1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-2649 Protocol | Enhancement | 0.35.0-rc5 (#1372)

This commit is contained in:
Evgenii Kozlov 2024-07-08 20:42:18 +02:00 committed by GitHub
parent b2dd0265b6
commit 26ae59d803
Signed by: github
GPG key ID: B5690EEEBB952194
21 changed files with 143 additions and 146 deletions

View file

@ -62,6 +62,9 @@ message Change {
SetFileInfo setFileInfo = 111;
NotificationCreate notificationCreate = 112;
NotificationUpdate notificationUpdate = 113;
DeviceAdd deviceAdd = 114;
DeviceUpdate deviceUpdate = 115;
}
reserved 102,103,104; // old unsupported relation changes
}
@ -167,4 +170,13 @@ message Change {
string id = 1;
anytype.model.Notification.Status status = 2;
}
message DeviceAdd {
anytype.model.DeviceInfo device = 1;
}
message DeviceUpdate {
string id = 1;
string name = 2;
}
}

View file

@ -4118,6 +4118,7 @@ message Rpc {
repeated string blockIds = 2;
string objectTypeUniqueKey = 3;
string templateId = 4;
anytype.model.Block block = 5;
}
message Response {
@ -7139,6 +7140,69 @@ message Rpc {
}
}
}
message Device {
message SetName {
message Request {
string deviceId = 1;
string name = 2;
}
message Response {
Error error = 1;
message Error {
Code code = 1;
string description = 2;
enum Code {
NULL = 0;
UNKNOWN_ERROR = 1;
BAD_INPUT = 2;
}
}
}
}
message List {
message Request {}
message Response {
Error error = 1;
repeated anytype.model.DeviceInfo devices = 2;
message Error {
Code code = 1;
string description = 2;
enum Code {
NULL = 0;
UNKNOWN_ERROR = 1;
BAD_INPUT = 2;
}
}
}
}
message NetworkState {
message Set {
message Request {
anytype.model.DeviceNetworkType deviceNetworkType = 1;
}
message Response {
Error error = 2;
message Error {
Code code = 1;
string description = 2;
enum Code {
NULL = 0;
UNKNOWN_ERROR = 1;
BAD_INPUT = 2;
INTERNAL_ERROR = 3;
}
}
}
}
}
}
}

View file

@ -106,6 +106,8 @@ message Event {
Membership.Update membershipUpdate = 117;
Space.SyncStatus.Update spaceSyncStatusUpdate = 119;
P2PStatus.Update p2pStatusUpdate = 120;
}
}
@ -1097,6 +1099,19 @@ message Event {
NetworkError = 3;
}
}
message P2PStatus {
message Update {
string spaceId = 1;
Status status = 2;
int64 devicesCounter = 3;
}
enum Status {
NotConnected = 0;
NotPossible = 1;
Connected = 2;
}
}
}
message ResponseEvent {

View file

@ -50,6 +50,7 @@ enum SmartBlockType {
FileObject = 0x215;
NotificationObject = 0x217;
DevicesObject = 0x218;
}
message Search {
@ -595,21 +596,10 @@ message Range {
*/
message Account {
string id = 1; // User's thread id
string name = 2; // User name, that associated with this account
Avatar avatar = 3; // Avatar of a user's account
Config config = 4;
Status status = 5;
Info info = 6;
/**
* Avatar of a user's account. It could be an image or color
*/
message Avatar {
oneof avatar {
Block.Content.File image = 1; // Image of the avatar. Contains the hash to retrieve the image.
string color = 2; // Color of the avatar, used if image not set.
}
}
message Config {
bool enableDataview = 1;
bool enableDebug = 2;
@ -1200,7 +1190,7 @@ enum NameserviceNameType {
}
message Membership {
message Membership {
enum Status {
StatusUnknown = 0;
// please wait a bit more, we are still processing your request
@ -1217,7 +1207,7 @@ message Membership {
// in this case please call Finalize to finish the process
StatusPendingRequiresFinalization = 3;
}
enum PaymentMethod {
MethodNone = 0;
MethodStripe = 1;
@ -1259,7 +1249,7 @@ message MembershipTierData {
PeriodTypeDays = 2;
PeriodTypeWeeks = 3;
PeriodTypeMonths = 4;
PeriodTypeYears = 5;
PeriodTypeYears = 5;
}
// this is a unique Payment Node ID of the tier
@ -1270,14 +1260,14 @@ message MembershipTierData {
// just a short technical description
string description = 3;
// is this tier for testing and debugging only?
bool isTest = 4;
bool isTest = 4;
// how long is the period of the subscription
PeriodType periodType = 5;
// i.e. "5 days" or "3 years"
uint32 periodValue = 6;
// this one is a price we use ONLY on Stripe platform
uint32 priceStripeUsdCents = 7;
// number of ANY NS names that this tier includes
// number of ANY NS names that this tier includes
// also in the "features" list (see below)
uint32 anyNamesCountIncluded = 8;
// somename.any - is of len 8
@ -1299,8 +1289,21 @@ message MembershipTierData {
string androidProductId = 17;
string androidManageUrl = 18;
}
enum DeviceNetworkType {
WIFI = 0;
CELLULAR = 1;
NOT_CONNECTED = 2;
}
message Detail {
string key = 1;
google.protobuf.Value value = 2; // NUll - removes key
}
message DeviceInfo {
string id = 1;
string name = 2;
int64 addDate = 3;
bool archived = 4;
bool isConnected = 5;
}