mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Re-organize gradle modules.
This commit is contained in:
committed by
jeffrey-signal
parent
f4863efb2e
commit
e162eb27c7
95
lib/libsignal-service/src/main/protowire/CDSI.proto
Normal file
95
lib/libsignal-service/src/main/protowire/CDSI.proto
Normal file
@@ -0,0 +1,95 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "org.signal.cdsi.proto";
|
||||
|
||||
package org.signal.cdsi;
|
||||
|
||||
message ClientRequest {
|
||||
// Each ACI/UAK pair is a 32-byte buffer, containing the 16-byte ACI followed
|
||||
// by its 16-byte UAK.
|
||||
bytes aciUakPairs = 1;
|
||||
|
||||
// Each E164 is an 8-byte big-endian number, as 8 bytes.
|
||||
bytes prevE164s = 2;
|
||||
bytes newE164s = 3;
|
||||
bytes discardE164s = 4;
|
||||
|
||||
// If true, the client has more pairs or e164s to send. If false or unset,
|
||||
// this is the client's last request, and processing should commence.
|
||||
// NOT NECESSARY FOR CDSI
|
||||
// bool has_more = 5;
|
||||
|
||||
// If set, a token which allows rate limiting to discount the e164s in
|
||||
// the request's prev_e164s, only counting new_e164s. If not set, then
|
||||
// rate limiting considers both prev_e164s' and new_e164s' size.
|
||||
bytes token = 6;
|
||||
|
||||
// After receiving a new token from the server, send back a message just
|
||||
// containing a token_ack.
|
||||
bool tokenAck = 7;
|
||||
|
||||
// Request that, if the server allows, both ACI and PNI be returned even
|
||||
// if the aci_uak_pairs don't match.
|
||||
bool returnAcisWithoutUaks = 8;
|
||||
}
|
||||
|
||||
message ClientResponse {
|
||||
// Each triple is an 8-byte e164, a 16-byte PNI, and a 16-byte ACI.
|
||||
// If the e164 was not found, PNI and ACI are all zeros. If the PNI
|
||||
// was found but the ACI was not, the PNI will be non-zero and the ACI
|
||||
// will be all zeros. ACI will be returned if one of the returned
|
||||
// PNIs has an ACI/UAK pair that matches.
|
||||
//
|
||||
// Should the request be successful (IE: a successful status returned),
|
||||
// |e164_pni_aci_triple| will always equal |e164| of the request,
|
||||
// so the entire marshalled size of the response will be (2+32)*|e164|,
|
||||
// where the additional 2 bytes are the id/type/length additions of the
|
||||
// protobuf marshaling added to each byte array. This avoids any data
|
||||
// leakage based on the size of the encrypted output.
|
||||
bytes e164PniAciTriples = 1;
|
||||
|
||||
// If the user has run out of quota for lookups, they will receive
|
||||
// a response with just the following field set, followed by a websocket
|
||||
// closure of type 4008 (RESOURCE_EXHAUSTED). Should they retry exactly
|
||||
// the same request after the provided number of seconds has passed,
|
||||
// we expect it should work.
|
||||
int32 retryAfterSecs = 2;
|
||||
|
||||
// A token which allows subsequent calls' rate limiting to discount the
|
||||
// e164s sent up in this request, only counting those in the next
|
||||
// request's new_e164s.
|
||||
bytes token = 3;
|
||||
|
||||
// On a successful response to a token_ack request, the number of permits
|
||||
// that were deducted from the user's rate-limit in order to process the
|
||||
// request
|
||||
int32 debugPermitsUsed = 4;
|
||||
}
|
||||
|
||||
message EnclaveLoad {
|
||||
// If set, before loading any tuples entirely clear the current map,
|
||||
// zero'ing out all current data.
|
||||
bool clearAll = 1;
|
||||
|
||||
// Each tuple is an 8-byte e164, a 16-byte PNI, a 16-byte ACI, and a
|
||||
// 16-byte UAK. These should be loaded as a 48-byte value (PNI,ACI,UAK)
|
||||
// associated with an 8-byte key (e164).
|
||||
// ACI/PNI/UAK may all be zeros, in which case this is a delete of the e164.
|
||||
bytes e164AciPniUakTuples = 2;
|
||||
|
||||
// If non-empty, overwrite the shared token secret with this value.
|
||||
bytes sharedTokenSecret = 3;
|
||||
}
|
||||
|
||||
message ClientHandshakeStart {
|
||||
// Public key associated with this server's enclave. For use in test-only
|
||||
// contexts where attestation is not available
|
||||
bytes testonlyPubkey = 1;
|
||||
|
||||
// Remote-attestation evidence associated with the public key
|
||||
bytes evidence = 2;
|
||||
|
||||
// Endorsements of remote-attestation evidence.
|
||||
bytes endorsement = 3;
|
||||
}
|
||||
100
lib/libsignal-service/src/main/protowire/CallQualitySurvey.proto
Normal file
100
lib/libsignal-service/src/main/protowire/CallQualitySurvey.proto
Normal file
@@ -0,0 +1,100 @@
|
||||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
|
||||
package org.signal.storageservice.protos.calls.quality;
|
||||
|
||||
message SubmitCallQualitySurveyRequest {
|
||||
// Indicates whether the caller was generally satisfied with the quality of
|
||||
// the call
|
||||
bool user_satisfied = 1;
|
||||
|
||||
// A list of call quality issues selected by the caller
|
||||
repeated string call_quality_issues = 2;
|
||||
|
||||
// A free-form description of any additional issues as written by the caller
|
||||
optional string additional_issues_description = 3;
|
||||
|
||||
// A URL for a set of debug logs associated with the call if the caller chose
|
||||
// to submit debug logs
|
||||
optional string debug_log_url = 4;
|
||||
|
||||
// The time at which the call started in microseconds since the epoch (see
|
||||
// https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type)
|
||||
int64 start_timestamp = 5;
|
||||
|
||||
// The time at which the call ended in microseconds since the epoch (see
|
||||
// https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type)
|
||||
int64 end_timestamp = 6;
|
||||
|
||||
// The type of call; note that direct voice calls can become video calls and
|
||||
// vice versa, and this field indicates which mode was selected at call
|
||||
// initiation time. At the time of writing, expected call types are
|
||||
// "direct_voice", "direct_video", "group", and "call_link".
|
||||
string call_type = 7;
|
||||
|
||||
// Indicates whether the call completed without error or if it terminated
|
||||
// abnormally
|
||||
bool success = 8;
|
||||
|
||||
// A client-defined, but human-readable reason for call termination
|
||||
string call_end_reason = 9;
|
||||
|
||||
// The median round-trip time, measured in milliseconds, for STUN/ICE packets
|
||||
// (i.e. connection maintenance and establishment)
|
||||
optional float connection_rtt_median = 10;
|
||||
|
||||
// The median round-trip time, measured in milliseconds, for RTP/RTCP packets
|
||||
// for audio streams
|
||||
optional float audio_rtt_median = 11;
|
||||
|
||||
// The median round-trip time, measured in milliseconds, for RTP/RTCP packets
|
||||
// for video streams
|
||||
optional float video_rtt_median = 12;
|
||||
|
||||
// The median jitter for audio streams, measured in milliseconds, for the
|
||||
// duration of the call as measured by the client submitting the survey
|
||||
optional float audio_recv_jitter_median = 13;
|
||||
|
||||
// The median jitter for video streams, measured in milliseconds, for the
|
||||
// duration of the call as measured by the client submitting the survey
|
||||
optional float video_recv_jitter_median = 14;
|
||||
|
||||
// The median jitter for audio streams, measured in milliseconds, for the
|
||||
// duration of the call as measured by the remote endpoint in the call (either
|
||||
// the peer of the client submitting the survey in a direct call or the SFU in
|
||||
// a group call)
|
||||
optional float audio_send_jitter_median = 15;
|
||||
|
||||
// The median jitter for video streams, measured in milliseconds, for the
|
||||
// duration of the call as measured by the remote endpoint in the call (either
|
||||
// the peer of the client submitting the survey in a direct call or the SFU in
|
||||
// a group call)
|
||||
optional float video_send_jitter_median = 16;
|
||||
|
||||
// The fraction of audio packets lost over the duration of the call as
|
||||
// measured by the client submitting the survey
|
||||
optional float audio_recv_packet_loss_fraction = 17;
|
||||
|
||||
// The fraction of video packets lost over the duration of the call as
|
||||
// measured by the client submitting the survey
|
||||
optional float video_recv_packet_loss_fraction = 18;
|
||||
|
||||
// The fraction of audio packets lost over the duration of the call as
|
||||
// measured by the remote endpoint in the call (either the peer of the client
|
||||
// submitting the survey in a direct call or the SFU in a group call)
|
||||
optional float audio_send_packet_loss_fraction = 19;
|
||||
|
||||
// The fraction of video packets lost over the duration of the call as
|
||||
// measured by the remote endpoint in the call (either the peer of the client
|
||||
// submitting the survey in a direct call or the SFU in a group call)
|
||||
optional float video_send_packet_loss_fraction = 20;
|
||||
|
||||
// Machine-generated telemetry from the call; this is a serialized protobuf
|
||||
// entity generated (and, critically, explained to the user!) by the calling
|
||||
// library
|
||||
optional bytes call_telemetry = 21;
|
||||
}
|
||||
129
lib/libsignal-service/src/main/protowire/DecryptedGroups.proto
Normal file
129
lib/libsignal-service/src/main/protowire/DecryptedGroups.proto
Normal file
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* Copyright (C) 2019 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto3";
|
||||
|
||||
option java_package = "org.signal.storageservice.protos.groups.local";
|
||||
option java_multiple_files = true;
|
||||
|
||||
import "Groups.proto";
|
||||
|
||||
// Decrypted version of Member
|
||||
// Keep field numbers in step
|
||||
message DecryptedMember {
|
||||
bytes aciBytes = 1;
|
||||
Member.Role role = 2;
|
||||
bytes profileKey = 3;
|
||||
uint32 joinedAtRevision = 5;
|
||||
bytes pniBytes = 6;
|
||||
}
|
||||
|
||||
message DecryptedPendingMember {
|
||||
bytes serviceIdBytes = 1;
|
||||
Member.Role role = 2;
|
||||
bytes addedByAci = 3;
|
||||
uint64 timestamp = 4;
|
||||
bytes serviceIdCipherText = 5;
|
||||
}
|
||||
|
||||
message DecryptedRequestingMember {
|
||||
bytes aciBytes = 1;
|
||||
bytes profileKey = 2;
|
||||
uint64 timestamp = 4;
|
||||
}
|
||||
|
||||
message DecryptedBannedMember {
|
||||
bytes serviceIdBytes = 1;
|
||||
uint64 timestamp = 2;
|
||||
}
|
||||
|
||||
message DecryptedPendingMemberRemoval {
|
||||
bytes serviceIdBytes = 1;
|
||||
bytes serviceIdCipherText = 2;
|
||||
}
|
||||
|
||||
message DecryptedApproveMember {
|
||||
bytes aciBytes = 1;
|
||||
Member.Role role = 2;
|
||||
}
|
||||
|
||||
message DecryptedModifyMemberRole {
|
||||
bytes aciBytes = 1;
|
||||
Member.Role role = 2;
|
||||
}
|
||||
|
||||
// Decrypted version of message Group
|
||||
// Keep field numbers in step
|
||||
message DecryptedGroup {
|
||||
string title = 2;
|
||||
string avatar = 3;
|
||||
DecryptedTimer disappearingMessagesTimer = 4;
|
||||
AccessControl accessControl = 5;
|
||||
uint32 revision = 6;
|
||||
repeated DecryptedMember members = 7;
|
||||
repeated DecryptedPendingMember pendingMembers = 8;
|
||||
repeated DecryptedRequestingMember requestingMembers = 9;
|
||||
bytes inviteLinkPassword = 10;
|
||||
string description = 11;
|
||||
EnabledState isAnnouncementGroup = 12;
|
||||
repeated DecryptedBannedMember bannedMembers = 13;
|
||||
bool isPlaceholderGroup = 64;
|
||||
}
|
||||
|
||||
// Decrypted version of message GroupChange.Actions
|
||||
// Keep field numbers in step
|
||||
message DecryptedGroupChange {
|
||||
bytes editorServiceIdBytes = 1;
|
||||
reserved 25; // groupId used only during verification + decrypt, only provided by server
|
||||
uint32 revision = 2;
|
||||
repeated DecryptedMember newMembers = 3;
|
||||
repeated bytes deleteMembers = 4;
|
||||
repeated DecryptedModifyMemberRole modifyMemberRoles = 5;
|
||||
repeated DecryptedMember modifiedProfileKeys = 6;
|
||||
repeated DecryptedPendingMember newPendingMembers = 7;
|
||||
repeated DecryptedPendingMemberRemoval deletePendingMembers = 8;
|
||||
repeated DecryptedMember promotePendingMembers = 9;
|
||||
DecryptedString newTitle = 10;
|
||||
DecryptedString newAvatar = 11;
|
||||
DecryptedTimer newTimer = 12;
|
||||
AccessControl.AccessRequired newAttributeAccess = 13;
|
||||
AccessControl.AccessRequired newMemberAccess = 14;
|
||||
AccessControl.AccessRequired newInviteLinkAccess = 15;
|
||||
repeated DecryptedRequestingMember newRequestingMembers = 16;
|
||||
repeated bytes deleteRequestingMembers = 17;
|
||||
repeated DecryptedApproveMember promoteRequestingMembers = 18;
|
||||
bytes newInviteLinkPassword = 19;
|
||||
DecryptedString newDescription = 20;
|
||||
EnabledState newIsAnnouncementGroup = 21;
|
||||
repeated DecryptedBannedMember newBannedMembers = 22;
|
||||
repeated DecryptedBannedMember deleteBannedMembers = 23;
|
||||
repeated DecryptedMember promotePendingPniAciMembers = 24;
|
||||
}
|
||||
|
||||
message DecryptedString {
|
||||
string value = 1;
|
||||
}
|
||||
|
||||
message DecryptedTimer {
|
||||
uint32 duration = 1;
|
||||
}
|
||||
|
||||
message DecryptedGroupJoinInfo {
|
||||
string title = 2;
|
||||
string avatar = 3;
|
||||
uint32 memberCount = 4;
|
||||
AccessControl.AccessRequired addFromInviteLink = 5;
|
||||
uint32 revision = 6;
|
||||
bool pendingAdminApproval = 7;
|
||||
string description = 8;
|
||||
bool isAnnouncementGroup = 9;
|
||||
}
|
||||
|
||||
enum EnabledState {
|
||||
UNKNOWN = 0;
|
||||
ENABLED = 1;
|
||||
DISABLED = 2;
|
||||
}
|
||||
|
||||
270
lib/libsignal-service/src/main/protowire/Groups.proto
Normal file
270
lib/libsignal-service/src/main/protowire/Groups.proto
Normal file
@@ -0,0 +1,270 @@
|
||||
/**
|
||||
* Copyright (C) 2019 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto3";
|
||||
|
||||
option java_package = "org.signal.storageservice.protos.groups";
|
||||
option java_multiple_files = true;
|
||||
|
||||
message AvatarUploadAttributes {
|
||||
string key = 1;
|
||||
string credential = 2;
|
||||
string acl = 3;
|
||||
string algorithm = 4;
|
||||
string date = 5;
|
||||
string policy = 6;
|
||||
string signature = 7;
|
||||
}
|
||||
|
||||
message Member {
|
||||
enum Role {
|
||||
UNKNOWN = 0;
|
||||
DEFAULT = 1;
|
||||
ADMINISTRATOR = 2;
|
||||
}
|
||||
|
||||
bytes userId = 1;
|
||||
Role role = 2;
|
||||
bytes profileKey = 3;
|
||||
bytes presentation = 4; // Only set when sending to server
|
||||
uint32 joinedAtRevision = 5;
|
||||
}
|
||||
|
||||
message PendingMember {
|
||||
Member member = 1;
|
||||
bytes addedByUserId = 2;
|
||||
uint64 timestamp = 3;
|
||||
}
|
||||
|
||||
message RequestingMember {
|
||||
bytes userId = 1;
|
||||
bytes profileKey = 2;
|
||||
bytes presentation = 3; // Only set when sending to server
|
||||
uint64 timestamp = 4;
|
||||
}
|
||||
|
||||
message BannedMember {
|
||||
bytes userId = 1;
|
||||
uint64 timestamp = 2;
|
||||
}
|
||||
|
||||
message AccessControl {
|
||||
enum AccessRequired {
|
||||
UNKNOWN = 0;
|
||||
ANY = 1;
|
||||
MEMBER = 2;
|
||||
ADMINISTRATOR = 3;
|
||||
UNSATISFIABLE = 4;
|
||||
}
|
||||
|
||||
AccessRequired attributes = 1;
|
||||
AccessRequired members = 2;
|
||||
AccessRequired addFromInviteLink = 3;
|
||||
}
|
||||
|
||||
message Group {
|
||||
bytes publicKey = 1;
|
||||
bytes title = 2;
|
||||
string avatar = 3;
|
||||
bytes disappearingMessagesTimer = 4;
|
||||
AccessControl accessControl = 5;
|
||||
uint32 revision = 6;
|
||||
repeated Member members = 7;
|
||||
repeated PendingMember pendingMembers = 8;
|
||||
repeated RequestingMember requestingMembers = 9;
|
||||
bytes inviteLinkPassword = 10;
|
||||
bytes description = 11;
|
||||
bool announcementsOnly = 12;
|
||||
repeated BannedMember bannedMembers = 13;
|
||||
}
|
||||
|
||||
message GroupChange {
|
||||
|
||||
message Actions {
|
||||
|
||||
message AddMemberAction {
|
||||
Member added = 1;
|
||||
bool joinFromInviteLink = 2;
|
||||
}
|
||||
|
||||
message DeleteMemberAction {
|
||||
bytes deletedUserId = 1;
|
||||
}
|
||||
|
||||
message ModifyMemberRoleAction {
|
||||
bytes userId = 1;
|
||||
Member.Role role = 2;
|
||||
}
|
||||
|
||||
message ModifyMemberProfileKeyAction {
|
||||
bytes presentation = 1; // Only set when sending to server
|
||||
bytes user_id = 2; // Only set when receiving from server
|
||||
bytes profile_key = 3; // Only set when receiving from server
|
||||
}
|
||||
|
||||
message AddPendingMemberAction {
|
||||
PendingMember added = 1;
|
||||
}
|
||||
|
||||
message DeletePendingMemberAction {
|
||||
bytes deletedUserId = 1;
|
||||
}
|
||||
|
||||
message PromotePendingMemberAction {
|
||||
bytes presentation = 1; // Only set when sending to server
|
||||
bytes user_id = 2; // Only set when receiving from server
|
||||
bytes profile_key = 3; // Only set when receiving from server
|
||||
}
|
||||
|
||||
message PromotePendingPniAciMemberProfileKeyAction {
|
||||
bytes presentation = 1; // Only set when sending to server
|
||||
bytes userId = 2; // Only set when receiving from server
|
||||
bytes pni = 3; // Only set when receiving from server
|
||||
bytes profileKey = 4; // Only set when receiving from server
|
||||
}
|
||||
|
||||
message AddRequestingMemberAction {
|
||||
RequestingMember added = 1;
|
||||
}
|
||||
|
||||
message DeleteRequestingMemberAction {
|
||||
bytes deletedUserId = 1;
|
||||
}
|
||||
|
||||
message PromoteRequestingMemberAction {
|
||||
bytes userId = 1;
|
||||
Member.Role role = 2;
|
||||
}
|
||||
|
||||
message AddBannedMemberAction {
|
||||
BannedMember added = 1;
|
||||
}
|
||||
|
||||
message DeleteBannedMemberAction {
|
||||
bytes deletedUserId = 1;
|
||||
}
|
||||
|
||||
message ModifyTitleAction {
|
||||
bytes title = 1;
|
||||
}
|
||||
|
||||
message ModifyDescriptionAction {
|
||||
bytes description = 1;
|
||||
}
|
||||
|
||||
message ModifyAvatarAction {
|
||||
string avatar = 1;
|
||||
}
|
||||
|
||||
message ModifyDisappearingMessagesTimerAction {
|
||||
bytes timer = 1;
|
||||
}
|
||||
|
||||
message ModifyAttributesAccessControlAction {
|
||||
AccessControl.AccessRequired attributesAccess = 1;
|
||||
}
|
||||
|
||||
message ModifyMembersAccessControlAction {
|
||||
AccessControl.AccessRequired membersAccess = 1;
|
||||
}
|
||||
|
||||
message ModifyAddFromInviteLinkAccessControlAction {
|
||||
AccessControl.AccessRequired addFromInviteLinkAccess = 1;
|
||||
}
|
||||
|
||||
message ModifyInviteLinkPasswordAction {
|
||||
bytes inviteLinkPassword = 1;
|
||||
}
|
||||
|
||||
message ModifyAnnouncementsOnlyAction {
|
||||
bool announcementsOnly = 1;
|
||||
}
|
||||
|
||||
bytes sourceServiceId = 1;
|
||||
bytes groupId = 25; // Only set when receiving from server
|
||||
uint32 revision = 2;
|
||||
repeated AddMemberAction addMembers = 3;
|
||||
repeated DeleteMemberAction deleteMembers = 4;
|
||||
repeated ModifyMemberRoleAction modifyMemberRoles = 5;
|
||||
repeated ModifyMemberProfileKeyAction modifyMemberProfileKeys = 6;
|
||||
repeated AddPendingMemberAction addPendingMembers = 7;
|
||||
repeated DeletePendingMemberAction deletePendingMembers = 8;
|
||||
repeated PromotePendingMemberAction promotePendingMembers = 9;
|
||||
ModifyTitleAction modifyTitle = 10;
|
||||
ModifyAvatarAction modifyAvatar = 11;
|
||||
ModifyDisappearingMessagesTimerAction modifyDisappearingMessagesTimer = 12;
|
||||
ModifyAttributesAccessControlAction modifyAttributesAccess = 13;
|
||||
ModifyMembersAccessControlAction modifyMemberAccess = 14;
|
||||
ModifyAddFromInviteLinkAccessControlAction modifyAddFromInviteLinkAccess = 15;
|
||||
repeated AddRequestingMemberAction addRequestingMembers = 16;
|
||||
repeated DeleteRequestingMemberAction deleteRequestingMembers = 17;
|
||||
repeated PromoteRequestingMemberAction promoteRequestingMembers = 18;
|
||||
ModifyInviteLinkPasswordAction modifyInviteLinkPassword = 19;
|
||||
ModifyDescriptionAction modifyDescription = 20;
|
||||
ModifyAnnouncementsOnlyAction modifyAnnouncementsOnly = 21;
|
||||
repeated AddBannedMemberAction addBannedMembers = 22;
|
||||
repeated DeleteBannedMemberAction deleteBannedMembers = 23;
|
||||
repeated PromotePendingPniAciMemberProfileKeyAction promotePendingPniAciMembers = 24;
|
||||
}
|
||||
|
||||
bytes actions = 1;
|
||||
bytes serverSignature = 2;
|
||||
uint32 changeEpoch = 3;
|
||||
}
|
||||
|
||||
message GroupResponse {
|
||||
Group group = 1;
|
||||
bytes groupSendEndorsementsResponse = 2;
|
||||
}
|
||||
|
||||
message GroupChanges {
|
||||
message GroupChangeState {
|
||||
GroupChange groupChange = 1;
|
||||
Group groupState = 2;
|
||||
}
|
||||
|
||||
repeated GroupChangeState groupChanges = 1;
|
||||
bytes groupSendEndorsementsResponse = 2;
|
||||
}
|
||||
|
||||
message GroupChangeResponse {
|
||||
GroupChange groupChange = 1;
|
||||
bytes groupSendEndorsementsResponse = 2;
|
||||
}
|
||||
|
||||
message GroupAttributeBlob {
|
||||
oneof content {
|
||||
string title = 1;
|
||||
bytes avatar = 2;
|
||||
uint32 disappearingMessagesDuration = 3;
|
||||
string description = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message GroupInviteLink {
|
||||
message GroupInviteLinkContentsV1 {
|
||||
bytes groupMasterKey = 1;
|
||||
bytes inviteLinkPassword = 2;
|
||||
}
|
||||
|
||||
oneof contents {
|
||||
GroupInviteLinkContentsV1 v1Contents = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message GroupJoinInfo {
|
||||
bytes publicKey = 1;
|
||||
bytes title = 2;
|
||||
string avatar = 3;
|
||||
uint32 memberCount = 4;
|
||||
AccessControl.AccessRequired addFromInviteLink = 5;
|
||||
uint32 revision = 6;
|
||||
bool pendingAdminApproval = 7;
|
||||
bytes description = 8;
|
||||
}
|
||||
|
||||
message GroupExternalCredential {
|
||||
string token = 1;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Copyright (C) 2019 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto2";
|
||||
|
||||
package textsecure;
|
||||
|
||||
import "SignalService.proto";
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.serialize.protos";
|
||||
option java_multiple_files = true;
|
||||
|
||||
message SignalServiceContentProto {
|
||||
optional AddressProto localAddress = 1;
|
||||
optional MetadataProto metadata = 2;
|
||||
oneof data {
|
||||
signalservice.DataMessage legacyDataMessage = 3;
|
||||
signalservice.Content content = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message MetadataProto {
|
||||
optional AddressProto address = 1;
|
||||
optional int32 senderDevice = 2;
|
||||
optional int64 timestamp = 3;
|
||||
optional int64 serverReceivedTimestamp = 5;
|
||||
optional int64 serverDeliveredTimestamp = 6;
|
||||
optional bool needsReceipt = 4;
|
||||
optional string serverGuid = 7;
|
||||
optional bytes groupId = 8;
|
||||
optional string destinationUuid = 9;
|
||||
}
|
||||
|
||||
message AddressProto {
|
||||
optional bytes uuid = 1;
|
||||
optional string e164 = 2;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright (C) 2014-2016 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.api.crypto.protos";
|
||||
|
||||
message EnvelopeMetadata {
|
||||
required bytes sourceServiceId = 1;
|
||||
optional string sourceE164 = 2;
|
||||
required int32 sourceDeviceId = 3;
|
||||
required bool sealedSender = 4;
|
||||
optional bytes groupId = 5;
|
||||
required bytes destinationServiceId = 6;
|
||||
}
|
||||
|
||||
message CompleteMessage {
|
||||
required bytes envelope = 1;
|
||||
required bytes content = 2;
|
||||
required EnvelopeMetadata metadata = 3;
|
||||
required int64 serverDeliveredTimestamp = 4;
|
||||
}
|
||||
56
lib/libsignal-service/src/main/protowire/Provisioning.proto
Normal file
56
lib/libsignal-service/src/main/protowire/Provisioning.proto
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright 2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.push";
|
||||
option java_outer_classname = "ProvisioningProtos";
|
||||
|
||||
// An opaque address sent by the server when clients first open a provisioning
|
||||
// WebSocket
|
||||
message ProvisioningAddress {
|
||||
|
||||
// The opaque provisioning address for the active provisioning WebSocket
|
||||
// session; clients should not attempt to interpret or modify the contents
|
||||
// of the address string
|
||||
optional string address = 1;
|
||||
}
|
||||
|
||||
message ProvisionEnvelope {
|
||||
optional bytes publicKey = 1;
|
||||
optional bytes body = 2; // Encrypted ProvisionMessage
|
||||
}
|
||||
|
||||
message ProvisionMessage {
|
||||
optional bytes aciIdentityKeyPublic = 1;
|
||||
optional bytes aciIdentityKeyPrivate = 2;
|
||||
optional bytes pniIdentityKeyPublic = 11;
|
||||
optional bytes pniIdentityKeyPrivate = 12;
|
||||
optional string aci = 8;
|
||||
optional string pni = 10;
|
||||
optional string number = 3;
|
||||
optional string provisioningCode = 4;
|
||||
optional string userAgent = 5;
|
||||
optional bytes profileKey = 6;
|
||||
optional bool readReceipts = 7;
|
||||
optional uint32 provisioningVersion = 9;
|
||||
optional bytes masterKey = 13; // Deprecated, but required by linked devices
|
||||
optional bytes ephemeralBackupKey = 14; // 32 bytes
|
||||
optional string accountEntropyPool = 15;
|
||||
optional bytes mediaRootBackupKey = 16; // 32-bytes
|
||||
optional bytes aciBinary = 17; // 16-byte UUID
|
||||
optional bytes pniBinary = 18; // 16-byte UUID
|
||||
// NEXT ID: 19
|
||||
}
|
||||
|
||||
enum ProvisioningVersion {
|
||||
option allow_alias = true;
|
||||
|
||||
INITIAL = 0;
|
||||
TABLET_SUPPORT = 1;
|
||||
CURRENT = 1;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "org.signal.registration.proto";
|
||||
|
||||
message RegistrationProvisionEnvelope {
|
||||
bytes publicKey = 1;
|
||||
bytes body = 2; // Encrypted RegistrationProvisionMessage
|
||||
}
|
||||
|
||||
message RegistrationProvisionMessage {
|
||||
enum Platform {
|
||||
ANDROID = 0;
|
||||
IOS = 1;
|
||||
}
|
||||
|
||||
enum Tier {
|
||||
FREE = 0;
|
||||
PAID = 1;
|
||||
}
|
||||
|
||||
string e164 = 1;
|
||||
bytes aci = 2;
|
||||
string accountEntropyPool = 3;
|
||||
optional string pin = 4;
|
||||
Platform platform = 5;
|
||||
optional uint64 backupTimestampMs = 6;
|
||||
optional Tier tier = 7;
|
||||
optional uint64 backupSizeBytes = 8;
|
||||
string restoreMethodToken = 9;
|
||||
bytes aciIdentityKeyPublic = 10;
|
||||
bytes aciIdentityKeyPrivate = 11;
|
||||
bytes pniIdentityKeyPublic = 12;
|
||||
bytes pniIdentityKeyPrivate = 13;
|
||||
uint64 backupVersion = 14;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (C) 2020 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto3";
|
||||
|
||||
option java_package = "org.signal.protos.resumableuploads";
|
||||
|
||||
message ResumableUpload {
|
||||
message Header {
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
bytes secretKey = 1;
|
||||
bytes iv = 2;
|
||||
string cdnKey = 3;
|
||||
uint32 cdnNumber = 4;
|
||||
string location = 5;
|
||||
uint64 timeout = 6;
|
||||
repeated Header headers = 7;
|
||||
}
|
||||
99
lib/libsignal-service/src/main/protowire/SVR2.proto
Normal file
99
lib/libsignal-service/src/main/protowire/SVR2.proto
Normal file
@@ -0,0 +1,99 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "org.signal.svr2.proto";
|
||||
|
||||
message Request {
|
||||
reserved 1; // backupId, only used by server
|
||||
|
||||
oneof inner {
|
||||
BackupRequest backup = 2;
|
||||
ExposeRequest expose = 5;
|
||||
RestoreRequest restore = 3;
|
||||
DeleteRequest delete = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message Response {
|
||||
oneof inner {
|
||||
BackupResponse backup = 1;
|
||||
ExposeResponse expose = 4;
|
||||
RestoreResponse restore = 2;
|
||||
DeleteResponse delete = 3;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// backup
|
||||
//
|
||||
|
||||
message BackupRequest {
|
||||
bytes data = 1; // between 16 and 48 bytes
|
||||
bytes pin = 2; // 32 bytes
|
||||
uint32 maxTries = 3; // in range [1,255]
|
||||
}
|
||||
|
||||
message BackupResponse {
|
||||
enum Status {
|
||||
UNSET = 0; // never returned
|
||||
OK = 1; // successfully set db[backup_id]=data
|
||||
REQUEST_INVALID = 2; // the request was not correctly specified
|
||||
}
|
||||
|
||||
Status status = 1;
|
||||
}
|
||||
|
||||
//
|
||||
// restore
|
||||
//
|
||||
|
||||
message RestoreRequest {
|
||||
bytes pin = 1; // 32 bytes
|
||||
}
|
||||
|
||||
message RestoreResponse {
|
||||
enum Status {
|
||||
UNSET = 0; // never returned
|
||||
OK = 1; // successfully restored, [data] will be set
|
||||
MISSING = 2; // db[backup_id] does not exist
|
||||
PIN_MISMATCH = 3; // pin did not match, tries were decremented
|
||||
REQUEST_INVALID = 4; // the request was not correctly specified, tries were not decremented
|
||||
}
|
||||
|
||||
Status status = 1;
|
||||
bytes data = 2; // between 16 and 48 bytes, if set
|
||||
uint32 tries = 3; // in range [0,255]
|
||||
}
|
||||
|
||||
//
|
||||
// delete
|
||||
//
|
||||
|
||||
message DeleteRequest {
|
||||
}
|
||||
|
||||
message DeleteResponse {
|
||||
}
|
||||
|
||||
message ExposeRequest {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
//
|
||||
// expose
|
||||
//
|
||||
|
||||
message ExposeResponse {
|
||||
enum Status {
|
||||
UNSET = 0; // never returned
|
||||
OK = 1; // successfully restored, [data] will be set
|
||||
|
||||
// If this status comes back after a successful Backup() call,
|
||||
// this should be cause for concern.
|
||||
// It means that someone has either reset, deleted, or tried to brute-force
|
||||
// the backup since it was created.
|
||||
ERROR = 2;
|
||||
}
|
||||
|
||||
Status status = 1;
|
||||
}
|
||||
936
lib/libsignal-service/src/main/protowire/SignalService.proto
Normal file
936
lib/libsignal-service/src/main/protowire/SignalService.proto
Normal file
@@ -0,0 +1,936 @@
|
||||
/*
|
||||
* Copyright 2020-2022 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.push";
|
||||
option java_outer_classname = "SignalServiceProtos";
|
||||
|
||||
message Envelope {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
CIPHERTEXT = 1; // content => (version byte | SignalMessage{Content})
|
||||
reserved 2;
|
||||
reserved "KEY_EXCHANGE";
|
||||
PREKEY_BUNDLE = 3; // content => (version byte | PreKeySignalMessage{Content})
|
||||
SERVER_DELIVERY_RECEIPT = 5; // legacyMessage => [] AND content => []
|
||||
UNIDENTIFIED_SENDER = 6; // legacyMessage => [] AND content => ((version byte | UnidentifiedSenderMessage) OR (version byte | Multi-Recipient Sealed Sender Format))
|
||||
SENDERKEY_MESSAGE = 7; // legacyMessage => [] AND content => (version byte | SenderKeyMessage)
|
||||
PLAINTEXT_CONTENT = 8; // legacyMessage => [] AND content => (marker byte | Content)
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
reserved 2; // formerly optional string sourceE164 = 2;
|
||||
optional string sourceServiceId = 11;
|
||||
optional uint32 sourceDevice = 7;
|
||||
optional string destinationServiceId = 13;
|
||||
reserved 3; // formerly optional string relay = 3;
|
||||
optional uint64 timestamp = 5;
|
||||
reserved 6; // formerly optional bytes legacyMessage = 6; // Contains an encrypted DataMessage; this field could have been set historically for type 1 or 3 messages; no longer in use
|
||||
optional bytes content = 8; // Contains an encrypted Content
|
||||
optional string serverGuid = 9;
|
||||
optional uint64 serverTimestamp = 10;
|
||||
optional bool ephemeral = 12; // indicates that the message should not be persisted if the recipient is offline
|
||||
optional bool urgent = 14 [default = true]; // indicates that the content is considered timely by the sender; defaults to true so senders have to opt-out to say something isn't time critical
|
||||
optional string updatedPni = 15; // for number-change synchronization messages, provides the new server-assigned phone number identifier associated with the changed number
|
||||
optional bool story = 16; // indicates that the content is a story.
|
||||
optional bytes report_spam_token = 17; // token sent when reporting spam
|
||||
reserved 18; // internal server use
|
||||
optional bytes sourceServiceIdBinary = 19; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
optional bytes destinationServiceIdBinary = 20; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
optional bytes serverGuidBinary = 21; // 16-byte UUID
|
||||
optional bytes updatedPniBinary = 22; // 16-byte UUID
|
||||
// next: 22
|
||||
}
|
||||
|
||||
message Content {
|
||||
optional DataMessage dataMessage = 1;
|
||||
optional SyncMessage syncMessage = 2;
|
||||
optional CallMessage callMessage = 3;
|
||||
optional NullMessage nullMessage = 4;
|
||||
optional ReceiptMessage receiptMessage = 5;
|
||||
optional TypingMessage typingMessage = 6;
|
||||
optional bytes /* SenderKeyDistributionMessage */ senderKeyDistributionMessage = 7;
|
||||
optional bytes /* DecryptionErrorMessage */ decryptionErrorMessage = 8;
|
||||
optional StoryMessage storyMessage = 9;
|
||||
optional PniSignatureMessage pniSignatureMessage = 10;
|
||||
optional EditMessage editMessage = 11;
|
||||
}
|
||||
|
||||
message CallMessage {
|
||||
message Offer {
|
||||
enum Type {
|
||||
OFFER_AUDIO_CALL = 0;
|
||||
OFFER_VIDEO_CALL = 1;
|
||||
reserved /* OFFER_NEED_PERMISSION */ 2; // removed
|
||||
}
|
||||
optional uint64 id = 1;
|
||||
reserved /* sdp */ 2;
|
||||
optional Type type = 3;
|
||||
optional bytes opaque = 4;
|
||||
}
|
||||
|
||||
message Answer {
|
||||
optional uint64 id = 1;
|
||||
reserved /* sdp */ 2;
|
||||
optional bytes opaque = 3;
|
||||
}
|
||||
|
||||
message IceUpdate {
|
||||
optional uint64 id = 1;
|
||||
reserved /* mid */ 2;
|
||||
reserved /* line */ 3;
|
||||
reserved /* sdp */ 4;
|
||||
optional bytes opaque = 5;
|
||||
}
|
||||
|
||||
message Busy {
|
||||
optional uint64 id = 1;
|
||||
}
|
||||
|
||||
message Hangup {
|
||||
enum Type {
|
||||
HANGUP_NORMAL = 0;
|
||||
HANGUP_ACCEPTED = 1;
|
||||
HANGUP_DECLINED = 2;
|
||||
HANGUP_BUSY = 3;
|
||||
HANGUP_NEED_PERMISSION = 4;
|
||||
}
|
||||
optional uint64 id = 1;
|
||||
optional Type type = 2;
|
||||
optional uint32 deviceId = 3;
|
||||
}
|
||||
|
||||
message Opaque {
|
||||
enum Urgency {
|
||||
DROPPABLE = 0;
|
||||
HANDLE_IMMEDIATELY = 1;
|
||||
}
|
||||
optional bytes data = 1;
|
||||
optional Urgency urgency = 2; // If missing, treat as DROPPABLE.
|
||||
}
|
||||
|
||||
optional Offer offer = 1;
|
||||
optional Answer answer = 2;
|
||||
repeated IceUpdate iceUpdate = 3;
|
||||
reserved /* legacyHangup */ 4;
|
||||
optional Busy busy = 5;
|
||||
reserved /* profileKey */ 6;
|
||||
optional Hangup hangup = 7;
|
||||
reserved /* multiRing */ 8;
|
||||
optional uint32 destinationDeviceId = 9;
|
||||
optional Opaque opaque = 10;
|
||||
}
|
||||
|
||||
message DataMessage {
|
||||
enum Flags {
|
||||
END_SESSION = 1;
|
||||
EXPIRATION_TIMER_UPDATE = 2;
|
||||
PROFILE_KEY_UPDATE = 4;
|
||||
FORWARD = 8;
|
||||
}
|
||||
|
||||
message Payment {
|
||||
message Amount {
|
||||
message MobileCoin {
|
||||
optional uint64 picoMob = 1; // 1,000,000,000,000 picoMob per Mob
|
||||
}
|
||||
|
||||
oneof Amount {
|
||||
MobileCoin mobileCoin = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message Notification {
|
||||
message MobileCoin {
|
||||
optional bytes receipt = 1;
|
||||
}
|
||||
|
||||
oneof Transaction {
|
||||
MobileCoin mobileCoin = 1;
|
||||
}
|
||||
|
||||
// Optional, Refers to the PaymentRequest message, if any.
|
||||
optional string note = 2;
|
||||
reserved /*requestId*/ 1003;
|
||||
}
|
||||
|
||||
message Activation {
|
||||
enum Type {
|
||||
REQUEST = 0;
|
||||
ACTIVATED = 1;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
}
|
||||
|
||||
oneof Item {
|
||||
Notification notification = 1;
|
||||
Activation activation = 2;
|
||||
}
|
||||
|
||||
reserved /*request*/ 1002;
|
||||
reserved /*cancellation*/ 1003;
|
||||
}
|
||||
|
||||
message Quote {
|
||||
enum Type {
|
||||
NORMAL = 0;
|
||||
GIFT_BADGE = 1;
|
||||
POLL = 2;
|
||||
}
|
||||
|
||||
message QuotedAttachment {
|
||||
optional string contentType = 1;
|
||||
optional string fileName = 2;
|
||||
optional AttachmentPointer thumbnail = 3;
|
||||
}
|
||||
|
||||
optional uint64 id = 1;
|
||||
reserved /*authorE164*/ 2;
|
||||
optional string authorAci = 5;
|
||||
optional string text = 3;
|
||||
repeated QuotedAttachment attachments = 4;
|
||||
repeated BodyRange bodyRanges = 6;
|
||||
optional Type type = 7;
|
||||
optional bytes authorAciBinary = 8; // 16-byte UUID
|
||||
}
|
||||
|
||||
message Contact {
|
||||
message Name {
|
||||
optional string givenName = 1;
|
||||
optional string familyName = 2;
|
||||
optional string prefix = 3;
|
||||
optional string suffix = 4;
|
||||
optional string middleName = 5;
|
||||
reserved /*displayName*/ 6;
|
||||
optional string nickname = 7;
|
||||
}
|
||||
|
||||
message Phone {
|
||||
enum Type {
|
||||
HOME = 1;
|
||||
MOBILE = 2;
|
||||
WORK = 3;
|
||||
CUSTOM = 4;
|
||||
}
|
||||
|
||||
optional string value = 1;
|
||||
optional Type type = 2;
|
||||
optional string label = 3;
|
||||
}
|
||||
|
||||
message Email {
|
||||
enum Type {
|
||||
HOME = 1;
|
||||
MOBILE = 2;
|
||||
WORK = 3;
|
||||
CUSTOM = 4;
|
||||
}
|
||||
|
||||
optional string value = 1;
|
||||
optional Type type = 2;
|
||||
optional string label = 3;
|
||||
}
|
||||
|
||||
message PostalAddress {
|
||||
enum Type {
|
||||
HOME = 1;
|
||||
WORK = 2;
|
||||
CUSTOM = 3;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
optional string label = 2;
|
||||
optional string street = 3;
|
||||
optional string pobox = 4;
|
||||
optional string neighborhood = 5;
|
||||
optional string city = 6;
|
||||
optional string region = 7;
|
||||
optional string postcode = 8;
|
||||
optional string country = 9;
|
||||
}
|
||||
|
||||
message Avatar {
|
||||
optional AttachmentPointer avatar = 1;
|
||||
optional bool isProfile = 2;
|
||||
}
|
||||
|
||||
optional Name name = 1;
|
||||
repeated Phone number = 3;
|
||||
repeated Email email = 4;
|
||||
repeated PostalAddress address = 5;
|
||||
optional Avatar avatar = 6;
|
||||
optional string organization = 7;
|
||||
}
|
||||
|
||||
message Sticker {
|
||||
optional bytes packId = 1;
|
||||
optional bytes packKey = 2;
|
||||
optional uint32 stickerId = 3;
|
||||
optional AttachmentPointer data = 4;
|
||||
optional string emoji = 5;
|
||||
}
|
||||
|
||||
message Reaction {
|
||||
optional string emoji = 1;
|
||||
optional bool remove = 2;
|
||||
reserved /* targetAuthorE164 */ 3;
|
||||
optional string targetAuthorAci = 4;
|
||||
optional uint64 targetSentTimestamp = 5;
|
||||
optional bytes targetAuthorAciBinary = 6; // 16-byte UUID
|
||||
}
|
||||
|
||||
message Delete {
|
||||
optional uint64 targetSentTimestamp = 1;
|
||||
}
|
||||
|
||||
message GroupCallUpdate {
|
||||
optional string eraId = 1;
|
||||
}
|
||||
|
||||
message StoryContext {
|
||||
optional string authorAci = 1;
|
||||
optional uint64 sentTimestamp = 2;
|
||||
optional bytes authorAciBinary = 3; // 16-byte UUID
|
||||
}
|
||||
|
||||
enum ProtocolVersion {
|
||||
option allow_alias = true;
|
||||
|
||||
INITIAL = 0;
|
||||
MESSAGE_TIMERS = 1;
|
||||
VIEW_ONCE = 2;
|
||||
VIEW_ONCE_VIDEO = 3;
|
||||
REACTIONS = 4;
|
||||
CDN_SELECTOR_ATTACHMENTS = 5;
|
||||
MENTIONS = 6;
|
||||
PAYMENTS = 7;
|
||||
POLLS = 8;
|
||||
CURRENT = 8;
|
||||
}
|
||||
|
||||
message GiftBadge {
|
||||
optional bytes receiptCredentialPresentation = 1;
|
||||
}
|
||||
|
||||
message PollCreate {
|
||||
optional string question = 1;
|
||||
optional bool allowMultiple = 2;
|
||||
repeated string options = 3;
|
||||
}
|
||||
|
||||
message PollTerminate {
|
||||
optional uint64 targetSentTimestamp = 1;
|
||||
}
|
||||
|
||||
message PollVote {
|
||||
optional bytes targetAuthorAciBinary = 1;
|
||||
optional uint64 targetSentTimestamp = 2;
|
||||
repeated uint32 optionIndexes = 3; // must be in the range [0, options.length) from the PollCreate
|
||||
optional uint32 voteCount = 4; // increment this by 1 each time you vote on a given poll
|
||||
}
|
||||
|
||||
message PinMessage {
|
||||
optional bytes targetAuthorAciBinary = 1; // 16-byte UUID
|
||||
optional uint64 targetSentTimestamp = 2;
|
||||
oneof pinDuration {
|
||||
uint32 pinDurationSeconds = 3;
|
||||
bool pinDurationForever = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message UnpinMessage {
|
||||
optional bytes targetAuthorAciBinary = 1; // 16-byte UUID
|
||||
optional uint64 targetSentTimestamp = 2;
|
||||
}
|
||||
|
||||
optional string body = 1;
|
||||
repeated AttachmentPointer attachments = 2;
|
||||
reserved /*groupV1*/ 3;
|
||||
optional GroupContextV2 groupV2 = 15;
|
||||
optional uint32 flags = 4;
|
||||
optional uint32 expireTimer = 5;
|
||||
optional uint32 expireTimerVersion = 23;
|
||||
optional bytes profileKey = 6;
|
||||
optional uint64 timestamp = 7;
|
||||
optional Quote quote = 8;
|
||||
repeated Contact contact = 9;
|
||||
repeated Preview preview = 10;
|
||||
optional Sticker sticker = 11;
|
||||
optional uint32 requiredProtocolVersion = 12;
|
||||
optional bool isViewOnce = 14;
|
||||
optional Reaction reaction = 16;
|
||||
optional Delete delete = 17;
|
||||
repeated BodyRange bodyRanges = 18;
|
||||
optional GroupCallUpdate groupCallUpdate = 19;
|
||||
optional Payment payment = 20;
|
||||
optional StoryContext storyContext = 21;
|
||||
optional GiftBadge giftBadge = 22;
|
||||
optional PollCreate pollCreate = 24;
|
||||
optional PollTerminate pollTerminate = 25;
|
||||
optional PollVote pollVote = 26;
|
||||
optional PinMessage pinMessage = 27;
|
||||
optional UnpinMessage unpinMessage = 28;
|
||||
// NEXT ID: 29
|
||||
}
|
||||
|
||||
message NullMessage {
|
||||
optional bytes padding = 1;
|
||||
}
|
||||
|
||||
message ReceiptMessage {
|
||||
enum Type {
|
||||
DELIVERY = 0;
|
||||
READ = 1;
|
||||
VIEWED = 2;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
repeated uint64 timestamp = 2;
|
||||
}
|
||||
|
||||
message TypingMessage {
|
||||
enum Action {
|
||||
STARTED = 0;
|
||||
STOPPED = 1;
|
||||
}
|
||||
|
||||
optional uint64 timestamp = 1;
|
||||
optional Action action = 2;
|
||||
optional bytes groupId = 3;
|
||||
}
|
||||
|
||||
message StoryMessage {
|
||||
optional bytes profileKey = 1;
|
||||
optional GroupContextV2 group = 2;
|
||||
oneof attachment {
|
||||
AttachmentPointer fileAttachment = 3;
|
||||
TextAttachment textAttachment = 4;
|
||||
}
|
||||
optional bool allowsReplies = 5;
|
||||
repeated BodyRange bodyRanges = 6;
|
||||
}
|
||||
|
||||
message Preview {
|
||||
optional string url = 1;
|
||||
optional string title = 2;
|
||||
optional AttachmentPointer image = 3;
|
||||
optional string description = 4;
|
||||
optional uint64 date = 5;
|
||||
}
|
||||
|
||||
message TextAttachment {
|
||||
enum Style {
|
||||
DEFAULT = 0;
|
||||
REGULAR = 1;
|
||||
BOLD = 2;
|
||||
SERIF = 3;
|
||||
SCRIPT = 4;
|
||||
CONDENSED = 5;
|
||||
}
|
||||
|
||||
message Gradient {
|
||||
optional uint32 startColor = 1; // deprecated: this field will be removed in a future release.
|
||||
optional uint32 endColor = 2; // deprecated: this field will be removed in a future release.
|
||||
optional uint32 angle = 3; // degrees
|
||||
repeated uint32 colors = 4;
|
||||
repeated float positions = 5; // percent from 0 to 1
|
||||
}
|
||||
|
||||
optional string text = 1;
|
||||
optional Style textStyle = 2;
|
||||
optional uint32 textForegroundColor = 3; // integer representation of hex color
|
||||
optional uint32 textBackgroundColor = 4;
|
||||
optional Preview preview = 5;
|
||||
oneof background {
|
||||
Gradient gradient = 6;
|
||||
uint32 color = 7;
|
||||
}
|
||||
}
|
||||
|
||||
message Verified {
|
||||
enum State {
|
||||
DEFAULT = 0;
|
||||
VERIFIED = 1;
|
||||
UNVERIFIED = 2;
|
||||
}
|
||||
|
||||
reserved /*destinationE164*/ 1;
|
||||
optional string destinationAci = 5;
|
||||
optional bytes identityKey = 2;
|
||||
optional State state = 3;
|
||||
optional bytes nullMessage = 4;
|
||||
optional bytes destinationAciBinary = 6; // 16-byte UUID
|
||||
}
|
||||
|
||||
message SyncMessage {
|
||||
message Sent {
|
||||
message UnidentifiedDeliveryStatus {
|
||||
reserved /*destinationE164*/ 1;
|
||||
optional string destinationServiceId = 3;
|
||||
optional bool unidentified = 2;
|
||||
reserved /*destinationPni */ 4;
|
||||
optional bytes destinationPniIdentityKey = 5; // Only set for PNI destinations
|
||||
optional bytes destinationServiceIdBinary = 6; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
|
||||
message StoryMessageRecipient {
|
||||
optional string destinationServiceId = 1;
|
||||
repeated string distributionListIds = 2;
|
||||
optional bool isAllowedToReply = 3;
|
||||
reserved /*destinationPni */ 4;
|
||||
optional bytes destinationServiceIdBinary = 5; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
|
||||
optional string destinationE164 = 1;
|
||||
optional string destinationServiceId = 7;
|
||||
optional uint64 timestamp = 2;
|
||||
optional DataMessage message = 3;
|
||||
optional uint64 expirationStartTimestamp = 4;
|
||||
repeated UnidentifiedDeliveryStatus unidentifiedStatus = 5;
|
||||
optional bool isRecipientUpdate = 6 [default = false];
|
||||
optional StoryMessage storyMessage = 8;
|
||||
repeated StoryMessageRecipient storyMessageRecipients = 9;
|
||||
optional EditMessage editMessage = 10;
|
||||
reserved /*destinationPni */ 11;
|
||||
optional bytes destinationServiceIdBinary = 12; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
// Next ID: 13
|
||||
}
|
||||
|
||||
message Contacts {
|
||||
optional AttachmentPointer blob = 1;
|
||||
optional bool complete = 2 [default = false];
|
||||
}
|
||||
|
||||
message Blocked {
|
||||
repeated string numbers = 1;
|
||||
repeated string acis = 3;
|
||||
repeated bytes groupIds = 2;
|
||||
repeated bytes acisBinary = 4; // 16-byte UUID
|
||||
}
|
||||
|
||||
message Request {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
CONTACTS = 1;
|
||||
reserved /*GROUPS*/ 2;
|
||||
BLOCKED = 3;
|
||||
CONFIGURATION = 4;
|
||||
KEYS = 5;
|
||||
reserved /*PNI_IDENTITY*/ 6;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
}
|
||||
|
||||
message Read {
|
||||
reserved /*senderE164*/ 1;
|
||||
optional string senderAci = 3;
|
||||
optional uint64 timestamp = 2;
|
||||
optional bytes senderAciBinary = 4; // 16-byte UUID
|
||||
}
|
||||
|
||||
message Viewed {
|
||||
reserved /*senderE164*/ 1;
|
||||
optional string senderAci = 3;
|
||||
optional uint64 timestamp = 2;
|
||||
optional bytes senderAciBinary = 4; // 16-byte UUID
|
||||
}
|
||||
|
||||
message Configuration {
|
||||
optional bool readReceipts = 1;
|
||||
optional bool unidentifiedDeliveryIndicators = 2;
|
||||
optional bool typingIndicators = 3;
|
||||
reserved /* linkPreviews */ 4;
|
||||
optional uint32 provisioningVersion = 5;
|
||||
optional bool linkPreviews = 6;
|
||||
}
|
||||
|
||||
message StickerPackOperation {
|
||||
enum Type {
|
||||
INSTALL = 0;
|
||||
REMOVE = 1;
|
||||
}
|
||||
|
||||
optional bytes packId = 1;
|
||||
optional bytes packKey = 2;
|
||||
optional Type type = 3;
|
||||
}
|
||||
|
||||
message ViewOnceOpen {
|
||||
reserved /*senderE164*/ 1;
|
||||
optional string senderAci = 3;
|
||||
optional uint64 timestamp = 2;
|
||||
optional bytes senderAciBinary = 4; // 16-byte UUID
|
||||
}
|
||||
|
||||
message FetchLatest {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
LOCAL_PROFILE = 1;
|
||||
STORAGE_MANIFEST = 2;
|
||||
SUBSCRIPTION_STATUS = 3;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
}
|
||||
|
||||
message Keys {
|
||||
reserved /* storageService */ 1;
|
||||
optional bytes master = 2; // deprecated: this field will be removed in a future release.
|
||||
optional string accountEntropyPool = 3;
|
||||
optional bytes mediaRootBackupKey = 4;
|
||||
}
|
||||
|
||||
message PniIdentity {
|
||||
optional bytes publicKey = 1;
|
||||
optional bytes privateKey = 2;
|
||||
}
|
||||
|
||||
message MessageRequestResponse {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
ACCEPT = 1;
|
||||
DELETE = 2;
|
||||
BLOCK = 3;
|
||||
BLOCK_AND_DELETE = 4;
|
||||
SPAM = 5;
|
||||
BLOCK_AND_SPAM = 6;
|
||||
}
|
||||
|
||||
reserved /*threadE164*/ 1;
|
||||
optional string threadAci = 2;
|
||||
optional bytes groupId = 3;
|
||||
optional Type type = 4;
|
||||
optional bytes threadAciBinary = 5; // 16-byte UUID
|
||||
}
|
||||
|
||||
message OutgoingPayment {
|
||||
message MobileCoin {
|
||||
optional bytes recipientAddress = 1;
|
||||
optional uint64 amountPicoMob = 2;
|
||||
optional uint64 feePicoMob = 3;
|
||||
optional bytes receipt = 4;
|
||||
optional uint64 ledgerBlockTimestamp = 5;
|
||||
optional uint64 ledgerBlockIndex = 6;
|
||||
repeated bytes spentKeyImages = 7;
|
||||
repeated bytes outputPublicKeys = 8;
|
||||
}
|
||||
optional string recipientServiceId = 1;
|
||||
optional string note = 2;
|
||||
oneof attachment_identifier {
|
||||
MobileCoin mobileCoin = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message PniChangeNumber {
|
||||
optional bytes identityKeyPair = 1; // Serialized libsignal-client IdentityKeyPair
|
||||
optional bytes signedPreKey = 2; // Serialized libsignal-client SignedPreKeyRecord
|
||||
optional bytes lastResortKyberPreKey = 5; // Serialized libsignal-client KyberPreKeyRecord
|
||||
optional uint32 registrationId = 3;
|
||||
optional string newE164 = 4; // The e164 we have changed our number to
|
||||
// Next ID: 6
|
||||
}
|
||||
|
||||
message CallEvent {
|
||||
enum Type {
|
||||
UNKNOWN_TYPE = 0;
|
||||
AUDIO_CALL = 1;
|
||||
VIDEO_CALL = 2;
|
||||
GROUP_CALL = 3;
|
||||
AD_HOC_CALL = 4;
|
||||
}
|
||||
|
||||
enum Direction {
|
||||
UNKNOWN_DIRECTION = 0;
|
||||
INCOMING = 1;
|
||||
OUTGOING = 2;
|
||||
}
|
||||
|
||||
enum Event {
|
||||
UNKNOWN_EVENT = 0;
|
||||
ACCEPTED = 1;
|
||||
NOT_ACCEPTED = 2;
|
||||
DELETE = 3;
|
||||
OBSERVED = 4;
|
||||
}
|
||||
|
||||
/* Data identifying a conversation. The service ID for 1:1, the group ID for
|
||||
* group, or the room ID for an ad-hoc call. See also
|
||||
* `CallLogEvent/conversationId`. */
|
||||
optional bytes conversationId = 1;
|
||||
/* An identifier for a call. Generated directly for 1:1, or derived from
|
||||
* the era ID for group and ad-hoc calls. See also `CallLogEvent/callId`. */
|
||||
optional uint64 callId = 2;
|
||||
optional uint64 timestamp = 3;
|
||||
optional Type type = 4;
|
||||
optional Direction direction = 5;
|
||||
optional Event event = 6;
|
||||
}
|
||||
|
||||
message CallLinkUpdate {
|
||||
enum Type {
|
||||
UPDATE = 0;
|
||||
reserved 1; // was DELETE, superseded by storage service
|
||||
}
|
||||
|
||||
optional bytes rootKey = 1;
|
||||
optional bytes adminPasskey = 2;
|
||||
optional Type type = 3; // defaults to UPDATE
|
||||
optional bytes epoch = 4;
|
||||
}
|
||||
|
||||
message CallLogEvent {
|
||||
enum Type {
|
||||
CLEAR = 0;
|
||||
MARKED_AS_READ = 1;
|
||||
MARKED_AS_READ_IN_CONVERSATION = 2;
|
||||
CLEAR_IN_CONVERSATION = 3;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
optional uint64 timestamp = 2;
|
||||
/* Data identifying a conversation. The service ID for 1:1, the group ID for
|
||||
* group, or the room ID for an ad-hoc call. See also
|
||||
* `CallEvent/conversationId`. */
|
||||
optional bytes conversationId = 3;
|
||||
/* An identifier for a call. Generated directly for 1:1, or derived from
|
||||
* the era ID for group and ad-hoc calls. See also `CallEvent/callId`. */
|
||||
optional uint64 callId = 4;
|
||||
}
|
||||
|
||||
message DeleteForMe {
|
||||
message MessageDeletes {
|
||||
optional ConversationIdentifier conversation = 1;
|
||||
repeated AddressableMessage messages = 2;
|
||||
}
|
||||
|
||||
message AttachmentDelete {
|
||||
optional ConversationIdentifier conversation = 1;
|
||||
optional AddressableMessage targetMessage = 2;
|
||||
// The `clientUuid` from `AttachmentPointer`.
|
||||
optional bytes clientUuid = 3;
|
||||
// SHA256 hash of the (encrypted, padded, etc.) attachment blob on the CDN.
|
||||
optional bytes fallbackDigest = 4;
|
||||
// SHA256 hash of the plaintext content of the attachment.
|
||||
optional bytes fallbackPlaintextHash = 5;
|
||||
}
|
||||
|
||||
message ConversationDelete {
|
||||
optional ConversationIdentifier conversation = 1;
|
||||
repeated AddressableMessage mostRecentMessages = 2;
|
||||
optional bool isFullDelete = 3;
|
||||
repeated AddressableMessage mostRecentNonExpiringMessages = 4;
|
||||
}
|
||||
|
||||
message LocalOnlyConversationDelete {
|
||||
optional ConversationIdentifier conversation = 1;
|
||||
}
|
||||
|
||||
repeated MessageDeletes messageDeletes = 1;
|
||||
repeated ConversationDelete conversationDeletes = 2;
|
||||
repeated LocalOnlyConversationDelete localOnlyConversationDeletes = 3;
|
||||
repeated AttachmentDelete attachmentDeletes = 4;
|
||||
}
|
||||
|
||||
message DeviceNameChange {
|
||||
reserved /*name*/ 1;
|
||||
optional uint32 deviceId = 2;
|
||||
}
|
||||
|
||||
message AttachmentBackfillRequest {
|
||||
optional AddressableMessage targetMessage = 1;
|
||||
optional ConversationIdentifier targetConversation = 2;
|
||||
}
|
||||
|
||||
message AttachmentBackfillResponse {
|
||||
message AttachmentData {
|
||||
enum Status {
|
||||
PENDING = 0;
|
||||
TERMINAL_ERROR = 1;
|
||||
}
|
||||
|
||||
oneof data {
|
||||
AttachmentPointer attachment = 1;
|
||||
Status status = 2;
|
||||
}
|
||||
}
|
||||
|
||||
enum Error {
|
||||
MESSAGE_NOT_FOUND = 0;
|
||||
}
|
||||
|
||||
message AttachmentDataList {
|
||||
repeated AttachmentData attachments = 1;
|
||||
optional AttachmentData longText = 2;
|
||||
}
|
||||
|
||||
optional AddressableMessage targetMessage = 1;
|
||||
optional ConversationIdentifier targetConversation = 2;
|
||||
|
||||
oneof data {
|
||||
AttachmentDataList attachments = 3;
|
||||
Error error = 4;
|
||||
}
|
||||
}
|
||||
|
||||
optional Sent sent = 1;
|
||||
optional Contacts contacts = 2;
|
||||
reserved /*groups*/ 3;
|
||||
optional Request request = 4;
|
||||
repeated Read read = 5;
|
||||
optional Blocked blocked = 6;
|
||||
optional Verified verified = 7;
|
||||
optional Configuration configuration = 9;
|
||||
optional bytes padding = 8;
|
||||
repeated StickerPackOperation stickerPackOperation = 10;
|
||||
optional ViewOnceOpen viewOnceOpen = 11;
|
||||
optional FetchLatest fetchLatest = 12;
|
||||
optional Keys keys = 13;
|
||||
optional MessageRequestResponse messageRequestResponse = 14;
|
||||
optional OutgoingPayment outgoingPayment = 15;
|
||||
repeated Viewed viewed = 16;
|
||||
reserved /*pniIdentity*/ 17;
|
||||
optional PniChangeNumber pniChangeNumber = 18;
|
||||
optional CallEvent callEvent = 19;
|
||||
optional CallLinkUpdate callLinkUpdate = 20;
|
||||
optional CallLogEvent callLogEvent = 21;
|
||||
optional DeleteForMe deleteForMe = 22;
|
||||
optional DeviceNameChange deviceNameChange = 23;
|
||||
optional AttachmentBackfillRequest attachmentBackfillRequest = 24;
|
||||
optional AttachmentBackfillResponse attachmentBackfillResponse = 25;
|
||||
}
|
||||
|
||||
message AttachmentPointer {
|
||||
enum Flags {
|
||||
VOICE_MESSAGE = 1;
|
||||
BORDERLESS = 2;
|
||||
reserved 4;
|
||||
GIF = 8;
|
||||
}
|
||||
|
||||
oneof attachment_identifier {
|
||||
fixed64 cdnId = 1;
|
||||
string cdnKey = 15;
|
||||
}
|
||||
// Cross-client identifier for this attachment among all attachments on the
|
||||
// owning message.
|
||||
optional bytes clientUuid = 20;
|
||||
optional string contentType = 2;
|
||||
optional bytes key = 3;
|
||||
optional uint32 size = 4;
|
||||
optional bytes thumbnail = 5;
|
||||
optional bytes digest = 6;
|
||||
reserved /* incrementalMac with implicit chunk sizing */ 16;
|
||||
reserved /* incrementalMac for all attachment types */ 18;
|
||||
optional bytes incrementalMac = 19;
|
||||
optional uint32 chunkSize = 17;
|
||||
optional string fileName = 7;
|
||||
optional uint32 flags = 8;
|
||||
optional uint32 width = 9;
|
||||
optional uint32 height = 10;
|
||||
optional string caption = 11;
|
||||
optional string blurHash = 12;
|
||||
optional uint64 uploadTimestamp = 13;
|
||||
optional uint32 cdnNumber = 14;
|
||||
// Next ID: 21
|
||||
}
|
||||
|
||||
message GroupContextV2 {
|
||||
optional bytes masterKey = 1;
|
||||
optional uint32 revision = 2;
|
||||
optional bytes groupChange = 3;
|
||||
}
|
||||
|
||||
message ContactDetails {
|
||||
message Avatar {
|
||||
optional string contentType = 1;
|
||||
optional uint32 length = 2;
|
||||
}
|
||||
|
||||
optional string number = 1;
|
||||
optional string aci = 9;
|
||||
optional bytes aciBinary = 13; // 16-byte UUID
|
||||
optional string name = 2;
|
||||
optional Avatar avatar = 3;
|
||||
reserved /* color */ 4;
|
||||
reserved /* verified */ 5;
|
||||
reserved /* profileKey */ 6;
|
||||
reserved /* blocked */ 7;
|
||||
optional uint32 expireTimer = 8;
|
||||
optional uint32 expireTimerVersion = 12;
|
||||
optional uint32 inboxPosition = 10;
|
||||
reserved /* archived */ 11;
|
||||
// NEXT ID: 14
|
||||
}
|
||||
|
||||
message PaymentAddress {
|
||||
message MobileCoin {
|
||||
optional bytes publicAddress = 1;
|
||||
optional bytes signature = 2;
|
||||
}
|
||||
|
||||
oneof Address {
|
||||
MobileCoin mobileCoin = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message DecryptionErrorMessage {
|
||||
optional bytes ratchetKey = 1; // set to the public ratchet key from the SignalMessage if a 1-1 payload fails to decrypt
|
||||
optional uint64 timestamp = 2;
|
||||
optional uint32 deviceId = 3;
|
||||
}
|
||||
|
||||
message PniSignatureMessage {
|
||||
optional bytes pni = 1;
|
||||
// Signature *by* the PNI identity key *of* the ACI identity key
|
||||
optional bytes signature = 2;
|
||||
}
|
||||
|
||||
message EditMessage {
|
||||
optional uint64 targetSentTimestamp = 1;
|
||||
optional DataMessage dataMessage = 2;
|
||||
}
|
||||
|
||||
message BodyRange {
|
||||
enum Style {
|
||||
NONE = 0;
|
||||
BOLD = 1;
|
||||
ITALIC = 2;
|
||||
SPOILER = 3;
|
||||
STRIKETHROUGH = 4;
|
||||
MONOSPACE = 5;
|
||||
}
|
||||
|
||||
optional uint32 start = 1; // Starting index in UTF-16 code units/raw string representation
|
||||
optional uint32 length = 2; // Length of range in UTF-16 code units/raw string representation
|
||||
|
||||
oneof associatedValue {
|
||||
string mentionAci = 3;
|
||||
Style style = 4;
|
||||
bytes mentionAciBinary = 5; // 16-byte UUID
|
||||
}
|
||||
}
|
||||
|
||||
message AddressableMessage {
|
||||
oneof author {
|
||||
string authorServiceId = 1;
|
||||
string authorE164 = 2;
|
||||
bytes authorServiceIdBinary = 4; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
optional uint64 sentTimestamp = 3;
|
||||
}
|
||||
|
||||
message ConversationIdentifier {
|
||||
oneof identifier {
|
||||
string threadServiceId = 1;
|
||||
bytes threadGroupId = 2;
|
||||
string threadE164 = 3;
|
||||
bytes threadServiceIdBinary = 4; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2020-2022 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file contains protos that were removed from SignalService.proto, but are still needed by our application,
|
||||
* typically for serialization purposes.
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.push";
|
||||
option java_outer_classname = "SignalServiceProtos";
|
||||
|
||||
import SignalService.proto;
|
||||
|
||||
message GroupContext {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
UPDATE = 1;
|
||||
DELIVER = 2;
|
||||
QUIT = 3;
|
||||
REQUEST_INFO = 4;
|
||||
}
|
||||
|
||||
message Member {
|
||||
reserved /* uuid */ 1; // removed
|
||||
optional string e164 = 2;
|
||||
}
|
||||
|
||||
optional bytes id = 1;
|
||||
optional Type type = 2;
|
||||
optional string name = 3;
|
||||
repeated string membersE164 = 4;
|
||||
repeated Member members = 6;
|
||||
optional signalservice.AttachmentPointer avatar = 5;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (C) 2019 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.sticker";
|
||||
option java_outer_classname = "StickerProtos";
|
||||
|
||||
message Pack {
|
||||
message Sticker {
|
||||
optional uint32 id = 1;
|
||||
optional string emoji = 2;
|
||||
optional string contentType = 3;
|
||||
}
|
||||
|
||||
optional string title = 1;
|
||||
optional string author = 2;
|
||||
optional Sticker cover = 3;
|
||||
repeated Sticker stickers = 4;
|
||||
}
|
||||
|
||||
376
lib/libsignal-service/src/main/protowire/StorageService.proto
Normal file
376
lib/libsignal-service/src/main/protowire/StorageService.proto
Normal file
@@ -0,0 +1,376 @@
|
||||
/**
|
||||
* Copyright (C) 2019 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto3";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.storage.protos";
|
||||
option java_multiple_files = true;
|
||||
|
||||
enum OptionalBool {
|
||||
UNSET = 0;
|
||||
ENABLED = 1;
|
||||
DISABLED = 2;
|
||||
}
|
||||
|
||||
message StorageManifest {
|
||||
uint64 version = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
message StorageItem {
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
message StorageItems {
|
||||
repeated StorageItem items = 1;
|
||||
}
|
||||
|
||||
message ReadOperation {
|
||||
repeated bytes readKey = 1;
|
||||
}
|
||||
|
||||
message WriteOperation {
|
||||
StorageManifest manifest = 1;
|
||||
repeated StorageItem insertItem = 2;
|
||||
repeated bytes deleteKey = 3;
|
||||
bool clearAll = 4;
|
||||
}
|
||||
|
||||
message ManifestRecord {
|
||||
message Identifier {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
CONTACT = 1;
|
||||
GROUPV1 = 2;
|
||||
GROUPV2 = 3;
|
||||
ACCOUNT = 4;
|
||||
STORY_DISTRIBUTION_LIST = 5;
|
||||
CALL_LINK = 7;
|
||||
CHAT_FOLDER = 8;
|
||||
NOTIFICATION_PROFILE = 9;
|
||||
}
|
||||
|
||||
bytes raw = 1;
|
||||
Type type = 2;
|
||||
}
|
||||
|
||||
uint64 version = 1;
|
||||
uint32 sourceDevice = 3;
|
||||
repeated Identifier identifiers = 2;
|
||||
bytes recordIkm = 4;
|
||||
// Next ID: 5
|
||||
}
|
||||
|
||||
message StorageRecord {
|
||||
oneof record {
|
||||
ContactRecord contact = 1;
|
||||
GroupV1Record groupV1 = 2;
|
||||
GroupV2Record groupV2 = 3;
|
||||
AccountRecord account = 4;
|
||||
StoryDistributionListRecord storyDistributionList = 5;
|
||||
CallLinkRecord callLink = 7;
|
||||
ChatFolderRecord chatFolder = 8;
|
||||
NotificationProfile notificationProfile = 9;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If unset - computed as the value of the first byte of SHA-256(msg=CONTACT_ID)
|
||||
// modulo the count of colors. Once set the avatar color for a recipient is
|
||||
// never recomputed or changed.
|
||||
//
|
||||
// `CONTACT_ID` is the first available identifier from the list:
|
||||
// - ServiceIdToBinary(ACI)
|
||||
// - E164
|
||||
// - ServiceIdToBinary(PNI)
|
||||
// - Group Id
|
||||
enum AvatarColor {
|
||||
A100 = 0;
|
||||
A110 = 1;
|
||||
A120 = 2;
|
||||
A130 = 3;
|
||||
A140 = 4;
|
||||
A150 = 5;
|
||||
A160 = 6;
|
||||
A170 = 7;
|
||||
A180 = 8;
|
||||
A190 = 9;
|
||||
A200 = 10;
|
||||
A210 = 11;
|
||||
}
|
||||
|
||||
message ContactRecord {
|
||||
enum IdentityState {
|
||||
DEFAULT = 0;
|
||||
VERIFIED = 1;
|
||||
UNVERIFIED = 2;
|
||||
}
|
||||
|
||||
message Name {
|
||||
string given = 1;
|
||||
string family = 2;
|
||||
}
|
||||
|
||||
string aci = 1;
|
||||
string e164 = 2;
|
||||
string pni = 15;
|
||||
bytes profileKey = 3;
|
||||
bytes identityKey = 4;
|
||||
IdentityState identityState = 5;
|
||||
string givenName = 6;
|
||||
string familyName = 7;
|
||||
string username = 8;
|
||||
bool blocked = 9;
|
||||
bool whitelisted = 10;
|
||||
bool archived = 11;
|
||||
bool markedUnread = 12;
|
||||
uint64 mutedUntilTimestamp = 13;
|
||||
bool hideStory = 14;
|
||||
uint64 unregisteredAtTimestamp = 16;
|
||||
string systemGivenName = 17;
|
||||
string systemFamilyName = 18;
|
||||
string systemNickname = 19;
|
||||
bool hidden = 20;
|
||||
bool pniSignatureVerified = 21;
|
||||
Name nickname = 22;
|
||||
string note = 23;
|
||||
optional AvatarColor avatarColor = 24;
|
||||
bytes aciBinary = 25; // 16-byte UUID
|
||||
bytes pniBinary = 26; // 16-byte UUID
|
||||
// Next ID: 27
|
||||
}
|
||||
|
||||
message GroupV1Record {
|
||||
bytes id = 1;
|
||||
bool blocked = 2;
|
||||
bool whitelisted = 3;
|
||||
bool archived = 4;
|
||||
bool markedUnread = 5;
|
||||
uint64 mutedUntilTimestamp = 6;
|
||||
}
|
||||
|
||||
message GroupV2Record {
|
||||
enum StorySendMode {
|
||||
DEFAULT = 0;
|
||||
DISABLED = 1;
|
||||
ENABLED = 2;
|
||||
}
|
||||
|
||||
bytes masterKey = 1;
|
||||
bool blocked = 2;
|
||||
bool whitelisted = 3;
|
||||
bool archived = 4;
|
||||
bool markedUnread = 5;
|
||||
uint64 mutedUntilTimestamp = 6;
|
||||
bool dontNotifyForMentionsIfMuted = 7;
|
||||
bool hideStory = 8;
|
||||
reserved /* storySendEnabled */ 9;
|
||||
StorySendMode storySendMode = 10;
|
||||
optional AvatarColor avatarColor = 11;
|
||||
}
|
||||
|
||||
message Payments {
|
||||
bool enabled = 1;
|
||||
bytes entropy = 2;
|
||||
}
|
||||
|
||||
message AccountRecord {
|
||||
|
||||
enum PhoneNumberSharingMode {
|
||||
UNKNOWN = 0;
|
||||
EVERYBODY = 1;
|
||||
NOBODY = 2;
|
||||
}
|
||||
|
||||
message PinnedConversation {
|
||||
message Contact {
|
||||
string serviceId = 1;
|
||||
string e164 = 2;
|
||||
bytes serviceIdBinary = 3; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
|
||||
oneof identifier {
|
||||
Contact contact = 1;
|
||||
bytes legacyGroupId = 3;
|
||||
bytes groupMasterKey = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message UsernameLink {
|
||||
enum Color {
|
||||
UNKNOWN = 0;
|
||||
BLUE = 1;
|
||||
WHITE = 2;
|
||||
GREY = 3;
|
||||
OLIVE = 4;
|
||||
GREEN = 5;
|
||||
ORANGE = 6;
|
||||
PINK = 7;
|
||||
PURPLE = 8;
|
||||
}
|
||||
|
||||
bytes entropy = 1; // 32 bytes of entropy used for encryption
|
||||
bytes serverId = 2; // 16 bytes of encoded UUID provided by the server
|
||||
Color color = 3;
|
||||
}
|
||||
|
||||
message IAPSubscriberData {
|
||||
bytes subscriberId = 1;
|
||||
|
||||
oneof iapSubscriptionId {
|
||||
// Identifies an Android Play Store IAP subscription.
|
||||
string purchaseToken = 2;
|
||||
// Identifies an iOS App Store IAP subscription.
|
||||
uint64 originalTransactionId = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message BackupTierHistory {
|
||||
// See zkgroup for integer particular values. Unset if backups are not enabled.
|
||||
optional uint64 backupTier = 1;
|
||||
optional uint64 endedAtTimestamp = 2;
|
||||
}
|
||||
|
||||
message NotificationProfileManualOverride {
|
||||
message ManuallyEnabled {
|
||||
bytes id = 1;
|
||||
|
||||
// This will be unset if no timespan was chosen in the UI.
|
||||
uint64 endAtTimestampMs = 3;
|
||||
}
|
||||
|
||||
oneof override {
|
||||
uint64 disabledAtTimestampMs = 1;
|
||||
ManuallyEnabled enabled = 2;
|
||||
}
|
||||
}
|
||||
|
||||
bytes profileKey = 1;
|
||||
string givenName = 2;
|
||||
string familyName = 3;
|
||||
string avatarUrlPath = 4;
|
||||
bool noteToSelfArchived = 5;
|
||||
bool readReceipts = 6;
|
||||
bool sealedSenderIndicators = 7;
|
||||
bool typingIndicators = 8;
|
||||
reserved /* proxiedLinkPreviews */ 9;
|
||||
bool noteToSelfMarkedUnread = 10;
|
||||
bool linkPreviews = 11;
|
||||
PhoneNumberSharingMode phoneNumberSharingMode = 12;
|
||||
bool unlistedPhoneNumber = 13;
|
||||
repeated PinnedConversation pinnedConversations = 14;
|
||||
bool preferContactAvatars = 15;
|
||||
Payments payments = 16;
|
||||
uint32 universalExpireTimer = 17;
|
||||
bool primarySendsSms = 18;
|
||||
reserved /* e164 */ 19;
|
||||
repeated string preferredReactionEmoji = 20;
|
||||
bytes subscriberId = 21;
|
||||
string subscriberCurrencyCode = 22;
|
||||
bool displayBadgesOnProfile = 23;
|
||||
bool subscriptionManuallyCancelled = 24;
|
||||
bool keepMutedChatsArchived = 25;
|
||||
bool hasSetMyStoriesPrivacy = 26;
|
||||
bool hasViewedOnboardingStory = 27;
|
||||
reserved /* storiesDisabled */ 28;
|
||||
bool storiesDisabled = 29;
|
||||
OptionalBool storyViewReceiptsEnabled = 30;
|
||||
reserved /* hasReadOnboardingStory */ 31;
|
||||
bool hasSeenGroupStoryEducationSheet = 32;
|
||||
string username = 33;
|
||||
bool hasCompletedUsernameOnboarding = 34;
|
||||
UsernameLink usernameLink = 35;
|
||||
reserved /* backupsSubscriberId */ 36;
|
||||
reserved /* backupsSubscriberCurrencyCode */ 37;
|
||||
reserved /* backupsSubscriptionManuallyCancelled */ 38;
|
||||
optional bool hasBackup = 39; // Set to true after backups are enabled and one is uploaded.
|
||||
optional uint64 backupTier = 40; // See zkgroup for integer particular values. Unset if backups are not enabled.
|
||||
IAPSubscriberData backupSubscriberData = 41;
|
||||
optional AvatarColor avatarColor = 42;
|
||||
BackupTierHistory backupTierHistory = 43;
|
||||
NotificationProfileManualOverride notificationProfileManualOverride = 44;
|
||||
}
|
||||
|
||||
message StoryDistributionListRecord {
|
||||
bytes identifier = 1;
|
||||
string name = 2;
|
||||
repeated string recipientServiceIds = 3;
|
||||
uint64 deletedAtTimestamp = 4;
|
||||
bool allowsReplies = 5;
|
||||
bool isBlockList = 6;
|
||||
repeated bytes recipientServiceIdsBinary = 7; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
|
||||
message CallLinkRecord {
|
||||
bytes rootKey = 1;
|
||||
bytes adminPasskey = 2;
|
||||
uint64 deletedAtTimestampMs = 3;
|
||||
optional bytes epoch = 4;
|
||||
}
|
||||
|
||||
message Recipient {
|
||||
message Contact {
|
||||
string serviceId = 1;
|
||||
string e164 = 2;
|
||||
bytes serviceIdBinary = 3; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
|
||||
}
|
||||
|
||||
oneof identifier {
|
||||
Contact contact = 1;
|
||||
bytes legacyGroupId = 2;
|
||||
bytes groupMasterKey = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message ChatFolderRecord {
|
||||
// Represents the default "All chats" folder record vs all other custom folders
|
||||
enum FolderType {
|
||||
UNKNOWN = 0;
|
||||
ALL = 1;
|
||||
CUSTOM = 2;
|
||||
}
|
||||
|
||||
bytes identifier = 1;
|
||||
string name = 2;
|
||||
uint32 position = 3;
|
||||
bool showOnlyUnread = 4;
|
||||
bool showMutedChats = 5;
|
||||
bool includeAllIndividualChats = 6; // Folder includes all 1:1 chats, unless excluded
|
||||
bool includeAllGroupChats = 7; // Folder includes all group chats, unless excluded
|
||||
FolderType folderType = 8;
|
||||
repeated Recipient includedRecipients = 9;
|
||||
repeated Recipient excludedRecipients = 10;
|
||||
uint64 deletedAtTimestampMs = 11; // When non-zero, `position` should be set to -1 and includedRecipients should be empty
|
||||
}
|
||||
|
||||
message NotificationProfile {
|
||||
enum DayOfWeek {
|
||||
UNKNOWN = 0; // Interpret as "Monday"
|
||||
MONDAY = 1;
|
||||
TUESDAY = 2;
|
||||
WEDNESDAY = 3;
|
||||
THURSDAY = 4;
|
||||
FRIDAY = 5;
|
||||
SATURDAY = 6;
|
||||
SUNDAY = 7;
|
||||
}
|
||||
|
||||
bytes id = 1;
|
||||
string name = 2;
|
||||
optional string emoji = 3;
|
||||
fixed32 color = 4; // 0xAARRGGBB
|
||||
uint64 createdAtMs = 5;
|
||||
bool allowAllCalls = 6;
|
||||
bool allowAllMentions = 7;
|
||||
repeated Recipient allowedMembers = 8;
|
||||
bool scheduleEnabled = 9;
|
||||
uint32 scheduleStartTime = 10; // 24-hour clock int, 0000-2359 (e.g., 15, 900, 1130, 2345)
|
||||
uint32 scheduleEndTime = 11; // 24-hour clock int, 0000-2359 (e.g., 15, 900, 1130, 2345)
|
||||
repeated DayOfWeek scheduleDaysEnabled = 12;
|
||||
uint64 deletedAtTimestampMs = 13;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Copyright (C) 2014-2016 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.whispersystems.signalservice.internal.websocket";
|
||||
option java_outer_classname = "WebSocketProtos";
|
||||
|
||||
message WebSocketRequestMessage {
|
||||
optional string verb = 1;
|
||||
optional string path = 2;
|
||||
optional bytes body = 3;
|
||||
repeated string headers = 5;
|
||||
optional uint64 id = 4;
|
||||
}
|
||||
|
||||
message WebSocketResponseMessage {
|
||||
optional uint64 id = 1;
|
||||
optional uint32 status = 2;
|
||||
optional string message = 3;
|
||||
repeated string headers = 5;
|
||||
optional bytes body = 4;
|
||||
}
|
||||
|
||||
message WebSocketMessage {
|
||||
enum Type {
|
||||
UNKNOWN = 0;
|
||||
REQUEST = 1;
|
||||
RESPONSE = 2;
|
||||
}
|
||||
|
||||
optional Type type = 1;
|
||||
optional WebSocketRequestMessage request = 2;
|
||||
optional WebSocketResponseMessage response = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user