2021-12-10 19:33:43 +00:00
|
|
|
// Extracted from: Spotify 1.1.73.517 (macOS)
|
2021-06-19 20:29:48 +00:00
|
|
|
|
|
|
|
syntax = "proto2";
|
|
|
|
|
|
|
|
package spotify.playlist_permission.proto;
|
|
|
|
|
|
|
|
option java_multiple_files = true;
|
|
|
|
option optimize_for = CODE_SIZE;
|
|
|
|
option java_package = "com.spotify.playlist.proto";
|
|
|
|
|
|
|
|
message Permission {
|
|
|
|
optional bytes revision = 1;
|
|
|
|
optional PermissionLevel permission_level = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Capabilities {
|
|
|
|
optional bool can_view = 1;
|
|
|
|
optional bool can_administrate_permissions = 2;
|
|
|
|
repeated PermissionLevel grantable_level = 3;
|
|
|
|
optional bool can_edit_metadata = 4;
|
|
|
|
optional bool can_edit_items = 5;
|
2021-12-10 19:33:43 +00:00
|
|
|
optional bool can_cancel_membership = 6;
|
2021-06-19 20:29:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CapabilitiesMultiRequest {
|
|
|
|
repeated CapabilitiesRequest request = 1;
|
|
|
|
optional string fallback_username = 2;
|
|
|
|
optional string fallback_user_id = 3;
|
|
|
|
optional string fallback_uri = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CapabilitiesRequest {
|
|
|
|
optional string username = 1;
|
|
|
|
optional string user_id = 2;
|
|
|
|
optional string uri = 3;
|
|
|
|
optional bool user_is_owner = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CapabilitiesMultiResponse {
|
|
|
|
repeated CapabilitiesResponse response = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CapabilitiesResponse {
|
|
|
|
optional ResponseStatus status = 1;
|
|
|
|
optional Capabilities capabilities = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SetPermissionLevelRequest {
|
|
|
|
optional PermissionLevel permission_level = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SetPermissionResponse {
|
|
|
|
optional Permission resulting_permission = 1;
|
|
|
|
}
|
|
|
|
|
2021-12-10 19:33:43 +00:00
|
|
|
message GetMemberPermissionsResponse {
|
|
|
|
map<string, Permission> member_permissions = 1;
|
|
|
|
}
|
|
|
|
|
2021-06-19 20:29:48 +00:00
|
|
|
message Permissions {
|
|
|
|
optional Permission base_permission = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PermissionState {
|
|
|
|
optional Permissions permissions = 1;
|
|
|
|
optional Capabilities capabilities = 2;
|
|
|
|
optional bool is_private = 3;
|
|
|
|
optional bool is_collaborative = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PermissionStatePub {
|
|
|
|
optional PermissionState permission_state = 1;
|
|
|
|
}
|
|
|
|
|
2021-12-10 19:33:43 +00:00
|
|
|
message PermissionGrantOptions {
|
|
|
|
optional Permission permission = 1;
|
|
|
|
optional int64 ttl_ms = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PermissionGrant {
|
|
|
|
optional string token = 1;
|
|
|
|
optional PermissionGrantOptions permission_grant_options = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ClaimPermissionGrantResponse {
|
|
|
|
optional Permission user_permission = 1;
|
|
|
|
optional Capabilities capabilities = 2;
|
|
|
|
}
|
|
|
|
|
2021-06-19 20:29:48 +00:00
|
|
|
message ResponseStatus {
|
|
|
|
optional int32 status_code = 1;
|
|
|
|
optional string status_message = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum PermissionLevel {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
BLOCKED = 1;
|
|
|
|
VIEWER = 2;
|
|
|
|
CONTRIBUTOR = 3;
|
|
|
|
}
|