@dcl/protocol 1.0.0-18103449748.commit-258fabc → 1.0.0-18103584382.commit-cb75aeb

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.
@@ -2,23 +2,36 @@ syntax = "proto3";
2
2
  package decentraland.social_service.v2;
3
3
 
4
4
  import "google/protobuf/empty.proto";
5
-
6
- // Errors
7
- message InvalidFriendshipAction {}
8
- message InternalServerError {}
5
+ import "decentraland/social_service/errors.proto";
9
6
 
10
7
  // Types
11
8
  message User { string address = 1; }
12
9
 
10
+ message FriendProfile {
11
+ string address = 1;
12
+ string name = 2;
13
+ bool has_claimed_name = 3;
14
+ string profile_picture_url = 4;
15
+ }
16
+
17
+ message BlockedUserProfile {
18
+ string address = 1;
19
+ string name = 2;
20
+ bool has_claimed_name = 3;
21
+ string profile_picture_url = 4;
22
+ optional int64 blocked_at = 5;
23
+ }
24
+
13
25
  message Pagination {
14
26
  int32 limit = 1;
15
27
  int32 offset = 2;
16
28
  }
17
29
 
18
30
  message FriendshipRequestResponse {
19
- User user = 1;
31
+ FriendProfile friend = 1;
20
32
  int64 created_at = 2;
21
33
  optional string message = 3;
34
+ string id = 4;
22
35
  }
23
36
 
