Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontier): add list group admins api #321

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,15 @@ service FrontierService {
};
}

rpc ListGroupAdmins(ListGroupAdminsRequest) returns (ListGroupAdminsResponse) {
option (google.api.http) = {get: "/v1beta1/organizations/{org_id}/groups/{id}/admins"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Group";
summary: "List group admins"
description: "Returns a collection of admins of a group";
};
}

rpc AddGroupUsers(AddGroupUsersRequest) returns (AddGroupUsersResponse) {
option (google.api.http) = {
post: "/v1beta1/organizations/{org_id}/groups/{id}/users",
Expand Down Expand Up @@ -2963,6 +2972,15 @@ message ListGroupUsersRequest {
bool with_roles = 3;
}

message ListGroupAdminsRequest {
string id = 1;
string org_id = 2;
}

message ListGroupAdminsResponse {
repeated User users = 1;
}

message ListGroupUsersResponse {
repeated User users = 1;

Expand Down
140 changes: 120 additions & 20 deletions raystack/frontier/v1beta1/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,12 @@ message BillingAccount {
int64 amount = 1;
string currency = 2;

google.protobuf.Timestamp updated_at = 3;
google.protobuf.Timestamp updated_at = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the balance was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

string id = 1;
Expand All @@ -565,8 +570,18 @@ message BillingAccount {
string state = 10;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
google.protobuf.Timestamp created_at = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the billing account was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the billing account was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message Subscription {
Expand All @@ -579,10 +594,30 @@ message Subscription {
int32 trial_days = 9;

google.protobuf.Struct metadata = 10;
google.protobuf.Timestamp created_at = 11;
google.protobuf.Timestamp updated_at = 12;
google.protobuf.Timestamp canceled_at = 13;
google.protobuf.Timestamp ended_at = 14;
google.protobuf.Timestamp created_at = 11 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the subscription was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the subscription was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp canceled_at = 13 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the subscription was canceled.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp ended_at = 14 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the subscription was ended.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message CheckoutSession {
Expand All @@ -594,9 +629,24 @@ message CheckoutSession {
string state = 5;

google.protobuf.Struct metadata = 10;
google.protobuf.Timestamp created_at = 11;
google.protobuf.Timestamp updated_at = 12;
google.protobuf.Timestamp expire_at = 13;
google.protobuf.Timestamp created_at = 11 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the checkout session was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the checkout session was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp expire_at = 13 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the checkout session will expire.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message Plan {
Expand All @@ -608,8 +658,18 @@ message Plan {
string interval = 6; // known intervals are "day", "week", "month", and "year"

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
google.protobuf.Timestamp created_at = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the plan was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the plan was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message Feature {
Expand All @@ -624,8 +684,18 @@ message Feature {
int64 credit_amount = 8;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
google.protobuf.Timestamp created_at = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the feature was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the feature was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message Price {
Expand All @@ -649,8 +719,18 @@ message Price {
string tier_mode = 14;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
google.protobuf.Timestamp created_at = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the price was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the price was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message BillingTransaction {
Expand All @@ -662,8 +742,18 @@ message BillingTransaction {
string description = 6;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
google.protobuf.Timestamp created_at = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the billing transaction was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the billing transaction was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

message Usage {
Expand All @@ -675,8 +765,18 @@ message Usage {
int64 amount = 6;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
google.protobuf.Timestamp created_at = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the usage was created.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
google.protobuf.Timestamp updated_at = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The time when the usage was updated.",
example: "\"2023-06-07T05:39:56.961Z\""
}
];
}

// Model crud body
Expand Down
Loading