@dcl/protocol 1.0.0-5555484353.commit-63c469d → 1.0.0-5623934099.commit-07e0626

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.
@@ -103,6 +103,14 @@ export interface UpdateFriendshipPayload {
103
103
  authToken?: Payload | undefined;
104
104
  }
105
105
 
106
+ export interface MutualFriendsPayload {
107
+ user:
108
+ | User
109
+ | undefined;
110
+ /** For internal use only, subject to change. */
111
+ authToken?: Payload | undefined;
112
+ }
113
+
106
114
  export interface Payload {
107
115
  /** For internal use only, subject to change. */
108
116
  synapseToken?: string | undefined;
@@ -135,6 +143,7 @@ export interface UsersResponse {
135
143
  | { $case: "unauthorizedError"; unauthorizedError: UnauthorizedError }
136
144
  | { $case: "forbiddenError"; forbiddenError: ForbiddenError }
137
145
  | { $case: "tooManyRequestsError"; tooManyRequestsError: TooManyRequestsError }
146
+ | { $case: "badRequestError"; badRequestError: BadRequestError }
138
147
  | undefined;
139
148
  }
140
149
 
@@ -1455,6 +1464,80 @@ export namespace UpdateFriendshipPayload {
1455
1464
  }
1456
1465
  }
1457
1466
 
1467
+ function createBaseMutualFriendsPayload(): MutualFriendsPayload {
1468
+ return { user: undefined, authToken: undefined };
1469
+ }
1470
+
1471
+ export namespace MutualFriendsPayload {
1472
+ export function encode(message: MutualFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1473
+ if (message.user !== undefined) {
1474
+ User.encode(message.user, writer.uint32(10).fork()).ldelim();
1475
+ }
1476
+ if (message.authToken !== undefined) {
1477
+ Payload.encode(message.authToken, writer.uint32(18).fork()).ldelim();
1478
+ }
1479
+ return writer;
1480
+ }
1481
+
1482
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): MutualFriendsPayload {
1483
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1484
+ let end = length === undefined ? reader.len : reader.pos + length;
1485
+ const message = createBaseMutualFriendsPayload();
1486
+ while (reader.pos < end) {
1487
+ const tag = reader.uint32();
1488
+ switch (tag >>> 3) {
1489
+ case 1:
1490
+ if (tag !== 10) {
1491
+ break;
1492
+ }
1493
+
1494
+ message.user = User.decode(reader, reader.uint32());
1495
+ continue;
1496
+ case 2:
1497
+ if (tag !== 18) {
1498
+ break;
1499
+ }
1500
+
1501
+ message.authToken = Payload.decode(reader, reader.uint32());
1502
+ continue;
1503
+ }
1504
+ if ((tag & 7) === 4 || tag === 0) {
1505
+ break;
1506
+ }
1507
+ reader.skipType(tag & 7);
1508
+ }
1509
+ return message;
1510
+ }
1511
+
1512
+ export function fromJSON(object: any): MutualFriendsPayload {
1513
+ return {
1514
+ user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
1515
+ authToken: isSet(object.authToken) ? Payload.fromJSON(object.authToken) : undefined,
1516
+ };
1517
+ }
1518
+
1519
+ export function toJSON(message: MutualFriendsPayload): unknown {
1520
+ const obj: any = {};
1521
+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
1522
+ message.authToken !== undefined &&
1523
+ (obj.authToken = message.authToken ? Payload.toJSON(message.authToken) : undefined);
1524
+ return obj;
1525
+ }
1526
+
1527
+ export function create<I extends Exact<DeepPartial<MutualFriendsPayload>, I>>(base?: I): MutualFriendsPayload {
1528
+ return MutualFriendsPayload.fromPartial(base ?? {});
1529
+ }
1530
+
1531
+ export function fromPartial<I extends Exact<DeepPartial<MutualFriendsPayload>, I>>(object: I): MutualFriendsPayload {
1532
+ const message = createBaseMutualFriendsPayload();
1533
+ message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
1534
+ message.authToken = (object.authToken !== undefined && object.authToken !== null)
1535
+ ? Payload.fromPartial(object.authToken)
1536
+ : undefined;
1537
+ return message;
1538
+ }
1539
+ }
1540
+
1458
1541
  function createBasePayload(): Payload {
1459
1542
  return { synapseToken: undefined };
1460
1543
  }
@@ -1813,6 +1896,9 @@ export namespace UsersResponse {
1813
1896
  case "tooManyRequestsError":
1814
1897
  TooManyRequestsError.encode(message.response.tooManyRequestsError, writer.uint32(42).fork()).ldelim();
1815
1898
  break;
1899
+ case "badRequestError":
1900
+ BadRequestError.encode(message.response.badRequestError, writer.uint32(50).fork()).ldelim();
1901
+ break;
1816
1902
  }
1817
1903
  return writer;
1818
1904
  }
@@ -1871,6 +1957,16 @@ export namespace UsersResponse {
1871
1957
  tooManyRequestsError: TooManyRequestsError.decode(reader, reader.uint32()),
1872
1958
  };
1873
1959
  continue;
1960
+ case 6:
1961
+ if (tag !== 50) {
1962
+ break;
1963
+ }
1964
+
1965
+ message.response = {
1966
+ $case: "badRequestError",
1967
+ badRequestError: BadRequestError.decode(reader, reader.uint32()),
1968
+ };
1969
+ continue;
1874
1970
  }
