Skip to content

[papi] Update UserService proto #19231

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
Dec 11, 2023
Merged
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
6 changes: 6 additions & 0 deletions components/dashboard/src/service/json-rpc-user-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { UserService } from "@gitpod/public-api/lib/gitpod/v1/user_connect";
import { PromiseClient } from "@connectrpc/connect";
import { PartialMessage } from "@bufbuild/protobuf";
import {
DeleteUserRequest,
DeleteUserResponse,
GetAuthenticatedUserRequest,
GetAuthenticatedUserResponse,
SetWorkspaceAutoStartOptionsRequest,
Expand Down Expand Up @@ -39,4 +41,8 @@ export class JsonRpcUserClient implements PromiseClient<typeof UserService> {
): Promise<SetWorkspaceAutoStartOptionsResponse> {
throw new ApplicationError(ErrorCodes.UNIMPLEMENTED, "not implemented");
}

async deleteUser(request: PartialMessage<DeleteUserRequest>): Promise<DeleteUserResponse> {
throw new ApplicationError(ErrorCodes.UNIMPLEMENTED, "not implemented");
}
}
9 changes: 9 additions & 0 deletions components/public-api/gitpod/v1/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ service UserService {
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
// +internal - only used by the Gitpod Dashboard.
rpc SetWorkspaceAutoStartOptions(SetWorkspaceAutoStartOptionsRequest) returns (SetWorkspaceAutoStartOptionsResponse) {}

// DeleteUser deletes the specified user.
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {}
}

message GetAuthenticatedUserRequest {}
Expand Down Expand Up @@ -69,11 +72,17 @@ message UpdateUserRequest {
optional google.protobuf.Duration inactivity = 1;
optional bool disabled_disconnected = 2;
}
optional string dotfile_repo = 9;
Copy link
Member

@filiptronicek filiptronicek Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should look into repo vs repository and add something about abbreviations to the guidelines, so that we have it consistently, but not blocking. 🙏

string repository_pattern = 4;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. We can use the "API hardening milestone" for this. cc. @akosyakov

Also, see Google's recommendations on naming conventions: https://cloud.google.com/apis/design/naming_convention?hl=en#name_abbreviation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, maybe we can align and rename ConfigurationService to RepoConfigService :-P

}
message UpdateUserResponse {
User user = 1;
}

message DeleteUserRequest {
string user_id = 1;
}
message DeleteUserResponse {}

message User {
// id is a UUID of the user
string id = 1;
Expand Down
Loading