✨ Complete the develop service
This commit is contained in:
@@ -7,11 +7,12 @@ option csharp_namespace = "DysonNetwork.Shared.Proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "file.proto";
|
||||
import "account.proto";
|
||||
|
||||
enum PublisherType {
|
||||
PUBLISHER_TYPE_UNSPECIFIED = 0;
|
||||
INDIVIDUAL = 1;
|
||||
ORGANIZATIONAL = 2;
|
||||
PUB_INDIVIDUAL = 1;
|
||||
PUB_ORGANIZATIONAL = 2;
|
||||
}
|
||||
|
||||
enum PublisherMemberRole {
|
||||
@@ -48,33 +49,35 @@ message Publisher {
|
||||
google.protobuf.StringValue bio = 5;
|
||||
CloudFile picture = 8;
|
||||
CloudFile background = 9;
|
||||
optional bytes verification_mark = 10;
|
||||
optional VerificationMark verification_mark = 10;
|
||||
string account_id = 11;
|
||||
string realm_id = 12;
|
||||
optional string realm_id = 12;
|
||||
google.protobuf.Timestamp created_at = 13;
|
||||
google.protobuf.Timestamp updated_at = 14;
|
||||
}
|
||||
|
||||
message GetPublisherRequest {
|
||||
string name = 1;
|
||||
oneof query {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message GetPublisherResponse {
|
||||
Publisher publisher = 1;
|
||||
}
|
||||
|
||||
message GetPublisherBatchRequest {
|
||||
repeated string ids = 1;
|
||||
}
|
||||
|
||||
message ListPublishersRequest {
|
||||
string account_id = 1; // filter by owner/member account
|
||||
string realm_id = 2; // filter by realm
|
||||
int32 page_size = 3;
|
||||
string page_token = 4;
|
||||
string order_by = 5;
|
||||
}
|
||||
|
||||
message ListPublishersResponse {
|
||||
repeated Publisher publishers = 1;
|
||||
string next_page_token = 2;
|
||||
int32 total_size = 3;
|
||||
}
|
||||
|
||||
message ListPublisherMembersRequest {
|
||||
@@ -99,10 +102,22 @@ message HasPublisherFeatureResponse {
|
||||
bool enabled = 1;
|
||||
}
|
||||
|
||||
message IsPublisherMemberRequest {
|
||||
string publisher_id = 1;
|
||||
string account_id = 2;
|
||||
PublisherMemberRole role = 3;
|
||||
}
|
||||
|
||||
message IsPublisherMemberResponse {
|
||||
bool valid = 1;
|
||||
}
|
||||
|
||||
service PublisherService {
|
||||
rpc GetPublisher(GetPublisherRequest) returns (GetPublisherResponse);
|
||||
rpc GetPublisherBatch(GetPublisherBatchRequest) returns (ListPublishersResponse);
|
||||
rpc ListPublishers(ListPublishersRequest) returns (ListPublishersResponse);
|
||||
rpc ListPublisherMembers(ListPublisherMembersRequest) returns (ListPublisherMembersResponse);
|
||||
rpc SetPublisherFeatureFlag(SetPublisherFeatureFlagRequest) returns (google.protobuf.StringValue); // returns optional message
|
||||
rpc HasPublisherFeature(HasPublisherFeatureRequest) returns (HasPublisherFeatureResponse);
|
||||
rpc IsPublisherMember(IsPublisherMemberRequest) returns (IsPublisherMemberResponse);
|
||||
}
|
||||
|
Reference in New Issue
Block a user