@@ -10,7 +10,7 @@ message InternalServerError {}
10
10
// Types
11
11
message User { string address = 1 ; }
12
12
13
- message FriendProfile {
13
+ message Profile {
14
14
string address = 1 ;
15
15
string name = 2 ;
16
16
bool has_claimed_name = 3 ;
@@ -23,7 +23,7 @@ message Pagination {
23
23
}
24
24
25
25
message FriendshipRequestResponse {
26
- FriendProfile friend = 1 ;
26
+ Profile friend = 1 ;
27
27
int64 created_at = 2 ;
28
28
optional string message = 3 ;
29
29
string id = 4 ;
@@ -77,7 +77,7 @@ message PaginatedResponse {
77
77
}
78
78
79
79
message PaginatedFriendsProfilesResponse {
80
- repeated FriendProfile friends = 1 ;
80
+ repeated Profile friends = 1 ;
81
81
PaginatedResponse pagination_data = 2 ;
82
82
}
83
83
@@ -93,7 +93,7 @@ message UpsertFriendshipResponse {
93
93
message Accepted {
94
94
string id = 1 ;
95
95
int64 created_at = 2 ;
96
- FriendProfile friend = 3 ;
96
+ Profile friend = 3 ;
97
97
optional string message = 4 ;
98
98
}
99
99
oneof response {
@@ -105,7 +105,7 @@ message UpsertFriendshipResponse {
105
105
106
106
message FriendshipUpdate {
107
107
message RequestResponse {
108
- FriendProfile friend = 1 ;
108
+ Profile friend = 1 ;
109
109
int64 created_at = 2 ;
110
110
optional string message = 3 ;
111
111
string id = 4 ;
@@ -125,7 +125,7 @@ message FriendshipUpdate {
125
125
}
126
126
127
127
message FriendConnectivityUpdate {
128
- FriendProfile friend = 1 ;
128
+ Profile friend = 1 ;
129
129
ConnectivityStatus status = 2 ;
130
130
}
131
131
@@ -155,6 +155,31 @@ message GetFriendshipStatusResponse {
155
155
}
156
156
}
157
157
158
+ message BlockUserPayload {
159
+ User user = 1 ;
160
+ }
161
+
162
+ message BlockUserResponse {
163
+ Profile profile = 1 ;
164
+ }
165
+
166
+ message UnblockUserPayload {
167
+ User user = 1 ;
168
+ }
169
+
170
+ message UnblockUserResponse {
171
+ Profile profile = 1 ;
172
+ }
173
+
174
+ message GetBlockedUsersPayload {
175
+ optional Pagination pagination = 1 ;
176
+ }
177
+
178
+ message GetBlockedUsersResponse {
179
+ repeated Profile profiles = 1 ;
180
+ PaginatedResponse pagination_data = 2 ;
181
+ }
182
+
158
183
service SocialService {
159
184
// Get the list of friends for the authenticated user
160
185
rpc GetFriends (GetFriendsPayload ) returns (PaginatedFriendsProfilesResponse ) {}
@@ -182,4 +207,10 @@ service SocialService {
182
207
// Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY
183
208
rpc SubscribeToFriendConnectivityUpdates (google .protobuf .Empty )
184
209
returns (stream FriendConnectivityUpdate ) {}
210
+
211
+ rpc BlockUser (BlockUserPayload ) returns (BlockUserResponse ) {}
212
+
213
+ rpc UnblockUser (UnblockUserPayload ) returns (UnblockUserResponse ) {}
214
+
215
+ rpc GetBlockedUsers (GetBlockedUsersPayload ) returns (GetBlockedUsersResponse ) {}
185
216
}
0 commit comments