// Extracted from: Spotify 1.2.52.442 (windows)

syntax = "proto3";

package spotify.social_esperanto.proto;

option java_multiple_files = true;
option optimize_for = CODE_SIZE;
option java_package = "com.spotify.social.esperanto.proto";

service SocialService {
    rpc SetAccessToken(SetAccessTokenRequest) returns (SetAccessTokenResponse);
    rpc SubscribeToEvents(SubscribeToEventsRequest) returns (stream SubscribeToEventsResponse);
    rpc SubscribeToState(SubscribeToStateRequest) returns (stream SubscribeToStateResponse);
}

message SetAccessTokenRequest {
    string accessToken = 1;
}

message SetAccessTokenResponse {
}

message SubscribeToEventsRequest {
}

message SubscribeToEventsResponse {
    enum Error {
        NONE = 0;
        FAILED_TO_CONNECT = 1;
        USER_DATA_FAIL = 2;
        PERMISSIONS = 3;
        SERVICE_CONNECT_NOT_PERMITTED = 4;
        USER_UNAUTHORIZED = 5;
    }

    Error status = 1;
    string description = 2;
}

message SubscribeToStateRequest {
}

message SubscribeToStateResponse {
    bool available = 1;
    bool enabled = 2;
    repeated string missingPermissions = 3;
    string accessToken = 4;
}

