Skip to content

Commit

Permalink
Update proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
any-association committed Jul 2, 2024
1 parent a4575ec commit ec7fb2f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
12 changes: 12 additions & 0 deletions changes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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;
}
}
19 changes: 14 additions & 5 deletions models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ enum SmartBlockType {
FileObject = 0x215;

NotificationObject = 0x217;
DevicesObject = 0x218;
}

message Search {
Expand Down Expand Up @@ -1189,7 +1190,7 @@ enum NameserviceNameType {
}


message Membership {
message Membership {
enum Status {
StatusUnknown = 0;
// please wait a bit more, we are still processing your request
Expand All @@ -1206,7 +1207,7 @@ message Membership {
// in this case please call Finalize to finish the process
StatusPendingRequiresFinalization = 3;
}

enum PaymentMethod {
MethodNone = 0;
MethodStripe = 1;
Expand Down Expand Up @@ -1248,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
Expand All @@ -1259,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
Expand All @@ -1292,4 +1293,12 @@ message MembershipTierData {
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;
}

0 comments on commit ec7fb2f

Please sign in to comment.