-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[papi] Add UserService/UpdateUser
to proto
#19163
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,69 @@ option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1"; | |
service UserService { | ||
// GetAuthenticatedUser allows to retrieve the current user. | ||
rpc GetAuthenticatedUser(GetAuthenticatedUserRequest) returns (GetAuthenticatedUserResponse) {} | ||
|
||
// UpdateUser updates the properties of a user. | ||
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) {} | ||
|
||
// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard. | ||
// +internal - only used by the Gitpod Dashboard. | ||
rpc SetWorkspaceAutoStartOptions(SetWorkspaceAutoStartOptionsRequest) returns (SetWorkspaceAutoStartOptionsResponse) {} | ||
} | ||
|
||
message GetAuthenticatedUserRequest {} | ||
message GetAuthenticatedUserResponse { | ||
User user = 1; | ||
} | ||
|
||
message SetWorkspaceAutoStartOptionsRequest { | ||
string user_id = 1; | ||
repeated WorkspaceAutostartOption workspace_autostart_options = 2; | ||
message WorkspaceAutostartOption { | ||
string clone_url = 1; | ||
string organization_id = 2; | ||
optional string workspace_class = 3; | ||
optional EditorReference editor_settings = 4; | ||
optional string region = 5; | ||
} | ||
} | ||
message SetWorkspaceAutoStartOptionsResponse {} | ||
|
||
message UpdateUserRequest { | ||
string user_id = 1; | ||
optional string name = 2; | ||
optional string accepted_privacy_policy_date = 3; | ||
optional ProfileDetails profile = 4; | ||
akosyakov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
message ProfileDetails { | ||
optional string last_updated_details_nudge = 1; | ||
optional string accepted_privacy_policy_date = 2; | ||
optional string company_name = 3; | ||
optional string email_address = 4; | ||
optional string job_role = 5; | ||
optional string job_role_other = 6; | ||
repeated string exploration_reasons = 7; | ||
repeated string signup_goals = 8; | ||
optional string signup_goals_other = 10; | ||
optional string onboarded_timestamp = 11; | ||
optional string company_size = 12; | ||
} | ||
optional string email_address = 5; | ||
optional EditorReference editor_settings = 6; | ||
optional EmailNotificationSettings email_notification_settings = 7; | ||
message EmailNotificationSettings { | ||
optional bool allows_changelog_mail = 1; | ||
optional bool allows_devx_mail = 2; | ||
optional bool allows_onboarding_mail = 3; | ||
} | ||
optional WorkspaceTimeoutSettings workspace_timeout_settings = 8; | ||
message WorkspaceTimeoutSettings { | ||
optional google.protobuf.Duration inactivity = 1; | ||
optional bool disabled_disconnected = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have another workspace timeout in Should them be aligned? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's align them in implementation PR. Here I did the bare minimum for the conversion. Happy to align, if there is an example for the conversion available. |
||
} | ||
} | ||
message UpdateUserResponse { | ||
User user = 1; | ||
} | ||
|
||
message User { | ||
// id is a UUID of the user | ||
string id = 1; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this method? I thought autoStart option is not useful, and can cause some confuse for me (Once saw that we want to remove it, I'm happy with that Closed PR XD, but closed already).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not aware of removing auto start. Do we have an issue or any discussion on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @AlexTugarev , this is not-blocking comment.
This is the PR to remove auth start option. I'm not clear if we want to keep it or remove it.
update: I just prefer to remove the auto start options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still used to preserve the options for the next workspace start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there is the
autostart
options to the prefixed URL.