@dcl/protocol 1.0.0-13589257140.commit-dc6f088 → 1.0.0-13589968257.commit-0870a3e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-13589257140.commit-dc6f088",
3
+ "version": "1.0.0-13589968257.commit-0870a3e",
4
4
  "description": "",
5
5
  "repository": "decentraland/protocol.git",
6
6
  "homepage": "https://github.com/decentraland/protocol#readme",
@@ -29,5 +29,5 @@
29
29
  "out-js",
30
30
  "public"
31
31
  ],
32
- "commit": "dc6f0880e2a98d203d810d35a527a1e202c41500"
32
+ "commit": "0870a3e554a46f0d06dda40bc7597abc3e567a2f"
33
33
  }
@@ -0,0 +1,35 @@
1
+ syntax = "proto3";
2
+ package decentraland.sdk.components;
3
+ import "decentraland/sdk/components/common/id.proto";
4
+ import "decentraland/common/colors.proto";
5
+ import "decentraland/common/texture.proto";
6
+ option (common.ecs_component_id) = 1079;
7
+
8
+ message PBLightSource {
9
+ optional bool active = 4; // default = true, whether the lightSource is active or not.
10
+ optional decentraland.common.Color3 color = 1; // default = Color.white, the tint of the light, in RGB format where each component is a floating point value with a range from 0 to 1.
11
+ optional float brightness = 2; // default = 250, ranges from 1 (dim) to 100,000 (very bright), expressed in Lumens for Point and Spot.
12
+ optional float range = 3; // default = 10, how far the light travels, expressed in meters.
13
+
14
+ oneof type {
15
+ Point point = 6;
16
+ Spot spot = 7;
17
+ }
18
+
19
+ message Point {
20
+ optional ShadowType shadow = 5; // default = ShadowType.ST_NONE The type of shadow the light source supports.
21
+ }
22
+
23
+ message Spot {
24
+ optional float inner_angle = 1; // default = 21.8. Inner angle can't be higher than outer angle, otherwise will default to same value. Min value is 0. Max value is 179.
25
+ optional float outer_angle = 2; // default = 30. Outer angle can't be lower than inner angle, otherwise will inner angle will be set to same value. Max value is 179.
26
+ optional ShadowType shadow = 5; // default = ShadowType.ST_NONE The type of shadow the light source supports.
27
+ optional decentraland.common.TextureUnion shadow_mask_texture = 8; // Texture mask through which shadows are cast to simulate caustics, soft shadows, and light shapes such as light entering from a window.
28
+ }
29
+
30
+ enum ShadowType {
31
+ ST_NONE = 0; // No shadows are cast from this LightSource.
32
+ ST_SOFT = 1; // More realistic type of shadow that reduces block artifacts, noise or pixelation, but requires more processing.
33
+ ST_HARD = 2; // Less realistic type of shadow but more performant, uses hard edges.
34
+ }
35
+ }
@@ -10,15 +10,23 @@ message InternalServerError {}
10
10
  // Types
11
11
  message User { string address = 1; }
12
12
 
13
+ message FriendProfile {
14
+ string address = 1;
15
+ string name = 2;
16
+ bool has_claimed_name = 3;
17
+ string profile_picture_url = 4;
18
+ }
19
+
13
20
  message Pagination {
14
21
  int32 limit = 1;
15
22
  int32 offset = 2;
16
23
  }
17
24
 
18
25
  message FriendshipRequestResponse {
19
- User user = 1;
26
+ FriendProfile friend = 1;
20
27
  int64 created_at = 2;
21
28
  optional string message = 3;
29
+ string id = 4;
22
30
  }
23
31
 
24
32
  message FriendshipRequests {
@@ -33,7 +41,6 @@ enum ConnectivityStatus {
33
41
 
34
42
  message GetFriendsPayload {
35
43
  optional Pagination pagination = 1;
36
- optional ConnectivityStatus status = 2;
37
44
  }
38
45
 
39
46
  message GetFriendshipRequestsPayload {
@@ -69,8 +76,8 @@ message PaginatedResponse {
69
76
  int32 page = 2;
70
77
  }
71
78
 
72
- message PaginatedUsersResponse {
73
- repeated User users = 1;
79
+ message PaginatedFriendsProfilesResponse {
80
+ repeated FriendProfile friends = 1;
74
81
  PaginatedResponse pagination_data = 2;
75
82
  }
76
83
 
@@ -86,6 +93,8 @@ message UpsertFriendshipResponse {
86
93
  message Accepted {
87
94
  string id = 1;
88
95
  int64 created_at = 2;
96
+ FriendProfile friend = 3;
97
+ optional string message = 4;
89
98
  }
90
99
  oneof response {
91
100
  Accepted accepted = 1;
@@ -95,13 +104,19 @@ message UpsertFriendshipResponse {
95
104
  }
96
105
 
97
106
  message FriendshipUpdate {
107
+ message RequestResponse {
108
+ FriendProfile friend = 1;
109
+ int64 created_at = 2;
110
+ optional string message = 3;
111
+ string id = 4;
112
+ }
98
113
  message AcceptResponse { User user = 1; }
99
114
  message RejectResponse { User user = 1; }
100
115
  message DeleteResponse { User user = 1; }
101
116
  message CancelResponse { User user = 1; }
102
117
 
103
118
  oneof update {
104
- FriendshipRequestResponse request = 1;
119
+ RequestResponse request = 1;
105
120
  AcceptResponse accept = 2;
106
121
  RejectResponse reject = 3;
107
122
  DeleteResponse delete = 4;
@@ -109,6 +124,11 @@ message FriendshipUpdate {
109
124
  }
110
125
  }
111
126
 
127
+ message FriendConnectivityUpdate {
128
+ FriendProfile friend = 1;
129
+ ConnectivityStatus status = 2;
130
+ }
131
+
112
132
  message GetFriendshipStatusPayload {
113
133
  User user = 1;
114
134
  }
@@ -121,6 +141,7 @@ enum FriendshipStatus {
121
141
  REJECTED = 4;
122
142
  DELETED = 5;
123
143
  BLOCKED = 6;
144
+ NONE = 7;
124
145
  }
125
146
 
126
147
  message GetFriendshipStatusResponse {
@@ -136,10 +157,10 @@ message GetFriendshipStatusResponse {
136
157
 
137
158
  service SocialService {
138
159
  // Get the list of friends for the authenticated user
139
- rpc GetFriends(GetFriendsPayload) returns (PaginatedUsersResponse) {}
160
+ rpc GetFriends(GetFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
140
161
 
141
162
  // Get the list of mutual friends between the authenticated user and the one in the parameter
142
- rpc GetMutualFriends(GetMutualFriendsPayload) returns (PaginatedUsersResponse) {}
163
+ rpc GetMutualFriends(GetMutualFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
143
164
 
144
165
  // Get the pending friendship requests for the authenticated user
145
166
  rpc GetPendingFriendshipRequests(GetFriendshipRequestsPayload) returns (PaginatedFriendshipRequestsResponse) {}
@@ -155,5 +176,10 @@ service SocialService {
155
176
  rpc SubscribeToFriendshipUpdates(google.protobuf.Empty)
156
177
  returns (stream FriendshipUpdate) {}
157
178
 
179
+ // Get the friendship status between the authenticated user and the one in the parameter
158
180
  rpc GetFriendshipStatus(GetFriendshipStatusPayload) returns (GetFriendshipStatusResponse) {}
181
+
182
+ // Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY
183
+ rpc SubscribeToFriendConnectivityUpdates(google.protobuf.Empty)
184
+ returns (stream FriendConnectivityUpdate) {}
159
185
  }