Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions proto/decentraland/kernel/apis/restricted_actions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,42 @@ message EmptyResponse { }

message StopEmoteRequest { }

// Identifies which fullscreen explorer panel OpenExplorerUi targets.
// EU_SETTINGS holds 0 so an unset `ui` field defaults to the least-intrusive panel.
enum ExplorerUi {
EU_SETTINGS = 0;
EU_MAP = 1;
EU_BACKPACK = 2;
EU_CAMERA_REEL = 3;
EU_COMMUNITIES = 4;
EU_PLACES = 5;
EU_EVENTS = 6;
}

// Verdict of an OpenExplorerUi request (enum rather than a bool so new outcomes stay expressible).
enum OpenExplorerUiResult {
UNSPECIFIED = 0;
OPENED = 1;
WAS_ALREADY_OPEN = 2; // a fullscreen panel is already open
REJECTED_NOT_CURRENT_SCENE = 3; // the standard restricted-actions current-scene gate rejected the call
REJECTED_FEATURE_DISABLED = 4; // the requested section is hidden by feature flags or client doesn't have that feature
REJECTED_NO_USER_GESTURE = 5; // rejected: the call did not originate from a user gesture
}

message OpenExplorerUiRequest {
ExplorerUi ui = 1;

// Extension point for future per-panel parameters, as a oneof so each panel gets its
// own optional param message without touching existing fields.
// message MapParams { int32 focus_x = 1; int32 focus_y = 2; }
// oneof params { MapParams map = 10; }
}

message OpenExplorerUiResponse {
// Carries only the verdict of the open action.
OpenExplorerUiResult open_result = 1;
}

service RestrictedActionsService {
// MovePlayerTo will move the player to a position relative to the current scene.
// If 'duration' field is used in the request, the success response depends on the
Expand Down Expand Up @@ -98,4 +134,7 @@ service RestrictedActionsService {

// StopEmote will stop the current emote
rpc StopEmote(StopEmoteRequest) returns (SuccessResponse) {}

// OpenExplorerUi opens a specific fullscreen explorer panel and returns the open verdict.
rpc OpenExplorerUi(OpenExplorerUiRequest) returns (OpenExplorerUiResponse) {}
}
Loading