24
37
  message FriendshipRequests {
@@ -33,7 +46,6 @@ enum ConnectivityStatus {
33
46
 
34
47
  message GetFriendsPayload {
35
48
  optional Pagination pagination = 1;
36
- optional ConnectivityStatus status = 2;
37
49
  }
38
50
 
39
51
  message GetFriendshipRequestsPayload {
@@ -69,8 +81,8 @@ message PaginatedResponse {
69
81
  int32 page = 2;
70
82
  }
71
83
 
72
- message PaginatedUsersResponse {
73
- repeated User users = 1;
84
+ message PaginatedFriendsProfilesResponse {
85
+ repeated FriendProfile friends = 1;
74
86
  PaginatedResponse pagination_data = 2;
75
87
  }
76
88
 
@@ -86,29 +98,45 @@ message UpsertFriendshipResponse {
86
98
  message Accepted {
87
99
  string id = 1;
88
100
  int64 created_at = 2;
101
+ FriendProfile friend = 3;
102
+ optional string message = 4;
89
103
  }
90
104
  oneof response {
91
105
  Accepted accepted = 1;
92
106
  InvalidFriendshipAction invalid_friendship_action = 2;
93
107
  InternalServerError internal_server_error = 3;
108
+ InvalidRequest invalid_request = 4;
94
109
  }
95
110
  }
96
111
 
97
112
  message FriendshipUpdate {
113
+ message RequestResponse {
114
+ FriendProfile friend = 1;
115
+ int64 created_at = 2;
116
+ optional string message = 3;
117
+ string id = 4;
118
+ }
98
119
  message AcceptResponse { User user = 1; }
99
120
  message RejectResponse { User user = 1; }
100
121
  message DeleteResponse { User user = 1; }
101
122
  message CancelResponse { User user = 1; }
123
+ message BlockResponse { User user = 1; }
102
124
 
103
125
  oneof update {
104
- FriendshipRequestResponse request = 1;
126
+ RequestResponse request = 1;
105
127
  AcceptResponse accept = 2;
106
128
  RejectResponse reject = 3;
107
129
  DeleteResponse delete = 4;
108
130
  CancelResponse cancel = 5;
131
+ BlockResponse block = 6;
109
132
  }
110
133
  }
111
134
 
135
+ message FriendConnectivityUpdate {
136
+ FriendProfile friend = 1;
137
+ ConnectivityStatus status = 2;
138
+ }
139
+
112
140
  message GetFriendshipStatusPayload {
113
141
  User user = 1;
114
142
  }
@@ -121,6 +149,8 @@ enum FriendshipStatus {
121
149
  REJECTED = 4;
122
150
  DELETED = 5;
123
151
  BLOCKED = 6;
152
+ NONE = 7;
153
+ BLOCKED_BY = 8;
124
154
  }
125
155
 
126
156
  message GetFriendshipStatusResponse {
@@ -131,15 +161,440 @@ message GetFriendshipStatusResponse {
131
161
  oneof response {
132
162
  Ok accepted = 1;
133
163
  InternalServerError internal_server_error = 2;
164
+ InvalidRequest invalid_request = 3;
165
+ }
166
+ }
167
+
168
+ message BlockUserPayload {
169
+ User user = 1;
170
+ }
171
+
172
+ message BlockUserResponse {
173
+ message Ok {
174
+ BlockedUserProfile profile = 1;
175
+ }
176
+
177
+ oneof response {
178
+ Ok ok = 1;
179
+ InternalServerError internal_server_error = 2;
180
+ InvalidRequest invalid_request = 3;
181
+ ProfileNotFound profile_not_found = 4;
182
+ }
183
+ }
184
+
185
+ message UnblockUserPayload {
186
+ User user = 1;
187
+ }
188
+
189
+ message UnblockUserResponse {
190
+ message Ok {
191
+ BlockedUserProfile profile = 1;
192
+ }
193
+
194
+ oneof response {
195
+ Ok ok = 1;
196
+ InternalServerError internal_server_error = 2;
197
+ InvalidRequest invalid_request = 3;
198
+ ProfileNotFound profile_not_found = 4;
199
+ }
200
+ }
201
+
202
+ enum PrivateMessagePrivacySetting {
203
+ ALL = 0;
204
+ ONLY_FRIENDS = 1;
205
+ }
206
+
207
+ enum BlockedUsersMessagesVisibilitySetting {
208
+ SHOW_MESSAGES = 0;
209
+ DO_NOT_SHOW_MESSAGES = 1;
210
+ }
211
+
212
+ message SocialSettings {
213
+ PrivateMessagePrivacySetting private_messages_privacy = 1;
214
+ BlockedUsersMessagesVisibilitySetting blocked_users_messages_visibility = 2;
215
+ }
216
+
217
+ message GetSocialSettingsResponse {
218
+ message Ok {
219
+ SocialSettings settings = 1;
220
+ }
221
+
222
+ oneof response {
223
+ Ok ok = 1;
224
+ InternalServerError internal_server_error = 2;
225
+ }
226
+ }
227
+
228
+ message UpsertSocialSettingsPayload {
229
+ optional PrivateMessagePrivacySetting private_messages_privacy = 1;
230
+ optional BlockedUsersMessagesVisibilitySetting blocked_users_messages_visibility = 2;
231
+ }
232
+
233
+ message UpsertSocialSettingsResponse {
234
+ oneof response {
235
+ SocialSettings ok = 1;
236
+ InternalServerError internal_server_error = 2;
237
+ InvalidRequest invalid_request = 3;
238
+ }
239
+ }
240
+
241
+ message GetPrivateMessagesSettingsPayload {
242
+ repeated User user = 1;
243
+ }
244
+
245
+ message GetPrivateMessagesSettingsResponse {
246
+ message PrivateMessagesSettings {
247
+ User user = 1;
248
+ PrivateMessagePrivacySetting private_messages_privacy = 2;
249
+ bool is_friend = 3;
250
+ }
251
+
252
+ message Ok {
253
+ repeated PrivateMessagesSettings settings = 1;
254
+ }
255
+
256
+ oneof response {
257
+ Ok ok = 1;
258
+ InternalServerError internal_server_error = 2;
259
+ InvalidRequest invalid_request = 3;
260
+ ProfileNotFound profile_not_found = 4;
261
+ }
262
+ }
263
+
264
+ message GetBlockedUsersPayload {
265
+ optional Pagination pagination = 1;
266
+ }
267
+
268
+ message GetBlockedUsersResponse {
269
+ repeated BlockedUserProfile profiles = 1;
270
+ PaginatedResponse pagination_data = 2;
271
+ }
272
+
273
+ message GetBlockingStatusResponse {
274
+ repeated string blocked_users = 1;
275
+ repeated string blocked_by_users = 2;
276
+ }
277
+
278
+ message BlockUpdate {
279
+ string address = 1;
280
+ bool is_blocked = 2;
281
+ }
282
+
283
+ message CommunityMemberConnectivityUpdate {
284
+ string community_id = 1;
285
+ User member = 2;
286
+ ConnectivityStatus status = 3;
287
+ }
288
+
289
+ // Private voice chats
290
+
291
+ // Starting a private voice chat
292
+
293
+ message StartPrivateVoiceChatPayload {
294
+ User callee = 1;
295
+ }
296
+
297
+ message StartPrivateVoiceChatResponse {
298
+ message Ok {
299
+ string call_id = 1;
300
+ }
301
+
302
+ oneof response {
303
+ Ok ok = 1;
304
+ InternalServerError internal_server_error = 2;
305
+ InvalidRequest invalid_request = 3;
306
+ ConflictingError conflicting_error = 4;
307
+ ForbiddenError forbidden_error = 5;
308
+ }
309
+ }
310
+
311
+ // Accepting a private voice chat
312
+
313
+ message AcceptPrivateVoiceChatPayload {
314
+ string call_id = 1;
315
+ }
316
+
317
+ message AcceptPrivateVoiceChatResponse {
318
+ message Ok {
319
+ string call_id = 1;
320
+ PrivateVoiceChatCredentials credentials = 2;
321
+ }
322
+
323
+ oneof response {
324
+ Ok ok = 1;
325
+ InternalServerError internal_server_error = 2;
326
+ InvalidRequest invalid_request = 3;
327
+ NotFoundError not_found = 4;
328
+ ForbiddenError forbidden_error = 5;
329
+ }
330
+ }
331
+
332
+ // Rejecting a private voice chat
333
+
334
+ message RejectPrivateVoiceChatPayload {
335
+ string call_id = 1;
336
+ }
337
+
338
+ message RejectPrivateVoiceChatResponse {
339
+ message Ok {
340
+ string call_id = 1;
341
+ }
342
+
343
+ oneof response {
344
+ Ok ok = 1;
345
+ InternalServerError internal_server_error = 2;
346
+ InvalidRequest invalid_request = 3;
347
+ NotFoundError not_found = 4;
348
+ }
349
+ }
350
+
351
+ // Private voice chat updates
352
+
353
+ enum PrivateVoiceChatStatus {
354
+ VOICE_CHAT_REQUESTED = 0;
355
+ VOICE_CHAT_ACCEPTED = 1;
356
+ VOICE_CHAT_REJECTED = 2;
357
+ VOICE_CHAT_ENDED = 3;
358
+ VOICE_CHAT_EXPIRED = 4;
359
+ }
360
+
361
+ message PrivateVoiceChatCredentials {
362
+ string connection_url = 1;
363
+ }
364
+
365
+ message PrivateVoiceChatUpdate {
366
+ string call_id = 1;
367
+ PrivateVoiceChatStatus status = 2;
368
+ optional User caller = 3;
369
+ optional User callee = 4;
370
+ optional PrivateVoiceChatCredentials credentials = 5;
371
+ }
372
+
373
+ // Ending a private voice chat
374
+ // This is sent from the client to the server whenever the user wants to end the voice chat
375
+ // This could occur before the voice chat is accepted or after it is accepted
376
+
377
+ message EndPrivateVoiceChatPayload {
378
+ string call_id = 1;
379
+ }
380
+
381
+ message EndPrivateVoiceChatResponse {
382
+ message Ok {
383
+ string call_id = 1;
384
+ }
385
+
386
+ oneof response {
387
+ Ok ok = 1;
388
+ InternalServerError internal_server_error = 2;
389
+ NotFoundError not_found = 3;
390
+ }
391
+ }
392
+
393
+ // Get incoming private voice chat request
394
+
395
+ message GetIncomingPrivateVoiceChatRequestResponse {
396
+ message Ok {
397
+ User caller = 1;
398
+ string call_id = 2;
399
+ }
400
+
401
+ oneof response {
402
+ Ok ok = 1;
403
+ NotFoundError not_found = 2;
404
+ InternalServerError internal_server_error = 3;
405
+ }
406
+ }
407
+
408
+ // Community Voice Chat messages
409
+
410
+ // Community voice chat credentials - specific type for community chats
411
+ message CommunityVoiceChatCredentials {
412
+ string connection_url = 1;
413
+ }
414
+
415
+ // Starting a community voice chat
416
+ message StartCommunityVoiceChatPayload {
417
+ string community_id = 1;
418
+ }
419
+
420
+ message StartCommunityVoiceChatResponse {
421
+ message Ok {
422
+ CommunityVoiceChatCredentials credentials = 1; // Moderator gets credentials immediately
423
+ }
424
+
425
+ oneof response {
426
+ Ok ok = 1;
427
+ InvalidRequest invalid_request = 2;
428
+ ForbiddenError forbidden_error = 3;
429
+ ConflictingError conflicting_error = 4;
430
+ InternalServerError internal_server_error = 5;
431
+ }
432
+ }
433
+
434
+ // Joining a community voice chat
435
+ message JoinCommunityVoiceChatPayload {
436
+ string community_id = 1;
437
+ }
438
+
439
+ message JoinCommunityVoiceChatResponse {
440
+ message Ok {
441
+ string voice_chat_id = 1;
442
+ CommunityVoiceChatCredentials credentials = 2;
443
+ }
444
+
445
+ oneof response {
446
+ Ok ok = 1;
447
+ InvalidRequest invalid_request = 2;
448
+ ForbiddenError forbidden_error = 3;
449
+ NotFoundError not_found_error = 4;
450
+ ConflictingError conflicting_error = 5;
451
+ InternalServerError internal_server_error = 6;
452
+ }
453
+ }
454
+
455
+ // Request to speak in community voice chat
456
+ message RequestToSpeakInCommunityVoiceChatPayload {
457
+ string community_id = 1;
458
+ bool is_raising_hand = 2; // true to raise hand (request to speak), false to lower hand (withdraw request)
459
+ }
460
+
461
+ message RequestToSpeakInCommunityVoiceChatResponse {
462
+ message Ok {
463
+ string message = 1;
464
+ }
465
+
466
+ oneof response {
467
+ Ok ok = 1;
468
+ InvalidRequest invalid_request = 2;
469
+ ForbiddenError forbidden_error = 3;
470
+ NotFoundError not_found_error = 4;
471
+ InternalServerError internal_server_error = 5;
472
+ }
473
+ }
474
+
475
+ // Promote speaker in community voice chat
476
+ message PromoteSpeakerInCommunityVoiceChatPayload {
477
+ string community_id = 1;
478
+ string user_address = 2;
479
+ }
480
+
481
+ message PromoteSpeakerInCommunityVoiceChatResponse {
482
+ message Ok {
483
+ string message = 1;
484
+ }
485
+
486
+ oneof response {
487
+ Ok ok = 1;
488
+ InvalidRequest invalid_request = 2;
489
+ ForbiddenError forbidden_error = 3;
490
+ NotFoundError not_found_error = 4;
491
+ InternalServerError internal_server_error = 5;
492
+ }
493
+ }
494
+
495
+ // Demote speaker in community voice chat
496
+ message DemoteSpeakerInCommunityVoiceChatPayload {
497
+ string community_id = 1;
498
+ string user_address = 2;
499
+ }
500
+
501
+ message DemoteSpeakerInCommunityVoiceChatResponse {
502
+ message Ok {
503
+ string message = 1;
504
+ }
505
+
506
+ oneof response {
507
+ Ok ok = 1;
508
+ InvalidRequest invalid_request = 2;
509
+ ForbiddenError forbidden_error = 3;
510
+ NotFoundError not_found_error = 4;
511
+ InternalServerError internal_server_error = 5;
512
+ }
513
+ }
514
+
515
+ // Kick player from community voice chat
516
+ message KickPlayerFromCommunityVoiceChatPayload {
517
+ string community_id = 1;
518
+ string user_address = 2;
519
+ }
520
+
521
+ message KickPlayerFromCommunityVoiceChatResponse {
522
+ message Ok {
523
+ string message = 1;
524
+ }
525
+
526
+ oneof response {
527
+ Ok ok = 1;
528
+ InvalidRequest invalid_request = 2;
529
+ ForbiddenError forbidden_error = 3;
530
+ NotFoundError not_found_error = 4;
531
+ InternalServerError internal_server_error = 5;
532
+ }
533
+ }
534
+
535
+ // Reject speak request in community voice chat
536
+ message RejectSpeakRequestInCommunityVoiceChatPayload {
537
+ string community_id = 1;
538
+ string user_address = 2;
539
+ }
540
+
541
+ message RejectSpeakRequestInCommunityVoiceChatResponse {
542
+ message Ok {
543
+ string message = 1;
544
+ }
545
+
546
+ oneof response {
547
+ Ok ok = 1;
548
+ InvalidRequest invalid_request = 2;
549
+ ForbiddenError forbidden_error = 3;
550
+ NotFoundError not_found_error = 4;
551
+ InternalServerError internal_server_error = 5;
552
+ }
553
+ }
554
+
555
+ // End community voice chat (moderator/owner only)
556
+ message EndCommunityVoiceChatPayload {
557
+ string community_id = 1;
558
+ }
559
+
560
+ message EndCommunityVoiceChatResponse {
561
+ message Ok {
562
+ string message = 1;
563
+ }
564
+
565
+ oneof response {
566
+ Ok ok = 1;
567
+ InvalidRequest invalid_request = 2;
568
+ ForbiddenError forbidden_error = 3;
569
+ NotFoundError not_found_error = 4;
570
+ InternalServerError internal_server_error = 5;
134
571
  }
135
572
  }
136
573
 
574
+ enum CommunityVoiceChatStatus {
575
+ COMMUNITY_VOICE_CHAT_STARTED = 0;
576
+ COMMUNITY_VOICE_CHAT_ENDED = 1;
577
+ }
578
+
579
+ // Community voice chat updates/events - 'started' and 'ended' status
580
+ message CommunityVoiceChatUpdate {
581
+ string community_id = 1;
582
+ int64 created_at = 2;
583
+ CommunityVoiceChatStatus status = 3; // 'started' or 'ended'
584
+ optional int64 ended_at = 4; // Only present when status is 'ended'
585
+ repeated string positions = 5; // Positions/coordinates associated with the community (world: false)
586
+ bool is_member = 6; // Whether the receiving user is a member of the community
587
+ string community_name = 7; // Name of the community
588
+ optional string community_image = 8; // Image/picture of the community
589
+ repeated string worlds = 9; // World names associated with the community (world: true)
590
+ }
591
+
137
592
  service SocialService {
138
593
  // Get the list of friends for the authenticated user
139
- rpc GetFriends(GetFriendsPayload) returns (PaginatedUsersResponse) {}
594
+ rpc GetFriends(GetFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
140
595
 
141
596
  // Get the list of mutual friends between the authenticated user and the one in the parameter
142
- rpc GetMutualFriends(GetMutualFriendsPayload) returns (PaginatedUsersResponse) {}
597
+ rpc GetMutualFriends(GetMutualFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
143
598
 
144
599
  // Get the pending friendship requests for the authenticated user
145
600
  rpc GetPendingFriendshipRequests(GetFriendshipRequestsPayload) returns (PaginatedFriendshipRequestsResponse) {}
@@ -155,5 +610,78 @@ service SocialService {
155
610
  rpc SubscribeToFriendshipUpdates(google.protobuf.Empty)
156
611
  returns (stream FriendshipUpdate) {}
157
612
 
613
+ // Get the friendship status between the authenticated user and the one in the parameter
158
614
  rpc GetFriendshipStatus(GetFriendshipStatusPayload) returns (GetFriendshipStatusResponse) {}
615
+
616
+ // Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY
617
+ rpc SubscribeToFriendConnectivityUpdates(google.protobuf.Empty)
618
+ returns (stream FriendConnectivityUpdate) {}
619
+
620
+ rpc BlockUser(BlockUserPayload) returns (BlockUserResponse) {}
621
+
622
+ rpc UnblockUser(UnblockUserPayload) returns (UnblockUserResponse) {}
623
+
624
+ rpc GetBlockedUsers(GetBlockedUsersPayload) returns (GetBlockedUsersResponse) {}
625
+
626
+ rpc GetBlockingStatus(google.protobuf.Empty) returns (GetBlockingStatusResponse) {}
627
+
628
+ rpc SubscribeToBlockUpdates(google.protobuf.Empty) returns (stream BlockUpdate) {}
629
+
630
+ // Get all the social settings for the authenticated user
631
+ rpc GetSocialSettings(google.protobuf.Empty) returns (GetSocialSettingsResponse) {}
632
+
633
+ // Insert or update the social settings for the authenticated user
634
+ rpc UpsertSocialSettings(UpsertSocialSettingsPayload) returns (UpsertSocialSettingsResponse) {}
635
+
636
+ // Get the private messages privacy settings for the requested users
637
+ rpc GetPrivateMessagesSettings(GetPrivateMessagesSettingsPayload) returns (GetPrivateMessagesSettingsResponse) {}
638
+
639
+ // Subscribe to community member connectivity updates: ONLINE, OFFLINE
640
+ rpc SubscribeToCommunityMemberConnectivityUpdates(google.protobuf.Empty)
641
+ returns (stream CommunityMemberConnectivityUpdate) {}
642
+
643
+ // Start a private voice chat
644
+ rpc StartPrivateVoiceChat(StartPrivateVoiceChatPayload) returns (StartPrivateVoiceChatResponse) {}
645
+
646
+ // Accept a private voice chat
647
+ rpc AcceptPrivateVoiceChat(AcceptPrivateVoiceChatPayload) returns (AcceptPrivateVoiceChatResponse) {}
648
+
649
+ // Reject a private voice chat
650
+ rpc RejectPrivateVoiceChat(RejectPrivateVoiceChatPayload) returns (RejectPrivateVoiceChatResponse) {}
651
+
652
+ // End a private voice chat
653
+ rpc EndPrivateVoiceChat(EndPrivateVoiceChatPayload) returns (EndPrivateVoiceChatResponse) {}
654
+
655
+ // Get the incoming private voice chat request
656
+ rpc GetIncomingPrivateVoiceChatRequest(google.protobuf.Empty) returns (GetIncomingPrivateVoiceChatRequestResponse) {}
657
+
658
+ // Subscribe to private voice chat updates
659
+ rpc SubscribeToPrivateVoiceChatUpdates(google.protobuf.Empty) returns (stream PrivateVoiceChatUpdate) {}
660
+
661
+ // Start a community voice chat (moderator/owner only)
662
+ rpc StartCommunityVoiceChat(StartCommunityVoiceChatPayload) returns (StartCommunityVoiceChatResponse) {}
663
+
664
+ // Join a community voice chat
665
+ rpc JoinCommunityVoiceChat(JoinCommunityVoiceChatPayload) returns (JoinCommunityVoiceChatResponse) {}
666
+
667
+ // Request to speak in community voice chat
668
+ rpc RequestToSpeakInCommunityVoiceChat(RequestToSpeakInCommunityVoiceChatPayload) returns (RequestToSpeakInCommunityVoiceChatResponse) {}
669
+
670
+ // Promote speaker in community voice chat (moderator only)
671
+ rpc PromoteSpeakerInCommunityVoiceChat(PromoteSpeakerInCommunityVoiceChatPayload) returns (PromoteSpeakerInCommunityVoiceChatResponse) {}
672
+
673
+ // Demote speaker in community voice chat (moderator only)
674
+ rpc DemoteSpeakerInCommunityVoiceChat(DemoteSpeakerInCommunityVoiceChatPayload) returns (DemoteSpeakerInCommunityVoiceChatResponse) {}
675
+
676
+ // Kick player from community voice chat (moderator only)
677
+ rpc KickPlayerFromCommunityVoiceChat(KickPlayerFromCommunityVoiceChatPayload) returns (KickPlayerFromCommunityVoiceChatResponse) {}
678
+
679
+ // Reject speak request in community voice chat (moderator only)
680
+ rpc RejectSpeakRequestInCommunityVoiceChat(RejectSpeakRequestInCommunityVoiceChatPayload) returns (RejectSpeakRequestInCommunityVoiceChatResponse) {}
681
+
682
+ // End community voice chat (moderator/owner only)
683
+ rpc EndCommunityVoiceChat(EndCommunityVoiceChatPayload) returns (EndCommunityVoiceChatResponse) {}
684
+
685
+ // Subscribe to community voice chat updates (only 'started' events)
686
+ rpc SubscribeToCommunityVoiceChatUpdates(google.protobuf.Empty) returns (stream CommunityVoiceChatUpdate) {}
159
687
  }
@@ -0,0 +1,51 @@
1
+ syntax = "proto3";
2
+ package decentraland.social_service.v3;
3
+
4
+ import "decentraland/social_service/errors.proto";
5
+
6
+ // Common types
7
+ message User { string address = 1; }
8
+
9
+ message Profile {
10
+ string name = 1;
11
+ bool has_claimed_name = 2;
12
+ string profile_picture_url = 3;
13
+ }
14
+
15
+ message Friend {
16
+ string address = 1;
17
+ optional Profile profile = 2;
18
+ }
19
+
20
+ message Pagination {
21
+ int32 limit = 1;
22
+ int32 offset = 2;
23
+ }
24
+
25
+ message PaginatedResponse {
26
+ int32 total = 1;
27
+ int32 page = 2;
28
+ }
29
+
30
+ // Get mutual friends
31
+ message GetMutualFriendsPayload {
32
+ User user = 1;
33
+ optional Pagination pagination = 2;
34
+ }
35
+
36
+ message GetMutualFriendsResponse {
37
+ message Ok {
38
+ repeated Friend friends = 1;
39
+ PaginatedResponse pagination_data = 2;
40
+ }
41
+
42
+ oneof response {
43
+ Ok ok = 1;
44
+ InternalServerError internal_server_error = 2;
45
+ InvalidRequest invalid_request = 3;
46
+ }
47
+ }
48
+
49
+ service SocialService {
50
+ rpc GetMutualFriends(GetMutualFriendsPayload) returns (GetMutualFriendsResponse) {}
51
+ }