Skip to content

Commit 88d65c1

Browse files
authored
[papi] Add UserService/UpdateUser to proto (#19163)
* [papi] Add `UserService/UpdateUser` to proto * extract SetWorkspaceAutoStartOptions
1 parent b983b62 commit 88d65c1

File tree

7 files changed

+1793
-267
lines changed

7 files changed

+1793
-267
lines changed

components/public-api/gitpod/v1/user.proto

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,69 @@ option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
1111
service UserService {
1212
// GetAuthenticatedUser allows to retrieve the current user.
1313
rpc GetAuthenticatedUser(GetAuthenticatedUserRequest) returns (GetAuthenticatedUserResponse) {}
14+
15+
// UpdateUser updates the properties of a user.
16+
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) {}
17+
18+
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
19+
// +internal - only used by the Gitpod Dashboard.
20+
rpc SetWorkspaceAutoStartOptions(SetWorkspaceAutoStartOptionsRequest) returns (SetWorkspaceAutoStartOptionsResponse) {}
1421
}
1522

1623
message GetAuthenticatedUserRequest {}
1724
message GetAuthenticatedUserResponse {
1825
User user = 1;
1926
}
2027

28+
message SetWorkspaceAutoStartOptionsRequest {
29+
string user_id = 1;
30+
repeated WorkspaceAutostartOption workspace_autostart_options = 2;
31+
message WorkspaceAutostartOption {
32+
string clone_url = 1;
33+
string organization_id = 2;
34+
optional string workspace_class = 3;
35+
optional EditorReference editor_settings = 4;
36+
optional string region = 5;
37+
}
38+
}
39+
message SetWorkspaceAutoStartOptionsResponse {}
40+
41+
message UpdateUserRequest {
42+
string user_id = 1;
43+
optional string name = 2;
44+
optional string accepted_privacy_policy_date = 3;
45+
optional ProfileDetails profile = 4;
46+
message ProfileDetails {
47+
optional string last_updated_details_nudge = 1;
48+
optional string accepted_privacy_policy_date = 2;
49+
optional string company_name = 3;
50+
optional string email_address = 4;
51+
optional string job_role = 5;
52+
optional string job_role_other = 6;
53+
repeated string exploration_reasons = 7;
54+
repeated string signup_goals = 8;
55+
optional string signup_goals_other = 10;
56+
optional string onboarded_timestamp = 11;
57+
optional string company_size = 12;
58+
}
59+
optional string email_address = 5;
60+
optional EditorReference editor_settings = 6;
61+
optional EmailNotificationSettings email_notification_settings = 7;
62+
message EmailNotificationSettings {
63+
optional bool allows_changelog_mail = 1;
64+
optional bool allows_devx_mail = 2;
65+
optional bool allows_onboarding_mail = 3;
66+
}
67+
optional WorkspaceTimeoutSettings workspace_timeout_settings = 8;
68+
message WorkspaceTimeoutSettings {
69+
optional google.protobuf.Duration inactivity = 1;
70+
optional bool disabled_disconnected = 2;
71+
}
72+
}
73+
message UpdateUserResponse {
74+
User user = 1;
75+
}
76+
2177
message User {
2278
// id is a UUID of the user
2379
string id = 1;

0 commit comments

Comments
 (0)