@dcl/protocol 1.0.0-13831858134.commit-4a5d023 → 1.0.0-13897190826.commit-195803d

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.
Files changed (87) hide show
  1. package/out-js/decentraland/common/texture.gen.d.ts +0 -18
  2. package/out-js/decentraland/common/texture.gen.js +4 -104
  3. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  4. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +0 -2
  5. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +2 -19
  6. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
  7. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +0 -41
  8. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +3 -241
  9. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  10. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +0 -2
  11. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +1 -19
  12. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  13. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +1 -35
  14. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +3 -172
  15. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  16. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +0 -3
  17. package/out-js/decentraland/sdk/components/common/input_action.gen.js +0 -18
  18. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  19. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +0 -19
  20. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +3 -90
  21. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
  22. package/out-js/decentraland/sdk/components/material.gen.d.ts +0 -20
  23. package/out-js/decentraland/sdk/components/material.gen.js +2 -86
  24. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  25. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +0 -18
  26. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +4 -90
  27. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  28. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +3 -19
  29. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +4 -90
  30. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  31. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +0 -4
  32. package/out-js/decentraland/sdk/components/ui_text.gen.js +1 -30
  33. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
  34. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +0 -37
  35. package/out-js/decentraland/sdk/components/ui_transform.gen.js +2 -201
  36. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  37. package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +306 -22
  38. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +1601 -124
  39. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -1
  40. package/out-ts/decentraland/common/texture.gen.ts +4 -119
  41. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +1 -20
  42. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +1 -292
  43. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +0 -20
  44. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +2 -218
  45. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +0 -18
  46. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +2 -108
  47. package/out-ts/decentraland/sdk/components/material.gen.ts +1 -102
  48. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +0 -99
  49. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +3 -100
  50. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +1 -40
  51. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +1 -230
  52. package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +2590 -946
  53. package/package.json +3 -6
  54. package/proto/decentraland/common/texture.proto +1 -8
  55. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +1 -2
  56. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +0 -21
  57. package/proto/decentraland/sdk/components/avatar_shape.proto +0 -1
  58. package/proto/decentraland/sdk/components/camera_mode_area.proto +3 -22
  59. package/proto/decentraland/sdk/components/common/input_action.proto +0 -3
  60. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +0 -13
  61. package/proto/decentraland/sdk/components/light_source.proto +35 -0
  62. package/proto/decentraland/sdk/components/material.proto +1 -13
  63. package/proto/decentraland/sdk/components/mesh_collider.proto +1 -8
  64. package/proto/decentraland/sdk/components/mesh_renderer.proto +3 -8
  65. package/proto/decentraland/sdk/components/ui_text.proto +0 -3
  66. package/proto/decentraland/sdk/components/ui_transform.proto +0 -23
  67. package/proto/decentraland/social_service/v2/social_service_v2.proto +119 -9
  68. package/public/sdk-components.proto +0 -2
  69. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +0 -66
  70. package/out-js/decentraland/sdk/components/gltf_node.gen.js +0 -69
  71. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +0 -1
  72. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +0 -43
  73. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +0 -122
  74. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +0 -1
  75. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +0 -116
  76. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +0 -139
  77. package/proto/decentraland/sdk/components/camera_layer.proto +0 -30
  78. package/proto/decentraland/sdk/components/camera_layers.proto +0 -11
  79. package/proto/decentraland/sdk/components/global_light.proto +0 -22
  80. package/proto/decentraland/sdk/components/gltf_node.proto +0 -42
  81. package/proto/decentraland/sdk/components/gltf_node_state.proto +0 -20
  82. package/proto/decentraland/sdk/components/light.proto +0 -42
  83. package/proto/decentraland/sdk/components/primary_pointer_info.proto +0 -25
  84. package/proto/decentraland/sdk/components/spotlight.proto +0 -21
  85. package/proto/decentraland/sdk/components/texture_camera.proto +0 -41
  86. package/proto/decentraland/sdk/components/ui_canvas.proto +0 -16
  87. package/proto/decentraland/sdk/components/ui_scroll_result.proto +0 -12
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SocialServiceDefinition = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendshipUpdate_CancelResponse = exports.FriendshipUpdate_DeleteResponse = exports.FriendshipUpdate_RejectResponse = exports.FriendshipUpdate_AcceptResponse = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.PaginatedFriendshipRequestsResponse = exports.PaginatedUsersResponse = exports.PaginatedResponse = exports.GetMutualFriendsPayload = exports.UpsertFriendshipPayload_CancelPayload = exports.UpsertFriendshipPayload_DeletePayload = exports.UpsertFriendshipPayload_RejectPayload = exports.UpsertFriendshipPayload_AcceptPayload = exports.UpsertFriendshipPayload_RequestPayload = exports.UpsertFriendshipPayload = exports.GetFriendshipRequestsPayload = exports.GetFriendsPayload = exports.FriendshipRequests = exports.FriendshipRequestResponse = exports.Pagination = exports.User = exports.InternalServerError = exports.InvalidFriendshipAction = exports.FriendshipStatus = exports.ConnectivityStatus = exports.protobufPackage = void 0;
6
+ exports.SocialServiceDefinition = exports.BlockUpdate = exports.GetBlockingStatusResponse = exports.GetBlockedUsersResponse = exports.GetBlockedUsersPayload = exports.UnblockUserResponse_Ok = exports.UnblockUserResponse = exports.UnblockUserPayload = exports.BlockUserResponse_Ok = exports.BlockUserResponse = exports.BlockUserPayload = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendConnectivityUpdate = exports.FriendshipUpdate_BlockResponse = exports.FriendshipUpdate_CancelResponse = exports.FriendshipUpdate_DeleteResponse = exports.FriendshipUpdate_RejectResponse = exports.FriendshipUpdate_AcceptResponse = exports.FriendshipUpdate_RequestResponse = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.PaginatedFriendshipRequestsResponse = exports.PaginatedFriendsProfilesResponse = exports.PaginatedResponse = exports.GetMutualFriendsPayload = exports.UpsertFriendshipPayload_CancelPayload = exports.UpsertFriendshipPayload_DeletePayload = exports.UpsertFriendshipPayload_RejectPayload = exports.UpsertFriendshipPayload_AcceptPayload = exports.UpsertFriendshipPayload_RequestPayload = exports.UpsertFriendshipPayload = exports.GetFriendshipRequestsPayload = exports.GetFriendsPayload = exports.FriendshipRequests = exports.FriendshipRequestResponse = exports.Pagination = exports.BlockedUserProfile = exports.FriendProfile = exports.User = exports.ProfileNotFound = exports.InvalidRequest = exports.InternalServerError = exports.InvalidFriendshipAction = exports.FriendshipStatus = exports.ConnectivityStatus = exports.protobufPackage = void 0;
7
7
  exports.connectivityStatusFromJSON = connectivityStatusFromJSON;
8
8
  exports.connectivityStatusToJSON = connectivityStatusToJSON;
9
9
  exports.friendshipStatusFromJSON = friendshipStatusFromJSON;
@@ -59,6 +59,8 @@ var FriendshipStatus;
59
59
  FriendshipStatus[FriendshipStatus["REJECTED"] = 4] = "REJECTED";
60
60
  FriendshipStatus[FriendshipStatus["DELETED"] = 5] = "DELETED";
61
61
  FriendshipStatus[FriendshipStatus["BLOCKED"] = 6] = "BLOCKED";
62
+ FriendshipStatus[FriendshipStatus["NONE"] = 7] = "NONE";
63
+ FriendshipStatus[FriendshipStatus["BLOCKED_BY"] = 8] = "BLOCKED_BY";
62
64
  FriendshipStatus[FriendshipStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
63
65
  })(FriendshipStatus || (exports.FriendshipStatus = FriendshipStatus = {}));
