@dcl/protocol 1.0.0-4408137944.commit-a67c796 → 1.0.0-4419899496.commit-11d63ec
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/out-js/decentraland/social/friendships/friendships.gen.d.ts +4816 -0
- package/out-js/decentraland/social/friendships/friendships.gen.js +1216 -0
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -0
- package/out-js/social.gen.d.ts +1 -0
- package/out-js/social.gen.js +6 -0
- package/out-js/social.gen.js.map +1 -0
- package/out-ts/decentraland/social/friendships/friendships.gen.ts +1447 -0
- package/out-ts/social.gen.ts +3 -0
- package/package.json +2 -2
- package/proto/decentraland/social/friendships/friendships.proto +106 -0
- package/public/social.proto +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-4419899496.commit-11d63ec",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"out-js",
|
|
27
27
|
"public"
|
|
28
28
|
],
|
|
29
|
-
"commit": "
|
|
29
|
+
"commit": "11d63ec5882ba77d22215424de946176f0a83f61"
|
|
30
30
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.social.friendships;
|
|
3
|
+
|
|
4
|
+
import "google/protobuf/empty.proto";
|
|
5
|
+
|
|
6
|
+
// Validation and anti-spam errors
|
|
7
|
+
enum FriendshipErrorCode {
|
|
8
|
+
TOO_MANY_REQUESTS_SENT = 0;
|
|
9
|
+
NOT_ENOUGH_TIME_PASSED = 1;
|
|
10
|
+
BLOCKED_USER = 2;
|
|
11
|
+
NON_EXISTING_USER = 3;
|
|
12
|
+
INVALID_REQUEST = 4;
|
|
13
|
+
UNKNOWN = 5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// This message is a response that is sent from the server to the client
|
|
17
|
+
message FriendshipEventResponse {
|
|
18
|
+
oneof body {
|
|
19
|
+
RequestResponse request = 1;
|
|
20
|
+
AcceptResponse accept = 2;
|
|
21
|
+
RejectResponse reject = 4;
|
|
22
|
+
DeleteResponse delete = 5;
|
|
23
|
+
CancelResponse cancel = 6;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message FriendshipEventPayload {
|
|
28
|
+
oneof body {
|
|
29
|
+
RequestPayload request = 1;
|
|
30
|
+
AcceptPayload accept = 2;
|
|
31
|
+
RejectPayload reject = 4;
|
|
32
|
+
DeletePayload delete = 5;
|
|
33
|
+
CancelPayload cancel = 6;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message User { string address = 1; }
|
|
38
|
+
|
|
39
|
+
message Users { repeated User users = 1; }
|
|
40
|
+
|
|
41
|
+
message RequestResponse {
|
|
42
|
+
User user = 1;
|
|
43
|
+
int64 created_at = 2;
|
|
44
|
+
optional string message = 3;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message RequestPayload {
|
|
48
|
+
User user = 1;
|
|
49
|
+
optional string message = 3;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message Requests {
|
|
53
|
+
int64 total = 1; // Total amount of friendship requests
|
|
54
|
+
repeated RequestResponse items = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message RequestEvents {
|
|
58
|
+
Requests outgoing = 1; // Requests the authed user have sent to users
|
|
59
|
+
Requests incoming = 2; // Requests the authed user have received from users
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message AcceptResponse { User user = 1; }
|
|
63
|
+
|
|
64
|
+
message AcceptPayload { User user = 1; }
|
|
65
|
+
|
|
66
|
+
message RejectResponse { User user = 1; }
|
|
67
|
+
|
|
68
|
+
message RejectPayload { User user = 1; }
|
|
69
|
+
|
|
70
|
+
message DeleteResponse { User user = 1; }
|
|
71
|
+
|
|
72
|
+
message DeletePayload { User user = 1; }
|
|
73
|
+
|
|
74
|
+
message CancelResponse { User user = 1; }
|
|
75
|
+
|
|
76
|
+
message CancelPayload { User user = 1; }
|
|
77
|
+
|
|
78
|
+
message UpdateFriendshipPayload { FriendshipEventPayload event = 1; }
|
|
79
|
+
|
|
80
|
+
message UpdateFriendshipResponse {
|
|
81
|
+
oneof response {
|
|
82
|
+
FriendshipErrorCode error = 1;
|
|
83
|
+
FriendshipEventResponse event = 2;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message SubscribeFriendshipEventsUpdatesResponse {
|
|
88
|
+
repeated FriendshipEventResponse events = 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
service FriendshipsService {
|
|
92
|
+
// Get the list of friends for the authenticated user
|
|
93
|
+
rpc GetFriends(google.protobuf.Empty) returns (stream Users) {}
|
|
94
|
+
|
|
95
|
+
// Get the list of request events for the authenticated user
|
|
96
|
+
rpc GetRequestEvents(google.protobuf.Empty) returns (RequestEvents) {}
|
|
97
|
+
|
|
98
|
+
// Update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE
|
|
99
|
+
rpc UpdateFriendshipEvent(UpdateFriendshipPayload)
|
|
100
|
+
returns (UpdateFriendshipResponse) {}
|
|
101
|
+
|
|
102
|
+
// Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL,
|
|
103
|
+
// DELETE
|
|
104
|
+
rpc SubscribeFriendshipEventsUpdates(google.protobuf.Empty)
|
|
105
|
+
returns (stream SubscribeFriendshipEventsUpdatesResponse) {}
|
|
106
|
+
}
|