Skip to content

Commit bf6a0fa

Browse files
authored
Merge branch 'main' into feat/testing-api-tool
2 parents 5a13107 + 9fe6ed4 commit bf6a0fa

File tree

9 files changed

+196
-16
lines changed

9 files changed

+196
-16
lines changed

proto/decentraland/kernel/apis/runtime.proto

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@ syntax = "proto3";
22
package decentraland.kernel.apis;
33

44
import "decentraland/common/content_mapping.proto";
5+
import "decentraland/sdk/components/realm_info.proto";
56

67
// This API will contain all the information related to the world runtime.
78
// Things related to the user, players or the scene itself has they own api, and
89
// won't live here. (UserIdentity, Players, ParcelIdentity)
910

10-
message RealmInfo {
11-
string base_url = 1;
12-
string realm_name = 2;
13-
int32 network_id = 3;
14-
string comms_adapter = 4;
15-
bool is_preview = 5;
16-
}
17-
1811
message GetRealmResponse {
19-
optional RealmInfo realm_info = 1;
12+
optional decentraland.sdk.components.PBRealmInfo realm_info = 1;
2013
}
2114

2215
message GetWorldTimeResponse {
@@ -72,7 +65,7 @@ service RuntimeService {
7265
rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) {}
7366
// Returns information about the current scene. This is the replacement of GetBootstrapData
7467
rpc GetSceneInformation(CurrentSceneEntityRequest) returns (CurrentSceneEntityResponse) {}
75-
76-
// Provides information about the explorer
68+
69+
// Provides information about the explorer
7770
rpc GetExplorerInformation(GetExplorerInformationRequest) returns (GetExplorerInformationResponse) {}
7871
}

proto/decentraland/kernel/comms/rfc4/comms.proto

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ message Packet {
1414
Chat chat = 5;
1515
Scene scene = 6;
1616
Voice voice = 7;
17+
Movement movement = 8;
18+
PlayerEmote player_emote = 9;
19+
SceneEmote scene_emote = 10;
1720
}
21+
uint32 protocol_version = 11;
1822
}
1923