1875
1971
  if ((tag & 7) === 4 || tag === 0) {
1876
1972
  break;
@@ -1898,6 +1994,8 @@ export namespace UsersResponse {
1898
1994
  $case: "tooManyRequestsError",
1899
1995
  tooManyRequestsError: TooManyRequestsError.fromJSON(object.tooManyRequestsError),
1900
1996
  }
1997
+ : isSet(object.badRequestError)
1998
+ ? { $case: "badRequestError", badRequestError: BadRequestError.fromJSON(object.badRequestError) }
1901
1999
  : undefined,
1902
2000
  };
1903
2001
  }
@@ -1922,6 +2020,10 @@ export namespace UsersResponse {
1922
2020
  (obj.tooManyRequestsError = message.response?.tooManyRequestsError
1923
2021
  ? TooManyRequestsError.toJSON(message.response?.tooManyRequestsError)
1924
2022
  : undefined);
2023
+ message.response?.$case === "badRequestError" &&
2024
+ (obj.badRequestError = message.response?.badRequestError
2025
+ ? BadRequestError.toJSON(message.response?.badRequestError)
2026
+ : undefined);
1925
2027
  return obj;
1926
2028
  }
1927
2029
 
@@ -1974,6 +2076,16 @@ export namespace UsersResponse {
1974
2076
  tooManyRequestsError: TooManyRequestsError.fromPartial(object.response.tooManyRequestsError),
1975
2077
  };
1976
2078
  }
2079
+ if (
2080
+ object.response?.$case === "badRequestError" &&
2081
+ object.response?.badRequestError !== undefined &&
2082
+ object.response?.badRequestError !== null
2083
+ ) {
2084
+ message.response = {
2085
+ $case: "badRequestError",
2086
+ badRequestError: BadRequestError.fromPartial(object.response.badRequestError),
2087
+ };
2088
+ }
1977
2089
  return message;
1978
2090
  }
1979
2091
  }
@@ -2599,6 +2711,15 @@ export const FriendshipsServiceDefinition = {
2599
2711
  responseStream: true,
2600
2712
  options: {},
2601
2713
  },
2714
+ /** Get the list of mutual friends between the authenticated user and the one in the parameter */
2715
+ getMutualFriends: {
2716
+ name: "GetMutualFriends",
2717
+ requestType: MutualFriendsPayload,
2718
+ requestStream: false,
2719
+ responseType: UsersResponse,
2720
+ responseStream: true,
2721
+ options: {},
2722
+ },
2602
2723
  /** Get the list of request events for the authenticated user */
2603
2724
  getRequestEvents: {
2604
2725
  name: "GetRequestEvents",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-5555484353.commit-63c469d",
3
+ "version": "1.0.0-5623934099.commit-07e0626",
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": "63c469d6c0c41575282924291b66291dafe49a41"
32
+ "commit": "07e0626e52fc49e2c9c45bbe53f8baead8431036"
33
33
  }
@@ -35,6 +35,11 @@ message CommsAdapterRequest {
35
35
  string connection_string = 1;
36
36
  }
37
37
 
38
+ message TriggerSceneEmoteRequest {
39
+ string src = 1;
40
+ optional bool loop = 2;
41
+ }
42
+
38
43
  message SuccessResponse {
39
44
  bool success = 1;
40
45
  }
@@ -67,4 +72,7 @@ service RestrictedActionsService {
67
72
  // Asks the explorer to connect to other communications adapter, this feature
68
73
  // can be used to join private game servers
69
74
  rpc SetCommunicationsAdapter(CommsAdapterRequest) returns (SuccessResponse) {}
75
+
76
+ // TriggerSceneEmote will trigger an scene emote file in this current user
77
+ rpc TriggerSceneEmote(TriggerSceneEmoteRequest) returns (SuccessResponse) {}
70
78
  }
@@ -78,6 +78,12 @@ message UpdateFriendshipPayload {
78
78
  optional Payload auth_token = 2;
79
79
  }
80
80
 
81
+ message MutualFriendsPayload {
82
+ User user = 1;
83
+ // For internal use only, subject to change.
84
+ optional Payload auth_token = 2;
85
+ }
86
+
81
87
  message Payload {
82
88
  // For internal use only, subject to change.
83
89
  optional string synapse_token = 1;
@@ -106,6 +112,7 @@ message UsersResponse {
106
112
  UnauthorizedError unauthorized_error = 3;
107
113
  ForbiddenError forbidden_error = 4;
108
114
  TooManyRequestsError too_many_requests_error = 5;
115
+ BadRequestError bad_request_error = 6;
109
116
  }
110
117
  }
111
118
 
@@ -144,6 +151,9 @@ service FriendshipsService {
144
151
  // Get the list of friends for the authenticated user
145
152
  rpc GetFriends(Payload) returns (stream UsersResponse) {}
146
153
 
154
+ // Get the list of mutual friends between the authenticated user and the one in the parameter
155
+ rpc GetMutualFriends(MutualFriendsPayload) returns (stream UsersResponse) {}
156
+
147
157
  // Get the list of request events for the authenticated user
148
158
  rpc GetRequestEvents(Payload) returns (RequestEventsResponse) {}
149
159