64
66
  function friendshipStatusFromJSON(object) {
@@ -84,6 +86,12 @@ function friendshipStatusFromJSON(object) {
84
86
  case 6:
85
87
  case "BLOCKED":
86
88
  return FriendshipStatus.BLOCKED;
89
+ case 7:
90
+ case "NONE":
91
+ return FriendshipStatus.NONE;
92
+ case 8:
93
+ case "BLOCKED_BY":
94
+ return FriendshipStatus.BLOCKED_BY;
87
95
  case -1:
88
96
  case "UNRECOGNIZED":
89
97
  default:
@@ -106,17 +114,24 @@ function friendshipStatusToJSON(object) {
106
114
  return "DELETED";
107
115
  case FriendshipStatus.BLOCKED:
108
116
  return "BLOCKED";
117
+ case FriendshipStatus.NONE:
118
+ return "NONE";
119
+ case FriendshipStatus.BLOCKED_BY:
120
+ return "BLOCKED_BY";
109
121
  case FriendshipStatus.UNRECOGNIZED:
110
122
  default:
111
123
  return "UNRECOGNIZED";
112
124
  }
113
125
  }
114
126
  function createBaseInvalidFriendshipAction() {
115
- return {};
127
+ return { message: undefined };
116
128
  }
117
129
  var InvalidFriendshipAction;
118
130
  (function (InvalidFriendshipAction) {
119
- function encode(_, writer = minimal_1.default.Writer.create()) {
131
+ function encode(message, writer = minimal_1.default.Writer.create()) {
132
+ if (message.message !== undefined) {
133
+ writer.uint32(10).string(message.message);
134
+ }
120
135
  return writer;
121
136
  }
122
137
  InvalidFriendshipAction.encode = encode;
@@ -127,6 +142,12 @@ var InvalidFriendshipAction;
127
142
  while (reader.pos < end) {
128
143
  const tag = reader.uint32();
129
144
  switch (tag >>> 3) {
145
+ case 1:
146
+ if (tag !== 10) {
147
+ break;
148
+ }
149
+ message.message = reader.string();
150
+ continue;
130
151
  }
131
152
  if ((tag & 7) === 4 || tag === 0) {
132
153
  break;
@@ -136,12 +157,13 @@ var InvalidFriendshipAction;
136
157
  return message;
137
158
  }
138
159
  InvalidFriendshipAction.decode = decode;
139
- function fromJSON(_) {
140
- return {};
160
+ function fromJSON(object) {
161
+ return { message: isSet(object.message) ? String(object.message) : undefined };
141
162
  }
142
163
  InvalidFriendshipAction.fromJSON = fromJSON;
143
- function toJSON(_) {
164
+ function toJSON(message) {
144
165
  const obj = {};
166
+ message.message !== undefined && (obj.message = message.message);
145
167
  return obj;
146
168
  }
147
169
  InvalidFriendshipAction.toJSON = toJSON;
@@ -149,18 +171,23 @@ var InvalidFriendshipAction;
149
171
  return InvalidFriendshipAction.fromPartial(base !== null && base !== void 0 ? base : {});
150
172
  }
151
173
  InvalidFriendshipAction.create = create;
152
- function fromPartial(_) {
174
+ function fromPartial(object) {
175
+ var _a;
153
176
  const message = createBaseInvalidFriendshipAction();
177
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
154
178
  return message;
155
179
  }
156
180
  InvalidFriendshipAction.fromPartial = fromPartial;
157
181
  })(InvalidFriendshipAction || (exports.InvalidFriendshipAction = InvalidFriendshipAction = {}));
158
182
  function createBaseInternalServerError() {
159
- return {};
183
+ return { message: undefined };
160
184
  }
161
185
  var InternalServerError;
162
186
  (function (InternalServerError) {
163
- function encode(_, writer = minimal_1.default.Writer.create()) {
187
+ function encode(message, writer = minimal_1.default.Writer.create()) {
188
+ if (message.message !== undefined) {
189
+ writer.uint32(10).string(message.message);
190
+ }
164
191
  return writer;
165
192
  }
166
193
  InternalServerError.encode = encode;
@@ -171,6 +198,12 @@ var InternalServerError;
171
198
  while (reader.pos < end) {
172
199
  const tag = reader.uint32();
173
200
  switch (tag >>> 3) {
201
+ case 1:
202
+ if (tag !== 10) {
203
+ break;
204
+ }
205
+ message.message = reader.string();
206
+ continue;
174
207
  }
175
208
  if ((tag & 7) === 4 || tag === 0) {
176
209
  break;
@@ -180,12 +213,13 @@ var InternalServerError;
180
213
  return message;
181
214
  }
182
215
  InternalServerError.decode = decode;
183
- function fromJSON(_) {
184
- return {};
216
+ function fromJSON(object) {
217
+ return { message: isSet(object.message) ? String(object.message) : undefined };
185
218
  }
186
219
  InternalServerError.fromJSON = fromJSON;
187
- function toJSON(_) {
220
+ function toJSON(message) {
188
221
  const obj = {};
222
+ message.message !== undefined && (obj.message = message.message);
189
223
  return obj;
190
224
  }
191
225
  InternalServerError.toJSON = toJSON;
@@ -193,12 +227,126 @@ var InternalServerError;
193
227
  return InternalServerError.fromPartial(base !== null && base !== void 0 ? base : {});
194
228
  }
195
229
  InternalServerError.create = create;
196
- function fromPartial(_) {
230
+ function fromPartial(object) {
231
+ var _a;
197
232
  const message = createBaseInternalServerError();
233
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
198
234
  return message;
199
235
  }
200
236
  InternalServerError.fromPartial = fromPartial;
201
237
  })(InternalServerError || (exports.InternalServerError = InternalServerError = {}));
238
+ function createBaseInvalidRequest() {
239
+ return { message: undefined };
240
+ }
241
+ var InvalidRequest;
242
+ (function (InvalidRequest) {
243
+ function encode(message, writer = minimal_1.default.Writer.create()) {
244
+ if (message.message !== undefined) {
245
+ writer.uint32(10).string(message.message);
246
+ }
247
+ return writer;
248
+ }
249
+ InvalidRequest.encode = encode;
250
+ function decode(input, length) {
251
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
252
+ let end = length === undefined ? reader.len : reader.pos + length;
253
+ const message = createBaseInvalidRequest();
254
+ while (reader.pos < end) {
255
+ const tag = reader.uint32();
256
+ switch (tag >>> 3) {
257
+ case 1:
258
+ if (tag !== 10) {
259
+ break;
260
+ }
261
+ message.message = reader.string();
262
+ continue;
263
+ }
264
+ if ((tag & 7) === 4 || tag === 0) {
265
+ break;
266
+ }
267
+ reader.skipType(tag & 7);
268
+ }
269
+ return message;
270
+ }
271
+ InvalidRequest.decode = decode;
272
+ function fromJSON(object) {
273
+ return { message: isSet(object.message) ? String(object.message) : undefined };
274
+ }
275
+ InvalidRequest.fromJSON = fromJSON;
276
+ function toJSON(message) {
277
+ const obj = {};
278
+ message.message !== undefined && (obj.message = message.message);
279
+ return obj;
280
+ }
281
+ InvalidRequest.toJSON = toJSON;
282
+ function create(base) {
283
+ return InvalidRequest.fromPartial(base !== null && base !== void 0 ? base : {});
284
+ }
285
+ InvalidRequest.create = create;
286
+ function fromPartial(object) {
287
+ var _a;
288
+ const message = createBaseInvalidRequest();
289
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
290
+ return message;
291
+ }
292
+ InvalidRequest.fromPartial = fromPartial;
293
+ })(InvalidRequest || (exports.InvalidRequest = InvalidRequest = {}));
294
+ function createBaseProfileNotFound() {
295
+ return { message: undefined };
296
+ }
297
+ var ProfileNotFound;
298
+ (function (ProfileNotFound) {
299
+ function encode(message, writer = minimal_1.default.Writer.create()) {
300
+ if (message.message !== undefined) {
301
+ writer.uint32(10).string(message.message);
302
+ }
303
+ return writer;
304
+ }
305
+ ProfileNotFound.encode = encode;
306
+ function decode(input, length) {
307
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
308
+ let end = length === undefined ? reader.len : reader.pos + length;
309
+ const message = createBaseProfileNotFound();
310
+ while (reader.pos < end) {
311
+ const tag = reader.uint32();
312
+ switch (tag >>> 3) {
313
+ case 1:
314
+ if (tag !== 10) {
315
+ break;
316
+ }
317
+ message.message = reader.string();
318
+ continue;
319
+ }
320
+ if ((tag & 7) === 4 || tag === 0) {
321
+ break;
322
+ }
323
+ reader.skipType(tag & 7);
324
+ }
325
+ return message;
326
+ }
327
+ ProfileNotFound.decode = decode;
328
+ function fromJSON(object) {
329
+ return { message: isSet(object.message) ? String(object.message) : undefined };
330
+ }
331
+ ProfileNotFound.fromJSON = fromJSON;
332
+ function toJSON(message) {
333
+ const obj = {};
334
+ message.message !== undefined && (obj.message = message.message);
335
+ return obj;
336
+ }
337
+ ProfileNotFound.toJSON = toJSON;
338
+ function create(base) {
339
+ return ProfileNotFound.fromPartial(base !== null && base !== void 0 ? base : {});
340
+ }
341
+ ProfileNotFound.create = create;
342
+ function fromPartial(object) {
343
+ var _a;
344
+ const message = createBaseProfileNotFound();
345
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
346
+ return message;
347
+ }
348
+ ProfileNotFound.fromPartial = fromPartial;
349
+ })(ProfileNotFound || (exports.ProfileNotFound = ProfileNotFound = {}));
202
350
  function createBaseUser() {
203
351
  return { address: "" };
204
352
  }
@@ -255,6 +403,206 @@ var User;
255
403
  }
256
404
  User.fromPartial = fromPartial;
257
405
  })(User || (exports.User = User = {}));
406
+ function createBaseFriendProfile() {
407
+ return { address: "", name: "", hasClaimedName: false, profilePictureUrl: "" };
408
+ }
409
+ var FriendProfile;
410
+ (function (FriendProfile) {
411
+ function encode(message, writer = minimal_1.default.Writer.create()) {
412
+ if (message.address !== "") {
413
+ writer.uint32(10).string(message.address);
414
+ }
415
+ if (message.name !== "") {
416
+ writer.uint32(18).string(message.name);
417
+ }
418
+ if (message.hasClaimedName === true) {
419
+ writer.uint32(24).bool(message.hasClaimedName);
420
+ }
421
+ if (message.profilePictureUrl !== "") {
422
+ writer.uint32(34).string(message.profilePictureUrl);
423
+ }
424
+ return writer;
425
+ }
426
+ FriendProfile.encode = encode;
427
+ function decode(input, length) {
428
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
429
+ let end = length === undefined ? reader.len : reader.pos + length;
430
+ const message = createBaseFriendProfile();
431
+ while (reader.pos < end) {
432
+ const tag = reader.uint32();
433
+ switch (tag >>> 3) {
434
+ case 1:
435
+ if (tag !== 10) {
436
+ break;
437
+ }
438
+ message.address = reader.string();
439
+ continue;
440
+ case 2:
441
+ if (tag !== 18) {
442
+ break;
443
+ }
444
+ message.name = reader.string();
445
+ continue;
446
+ case 3:
447
+ if (tag !== 24) {
448
+ break;
449
+ }
450
+ message.hasClaimedName = reader.bool();
451
+ continue;
452
+ case 4:
453
+ if (tag !== 34) {
454
+ break;
455
+ }
456
+ message.profilePictureUrl = reader.string();
457
+ continue;
458
+ }
459
+ if ((tag & 7) === 4 || tag === 0) {
460
+ break;
461
+ }
462
+ reader.skipType(tag & 7);
463
+ }
464
+ return message;
465
+ }
466
+ FriendProfile.decode = decode;
467
+ function fromJSON(object) {
468
+ return {
469
+ address: isSet(object.address) ? String(object.address) : "",
470
+ name: isSet(object.name) ? String(object.name) : "",
471
+ hasClaimedName: isSet(object.hasClaimedName) ? Boolean(object.hasClaimedName) : false,
472
+ profilePictureUrl: isSet(object.profilePictureUrl) ? String(object.profilePictureUrl) : "",
473
+ };
474
+ }
475
+ FriendProfile.fromJSON = fromJSON;
476
+ function toJSON(message) {
477
+ const obj = {};
478
+ message.address !== undefined && (obj.address = message.address);
479
+ message.name !== undefined && (obj.name = message.name);
480
+ message.hasClaimedName !== undefined && (obj.hasClaimedName = message.hasClaimedName);
481
+ message.profilePictureUrl !== undefined && (obj.profilePictureUrl = message.profilePictureUrl);
482
+ return obj;
483
+ }
484
+ FriendProfile.toJSON = toJSON;
485
+ function create(base) {
486
+ return FriendProfile.fromPartial(base !== null && base !== void 0 ? base : {});
487
+ }
488
+ FriendProfile.create = create;
489
+ function fromPartial(object) {
490
+ var _a, _b, _c, _d;
491
+ const message = createBaseFriendProfile();
492
+ message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
493
+ message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
494
+ message.hasClaimedName = (_c = object.hasClaimedName) !== null && _c !== void 0 ? _c : false;
495
+ message.profilePictureUrl = (_d = object.profilePictureUrl) !== null && _d !== void 0 ? _d : "";
496
+ return message;
497
+ }
498
+ FriendProfile.fromPartial = fromPartial;
499
+ })(FriendProfile || (exports.FriendProfile = FriendProfile = {}));
500
+ function createBaseBlockedUserProfile() {
501
+ return { address: "", name: "", hasClaimedName: false, profilePictureUrl: "", blockedAt: undefined };
502
+ }
503
+ var BlockedUserProfile;
504
+ (function (BlockedUserProfile) {
505
+ function encode(message, writer = minimal_1.default.Writer.create()) {
506
+ if (message.address !== "") {
507
+ writer.uint32(10).string(message.address);
508
+ }
509
+ if (message.name !== "") {
510
+ writer.uint32(18).string(message.name);
511
+ }
512
+ if (message.hasClaimedName === true) {
513
+ writer.uint32(24).bool(message.hasClaimedName);
514
+ }
515
+ if (message.profilePictureUrl !== "") {
516
+ writer.uint32(34).string(message.profilePictureUrl);
517
+ }
518
+ if (message.blockedAt !== undefined) {
519
+ writer.uint32(40).int64(message.blockedAt);
520
+ }
521
+ return writer;
522
+ }
523
+ BlockedUserProfile.encode = encode;
524
+ function decode(input, length) {
525
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
526
+ let end = length === undefined ? reader.len : reader.pos + length;
527
+ const message = createBaseBlockedUserProfile();
528
+ while (reader.pos < end) {
529
+ const tag = reader.uint32();
530
+ switch (tag >>> 3) {
531
+ case 1:
532
+ if (tag !== 10) {
533
+ break;
534
+ }
535
+ message.address = reader.string();
536
+ continue;
537
+ case 2:
538
+ if (tag !== 18) {
539
+ break;
540
+ }
541
+ message.name = reader.string();
542
+ continue;
543
+ case 3:
544
+ if (tag !== 24) {
545
+ break;
546
+ }
547
+ message.hasClaimedName = reader.bool();
548
+ continue;
549
+ case 4:
550
+ if (tag !== 34) {
551
+ break;
552
+ }
553
+ message.profilePictureUrl = reader.string();
554
+ continue;
555
+ case 5:
556
+ if (tag !== 40) {
557
+ break;
558
+ }
559
+ message.blockedAt = longToNumber(reader.int64());
560
+ continue;
561
+ }
562
+ if ((tag & 7) === 4 || tag === 0) {
563
+ break;
564
+ }
565
+ reader.skipType(tag & 7);
566
+ }
567
+ return message;
568
+ }
569
+ BlockedUserProfile.decode = decode;
570
+ function fromJSON(object) {
571
+ return {
572
+ address: isSet(object.address) ? String(object.address) : "",
573
+ name: isSet(object.name) ? String(object.name) : "",
574
+ hasClaimedName: isSet(object.hasClaimedName) ? Boolean(object.hasClaimedName) : false,
575
+ profilePictureUrl: isSet(object.profilePictureUrl) ? String(object.profilePictureUrl) : "",
576
+ blockedAt: isSet(object.blockedAt) ? Number(object.blockedAt) : undefined,
577
+ };
578
+ }
579
+ BlockedUserProfile.fromJSON = fromJSON;
580
+ function toJSON(message) {
581
+ const obj = {};
582
+ message.address !== undefined && (obj.address = message.address);
583
+ message.name !== undefined && (obj.name = message.name);
584
+ message.hasClaimedName !== undefined && (obj.hasClaimedName = message.hasClaimedName);
585
+ message.profilePictureUrl !== undefined && (obj.profilePictureUrl = message.profilePictureUrl);
586
+ message.blockedAt !== undefined && (obj.blockedAt = Math.round(message.blockedAt));
587
+ return obj;
588
+ }
589
+ BlockedUserProfile.toJSON = toJSON;
590
+ function create(base) {
591
+ return BlockedUserProfile.fromPartial(base !== null && base !== void 0 ? base : {});
592
+ }
593
+ BlockedUserProfile.create = create;
594
+ function fromPartial(object) {
595
+ var _a, _b, _c, _d, _e;
596
+ const message = createBaseBlockedUserProfile();
597
+ message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
598
+ message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
599
+ message.hasClaimedName = (_c = object.hasClaimedName) !== null && _c !== void 0 ? _c : false;
600
+ message.profilePictureUrl = (_d = object.profilePictureUrl) !== null && _d !== void 0 ? _d : "";
601
+ message.blockedAt = (_e = object.blockedAt) !== null && _e !== void 0 ? _e : undefined;
602
+ return message;
603
+ }
604
+ BlockedUserProfile.fromPartial = fromPartial;
605
+ })(BlockedUserProfile || (exports.BlockedUserProfile = BlockedUserProfile = {}));
258
606
  function createBasePagination() {
259
607
  return { limit: 0, offset: 0 };
260
608
  }
@@ -326,13 +674,13 @@ var Pagination;
326
674
  Pagination.fromPartial = fromPartial;
327
675
  })(Pagination || (exports.Pagination = Pagination = {}));
328
676
  function createBaseFriendshipRequestResponse() {
329
- return { user: undefined, createdAt: 0, message: undefined };
677
+ return { friend: undefined, createdAt: 0, message: undefined, id: "" };
330
678
  }
331
679
  var FriendshipRequestResponse;
332
680
  (function (FriendshipRequestResponse) {
333
681
  function encode(message, writer = minimal_1.default.Writer.create()) {
334
- if (message.user !== undefined) {
335
- User.encode(message.user, writer.uint32(10).fork()).ldelim();
682
+ if (message.friend !== undefined) {
683
+ FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
336
684
  }
337
685
  if (message.createdAt !== 0) {
338
686
  writer.uint32(16).int64(message.createdAt);
@@ -340,6 +688,9 @@ var FriendshipRequestResponse;
340
688
  if (message.message !== undefined) {
341
689
  writer.uint32(26).string(message.message);
342
690
  }
691
+ if (message.id !== "") {
692
+ writer.uint32(34).string(message.id);
693
+ }
343
694
  return writer;
344
695
  }
345
696
  FriendshipRequestResponse.encode = encode;
@@ -354,7 +705,7 @@ var FriendshipRequestResponse;
354
705
  if (tag !== 10) {
355
706
  break;
356
707
  }
357
- message.user = User.decode(reader, reader.uint32());
708
+ message.friend = FriendProfile.decode(reader, reader.uint32());
358
709
  continue;
359
710
  case 2:
360
711
  if (tag !== 16) {
@@ -368,6 +719,12 @@ var FriendshipRequestResponse;
368
719
  }
369
720
  message.message = reader.string();
370
721
  continue;
722
+ case 4:
723
+ if (tag !== 34) {
724
+ break;
725
+ }
726
+ message.id = reader.string();
727
+ continue;
371
728
  }
372
729
  if ((tag & 7) === 4 || tag === 0) {
373
730
  break;
@@ -379,17 +736,19 @@ var FriendshipRequestResponse;
379
736
  FriendshipRequestResponse.decode = decode;
380
737
  function fromJSON(object) {
381
738
  return {
382
- user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
739
+ friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
383
740
  createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
384
741
  message: isSet(object.message) ? String(object.message) : undefined,
742
+ id: isSet(object.id) ? String(object.id) : "",
385
743
  };
386
744
  }
387
745
  FriendshipRequestResponse.fromJSON = fromJSON;
388
746
  function toJSON(message) {
389
747
  const obj = {};
390
- message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
748
+ message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
391
749
  message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
392
750
  message.message !== undefined && (obj.message = message.message);
751
+ message.id !== undefined && (obj.id = message.id);
393
752
  return obj;
394
753
  }
395
754
  FriendshipRequestResponse.toJSON = toJSON;
@@ -398,11 +757,14 @@ var FriendshipRequestResponse;
398
757
  }
399
758
  FriendshipRequestResponse.create = create;
400
759
  function fromPartial(object) {
401
- var _a, _b;
760
+ var _a, _b, _c;
402
761
  const message = createBaseFriendshipRequestResponse();
403
- message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
762
+ message.friend = (object.friend !== undefined && object.friend !== null)
763
+ ? FriendProfile.fromPartial(object.friend)
764
+ : undefined;
404
765
  message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : 0;
405
766
  message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
767
+ message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
406
768
  return message;
407
769
  }
408
770
  FriendshipRequestResponse.fromPartial = fromPartial;
@@ -473,7 +835,7 @@ var FriendshipRequests;
473
835
  FriendshipRequests.fromPartial = fromPartial;
474
836
  })(FriendshipRequests || (exports.FriendshipRequests = FriendshipRequests = {}));
475
837
  function createBaseGetFriendsPayload() {
476
- return { pagination: undefined, status: undefined };
838
+ return { pagination: undefined };
477
839
  }
478
840
  var GetFriendsPayload;
479
841
  (function (GetFriendsPayload) {
@@ -481,9 +843,6 @@ var GetFriendsPayload;
481
843
  if (message.pagination !== undefined) {
482
844
  Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
483
845
  }
484
- if (message.status !== undefined) {
485
- writer.uint32(16).int32(message.status);
486
- }
487
846
  return writer;
488
847
  }
489
848
  GetFriendsPayload.encode = encode;
@@ -500,12 +859,6 @@ var GetFriendsPayload;
500
859
  }
501
860
  message.pagination = Pagination.decode(reader, reader.uint32());
502
861
  continue;
503
- case 2:
504
- if (tag !== 16) {
505
- break;
506
- }
507
- message.status = reader.int32();
508
- continue;
509
862
  }
510
863
  if ((tag & 7) === 4 || tag === 0) {
511
864
  break;
@@ -516,18 +869,13 @@ var GetFriendsPayload;
516
869
  }
517
870
  GetFriendsPayload.decode = decode;
518
871
  function fromJSON(object) {
519
- return {
520
- pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
521
- status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : undefined,
522
- };
872
+ return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
523
873
  }
524
874
  GetFriendsPayload.fromJSON = fromJSON;
525
875
  function toJSON(message) {
526
876
  const obj = {};
527
877
  message.pagination !== undefined &&
528
878
  (obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
529
- message.status !== undefined &&
530
- (obj.status = message.status !== undefined ? connectivityStatusToJSON(message.status) : undefined);
531
879
  return obj;
532
880
  }
533
881
  GetFriendsPayload.toJSON = toJSON;
@@ -536,12 +884,10 @@ var GetFriendsPayload;
536
884
  }
537
885
  GetFriendsPayload.create = create;
538
886
  function fromPartial(object) {
539
- var _a;
540
887
  const message = createBaseGetFriendsPayload();
541
888
  message.pagination = (object.pagination !== undefined && object.pagination !== null)
542
889
  ? Pagination.fromPartial(object.pagination)
543
890
  : undefined;
544
- message.status = (_a = object.status) !== null && _a !== void 0 ? _a : undefined;
545
891
  return message;
546
892
  }
547
893
  GetFriendsPayload.fromPartial = fromPartial;
@@ -1207,25 +1553,25 @@ var PaginatedResponse;
1207
1553
  }
1208
1554
  PaginatedResponse.fromPartial = fromPartial;
1209
1555
  })(PaginatedResponse || (exports.PaginatedResponse = PaginatedResponse = {}));
1210
- function createBasePaginatedUsersResponse() {
1211
- return { users: [], paginationData: undefined };
1556
+ function createBasePaginatedFriendsProfilesResponse() {
1557
+ return { friends: [], paginationData: undefined };
1212
1558
  }
1213
- var PaginatedUsersResponse;
1214
- (function (PaginatedUsersResponse) {
1559
+ var PaginatedFriendsProfilesResponse;
1560
+ (function (PaginatedFriendsProfilesResponse) {
1215
1561
  function encode(message, writer = minimal_1.default.Writer.create()) {
1216
- for (const v of message.users) {
1217
- User.encode(v, writer.uint32(10).fork()).ldelim();
1562
+ for (const v of message.friends) {
1563
+ FriendProfile.encode(v, writer.uint32(10).fork()).ldelim();
1218
1564
  }
1219
1565
  if (message.paginationData !== undefined) {
1220
1566
  PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
1221
1567
  }
1222
1568
  return writer;
1223
1569
  }
1224
- PaginatedUsersResponse.encode = encode;
1570
+ PaginatedFriendsProfilesResponse.encode = encode;
1225
1571
  function decode(input, length) {
1226
1572
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
1227
1573
  let end = length === undefined ? reader.len : reader.pos + length;
1228
- const message = createBasePaginatedUsersResponse();
1574
+ const message = createBasePaginatedFriendsProfilesResponse();
1229
1575
  while (reader.pos < end) {
1230
1576
  const tag = reader.uint32();
1231
1577
  switch (tag >>> 3) {
@@ -1233,7 +1579,7 @@ var PaginatedUsersResponse;
1233
1579
  if (tag !== 10) {
1234
1580
  break;
1235
1581
  }
1236
- message.users.push(User.decode(reader, reader.uint32()));
1582
+ message.friends.push(FriendProfile.decode(reader, reader.uint32()));
1237
1583
  continue;
1238
1584
  case 2:
1239
1585
  if (tag !== 18) {
@@ -1249,42 +1595,42 @@ var PaginatedUsersResponse;
1249
1595
  }
1250
1596
  return message;
1251
1597
  }
1252
- PaginatedUsersResponse.decode = decode;
1598
+ PaginatedFriendsProfilesResponse.decode = decode;
1253
1599
  function fromJSON(object) {
1254
1600
  return {
1255
- users: Array.isArray(object === null || object === void 0 ? void 0 : object.users) ? object.users.map((e) => User.fromJSON(e)) : [],
1601
+ friends: Array.isArray(object === null || object === void 0 ? void 0 : object.friends) ? object.friends.map((e) => FriendProfile.fromJSON(e)) : [],
1256
1602
  paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
1257
1603
  };
1258
1604
  }
1259
- PaginatedUsersResponse.fromJSON = fromJSON;
1605
+ PaginatedFriendsProfilesResponse.fromJSON = fromJSON;
1260
1606
  function toJSON(message) {
1261
1607
  const obj = {};
1262
- if (message.users) {
1263
- obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);
1608
+ if (message.friends) {
1609
+ obj.friends = message.friends.map((e) => e ? FriendProfile.toJSON(e) : undefined);
1264
1610
  }
1265
1611
  else {
1266
- obj.users = [];
1612
+ obj.friends = [];
1267
1613
  }
1268
1614
  message.paginationData !== undefined &&
1269
1615
  (obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
1270
1616
  return obj;
1271
1617
  }
1272
- PaginatedUsersResponse.toJSON = toJSON;
1618
+ PaginatedFriendsProfilesResponse.toJSON = toJSON;
1273
1619
  function create(base) {
1274
- return PaginatedUsersResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1620
+ return PaginatedFriendsProfilesResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1275
1621
  }
1276
- PaginatedUsersResponse.create = create;
1622
+ PaginatedFriendsProfilesResponse.create = create;
1277
1623
  function fromPartial(object) {
1278
1624
  var _a;
1279
- const message = createBasePaginatedUsersResponse();
1280
- message.users = ((_a = object.users) === null || _a === void 0 ? void 0 : _a.map((e) => User.fromPartial(e))) || [];
1625
+ const message = createBasePaginatedFriendsProfilesResponse();
1626
+ message.friends = ((_a = object.friends) === null || _a === void 0 ? void 0 : _a.map((e) => FriendProfile.fromPartial(e))) || [];
1281
1627
  message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
1282
1628
  ? PaginatedResponse.fromPartial(object.paginationData)
1283
1629
  : undefined;
1284
1630
  return message;
1285
1631
  }
1286
- PaginatedUsersResponse.fromPartial = fromPartial;
1287
- })(PaginatedUsersResponse || (exports.PaginatedUsersResponse = PaginatedUsersResponse = {}));
1632
+ PaginatedFriendsProfilesResponse.fromPartial = fromPartial;
1633
+ })(PaginatedFriendsProfilesResponse || (exports.PaginatedFriendsProfilesResponse = PaginatedFriendsProfilesResponse = {}));
1288
1634
  function createBasePaginatedFriendshipRequestsResponse() {
1289
1635
  return { response: undefined, paginationData: undefined };
1290
1636
  }
@@ -1534,7 +1880,7 @@ var UpsertFriendshipResponse;
1534
1880
  UpsertFriendshipResponse.fromPartial = fromPartial;
1535
1881
  })(UpsertFriendshipResponse || (exports.UpsertFriendshipResponse = UpsertFriendshipResponse = {}));
1536
1882
  function createBaseUpsertFriendshipResponse_Accepted() {
1537
- return { id: "", createdAt: 0 };
1883
+ return { id: "", createdAt: 0, friend: undefined, message: undefined };
1538
1884
  }
1539
1885
  var UpsertFriendshipResponse_Accepted;
1540
1886
  (function (UpsertFriendshipResponse_Accepted) {
@@ -1545,6 +1891,12 @@ var UpsertFriendshipResponse_Accepted;
1545
1891
  if (message.createdAt !== 0) {
1546
1892
  writer.uint32(16).int64(message.createdAt);
1547
1893
  }
1894
+ if (message.friend !== undefined) {
1895
+ FriendProfile.encode(message.friend, writer.uint32(26).fork()).ldelim();
1896
+ }
1897
+ if (message.message !== undefined) {
1898
+ writer.uint32(34).string(message.message);
1899
+ }
1548
1900
  return writer;
1549
1901
  }
1550
1902
  UpsertFriendshipResponse_Accepted.encode = encode;
@@ -1567,6 +1919,18 @@ var UpsertFriendshipResponse_Accepted;
1567
1919
  }
1568
1920
  message.createdAt = longToNumber(reader.int64());
1569
1921
  continue;
1922
+ case 3:
1923
+ if (tag !== 26) {
1924
+ break;
1925
+ }
1926
+ message.friend = FriendProfile.decode(reader, reader.uint32());
1927
+ continue;
1928
+ case 4:
1929
+ if (tag !== 34) {
1930
+ break;
1931
+ }
1932
+ message.message = reader.string();
1933
+ continue;
1570
1934
  }
1571
1935
  if ((tag & 7) === 4 || tag === 0) {
1572
1936
  break;
@@ -1580,6 +1944,8 @@ var UpsertFriendshipResponse_Accepted;
1580
1944
  return {
1581
1945
  id: isSet(object.id) ? String(object.id) : "",
1582
1946
  createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
1947
+ friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
1948
+ message: isSet(object.message) ? String(object.message) : undefined,
1583
1949
  };
1584
1950
  }
1585
1951
  UpsertFriendshipResponse_Accepted.fromJSON = fromJSON;
@@ -1587,6 +1953,8 @@ var UpsertFriendshipResponse_Accepted;
1587
1953
  const obj = {};
1588
1954
  message.id !== undefined && (obj.id = message.id);
1589
1955
  message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
1956
+ message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
1957
+ message.message !== undefined && (obj.message = message.message);
1590
1958
  return obj;
1591
1959
  }
1592
1960
  UpsertFriendshipResponse_Accepted.toJSON = toJSON;
@@ -1595,10 +1963,14 @@ var UpsertFriendshipResponse_Accepted;
1595
1963
  }
1596
1964
  UpsertFriendshipResponse_Accepted.create = create;
1597
1965
  function fromPartial(object) {
1598
- var _a, _b;
1966
+ var _a, _b, _c;
1599
1967
  const message = createBaseUpsertFriendshipResponse_Accepted();
1600
1968
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1601
1969
  message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : 0;
1970
+ message.friend = (object.friend !== undefined && object.friend !== null)
1971
+ ? FriendProfile.fromPartial(object.friend)
1972
+ : undefined;
1973
+ message.message = (_c = object.message) !== null && _c !== void 0 ? _c : undefined;
1602
1974
  return message;
1603
1975
  }
1604
1976
  UpsertFriendshipResponse_Accepted.fromPartial = fromPartial;
@@ -1612,7 +1984,7 @@ var FriendshipUpdate;
1612
1984
  var _a;
1613
1985
  switch ((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) {
1614
1986
  case "request":
1615
- FriendshipRequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
1987
+ FriendshipUpdate_RequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
1616
1988
  break;
1617
1989
  case "accept":
1618
1990
  FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
@@ -1626,6 +1998,9 @@ var FriendshipUpdate;
1626
1998
  case "cancel":
1627
1999
  FriendshipUpdate_CancelResponse.encode(message.update.cancel, writer.uint32(42).fork()).ldelim();
1628
2000
  break;
2001
+ case "block":
2002
+ FriendshipUpdate_BlockResponse.encode(message.update.block, writer.uint32(50).fork()).ldelim();
2003
+ break;
1629
2004
  }
1630
2005
  return writer;
1631
2006
  }
@@ -1641,7 +2016,10 @@ var FriendshipUpdate;
1641
2016
  if (tag !== 10) {
1642
2017
  break;
1643
2018
  }
1644
- message.update = { $case: "request", request: FriendshipRequestResponse.decode(reader, reader.uint32()) };
2019
+ message.update = {
2020
+ $case: "request",
2021
+ request: FriendshipUpdate_RequestResponse.decode(reader, reader.uint32()),
2022
+ };
1645
2023
  continue;
1646
2024
  case 2:
1647
2025
  if (tag !== 18) {
@@ -1667,6 +2045,12 @@ var FriendshipUpdate;
1667
2045
  }
1668
2046
  message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.decode(reader, reader.uint32()) };
