@dcl/protocol 1.0.0-8758013256.commit-44aab53 → 1.0.0-8789372854.commit-f692c7a

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.
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+
3
+ export const protobufPackage = "decentraland.social";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-8758013256.commit-44aab53",
3
+ "version": "1.0.0-8789372854.commit-f692c7a",
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": "44aab532f5f49ebbc20eddc6e4e2dfb03ecfeabc"
32
+ "commit": "f692c7a3e0399a147d75209bc2831e4b13324417"
33
33
  }
@@ -1,8 +1,3 @@
1
- // ***
2
- // FOR INTERNAL USE ONLY, IN BETA VERSION OF THE PROTOCOL.
3
- // SUBJECT TO CHANGE.
4
- // ***
5
-
6
1
  syntax = "proto3";
7
2
  package decentraland.social.friendships;
8
3
 
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ syntax = "proto3";
2
+ package decentraland.social;
3
+
4
+ import public "decentraland/social_service_v2/social_service.proto";