2024
message Position {
@@ -31,6 +35,39 @@ message Position {
3135
float rotation_w = 9;
3236
}
3337

38+
message Movement {
39+
// command number
40+
float timestamp = 1;
41+
// world position
42+
float position_x = 2;
43+
float position_y = 3;
44+
float position_z = 4;
45+
// velocity
46+
float velocity_x = 5;
47+
float velocity_y = 6;
48+
float velocity_z = 7;
49+
// animations
50+
float movement_blend_value = 8;
51+
float slide_blend_value = 9;
52+
bool is_grounded = 10;
53+
bool is_jumping = 11;
54+
bool is_long_jump = 12;
55+
bool is_long_fall = 13;
56+
bool is_falling = 14;
57+
58+
bool is_stunned = 15;
59+
}
60+
61+
message PlayerEmote {
62+
uint32 incremental_id = 1;
63+
string urn = 2;
64+
}
65+
66+
message SceneEmote {
67+
string scene_entity_id = 1;
68+
string source = 2;
69+
}
70+
3471
message AnnounceProfileVersion {
3572
uint32 profile_version = 1;
3673

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
syntax = "proto3";
2+
3+
package decentraland.sdk.components;
4+
5+
import "decentraland/sdk/components/common/id.proto";
6+
import "decentraland/sdk/components/common/media_state.proto";
7+
option (common.ecs_component_id) = 1105;
8+
9+
message PBAudioEvent {
10+
common.MediaState state = 1;
11+
uint32 timestamp = 2; // monotonic counter
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
syntax = "proto3";
2+
package decentraland.sdk.components.common;
3+
4+
enum MediaState {
5+
MS_NONE = 0;
6+
MS_ERROR = 1;
7+
MS_LOADING = 2;
8+
MS_READY = 3;
9+
MS_PLAYING = 4;
10+
MS_BUFFERING = 5;
11+
MS_SEEKING = 6;
12+
MS_PAUSED = 7;
13+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
syntax = "proto3";
2+
package decentraland.sdk.components;
3+
4+
import "decentraland/sdk/components/common/id.proto";
5+
option (common.ecs_component_id) = 1106;
6+
7+
message PBRealmInfo {
8+
string base_url = 1;
9+
string realm_name = 2;
10+
int32 network_id = 3;
11+
string comms_adapter = 4;
12+
bool is_preview = 5;
13+
optional string room = 6;
14+
}

proto/decentraland/social/friendships/friendships.proto

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// ***
2-
// FOR INTERNAL USE ONLY, IN BETA VERSION OF THE PROTOCOL.
3-
// SUBJECT TO CHANGE.
4-
// ***
5-
61
syntax = "proto3";
72
package decentraland.social.friendships;
83

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
syntax = "proto3";
2+
package decentraland.social_service_v2;
3+
4+
import "google/protobuf/empty.proto";
5+
6+
// Errors
7+
8+
message InvalidFriendshipAction {}
9+
10+
message InternalServerError {}
11+
12+
// Types
13+
14+
message User { string address = 1; }
15+
16+
message RequestResponse {
17+
User user = 1;
18+
int64 created_at = 2;
19+
optional string message = 3;
20+
}
21+
22+
message RequestPayload {
23+
User user = 1;
24+
optional string message = 3;
25+
}
26+
27+
message Requests {
28+
repeated RequestResponse requests = 1;
29+
}
30+
31+
message AcceptResponse { User user = 1; }
32+
33+
message AcceptPayload { User user = 1; }
34+
35+
message RejectResponse { User user = 1; }
36+
37+
message RejectPayload { User user = 1; }
38+
39+
message DeleteResponse { User user = 1; }
40+
41+
message DeletePayload { User user = 1; }
42+
43+
message CancelResponse { User user = 1; }
44+
45+
message CancelPayload { User user = 1; }
46+
47+
message UpsertFriendshipPayload {
48+
oneof action {
49+
RequestPayload request = 1;
50+
AcceptPayload accept = 2;
51+
RejectPayload reject = 4;
52+
DeletePayload delete = 5;
53+
CancelPayload cancel = 6;
54+
}
55+
}
56+
57+
message MutualFriendsPayload {
58+
User user = 1;
59+
}
60+
61+
message UsersResponse {
62+
repeated User users = 1;
63+
}
64+
65+
message FriendshipRequestsResponse {
66+
oneof response {
67+
Requests requests = 1;
68+
InternalServerError internal_server_error = 2;
69+
}
70+
}
71+
72+
message UpsertFriendshipResponse {
73+
message Accepted {}
74+
oneof response {
75+
Accepted accepted = 1;
76+
InvalidFriendshipAction invalid_friendship_action = 2;
77+
InternalServerError internal_server_error = 3;
78+
}
79+
}
80+
81+
message FriendshipUpdate {
82+
oneof update {
83+
RequestResponse request = 1;
84+
AcceptResponse accept = 2;
85+
RejectResponse reject = 4;
86+
DeleteResponse delete = 5;
87+
CancelResponse cancel = 6;
88+
}
89+
}
90+
91+
service SocialService {
92+
// Get the list of friends for the authenticated user
93+
rpc GetFriends(google.protobuf.Empty) returns (stream UsersResponse) {}
94+
95+
// Get the list of mutual friends between the authenticated user and the one in the parameter
96+
rpc GetMutualFriends(MutualFriendsPayload) returns (stream UsersResponse) {}
97+
98+
// Get the pending friendship requests for the authenticated user
99+
rpc GetPendingFriendshipRequests(google.protobuf.Empty) returns (FriendshipRequestsResponse) {}
100+
101+
// Get the sent friendship requests for the authenticated user
102+
rpc GetSentFriendshipRequests(google.protobuf.Empty) returns (FriendshipRequestsResponse) {}
103+
104+
// Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE
105+
rpc UpsertFriendship(UpsertFriendshipPayload)
106+
returns (UpsertFriendshipResponse) {}
107+
108+
// Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE
109+
rpc SubscribeToFriendshipUpdates(google.protobuf.Empty)
110+
returns (stream FriendshipUpdate) {}
111+
}

public/sdk-components.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import public "decentraland/sdk/components/pointer_events.proto";
2626
import public "decentraland/sdk/components/pointer_lock.proto";
2727
import public "decentraland/sdk/components/raycast_result.proto";
2828
import public "decentraland/sdk/components/raycast.proto";
29+
import public "decentraland/sdk/components/realm_info.proto";
2930
import public "decentraland/sdk/components/text_shape.proto";
3031
import public "decentraland/sdk/components/tween.proto";
3132
import public "decentraland/sdk/components/tween_state.proto";

public/social_service_v2.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
syntax = "proto3";
2+
package decentraland.social;
3+
4+
import public "decentraland/social_service_v2/social_service.proto";

0 commit comments

Comments
 (0)