1669
2047
  continue;
2048
+ case 6:
2049
+ if (tag !== 50) {
2050
+ break;
2051
+ }
2052
+ message.update = { $case: "block", block: FriendshipUpdate_BlockResponse.decode(reader, reader.uint32()) };
2053
+ continue;
1670
2054
  }
1671
2055
  if ((tag & 7) === 4 || tag === 0) {
1672
2056
  break;
@@ -1679,7 +2063,7 @@ var FriendshipUpdate;
1679
2063
  function fromJSON(object) {
1680
2064
  return {
1681
2065
  update: isSet(object.request)
1682
- ? { $case: "request", request: FriendshipRequestResponse.fromJSON(object.request) }
2066
+ ? { $case: "request", request: FriendshipUpdate_RequestResponse.fromJSON(object.request) }
1683
2067
  : isSet(object.accept)
1684
2068
  ? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
1685
2069
  : isSet(object.reject)
@@ -1688,15 +2072,19 @@ var FriendshipUpdate;
1688
2072
  ? { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromJSON(object.delete) }
1689
2073
  : isSet(object.cancel)
1690
2074
  ? { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromJSON(object.cancel) }
1691
- : undefined,
2075
+ : isSet(object.block)
2076
+ ? { $case: "block", block: FriendshipUpdate_BlockResponse.fromJSON(object.block) }
2077
+ : undefined,
1692
2078
  };
1693
2079
  }
1694
2080
  FriendshipUpdate.fromJSON = fromJSON;
1695
2081
  function toJSON(message) {
1696
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
2082
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1697
2083
  const obj = {};
1698
2084
  ((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) === "request" &&
1699
- (obj.request = ((_b = message.update) === null || _b === void 0 ? void 0 : _b.request) ? FriendshipRequestResponse.toJSON((_c = message.update) === null || _c === void 0 ? void 0 : _c.request) : undefined);
2085
+ (obj.request = ((_b = message.update) === null || _b === void 0 ? void 0 : _b.request)
2086
+ ? FriendshipUpdate_RequestResponse.toJSON((_c = message.update) === null || _c === void 0 ? void 0 : _c.request)
2087
+ : undefined);
1700
2088
  ((_d = message.update) === null || _d === void 0 ? void 0 : _d.$case) === "accept" &&
1701
2089
  (obj.accept = ((_e = message.update) === null || _e === void 0 ? void 0 : _e.accept)
1702
2090
  ? FriendshipUpdate_AcceptResponse.toJSON((_f = message.update) === null || _f === void 0 ? void 0 : _f.accept)
@@ -1713,6 +2101,8 @@ var FriendshipUpdate;
1713
2101
  (obj.cancel = ((_p = message.update) === null || _p === void 0 ? void 0 : _p.cancel)
1714
2102
  ? FriendshipUpdate_CancelResponse.toJSON((_q = message.update) === null || _q === void 0 ? void 0 : _q.cancel)
1715
2103
  : undefined);
2104
+ ((_r = message.update) === null || _r === void 0 ? void 0 : _r.$case) === "block" &&
2105
+ (obj.block = ((_s = message.update) === null || _s === void 0 ? void 0 : _s.block) ? FriendshipUpdate_BlockResponse.toJSON((_t = message.update) === null || _t === void 0 ? void 0 : _t.block) : undefined);
1716
2106
  return obj;
1717
2107
  }
1718
2108
  FriendshipUpdate.toJSON = toJSON;
@@ -1721,10 +2111,13 @@ var FriendshipUpdate;
1721
2111
  }
1722
2112
  FriendshipUpdate.create = create;
1723
2113
  function fromPartial(object) {
1724
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
2114
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1725
2115
  const message = createBaseFriendshipUpdate();
1726
2116
  if (((_a = object.update) === null || _a === void 0 ? void 0 : _a.$case) === "request" && ((_b = object.update) === null || _b === void 0 ? void 0 : _b.request) !== undefined && ((_c = object.update) === null || _c === void 0 ? void 0 : _c.request) !== null) {
1727
- message.update = { $case: "request", request: FriendshipRequestResponse.fromPartial(object.update.request) };
2117
+ message.update = {
2118
+ $case: "request",
2119
+ request: FriendshipUpdate_RequestResponse.fromPartial(object.update.request),
2120
+ };
1728
2121
  }
1729
2122
  if (((_d = object.update) === null || _d === void 0 ? void 0 : _d.$case) === "accept" && ((_e = object.update) === null || _e === void 0 ? void 0 : _e.accept) !== undefined && ((_f = object.update) === null || _f === void 0 ? void 0 : _f.accept) !== null) {
1730
2123
  message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
@@ -1738,10 +2131,109 @@ var FriendshipUpdate;
1738
2131
  if (((_o = object.update) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" && ((_p = object.update) === null || _p === void 0 ? void 0 : _p.cancel) !== undefined && ((_q = object.update) === null || _q === void 0 ? void 0 : _q.cancel) !== null) {
1739
2132
  message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromPartial(object.update.cancel) };
1740
2133
  }
2134
+ if (((_r = object.update) === null || _r === void 0 ? void 0 : _r.$case) === "block" && ((_s = object.update) === null || _s === void 0 ? void 0 : _s.block) !== undefined && ((_t = object.update) === null || _t === void 0 ? void 0 : _t.block) !== null) {
2135
+ message.update = { $case: "block", block: FriendshipUpdate_BlockResponse.fromPartial(object.update.block) };
2136
+ }
1741
2137
  return message;
1742
2138
  }
1743
2139
  FriendshipUpdate.fromPartial = fromPartial;
1744
2140
  })(FriendshipUpdate || (exports.FriendshipUpdate = FriendshipUpdate = {}));
2141
+ function createBaseFriendshipUpdate_RequestResponse() {
2142
+ return { friend: undefined, createdAt: 0, message: undefined, id: "" };
2143
+ }
2144
+ var FriendshipUpdate_RequestResponse;
2145
+ (function (FriendshipUpdate_RequestResponse) {
2146
+ function encode(message, writer = minimal_1.default.Writer.create()) {
2147
+ if (message.friend !== undefined) {
2148
+ FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
2149
+ }
2150
+ if (message.createdAt !== 0) {
2151
+ writer.uint32(16).int64(message.createdAt);
2152
+ }
2153
+ if (message.message !== undefined) {
2154
+ writer.uint32(26).string(message.message);
2155
+ }
2156
+ if (message.id !== "") {
2157
+ writer.uint32(34).string(message.id);
2158
+ }
2159
+ return writer;
2160
+ }
2161
+ FriendshipUpdate_RequestResponse.encode = encode;
2162
+ function decode(input, length) {
2163
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
2164
+ let end = length === undefined ? reader.len : reader.pos + length;
2165
+ const message = createBaseFriendshipUpdate_RequestResponse();
2166
+ while (reader.pos < end) {
2167
+ const tag = reader.uint32();
2168
+ switch (tag >>> 3) {
2169
+ case 1:
2170
+ if (tag !== 10) {
2171
+ break;
2172
+ }
2173
+ message.friend = FriendProfile.decode(reader, reader.uint32());
2174
+ continue;
2175
+ case 2:
2176
+ if (tag !== 16) {
2177
+ break;
2178
+ }
2179
+ message.createdAt = longToNumber(reader.int64());
2180
+ continue;
2181
+ case 3:
2182
+ if (tag !== 26) {
2183
+ break;
2184
+ }
2185
+ message.message = reader.string();
2186
+ continue;
2187
+ case 4:
2188
+ if (tag !== 34) {
2189
+ break;
2190
+ }
2191
+ message.id = reader.string();
2192
+ continue;
2193
+ }
2194
+ if ((tag & 7) === 4 || tag === 0) {
2195
+ break;
2196
+ }
2197
+ reader.skipType(tag & 7);
2198
+ }
2199
+ return message;
2200
+ }
2201
+ FriendshipUpdate_RequestResponse.decode = decode;
2202
+ function fromJSON(object) {
2203
+ return {
2204
+ friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
2205
+ createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
2206
+ message: isSet(object.message) ? String(object.message) : undefined,
2207
+ id: isSet(object.id) ? String(object.id) : "",
2208
+ };
2209
+ }
2210
+ FriendshipUpdate_RequestResponse.fromJSON = fromJSON;
2211
+ function toJSON(message) {
2212
+ const obj = {};
2213
+ message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
2214
+ message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
2215
+ message.message !== undefined && (obj.message = message.message);
2216
+ message.id !== undefined && (obj.id = message.id);
2217
+ return obj;
2218
+ }
2219
+ FriendshipUpdate_RequestResponse.toJSON = toJSON;
2220
+ function create(base) {
2221
+ return FriendshipUpdate_RequestResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2222
+ }
2223
+ FriendshipUpdate_RequestResponse.create = create;
2224
+ function fromPartial(object) {
2225
+ var _a, _b, _c;
2226
+ const message = createBaseFriendshipUpdate_RequestResponse();
2227
+ message.friend = (object.friend !== undefined && object.friend !== null)
2228
+ ? FriendProfile.fromPartial(object.friend)
2229
+ : undefined;
2230
+ message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : 0;
2231
+ message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
2232
+ message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
2233
+ return message;
2234
+ }
2235
+ FriendshipUpdate_RequestResponse.fromPartial = fromPartial;
2236
+ })(FriendshipUpdate_RequestResponse || (exports.FriendshipUpdate_RequestResponse = FriendshipUpdate_RequestResponse = {}));
1745
2237
  function createBaseFriendshipUpdate_AcceptResponse() {
1746
2238
  return { user: undefined };
1747
2239
  }
@@ -1962,6 +2454,133 @@ var FriendshipUpdate_CancelResponse;
1962
2454
  }
