Skip to content

feat: add rpc for users search #402

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

Merged
merged 3 commits into from
Apr 11, 2025
Merged
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
38 changes: 38 additions & 0 deletions raystack/frontier/v1beta1/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,32 @@ service AdminService {
};
}

// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
rpc ExportUsers(ExportUsersRequest) returns (stream google.api.HttpBody) {
option (google.api.http) = {
get: "/v1beta1/admin/users/export"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "User";
summary: "Export users";
description: "Export user with demographic properties and billing plan details";
produces: "text/csv";
};
}

rpc SearchUsers(SearchUsersRequest) returns (SearchUsersResponse) {
option (google.api.http) = {
post: "/v1beta1/admin/users/search",
body: "query"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "User";
summary: "Search users";
description: "Search users based on their properties";
};
}

rpc SetOrganizationKyc(SetOrganizationKycRequest) returns (SetOrganizationKycResponse) {
option (google.api.http) = {
put: "/v1beta1/admin/organizations/{org_id}/kyc",
Expand Down Expand Up @@ -1363,3 +1389,15 @@ message SearchOrganizationServiceUserCredentialsResponse {
RQLQueryPaginationResponse pagination = 2;
RQLQueryGroupResponse group = 3;
}

message SearchUsersRequest {
RQLRequest query = 1;
}

message SearchUsersResponse {
repeated User users = 1;
RQLQueryPaginationResponse pagination = 2;
RQLQueryGroupResponse group = 3;
}

message ExportUsersRequest {}
Loading