mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-07 21:47:02 +09:00
81 lines
2.2 KiB
Protocol Buffer
81 lines
2.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = "paymentservice/paymentserviceproto";
|
|
|
|
|
|
enum PeriodType {
|
|
PeriodTypeUnknown = 0;
|
|
PeriodTypeUnlimited = 1;
|
|
PeriodTypeDays = 2;
|
|
PeriodTypeWeeks = 3;
|
|
PeriodTypeMonths = 4;
|
|
PeriodTypeYears = 5;
|
|
}
|
|
|
|
message Feature {
|
|
string description = 1;
|
|
}
|
|
|
|
message GetTiersRequest {
|
|
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
|
|
// you can get it with Account().SignKey.GetPublic().Account()
|
|
string ownerAnyId = 1;
|
|
|
|
string locale = 2;
|
|
}
|
|
|
|
message GetTiersRequestSigned {
|
|
// GetTiersRequest struct
|
|
bytes payload = 1;
|
|
// this is payload signed with payload.ownerAnyID
|
|
bytes signature = 2;
|
|
}
|
|
|
|
message TierData {
|
|
// this is a unique ID of the tier
|
|
// you should hardcode this in your app and provide icon, graphics, etc for each tier
|
|
// (even for old/historical/inactive/hidden tiers)
|
|
uint32 id = 1;
|
|
// localazied name of the tier
|
|
string name = 2;
|
|
// just a short technical description
|
|
// you don't have to use it, you can use your own UI-friendly texts
|
|
string description = 3;
|
|
// can you buy it (ON ALL PLATFORMS, without clarification)?
|
|
bool isActive = 4;
|
|
// is this tier for debugging only?
|
|
bool isTest = 5;
|
|
// hidden tiers are only visible once user got them
|
|
bool isHiddenTier = 6;
|
|
// how long is the period of the subscription
|
|
PeriodType periodType = 7;
|
|
// i.e. "5 days" or "3 years"
|
|
uint32 periodValue = 8;
|
|
// this one is a price we use ONLY on Stripe platform
|
|
uint32 priceStripeUsdCents = 9;
|
|
// number of ANY NS names that this tier includes
|
|
// (not counted as a "feature" and not in the features list)
|
|
uint32 anyNamesCountIncluded = 10;
|
|
// somename.any - len of 8
|
|
uint32 anyNameMinLength = 11;
|
|
// each tier has a set of features
|
|
repeated Feature features = 12;
|
|
// green, blue, red, purple or custom color in string format #ff00ff
|
|
string colorStr = 13;
|
|
|
|
// Stripe platform-specific data:
|
|
string stripeProductId = 14;
|
|
string stripeManageUrl = 15;
|
|
|
|
// iOS platform-specific data:
|
|
string iosProductId = 16;
|
|
string iosManageUrl = 17;
|
|
|
|
// Android platform-specific data:
|
|
string androidProductId = 18;
|
|
string androidManageUrl = 19;
|
|
}
|
|
|
|
message GetTiersResponse {
|
|
// list of all available tiers
|
|
repeated TierData tiers = 1;
|
|
}
|