1963
2455
  FriendshipUpdate_CancelResponse.fromPartial = fromPartial;
1964
2456
  })(FriendshipUpdate_CancelResponse || (exports.FriendshipUpdate_CancelResponse = FriendshipUpdate_CancelResponse = {}));
2457
+ function createBaseFriendshipUpdate_BlockResponse() {
2458
+ return { user: undefined };
2459
+ }
2460
+ var FriendshipUpdate_BlockResponse;
2461
+ (function (FriendshipUpdate_BlockResponse) {
2462
+ function encode(message, writer = minimal_1.default.Writer.create()) {
2463
+ if (message.user !== undefined) {
2464
+ User.encode(message.user, writer.uint32(10).fork()).ldelim();
2465
+ }
2466
+ return writer;
2467
+ }
2468
+ FriendshipUpdate_BlockResponse.encode = encode;
2469
+ function decode(input, length) {
2470
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
2471
+ let end = length === undefined ? reader.len : reader.pos + length;
2472
+ const message = createBaseFriendshipUpdate_BlockResponse();
2473
+ while (reader.pos < end) {
2474
+ const tag = reader.uint32();
2475
+ switch (tag >>> 3) {
2476
+ case 1:
2477
+ if (tag !== 10) {
2478
+ break;
2479
+ }
2480
+ message.user = User.decode(reader, reader.uint32());
2481
+ continue;
2482
+ }
2483
+ if ((tag & 7) === 4 || tag === 0) {
2484
+ break;
2485
+ }
2486
+ reader.skipType(tag & 7);
2487
+ }
2488
+ return message;
2489
+ }
2490
+ FriendshipUpdate_BlockResponse.decode = decode;
2491
+ function fromJSON(object) {
2492
+ return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
2493
+ }
2494
+ FriendshipUpdate_BlockResponse.fromJSON = fromJSON;
2495
+ function toJSON(message) {
2496
+ const obj = {};
2497
+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
2498
+ return obj;
2499
+ }
2500
+ FriendshipUpdate_BlockResponse.toJSON = toJSON;
2501
+ function create(base) {
2502
+ return FriendshipUpdate_BlockResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2503
+ }
2504
+ FriendshipUpdate_BlockResponse.create = create;
2505
+ function fromPartial(object) {
2506
+ const message = createBaseFriendshipUpdate_BlockResponse();
2507
+ message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
2508
+ return message;
2509
+ }
2510
+ FriendshipUpdate_BlockResponse.fromPartial = fromPartial;
2511
+ })(FriendshipUpdate_BlockResponse || (exports.FriendshipUpdate_BlockResponse = FriendshipUpdate_BlockResponse = {}));
2512
+ function createBaseFriendConnectivityUpdate() {
2513
+ return { friend: undefined, status: 0 };
2514
+ }
2515
+ var FriendConnectivityUpdate;
2516
+ (function (FriendConnectivityUpdate) {
2517
+ function encode(message, writer = minimal_1.default.Writer.create()) {
2518
+ if (message.friend !== undefined) {
2519
+ FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
2520
+ }
2521
+ if (message.status !== 0) {
2522
+ writer.uint32(16).int32(message.status);
2523
+ }
2524
+ return writer;
2525
+ }
2526
+ FriendConnectivityUpdate.encode = encode;
2527
+ function decode(input, length) {
2528
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
2529
+ let end = length === undefined ? reader.len : reader.pos + length;
2530
+ const message = createBaseFriendConnectivityUpdate();
2531
+ while (reader.pos < end) {
2532
+ const tag = reader.uint32();
2533
+ switch (tag >>> 3) {
2534
+ case 1:
2535
+ if (tag !== 10) {
2536
+ break;
2537
+ }
2538
+ message.friend = FriendProfile.decode(reader, reader.uint32());
2539
+ continue;
2540
+ case 2:
2541
+ if (tag !== 16) {
2542
+ break;
2543
+ }
2544
+ message.status = reader.int32();
2545
+ continue;
2546
+ }
2547
+ if ((tag & 7) === 4 || tag === 0) {
2548
+ break;
2549
+ }
2550
+ reader.skipType(tag & 7);
2551
+ }
2552
+ return message;
2553
+ }
2554
+ FriendConnectivityUpdate.decode = decode;
2555
+ function fromJSON(object) {
2556
+ return {
2557
+ friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
2558
+ status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : 0,
2559
+ };
2560
+ }
2561
+ FriendConnectivityUpdate.fromJSON = fromJSON;
2562
+ function toJSON(message) {
2563
+ const obj = {};
2564
+ message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
2565
+ message.status !== undefined && (obj.status = connectivityStatusToJSON(message.status));
2566
+ return obj;
2567
+ }
2568
+ FriendConnectivityUpdate.toJSON = toJSON;
2569
+ function create(base) {
2570
+ return FriendConnectivityUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
2571
+ }
2572
+ FriendConnectivityUpdate.create = create;
2573
+ function fromPartial(object) {
2574
+ var _a;
2575
+ const message = createBaseFriendConnectivityUpdate();
2576
+ message.friend = (object.friend !== undefined && object.friend !== null)
2577
+ ? FriendProfile.fromPartial(object.friend)
2578
+ : undefined;
2579
+ message.status = (_a = object.status) !== null && _a !== void 0 ? _a : 0;
2580
+ return message;
2581
+ }
2582
+ FriendConnectivityUpdate.fromPartial = fromPartial;
2583
+ })(FriendConnectivityUpdate || (exports.FriendConnectivityUpdate = FriendConnectivityUpdate = {}));
1965
2584
  function createBaseGetFriendshipStatusPayload() {
1966
2585
  return { user: undefined };
1967
2586
  }
