102 lines
2.4 KiB
Protocol Buffer
102 lines
2.4 KiB
Protocol Buffer
|
// Extracted from: Spotify 1.1.73.517 (macOS)
|
||
|
|
||
|
syntax = "proto2";
|
||
|
|
||
|
package spotify.playlist_permission.proto;
|
||
|
|
||
|
option java_multiple_files = true;
|
||
|
option optimize_for = CODE_SIZE;
|
||
|
option java_package = "com.spotify.playlist.proto";
|
||
|
option go_package = "tuxpa.in/a/goplayd/lib/spot/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;
|
||
|
optional bool can_cancel_membership = 6;
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
message GetMemberPermissionsResponse {
|
||
|
map<string, Permission> member_permissions = 1;
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
message ResponseStatus {
|
||
|
optional int32 status_code = 1;
|
||
|
optional string status_message = 2;
|
||
|
}
|
||
|
|
||
|
enum PermissionLevel {
|
||
|
UNKNOWN = 0;
|
||
|
BLOCKED = 1;
|
||
|
VIEWER = 2;
|
||
|
CONTRIBUTOR = 3;
|
||
|
}
|