@@ -2193,64 +2812,873 @@ var GetFriendshipStatusResponse_Ok;
2193
2812
  }
2194
2813
  GetFriendshipStatusResponse_Ok.fromPartial = fromPartial;
2195
2814
  })(GetFriendshipStatusResponse_Ok || (exports.GetFriendshipStatusResponse_Ok = GetFriendshipStatusResponse_Ok = {}));
2196
- exports.SocialServiceDefinition = {
2197
- name: "SocialService",
2198
- fullName: "decentraland.social_service.v2.SocialService",
2199
- methods: {
2200
- /** Get the list of friends for the authenticated user */
2201
- getFriends: {
2202
- name: "GetFriends",
2203
- requestType: GetFriendsPayload,
2204
- requestStream: false,
2205
- responseType: PaginatedUsersResponse,
2206
- responseStream: false,
2207
- options: {},
2208
- },
2209
- /** Get the list of mutual friends between the authenticated user and the one in the parameter */
2210
- getMutualFriends: {
2211
- name: "GetMutualFriends",
2212
- requestType: GetMutualFriendsPayload,
2213
- requestStream: false,
2214
- responseType: PaginatedUsersResponse,
2215
- responseStream: false,
2216
- options: {},
2217
- },
2218
- /** Get the pending friendship requests for the authenticated user */
2219
- getPendingFriendshipRequests: {
2220
- name: "GetPendingFriendshipRequests",
2221
- requestType: GetFriendshipRequestsPayload,
2222
- requestStream: false,
2223
- responseType: PaginatedFriendshipRequestsResponse,
2224
- responseStream: false,
2225
- options: {},
2226
- },
2227
- /** Get the sent friendship requests for the authenticated user */
2228
- getSentFriendshipRequests: {
2229
- name: "GetSentFriendshipRequests",
2230
- requestType: GetFriendshipRequestsPayload,
2231
- requestStream: false,
2232
- responseType: PaginatedFriendshipRequestsResponse,
2233
- responseStream: false,
2234
- options: {},
2235
- },
2236
- /** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
2237
- upsertFriendship: {
2238
- name: "UpsertFriendship",
2239
- requestType: UpsertFriendshipPayload,
2240
- requestStream: false,
2241
- responseType: UpsertFriendshipResponse,
2242
- responseStream: false,
2243
- options: {},
2244
- },
2245
- /** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
2246
- subscribeToFriendshipUpdates: {
2247
- name: "SubscribeToFriendshipUpdates",
2248
- requestType: empty_gen_1.Empty,
2815
+ function createBaseBlockUserPayload() {
2816
+ return { user: undefined };
2817
+ }
2818
+ var BlockUserPayload;
2819
+ (function (BlockUserPayload) {
2820
+ function encode(message, writer = minimal_1.default.Writer.create()) {
2821
+ if (message.user !== undefined) {
2822
+ User.encode(message.user, writer.uint32(10).fork()).ldelim();
2823
+ }
2824
+ return writer;
2825
+ }
2826
+ BlockUserPayload.encode = encode;
2827
+ function decode(input, length) {
2828
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
2829
+ let end = length === undefined ? reader.len : reader.pos + length;
2830
+ const message = createBaseBlockUserPayload();
2831
+ while (reader.pos < end) {
2832
+ const tag = reader.uint32();
2833
+ switch (tag >>> 3) {
2834
+ case 1:
2835
+ if (tag !== 10) {
2836
+ break;
2837
+ }
2838
+ message.user = User.decode(reader, reader.uint32());
2839
+ continue;
2840
+ }
2841
+ if ((tag & 7) === 4 || tag === 0) {
2842
+ break;
2843
+ }
2844
+ reader.skipType(tag & 7);
2845
+ }
2846
+ return message;
2847
+ }
2848
+ BlockUserPayload.decode = decode;
2849
+ function fromJSON(object) {
2850
+ return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
2851
+ }
2852
+ BlockUserPayload.fromJSON = fromJSON;
2853
+ function toJSON(message) {
2854
+ const obj = {};
2855
+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
2856
+ return obj;
2857
+ }
2858
+ BlockUserPayload.toJSON = toJSON;
2859
+ function create(base) {
2860
+ return BlockUserPayload.fromPartial(base !== null && base !== void 0 ? base : {});
2861
+ }
2862
+ BlockUserPayload.create = create;
2863
+ function fromPartial(object) {
2864
+ const message = createBaseBlockUserPayload();
2865
+ message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
2866
+ return message;
2867
+ }
2868
+ BlockUserPayload.fromPartial = fromPartial;
2869
+ })(BlockUserPayload || (exports.BlockUserPayload = BlockUserPayload = {}));
2870
+ function createBaseBlockUserResponse() {
2871
+ return { response: undefined };
2872
+ }
2873
+ var BlockUserResponse;
2874
+ (function (BlockUserResponse) {
2875
+ function encode(message, writer = minimal_1.default.Writer.create()) {
2876
+ var _a;
2877
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
2878
+ case "ok":
2879
+ BlockUserResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
2880
+ break;
2881
+ case "internalServerError":
2882
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
2883
+ break;
2884
+ case "invalidRequest":
2885
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(26).fork()).ldelim();
2886
+ break;
2887
+ case "profileNotFound":
2888
+ ProfileNotFound.encode(message.response.profileNotFound, writer.uint32(34).fork()).ldelim();
2889
+ break;
2890
+ }
2891
+ return writer;
2892
+ }
2893
+ BlockUserResponse.encode = encode;
2894
+ function decode(input, length) {
2895
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
2896
+ let end = length === undefined ? reader.len : reader.pos + length;
2897
+ const message = createBaseBlockUserResponse();
2898
+ while (reader.pos < end) {
2899
+ const tag = reader.uint32();
2900
+ switch (tag >>> 3) {
2901
+ case 1:
2902
+ if (tag !== 10) {
2903
+ break;
2904
+ }
2905
+ message.response = { $case: "ok", ok: BlockUserResponse_Ok.decode(reader, reader.uint32()) };
2906
+ continue;
2907
+ case 2:
2908
+ if (tag !== 18) {
2909
+ break;
2910
+ }
2911
+ message.response = {
2912
+ $case: "internalServerError",
2913
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
2914
+ };
2915
+ continue;
2916
+ case 3:
2917
+ if (tag !== 26) {
2918
+ break;
2919
+ }
2920
+ message.response = {
2921
+ $case: "invalidRequest",
2922
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
2923
+ };
2924
+ continue;
2925
+ case 4:
2926
+ if (tag !== 34) {
2927
+ break;
2928
+ }
2929
+ message.response = {
2930
+ $case: "profileNotFound",
2931
+ profileNotFound: ProfileNotFound.decode(reader, reader.uint32()),
2932
+ };
2933
+ continue;
2934
+ }
2935
+ if ((tag & 7) === 4 || tag === 0) {
2936
+ break;
2937
+ }
2938
+ reader.skipType(tag & 7);
2939
+ }
2940
+ return message;
2941
+ }
2942
+ BlockUserResponse.decode = decode;
2943
+ function fromJSON(object) {
2944
+ return {
2945
+ response: isSet(object.ok)
2946
+ ? { $case: "ok", ok: BlockUserResponse_Ok.fromJSON(object.ok) }
2947
+ : isSet(object.internalServerError)
2948
+ ? {
2949
+ $case: "internalServerError",
2950
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
2951
+ }
2952
+ : isSet(object.invalidRequest)
2953
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
2954
+ : isSet(object.profileNotFound)
2955
+ ? { $case: "profileNotFound", profileNotFound: ProfileNotFound.fromJSON(object.profileNotFound) }
2956
+ : undefined,
2957
+ };
2958
+ }
2959
+ BlockUserResponse.fromJSON = fromJSON;
2960
+ function toJSON(message) {
2961
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2962
+ const obj = {};
2963
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
2964
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? BlockUserResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
2965
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
2966
+ (obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
2967
+ ? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
2968
+ : undefined);
2969
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
2970
+ (obj.invalidRequest = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.invalidRequest)
2971
+ ? InvalidRequest.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.invalidRequest)
2972
+ : undefined);
2973
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "profileNotFound" &&
2974
+ (obj.profileNotFound = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.profileNotFound)
2975
+ ? ProfileNotFound.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.profileNotFound)
2976
+ : undefined);
2977
+ return obj;
2978
+ }
2979
+ BlockUserResponse.toJSON = toJSON;
2980
+ function create(base) {
2981
+ return BlockUserResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2982
+ }
2983
+ BlockUserResponse.create = create;
2984
+ function fromPartial(object) {
2985
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2986
+ const message = createBaseBlockUserResponse();
2987
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
2988
+ message.response = { $case: "ok", ok: BlockUserResponse_Ok.fromPartial(object.response.ok) };
2989
+ }
2990
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
2991
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
2992
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
2993
+ message.response = {
2994
+ $case: "internalServerError",
2995
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
2996
+ };
2997
+ }
2998
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
2999
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.invalidRequest) !== undefined &&
3000
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.invalidRequest) !== null) {
3001
+ message.response = {
3002
+ $case: "invalidRequest",
3003
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
3004
+ };
3005
+ }
3006
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "profileNotFound" &&
3007
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.profileNotFound) !== undefined &&
3008
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.profileNotFound) !== null) {
3009
+ message.response = {
3010
+ $case: "profileNotFound",
3011
+ profileNotFound: ProfileNotFound.fromPartial(object.response.profileNotFound),
3012
+ };
3013
+ }
3014
+ return message;
3015
+ }
3016
+ BlockUserResponse.fromPartial = fromPartial;
3017
+ })(BlockUserResponse || (exports.BlockUserResponse = BlockUserResponse = {}));
3018
+ function createBaseBlockUserResponse_Ok() {
3019
+ return { profile: undefined };
3020
+ }
3021
+ var BlockUserResponse_Ok;
3022
+ (function (BlockUserResponse_Ok) {
3023
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3024
+ if (message.profile !== undefined) {
3025
+ BlockedUserProfile.encode(message.profile, writer.uint32(10).fork()).ldelim();
3026
+ }
3027
+ return writer;
3028
+ }
3029
+ BlockUserResponse_Ok.encode = encode;
3030
+ function decode(input, length) {
3031
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3032
+ let end = length === undefined ? reader.len : reader.pos + length;
3033
+ const message = createBaseBlockUserResponse_Ok();
3034
+ while (reader.pos < end) {
3035
+ const tag = reader.uint32();
3036
+ switch (tag >>> 3) {
3037
+ case 1:
3038
+ if (tag !== 10) {
3039
+ break;
3040
+ }
3041
+ message.profile = BlockedUserProfile.decode(reader, reader.uint32());
3042
+ continue;
3043
+ }
3044
+ if ((tag & 7) === 4 || tag === 0) {
3045
+ break;
3046
+ }
3047
+ reader.skipType(tag & 7);
3048
+ }
3049
+ return message;
3050
+ }
3051
+ BlockUserResponse_Ok.decode = decode;
3052
+ function fromJSON(object) {
3053
+ return { profile: isSet(object.profile) ? BlockedUserProfile.fromJSON(object.profile) : undefined };
3054
+ }
3055
+ BlockUserResponse_Ok.fromJSON = fromJSON;
3056
+ function toJSON(message) {
3057
+ const obj = {};
3058
+ message.profile !== undefined &&
3059
+ (obj.profile = message.profile ? BlockedUserProfile.toJSON(message.profile) : undefined);
3060
+ return obj;
3061
+ }
3062
+ BlockUserResponse_Ok.toJSON = toJSON;
3063
+ function create(base) {
3064
+ return BlockUserResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
3065
+ }
3066
+ BlockUserResponse_Ok.create = create;
3067
+ function fromPartial(object) {
3068
+ const message = createBaseBlockUserResponse_Ok();
3069
+ message.profile = (object.profile !== undefined && object.profile !== null)
3070
+ ? BlockedUserProfile.fromPartial(object.profile)
3071
+ : undefined;
3072
+ return message;
3073
+ }
3074
+ BlockUserResponse_Ok.fromPartial = fromPartial;
3075
+ })(BlockUserResponse_Ok || (exports.BlockUserResponse_Ok = BlockUserResponse_Ok = {}));
3076
+ function createBaseUnblockUserPayload() {
3077
+ return { user: undefined };
3078
+ }
3079
+ var UnblockUserPayload;
3080
+ (function (UnblockUserPayload) {
3081
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3082
+ if (message.user !== undefined) {
3083
+ User.encode(message.user, writer.uint32(10).fork()).ldelim();
3084
+ }
3085
+ return writer;
3086
+ }
3087
+ UnblockUserPayload.encode = encode;
3088
+ function decode(input, length) {
3089
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3090
+ let end = length === undefined ? reader.len : reader.pos + length;
3091
+ const message = createBaseUnblockUserPayload();
3092
+ while (reader.pos < end) {
3093
+ const tag = reader.uint32();
3094
+ switch (tag >>> 3) {
3095
+ case 1:
3096
+ if (tag !== 10) {
3097
+ break;
3098
+ }
3099
+ message.user = User.decode(reader, reader.uint32());
3100
+ continue;
3101
+ }
3102
+ if ((tag & 7) === 4 || tag === 0) {
3103
+ break;
3104
+ }
3105
+ reader.skipType(tag & 7);
3106
+ }
3107
+ return message;
3108
+ }
3109
+ UnblockUserPayload.decode = decode;
3110
+ function fromJSON(object) {
3111
+ return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
3112
+ }
3113
+ UnblockUserPayload.fromJSON = fromJSON;
3114
+ function toJSON(message) {
3115
+ const obj = {};
3116
+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
3117
+ return obj;
3118
+ }
3119
+ UnblockUserPayload.toJSON = toJSON;
3120
+ function create(base) {
3121
+ return UnblockUserPayload.fromPartial(base !== null && base !== void 0 ? base : {});
3122
+ }
3123
+ UnblockUserPayload.create = create;
3124
+ function fromPartial(object) {
3125
+ const message = createBaseUnblockUserPayload();
3126
+ message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
3127
+ return message;
3128
+ }
3129
+ UnblockUserPayload.fromPartial = fromPartial;
3130
+ })(UnblockUserPayload || (exports.UnblockUserPayload = UnblockUserPayload = {}));
3131
+ function createBaseUnblockUserResponse() {
3132
+ return { response: undefined };
3133
+ }
3134
+ var UnblockUserResponse;
3135
+ (function (UnblockUserResponse) {
3136
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3137
+ var _a;
3138
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
3139
+ case "ok":
3140
+ UnblockUserResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
3141
+ break;
3142
+ case "internalServerError":
3143
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
3144
+ break;
3145
+ case "invalidRequest":
3146
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(26).fork()).ldelim();
3147
+ break;
3148
+ case "profileNotFound":
3149
+ ProfileNotFound.encode(message.response.profileNotFound, writer.uint32(34).fork()).ldelim();
3150
+ break;
3151
+ }
3152
+ return writer;
3153
+ }
3154
+ UnblockUserResponse.encode = encode;
3155
+ function decode(input, length) {
3156
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3157
+ let end = length === undefined ? reader.len : reader.pos + length;
3158
+ const message = createBaseUnblockUserResponse();
3159
+ while (reader.pos < end) {
3160
+ const tag = reader.uint32();
3161
+ switch (tag >>> 3) {
3162
+ case 1:
3163
+ if (tag !== 10) {
3164
+ break;
3165
+ }
3166
+ message.response = { $case: "ok", ok: UnblockUserResponse_Ok.decode(reader, reader.uint32()) };
3167
+ continue;
3168
+ case 2:
3169
+ if (tag !== 18) {
3170
+ break;
3171
+ }
3172
+ message.response = {
3173
+ $case: "internalServerError",
3174
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
3175
+ };
3176
+ continue;
3177
+ case 3:
3178
+ if (tag !== 26) {
3179
+ break;
3180
+ }
3181
+ message.response = {
3182
+ $case: "invalidRequest",
3183
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
3184
+ };
3185
+ continue;
3186
+ case 4:
3187
+ if (tag !== 34) {
3188
+ break;
3189
+ }
3190
+ message.response = {
3191
+ $case: "profileNotFound",
3192
+ profileNotFound: ProfileNotFound.decode(reader, reader.uint32()),
3193
+ };
3194
+ continue;
3195
+ }
3196
+ if ((tag & 7) === 4 || tag === 0) {
3197
+ break;
3198
+ }
3199
+ reader.skipType(tag & 7);
3200
+ }
3201
+ return message;
3202
+ }
3203
+ UnblockUserResponse.decode = decode;
3204
+ function fromJSON(object) {
3205
+ return {
3206
+ response: isSet(object.ok)
3207
+ ? { $case: "ok", ok: UnblockUserResponse_Ok.fromJSON(object.ok) }
3208
+ : isSet(object.internalServerError)
3209
+ ? {
3210
+ $case: "internalServerError",
3211
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
3212
+ }
3213
+ : isSet(object.invalidRequest)
3214
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
3215
+ : isSet(object.profileNotFound)
3216
+ ? { $case: "profileNotFound", profileNotFound: ProfileNotFound.fromJSON(object.profileNotFound) }
3217
+ : undefined,
3218
+ };
3219
+ }
3220
+ UnblockUserResponse.fromJSON = fromJSON;
3221
+ function toJSON(message) {
3222
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
3223
+ const obj = {};
3224
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
3225
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? UnblockUserResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
3226
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3227
+ (obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
3228
+ ? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
3229
+ : undefined);
3230
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
3231
+ (obj.invalidRequest = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.invalidRequest)
3232
+ ? InvalidRequest.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.invalidRequest)
3233
+ : undefined);
3234
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "profileNotFound" &&
3235
+ (obj.profileNotFound = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.profileNotFound)
3236
+ ? ProfileNotFound.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.profileNotFound)
3237
+ : undefined);
3238
+ return obj;
3239
+ }
3240
+ UnblockUserResponse.toJSON = toJSON;
3241
+ function create(base) {
3242
+ return UnblockUserResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3243
+ }
3244
+ UnblockUserResponse.create = create;
3245
+ function fromPartial(object) {
3246
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
3247
+ const message = createBaseUnblockUserResponse();
3248
+ if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" && ((_b = object.response) === null || _b === void 0 ? void 0 : _b.ok) !== undefined && ((_c = object.response) === null || _c === void 0 ? void 0 : _c.ok) !== null) {
3249
+ message.response = { $case: "ok", ok: UnblockUserResponse_Ok.fromPartial(object.response.ok) };
3250
+ }
3251
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3252
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
3253
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
3254
+ message.response = {
3255
+ $case: "internalServerError",
3256
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
3257
+ };
3258
+ }
3259
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
3260
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.invalidRequest) !== undefined &&
3261
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.invalidRequest) !== null) {
3262
+ message.response = {
3263
+ $case: "invalidRequest",
3264
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
3265
+ };
3266
+ }
3267
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "profileNotFound" &&
3268
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.profileNotFound) !== undefined &&
3269
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.profileNotFound) !== null) {
3270
+ message.response = {
3271
+ $case: "profileNotFound",
3272
+ profileNotFound: ProfileNotFound.fromPartial(object.response.profileNotFound),
3273
+ };
3274
+ }
3275
+ return message;
3276
+ }
3277
+ UnblockUserResponse.fromPartial = fromPartial;
3278
+ })(UnblockUserResponse || (exports.UnblockUserResponse = UnblockUserResponse = {}));
3279
+ function createBaseUnblockUserResponse_Ok() {
3280
+ return { profile: undefined };
3281
+ }
3282
+ var UnblockUserResponse_Ok;
3283
+ (function (UnblockUserResponse_Ok) {
3284
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3285
+ if (message.profile !== undefined) {
3286
+ BlockedUserProfile.encode(message.profile, writer.uint32(10).fork()).ldelim();
3287
+ }
3288
+ return writer;
3289
+ }
3290
+ UnblockUserResponse_Ok.encode = encode;
3291
+ function decode(input, length) {
3292
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3293
+ let end = length === undefined ? reader.len : reader.pos + length;
3294
+ const message = createBaseUnblockUserResponse_Ok();
3295
+ while (reader.pos < end) {
3296
+ const tag = reader.uint32();
3297
+ switch (tag >>> 3) {
3298
+ case 1:
3299
+ if (tag !== 10) {
3300
+ break;
3301
+ }
3302
+ message.profile = BlockedUserProfile.decode(reader, reader.uint32());
3303
+ continue;
3304
+ }
3305
+ if ((tag & 7) === 4 || tag === 0) {
3306
+ break;
3307
+ }
3308
+ reader.skipType(tag & 7);
3309
+ }
3310
+ return message;
3311
+ }
3312
+ UnblockUserResponse_Ok.decode = decode;
3313
+ function fromJSON(object) {
3314
+ return { profile: isSet(object.profile) ? BlockedUserProfile.fromJSON(object.profile) : undefined };
3315
+ }
3316
+ UnblockUserResponse_Ok.fromJSON = fromJSON;
3317
+ function toJSON(message) {
3318
+ const obj = {};
3319
+ message.profile !== undefined &&
3320
+ (obj.profile = message.profile ? BlockedUserProfile.toJSON(message.profile) : undefined);
3321
+ return obj;
3322
+ }
3323
+ UnblockUserResponse_Ok.toJSON = toJSON;
3324
+ function create(base) {
3325
+ return UnblockUserResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
3326
+ }
3327
+ UnblockUserResponse_Ok.create = create;
3328
+ function fromPartial(object) {
3329
+ const message = createBaseUnblockUserResponse_Ok();
3330
+ message.profile = (object.profile !== undefined && object.profile !== null)
3331
+ ? BlockedUserProfile.fromPartial(object.profile)
3332
+ : undefined;
3333
+ return message;
3334
+ }
3335
+ UnblockUserResponse_Ok.fromPartial = fromPartial;
3336
+ })(UnblockUserResponse_Ok || (exports.UnblockUserResponse_Ok = UnblockUserResponse_Ok = {}));
3337
+ function createBaseGetBlockedUsersPayload() {
3338
+ return { pagination: undefined };
3339
+ }
3340
+ var GetBlockedUsersPayload;
3341
+ (function (GetBlockedUsersPayload) {
3342
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3343
+ if (message.pagination !== undefined) {
3344
+ Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
3345
+ }
3346
+ return writer;
3347
+ }
3348
+ GetBlockedUsersPayload.encode = encode;
3349
+ function decode(input, length) {
3350
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3351
+ let end = length === undefined ? reader.len : reader.pos + length;
3352
+ const message = createBaseGetBlockedUsersPayload();
3353
+ while (reader.pos < end) {
3354
+ const tag = reader.uint32();
3355
+ switch (tag >>> 3) {
3356
+ case 1:
3357
+ if (tag !== 10) {
3358
+ break;
3359
+ }
3360
+ message.pagination = Pagination.decode(reader, reader.uint32());
3361
+ continue;
3362
+ }
3363
+ if ((tag & 7) === 4 || tag === 0) {
3364
+ break;
3365
+ }
3366
+ reader.skipType(tag & 7);
3367
+ }
3368
+ return message;
3369
+ }
3370
+ GetBlockedUsersPayload.decode = decode;
3371
+ function fromJSON(object) {
3372
+ return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
3373
+ }
3374
+ GetBlockedUsersPayload.fromJSON = fromJSON;
3375
+ function toJSON(message) {
3376
+ const obj = {};
3377
+ message.pagination !== undefined &&
3378
+ (obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
3379
+ return obj;
3380
+ }
3381
+ GetBlockedUsersPayload.toJSON = toJSON;
3382
+ function create(base) {
3383
+ return GetBlockedUsersPayload.fromPartial(base !== null && base !== void 0 ? base : {});
3384
+ }
3385
+ GetBlockedUsersPayload.create = create;
3386
+ function fromPartial(object) {
3387
+ const message = createBaseGetBlockedUsersPayload();
3388
+ message.pagination = (object.pagination !== undefined && object.pagination !== null)
3389
+ ? Pagination.fromPartial(object.pagination)
3390
+ : undefined;
3391
+ return message;
3392
+ }
3393
+ GetBlockedUsersPayload.fromPartial = fromPartial;
3394
+ })(GetBlockedUsersPayload || (exports.GetBlockedUsersPayload = GetBlockedUsersPayload = {}));
3395
+ function createBaseGetBlockedUsersResponse() {
3396
+ return { profiles: [], paginationData: undefined };
3397
+ }
3398
+ var GetBlockedUsersResponse;
3399
+ (function (GetBlockedUsersResponse) {
3400
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3401
+ for (const v of message.profiles) {
3402
+ BlockedUserProfile.encode(v, writer.uint32(10).fork()).ldelim();
3403
+ }
3404
+ if (message.paginationData !== undefined) {
3405
+ PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
3406
+ }
3407
+ return writer;
3408
+ }
3409
+ GetBlockedUsersResponse.encode = encode;
3410
+ function decode(input, length) {
3411
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3412
+ let end = length === undefined ? reader.len : reader.pos + length;
3413
+ const message = createBaseGetBlockedUsersResponse();
3414
+ while (reader.pos < end) {
3415
+ const tag = reader.uint32();
3416
+ switch (tag >>> 3) {
3417
+ case 1:
3418
+ if (tag !== 10) {
3419
+ break;
3420
+ }
3421
+ message.profiles.push(BlockedUserProfile.decode(reader, reader.uint32()));
3422
+ continue;
3423
+ case 2:
3424
+ if (tag !== 18) {
3425
+ break;
3426
+ }
3427
+ message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
3428
+ continue;
3429
+ }
3430
+ if ((tag & 7) === 4 || tag === 0) {
3431
+ break;
3432
+ }
3433
+ reader.skipType(tag & 7);
3434
+ }
3435
+ return message;
3436
+ }
3437
+ GetBlockedUsersResponse.decode = decode;
3438
+ function fromJSON(object) {
3439
+ return {
3440
+ profiles: Array.isArray(object === null || object === void 0 ? void 0 : object.profiles) ? object.profiles.map((e) => BlockedUserProfile.fromJSON(e)) : [],
3441
+ paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
3442
+ };
3443
+ }
3444
+ GetBlockedUsersResponse.fromJSON = fromJSON;
3445
+ function toJSON(message) {
3446
+ const obj = {};
3447
+ if (message.profiles) {
3448
+ obj.profiles = message.profiles.map((e) => e ? BlockedUserProfile.toJSON(e) : undefined);
3449
+ }
3450
+ else {
3451
+ obj.profiles = [];
3452
+ }
3453
+ message.paginationData !== undefined &&
3454
+ (obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
3455
+ return obj;
3456
+ }
3457
+ GetBlockedUsersResponse.toJSON = toJSON;
3458
+ function create(base) {
3459
+ return GetBlockedUsersResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3460
+ }
3461
+ GetBlockedUsersResponse.create = create;
3462
+ function fromPartial(object) {
3463
+ var _a;
3464
+ const message = createBaseGetBlockedUsersResponse();
3465
+ message.profiles = ((_a = object.profiles) === null || _a === void 0 ? void 0 : _a.map((e) => BlockedUserProfile.fromPartial(e))) || [];
3466
+ message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
3467
+ ? PaginatedResponse.fromPartial(object.paginationData)
3468
+ : undefined;
3469
+ return message;
3470
+ }
3471
+ GetBlockedUsersResponse.fromPartial = fromPartial;
3472
+ })(GetBlockedUsersResponse || (exports.GetBlockedUsersResponse = GetBlockedUsersResponse = {}));
3473
+ function createBaseGetBlockingStatusResponse() {
3474
+ return { blockedUsers: [], blockedByUsers: [] };
3475
+ }
3476
+ var GetBlockingStatusResponse;
3477
+ (function (GetBlockingStatusResponse) {
3478
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3479
+ for (const v of message.blockedUsers) {
3480
+ writer.uint32(10).string(v);
3481
+ }
3482
+ for (const v of message.blockedByUsers) {
3483
+ writer.uint32(18).string(v);
3484
+ }
3485
+ return writer;
3486
+ }
3487
+ GetBlockingStatusResponse.encode = encode;
3488
+ function decode(input, length) {
3489
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3490
+ let end = length === undefined ? reader.len : reader.pos + length;
3491
+ const message = createBaseGetBlockingStatusResponse();
3492
+ while (reader.pos < end) {
3493
+ const tag = reader.uint32();
3494
+ switch (tag >>> 3) {
3495
+ case 1:
3496
+ if (tag !== 10) {
3497
+ break;
3498
+ }
3499
+ message.blockedUsers.push(reader.string());
3500
+ continue;
3501
+ case 2:
3502
+ if (tag !== 18) {
3503
+ break;
3504
+ }
3505
+ message.blockedByUsers.push(reader.string());
3506
+ continue;
3507
+ }
3508
+ if ((tag & 7) === 4 || tag === 0) {
3509
+ break;
3510
+ }
3511
+ reader.skipType(tag & 7);
3512
+ }
3513
+ return message;
3514
+ }
3515
+ GetBlockingStatusResponse.decode = decode;
3516
+ function fromJSON(object) {
3517
+ return {
3518
+ blockedUsers: Array.isArray(object === null || object === void 0 ? void 0 : object.blockedUsers) ? object.blockedUsers.map((e) => String(e)) : [],
3519
+ blockedByUsers: Array.isArray(object === null || object === void 0 ? void 0 : object.blockedByUsers) ? object.blockedByUsers.map((e) => String(e)) : [],
3520
+ };
3521
+ }
3522
+ GetBlockingStatusResponse.fromJSON = fromJSON;
3523
+ function toJSON(message) {
3524
+ const obj = {};
3525
+ if (message.blockedUsers) {
3526
+ obj.blockedUsers = message.blockedUsers.map((e) => e);
3527
+ }
3528
+ else {
3529
+ obj.blockedUsers = [];
3530
+ }
3531
+ if (message.blockedByUsers) {
3532
+ obj.blockedByUsers = message.blockedByUsers.map((e) => e);
3533
+ }
3534
+ else {
3535
+ obj.blockedByUsers = [];
3536
+ }
3537
+ return obj;
3538
+ }
3539
+ GetBlockingStatusResponse.toJSON = toJSON;
3540
+ function create(base) {
3541
+ return GetBlockingStatusResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3542
+ }
3543
+ GetBlockingStatusResponse.create = create;
3544
+ function fromPartial(object) {
3545
+ var _a, _b;
3546
+ const message = createBaseGetBlockingStatusResponse();
3547
+ message.blockedUsers = ((_a = object.blockedUsers) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
3548
+ message.blockedByUsers = ((_b = object.blockedByUsers) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
3549
+ return message;
3550
+ }
3551
+ GetBlockingStatusResponse.fromPartial = fromPartial;
3552
+ })(GetBlockingStatusResponse || (exports.GetBlockingStatusResponse = GetBlockingStatusResponse = {}));
3553
+ function createBaseBlockUpdate() {
3554
+ return { address: "", isBlocked: false };
3555
+ }
3556
+ var BlockUpdate;
3557
+ (function (BlockUpdate) {
3558
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3559
+ if (message.address !== "") {
3560
+ writer.uint32(10).string(message.address);
3561
+ }
3562
+ if (message.isBlocked === true) {
3563
+ writer.uint32(16).bool(message.isBlocked);
3564
+ }
3565
+ return writer;
3566
+ }
3567
+ BlockUpdate.encode = encode;
3568
+ function decode(input, length) {
3569
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3570
+ let end = length === undefined ? reader.len : reader.pos + length;
3571
+ const message = createBaseBlockUpdate();
3572
+ while (reader.pos < end) {
3573
+ const tag = reader.uint32();
3574
+ switch (tag >>> 3) {
3575
+ case 1:
3576
+ if (tag !== 10) {
3577
+ break;
3578
+ }
3579
+ message.address = reader.string();
3580
+ continue;
3581
+ case 2:
3582
+ if (tag !== 16) {
3583
+ break;
3584
+ }
3585
+ message.isBlocked = reader.bool();
3586
+ continue;
3587
+ }
3588
+ if ((tag & 7) === 4 || tag === 0) {
3589
+ break;
3590
+ }
3591
+ reader.skipType(tag & 7);
3592
+ }
3593
+ return message;
3594
+ }
3595
+ BlockUpdate.decode = decode;
3596
+ function fromJSON(object) {
3597
+ return {
3598
+ address: isSet(object.address) ? String(object.address) : "",
3599
+ isBlocked: isSet(object.isBlocked) ? Boolean(object.isBlocked) : false,
3600
+ };
3601
+ }
3602
+ BlockUpdate.fromJSON = fromJSON;
3603
+ function toJSON(message) {
3604
+ const obj = {};
3605
+ message.address !== undefined && (obj.address = message.address);
3606
+ message.isBlocked !== undefined && (obj.isBlocked = message.isBlocked);
3607
+ return obj;
3608
+ }
3609
+ BlockUpdate.toJSON = toJSON;
3610
+ function create(base) {
3611
+ return BlockUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
3612
+ }
3613
+ BlockUpdate.create = create;
3614
+ function fromPartial(object) {
3615
+ var _a, _b;
3616
+ const message = createBaseBlockUpdate();
3617
+ message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
3618
+ message.isBlocked = (_b = object.isBlocked) !== null && _b !== void 0 ? _b : false;
3619
+ return message;
3620
+ }
3621
+ BlockUpdate.fromPartial = fromPartial;
3622
+ })(BlockUpdate || (exports.BlockUpdate = BlockUpdate = {}));
3623
+ exports.SocialServiceDefinition = {
3624
+ name: "SocialService",
3625
+ fullName: "decentraland.social_service.v2.SocialService",
3626
+ methods: {
3627
+ /** Get the list of friends for the authenticated user */
3628
+ getFriends: {
3629
+ name: "GetFriends",
3630
+ requestType: GetFriendsPayload,
3631
+ requestStream: false,
3632
+ responseType: PaginatedFriendsProfilesResponse,
3633
+ responseStream: false,
3634
+ options: {},
3635
+ },
3636
+ /** Get the list of mutual friends between the authenticated user and the one in the parameter */
3637
+ getMutualFriends: {
3638
+ name: "GetMutualFriends",
3639
+ requestType: GetMutualFriendsPayload,
3640
+ requestStream: false,
3641
+ responseType: PaginatedFriendsProfilesResponse,
3642
+ responseStream: false,
3643
+ options: {},
3644
+ },
3645
+ /** Get the pending friendship requests for the authenticated user */
3646
+ getPendingFriendshipRequests: {
3647
+ name: "GetPendingFriendshipRequests",
3648
+ requestType: GetFriendshipRequestsPayload,
3649
+ requestStream: false,
3650
+ responseType: PaginatedFriendshipRequestsResponse,
3651
+ responseStream: false,
3652
+ options: {},
3653
+ },
3654
+ /** Get the sent friendship requests for the authenticated user */
3655
+ getSentFriendshipRequests: {
3656
+ name: "GetSentFriendshipRequests",
3657
+ requestType: GetFriendshipRequestsPayload,
3658
+ requestStream: false,
3659
+ responseType: PaginatedFriendshipRequestsResponse,
3660
+ responseStream: false,
3661
+ options: {},
3662
+ },
3663
+ /** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
3664
+ upsertFriendship: {
3665
+ name: "UpsertFriendship",
3666
+ requestType: UpsertFriendshipPayload,
3667
+ requestStream: false,
3668
+ responseType: UpsertFriendshipResponse,
3669
+ responseStream: false,
3670
+ options: {},
3671
+ },
3672
+ /** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
3673
+ subscribeToFriendshipUpdates: {
3674
+ name: "SubscribeToFriendshipUpdates",
3675
+ requestType: empty_gen_1.Empty,
2249
3676
  requestStream: false,
2250
3677
  responseType: FriendshipUpdate,
2251
3678
  responseStream: true,
2252
3679
  options: {},
2253
3680
  },
3681
+ /** Get the friendship status between the authenticated user and the one in the parameter */
2254
3682
  getFriendshipStatus: {
2255
3683
  name: "GetFriendshipStatus",
2256
3684
  requestType: GetFriendshipStatusPayload,
@@ -2259,6 +3687,55 @@ exports.SocialServiceDefinition = {
2259
3687
  responseStream: false,
2260
3688
  options: {},
2261
3689
  },
3690
+ /** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
3691
+ subscribeToFriendConnectivityUpdates: {
3692
+ name: "SubscribeToFriendConnectivityUpdates",
3693
+ requestType: empty_gen_1.Empty,
3694
+ requestStream: false,
3695
+ responseType: FriendConnectivityUpdate,
3696
+ responseStream: true,
3697
+ options: {},
3698
+ },
3699
+ blockUser: {
3700
+ name: "BlockUser",
3701
+ requestType: BlockUserPayload,
3702
+ requestStream: false,
3703
+ responseType: BlockUserResponse,
3704
+ responseStream: false,
3705
+ options: {},
3706
+ },
3707
+ unblockUser: {
3708
+ name: "UnblockUser",
3709
+ requestType: UnblockUserPayload,
3710
+ requestStream: false,
3711
+ responseType: UnblockUserResponse,
3712
+ responseStream: false,
3713
+ options: {},
3714
+ },
3715
+ getBlockedUsers: {
3716
+ name: "GetBlockedUsers",
3717
+ requestType: GetBlockedUsersPayload,
3718
+ requestStream: false,
3719
+ responseType: GetBlockedUsersResponse,
3720
+ responseStream: false,
3721
+ options: {},
3722
+ },
3723
+ getBlockingStatus: {
3724
+ name: "GetBlockingStatus",
3725
+ requestType: empty_gen_1.Empty,
3726
+ requestStream: false,
3727
+ responseType: GetBlockingStatusResponse,
3728
+ responseStream: false,
3729
+ options: {},
3730
+ },
3731
+ subscribeToBlockUpdates: {
3732
+ name: "SubscribeToBlockUpdates",
3733
+ requestType: empty_gen_1.Empty,
3734
+ requestStream: false,
3735
+ responseType: BlockUpdate,
3736
+ responseStream: true,
3737
+ options: {},
3738
+ },
2262
3739
  },
2263
3740
  };
2264
3741
  const tsProtoGlobalThis = (() => {