@dcl/protocol 1.0.0-14033250574.commit-0daf6ca → 1.0.0-14129719212.commit-3bf30a3

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.
@@ -3,11 +3,16 @@ 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.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;
6
+ exports.UpsertSocialSettingsPayload = exports.GetSocialSettingsResponse_Ok = exports.GetSocialSettingsResponse = exports.SocialSettings = 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.BlockedUsersMessagesVisibilitySetting = exports.PrivateMessagePrivacySetting = exports.FriendshipStatus = exports.ConnectivityStatus = exports.protobufPackage = void 0;
7
+ exports.SocialServiceDefinition = exports.BlockUpdate = exports.GetBlockingStatusResponse = exports.GetBlockedUsersResponse = exports.GetBlockedUsersPayload = exports.GetPrivateMessagesSettingsResponse_Ok = exports.GetPrivateMessagesSettingsResponse_PrivateMessagesSettings = exports.GetPrivateMessagesSettingsResponse = exports.GetPrivateMessagesSettingsPayload = exports.UpsertSocialSettingsResponse = void 0;
7
8
  exports.connectivityStatusFromJSON = connectivityStatusFromJSON;
8
9
  exports.connectivityStatusToJSON = connectivityStatusToJSON;
9
10
  exports.friendshipStatusFromJSON = friendshipStatusFromJSON;
10
11
  exports.friendshipStatusToJSON = friendshipStatusToJSON;
12
+ exports.privateMessagePrivacySettingFromJSON = privateMessagePrivacySettingFromJSON;
13
+ exports.privateMessagePrivacySettingToJSON = privateMessagePrivacySettingToJSON;
14
+ exports.blockedUsersMessagesVisibilitySettingFromJSON = blockedUsersMessagesVisibilitySettingFromJSON;
15
+ exports.blockedUsersMessagesVisibilitySettingToJSON = blockedUsersMessagesVisibilitySettingToJSON;
11
16
  /* eslint-disable */
12
17
  const long_1 = __importDefault(require("long"));
13
18
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -123,6 +128,68 @@ function friendshipStatusToJSON(object) {
123
128
  return "UNRECOGNIZED";
124
129
  }
125
130
  }
131
+ var PrivateMessagePrivacySetting;
132
+ (function (PrivateMessagePrivacySetting) {
133
+ PrivateMessagePrivacySetting[PrivateMessagePrivacySetting["ALL"] = 0] = "ALL";
134
+ PrivateMessagePrivacySetting[PrivateMessagePrivacySetting["ONLY_FRIENDS"] = 1] = "ONLY_FRIENDS";
135
+ PrivateMessagePrivacySetting[PrivateMessagePrivacySetting["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
136
+ })(PrivateMessagePrivacySetting || (exports.PrivateMessagePrivacySetting = PrivateMessagePrivacySetting = {}));
137
+ function privateMessagePrivacySettingFromJSON(object) {
138
+ switch (object) {
139
+ case 0:
140
+ case "ALL":
141
+ return PrivateMessagePrivacySetting.ALL;
142
+ case 1:
143
+ case "ONLY_FRIENDS":
144
+ return PrivateMessagePrivacySetting.ONLY_FRIENDS;
145
+ case -1:
146
+ case "UNRECOGNIZED":
147
+ default:
148
+ return PrivateMessagePrivacySetting.UNRECOGNIZED;
149
+ }
150
+ }
151
+ function privateMessagePrivacySettingToJSON(object) {
152
+ switch (object) {
153
+ case PrivateMessagePrivacySetting.ALL:
154
+ return "ALL";
155
+ case PrivateMessagePrivacySetting.ONLY_FRIENDS:
156
+ return "ONLY_FRIENDS";
157
+ case PrivateMessagePrivacySetting.UNRECOGNIZED:
158
+ default:
159
+ return "UNRECOGNIZED";
160
+ }
161
+ }
162
+ var BlockedUsersMessagesVisibilitySetting;
163
+ (function (BlockedUsersMessagesVisibilitySetting) {
164
+ BlockedUsersMessagesVisibilitySetting[BlockedUsersMessagesVisibilitySetting["SHOW_MESSAGES"] = 0] = "SHOW_MESSAGES";
165
+ BlockedUsersMessagesVisibilitySetting[BlockedUsersMessagesVisibilitySetting["DO_NOT_SHOW_MESSAGES"] = 1] = "DO_NOT_SHOW_MESSAGES";
166
+ BlockedUsersMessagesVisibilitySetting[BlockedUsersMessagesVisibilitySetting["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
167
+ })(BlockedUsersMessagesVisibilitySetting || (exports.BlockedUsersMessagesVisibilitySetting = BlockedUsersMessagesVisibilitySetting = {}));
168
+ function blockedUsersMessagesVisibilitySettingFromJSON(object) {
169
+ switch (object) {
170
+ case 0:
171
+ case "SHOW_MESSAGES":
172
+ return BlockedUsersMessagesVisibilitySetting.SHOW_MESSAGES;
173
+ case 1:
174
+ case "DO_NOT_SHOW_MESSAGES":
175
+ return BlockedUsersMessagesVisibilitySetting.DO_NOT_SHOW_MESSAGES;
176
+ case -1:
177
+ case "UNRECOGNIZED":
178
+ default:
179
+ return BlockedUsersMessagesVisibilitySetting.UNRECOGNIZED;
180
+ }
181
+ }
182
+ function blockedUsersMessagesVisibilitySettingToJSON(object) {
183
+ switch (object) {
184
+ case BlockedUsersMessagesVisibilitySetting.SHOW_MESSAGES:
185
+ return "SHOW_MESSAGES";
186
+ case BlockedUsersMessagesVisibilitySetting.DO_NOT_SHOW_MESSAGES:
187
+ return "DO_NOT_SHOW_MESSAGES";
188
+ case BlockedUsersMessagesVisibilitySetting.UNRECOGNIZED:
189
+ default:
190
+ return "UNRECOGNIZED";
191
+ }
192
+ }
126
193
  function createBaseInvalidFriendshipAction() {
127
194
  return { message: undefined };
128
195
  }
@@ -3334,30 +3401,39 @@ var UnblockUserResponse_Ok;
3334
3401
  }
3335
3402
  UnblockUserResponse_Ok.fromPartial = fromPartial;
3336
3403
  })(UnblockUserResponse_Ok || (exports.UnblockUserResponse_Ok = UnblockUserResponse_Ok = {}));
3337
- function createBaseGetBlockedUsersPayload() {
3338
- return { pagination: undefined };
3404
+ function createBaseSocialSettings() {
3405
+ return { privateMessagesPrivacy: 0, blockedUsersMessagesVisibility: 0 };
3339
3406
  }
3340
- var GetBlockedUsersPayload;
3341
- (function (GetBlockedUsersPayload) {
3407
+ var SocialSettings;
3408
+ (function (SocialSettings) {
3342
3409
  function encode(message, writer = minimal_1.default.Writer.create()) {
3343
- if (message.pagination !== undefined) {
3344
- Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
3410
+ if (message.privateMessagesPrivacy !== 0) {
3411
+ writer.uint32(8).int32(message.privateMessagesPrivacy);
3412
+ }
3413
+ if (message.blockedUsersMessagesVisibility !== 0) {
3414
+ writer.uint32(16).int32(message.blockedUsersMessagesVisibility);
3345
3415
  }
3346
3416
  return writer;
3347
3417
  }
3348
- GetBlockedUsersPayload.encode = encode;
3418
+ SocialSettings.encode = encode;
3349
3419
  function decode(input, length) {
3350
3420
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3351
3421
  let end = length === undefined ? reader.len : reader.pos + length;
3352
- const message = createBaseGetBlockedUsersPayload();
3422
+ const message = createBaseSocialSettings();
3353
3423
  while (reader.pos < end) {
3354
3424
  const tag = reader.uint32();
3355
3425
  switch (tag >>> 3) {
3356
3426
  case 1:
3357
- if (tag !== 10) {
3427
+ if (tag !== 8) {
3358
3428
  break;
3359
3429
  }
3360
- message.pagination = Pagination.decode(reader, reader.uint32());
3430
+ message.privateMessagesPrivacy = reader.int32();
3431
+ continue;
3432
+ case 2:
3433
+ if (tag !== 16) {
3434
+ break;
3435
+ }
3436
+ message.blockedUsersMessagesVisibility = reader.int32();
3361
3437
  continue;
3362
3438
  }
3363
3439
  if ((tag & 7) === 4 || tag === 0) {
@@ -3367,50 +3443,62 @@ var GetBlockedUsersPayload;
3367
3443
  }
3368
3444
  return message;
3369
3445
  }
3370
- GetBlockedUsersPayload.decode = decode;
3446
+ SocialSettings.decode = decode;
3371
3447
  function fromJSON(object) {
3372
- return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
3448
+ return {
3449
+ privateMessagesPrivacy: isSet(object.privateMessagesPrivacy)
3450
+ ? privateMessagePrivacySettingFromJSON(object.privateMessagesPrivacy)
3451
+ : 0,
3452
+ blockedUsersMessagesVisibility: isSet(object.blockedUsersMessagesVisibility)
3453
+ ? blockedUsersMessagesVisibilitySettingFromJSON(object.blockedUsersMessagesVisibility)
3454
+ : 0,
3455
+ };
3373
3456
  }
3374
- GetBlockedUsersPayload.fromJSON = fromJSON;
3457
+ SocialSettings.fromJSON = fromJSON;
3375
3458
  function toJSON(message) {
3376
3459
  const obj = {};
3377
- message.pagination !== undefined &&
3378
- (obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
3460
+ message.privateMessagesPrivacy !== undefined &&
3461
+ (obj.privateMessagesPrivacy = privateMessagePrivacySettingToJSON(message.privateMessagesPrivacy));
3462
+ message.blockedUsersMessagesVisibility !== undefined &&
3463
+ (obj.blockedUsersMessagesVisibility = blockedUsersMessagesVisibilitySettingToJSON(message.blockedUsersMessagesVisibility));
3379
3464
  return obj;
3380
3465
  }
3381
- GetBlockedUsersPayload.toJSON = toJSON;
3466
+ SocialSettings.toJSON = toJSON;
3382
3467
  function create(base) {
3383
- return GetBlockedUsersPayload.fromPartial(base !== null && base !== void 0 ? base : {});
3468
+ return SocialSettings.fromPartial(base !== null && base !== void 0 ? base : {});
3384
3469
  }
3385
- GetBlockedUsersPayload.create = create;
3470
+ SocialSettings.create = create;
3386
3471
  function fromPartial(object) {
3387
- const message = createBaseGetBlockedUsersPayload();
3388
- message.pagination = (object.pagination !== undefined && object.pagination !== null)
3389
- ? Pagination.fromPartial(object.pagination)
3390
- : undefined;
3472
+ var _a, _b;
3473
+ const message = createBaseSocialSettings();
3474
+ message.privateMessagesPrivacy = (_a = object.privateMessagesPrivacy) !== null && _a !== void 0 ? _a : 0;
3475
+ message.blockedUsersMessagesVisibility = (_b = object.blockedUsersMessagesVisibility) !== null && _b !== void 0 ? _b : 0;
3391
3476
  return message;
3392
3477
  }
3393
- GetBlockedUsersPayload.fromPartial = fromPartial;
3394
- })(GetBlockedUsersPayload || (exports.GetBlockedUsersPayload = GetBlockedUsersPayload = {}));
3395
- function createBaseGetBlockedUsersResponse() {
3396
- return { profiles: [], paginationData: undefined };
3478
+ SocialSettings.fromPartial = fromPartial;
3479
+ })(SocialSettings || (exports.SocialSettings = SocialSettings = {}));
3480
+ function createBaseGetSocialSettingsResponse() {
3481
+ return { response: undefined };
3397
3482
  }
3398
- var GetBlockedUsersResponse;
3399
- (function (GetBlockedUsersResponse) {
3483
+ var GetSocialSettingsResponse;
3484
+ (function (GetSocialSettingsResponse) {
3400
3485
  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();
3486
+ var _a;
3487
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
3488
+ case "ok":
3489
+ GetSocialSettingsResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
3490
+ break;
3491
+ case "internalServerError":
3492
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
3493
+ break;
3406
3494
  }
3407
3495
  return writer;
3408
3496
  }
3409
- GetBlockedUsersResponse.encode = encode;
3497
+ GetSocialSettingsResponse.encode = encode;
3410
3498
  function decode(input, length) {
3411
3499
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3412
3500
  let end = length === undefined ? reader.len : reader.pos + length;
3413
- const message = createBaseGetBlockedUsersResponse();
3501
+ const message = createBaseGetSocialSettingsResponse();
3414
3502
  while (reader.pos < end) {
3415
3503
  const tag = reader.uint32();
3416
3504
  switch (tag >>> 3) {
@@ -3418,13 +3506,16 @@ var GetBlockedUsersResponse;
3418
3506
  if (tag !== 10) {
3419
3507
  break;
3420
3508
  }
3421
- message.profiles.push(BlockedUserProfile.decode(reader, reader.uint32()));
3509
+ message.response = { $case: "ok", ok: GetSocialSettingsResponse_Ok.decode(reader, reader.uint32()) };
3422
3510
  continue;
3423
3511
  case 2:
3424
3512
  if (tag !== 18) {
3425
3513
  break;
3426
3514
  }
3427
- message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
3515
+ message.response = {
3516
+ $case: "internalServerError",
3517
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
3518
+ };
3428
3519
  continue;
3429
3520
  }
3430
3521
  if ((tag & 7) === 4 || tag === 0) {
@@ -3434,61 +3525,70 @@ var GetBlockedUsersResponse;
3434
3525
  }
3435
3526
  return message;
3436
3527
  }
3437
- GetBlockedUsersResponse.decode = decode;
3528
+ GetSocialSettingsResponse.decode = decode;
3438
3529
  function fromJSON(object) {
3439
3530
  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,
3531
+ response: isSet(object.ok)
3532
+ ? { $case: "ok", ok: GetSocialSettingsResponse_Ok.fromJSON(object.ok) }
3533
+ : isSet(object.internalServerError)
3534
+ ? {
3535
+ $case: "internalServerError",
3536
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
3537
+ }
3538
+ : undefined,
3442
3539
  };
3443
3540
  }
3444
- GetBlockedUsersResponse.fromJSON = fromJSON;
3541
+ GetSocialSettingsResponse.fromJSON = fromJSON;
3445
3542
  function toJSON(message) {
3543
+ var _a, _b, _c, _d, _e, _f;
3446
3544
  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);
3545
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
3546
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? GetSocialSettingsResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
3547
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3548
+ (obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
3549
+ ? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
3550
+ : undefined);
3455
3551
  return obj;
3456
3552
  }
3457
- GetBlockedUsersResponse.toJSON = toJSON;
3553
+ GetSocialSettingsResponse.toJSON = toJSON;
3458
3554
  function create(base) {
3459
- return GetBlockedUsersResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3555
+ return GetSocialSettingsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3460
3556
  }
3461
- GetBlockedUsersResponse.create = create;
3557
+ GetSocialSettingsResponse.create = create;
3462
3558
  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;
3559
+ var _a, _b, _c, _d, _e, _f;
3560
+ const message = createBaseGetSocialSettingsResponse();
3561
+ 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) {
3562
+ message.response = { $case: "ok", ok: GetSocialSettingsResponse_Ok.fromPartial(object.response.ok) };
3563
+ }
3564
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3565
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
3566
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
3567
+ message.response = {
3568
+ $case: "internalServerError",
3569
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
3570
+ };
3571
+ }
3469
3572
  return message;
3470
3573
  }
3471
- GetBlockedUsersResponse.fromPartial = fromPartial;
3472
- })(GetBlockedUsersResponse || (exports.GetBlockedUsersResponse = GetBlockedUsersResponse = {}));
3473
- function createBaseGetBlockingStatusResponse() {
3474
- return { blockedUsers: [], blockedByUsers: [] };
3574
+ GetSocialSettingsResponse.fromPartial = fromPartial;
3575
+ })(GetSocialSettingsResponse || (exports.GetSocialSettingsResponse = GetSocialSettingsResponse = {}));
3576
+ function createBaseGetSocialSettingsResponse_Ok() {
3577
+ return { settings: undefined };
3475
3578
  }
3476
- var GetBlockingStatusResponse;
3477
- (function (GetBlockingStatusResponse) {
3579
+ var GetSocialSettingsResponse_Ok;
3580
+ (function (GetSocialSettingsResponse_Ok) {
3478
3581
  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);
3582
+ if (message.settings !== undefined) {
3583
+ SocialSettings.encode(message.settings, writer.uint32(10).fork()).ldelim();
3484
3584
  }
3485
3585
  return writer;
3486
3586
  }
3487
- GetBlockingStatusResponse.encode = encode;
3587
+ GetSocialSettingsResponse_Ok.encode = encode;
3488
3588
  function decode(input, length) {
3489
3589
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3490
3590
  let end = length === undefined ? reader.len : reader.pos + length;
3491
- const message = createBaseGetBlockingStatusResponse();
3591
+ const message = createBaseGetSocialSettingsResponse_Ok();
3492
3592
  while (reader.pos < end) {
3493
3593
  const tag = reader.uint32();
3494
3594
  switch (tag >>> 3) {
@@ -3496,13 +3596,7 @@ var GetBlockingStatusResponse;
3496
3596
  if (tag !== 10) {
3497
3597
  break;
3498
3598
  }
3499
- message.blockedUsers.push(reader.string());
3500
- continue;
3501
- case 2:
3502
- if (tag !== 18) {
3503
- break;
3504
- }
3505
- message.blockedByUsers.push(reader.string());
3599
+ message.settings = SocialSettings.decode(reader, reader.uint32());
3506
3600
  continue;
3507
3601
  }
3508
3602
  if ((tag & 7) === 4 || tag === 0) {
@@ -3512,77 +3606,64 @@ var GetBlockingStatusResponse;
3512
3606
  }
3513
3607
  return message;
3514
3608
  }
3515
- GetBlockingStatusResponse.decode = decode;
3609
+ GetSocialSettingsResponse_Ok.decode = decode;
3516
3610
  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
- };
3611
+ return { settings: isSet(object.settings) ? SocialSettings.fromJSON(object.settings) : undefined };
3521
3612
  }
3522
- GetBlockingStatusResponse.fromJSON = fromJSON;
3613
+ GetSocialSettingsResponse_Ok.fromJSON = fromJSON;
3523
3614
  function toJSON(message) {
3524
3615
  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
- }
3616
+ message.settings !== undefined &&
3617
+ (obj.settings = message.settings ? SocialSettings.toJSON(message.settings) : undefined);
3537
3618
  return obj;
3538
3619
  }
3539
- GetBlockingStatusResponse.toJSON = toJSON;
3620
+ GetSocialSettingsResponse_Ok.toJSON = toJSON;
3540
3621
  function create(base) {
3541
- return GetBlockingStatusResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3622
+ return GetSocialSettingsResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
3542
3623
  }
3543
- GetBlockingStatusResponse.create = create;
3624
+ GetSocialSettingsResponse_Ok.create = create;
3544
3625
  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)) || [];
3626
+ const message = createBaseGetSocialSettingsResponse_Ok();
3627
+ message.settings = (object.settings !== undefined && object.settings !== null)
3628
+ ? SocialSettings.fromPartial(object.settings)
3629
+ : undefined;
3549
3630
  return message;
3550
3631
  }
3551
- GetBlockingStatusResponse.fromPartial = fromPartial;
3552
- })(GetBlockingStatusResponse || (exports.GetBlockingStatusResponse = GetBlockingStatusResponse = {}));
3553
- function createBaseBlockUpdate() {
3554
- return { address: "", isBlocked: false };
3632
+ GetSocialSettingsResponse_Ok.fromPartial = fromPartial;
3633
+ })(GetSocialSettingsResponse_Ok || (exports.GetSocialSettingsResponse_Ok = GetSocialSettingsResponse_Ok = {}));
3634
+ function createBaseUpsertSocialSettingsPayload() {
3635
+ return { privateMessagesPrivacy: undefined, blockedUsersMessagesVisibility: undefined };
3555
3636
  }
3556
- var BlockUpdate;
3557
- (function (BlockUpdate) {
3637
+ var UpsertSocialSettingsPayload;
3638
+ (function (UpsertSocialSettingsPayload) {
3558
3639
  function encode(message, writer = minimal_1.default.Writer.create()) {
3559
- if (message.address !== "") {
3560
- writer.uint32(10).string(message.address);
3640
+ if (message.privateMessagesPrivacy !== undefined) {
3641
+ writer.uint32(8).int32(message.privateMessagesPrivacy);
3561
3642
  }
3562
- if (message.isBlocked === true) {
3563
- writer.uint32(16).bool(message.isBlocked);
3643
+ if (message.blockedUsersMessagesVisibility !== undefined) {
3644
+ writer.uint32(16).int32(message.blockedUsersMessagesVisibility);
3564
3645
  }
3565
3646
  return writer;
3566
3647
  }
3567
- BlockUpdate.encode = encode;
3648
+ UpsertSocialSettingsPayload.encode = encode;
3568
3649
  function decode(input, length) {
3569
3650
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3570
3651
  let end = length === undefined ? reader.len : reader.pos + length;
3571
- const message = createBaseBlockUpdate();
3652
+ const message = createBaseUpsertSocialSettingsPayload();
3572
3653
  while (reader.pos < end) {
3573
3654
  const tag = reader.uint32();
3574
3655
  switch (tag >>> 3) {
3575
3656
  case 1:
3576
- if (tag !== 10) {
3657
+ if (tag !== 8) {
3577
3658
  break;
3578
3659
  }
3579
- message.address = reader.string();
3660
+ message.privateMessagesPrivacy = reader.int32();
3580
3661
  continue;
3581
3662
  case 2:
3582
3663
  if (tag !== 16) {
3583
3664
  break;
3584
3665
  }
3585
- message.isBlocked = reader.bool();
3666
+ message.blockedUsersMessagesVisibility = reader.int32();
3586
3667
  continue;
3587
3668
  }
3588
3669
  if ((tag & 7) === 4 || tag === 0) {
@@ -3592,82 +3673,848 @@ var BlockUpdate;
3592
3673
  }
3593
3674
  return message;
3594
3675
  }
3595
- BlockUpdate.decode = decode;
3676
+ UpsertSocialSettingsPayload.decode = decode;
3596
3677
  function fromJSON(object) {
3597
3678
  return {
3598
- address: isSet(object.address) ? String(object.address) : "",
3599
- isBlocked: isSet(object.isBlocked) ? Boolean(object.isBlocked) : false,
3679
+ privateMessagesPrivacy: isSet(object.privateMessagesPrivacy)
3680
+ ? privateMessagePrivacySettingFromJSON(object.privateMessagesPrivacy)
3681
+ : undefined,
3682
+ blockedUsersMessagesVisibility: isSet(object.blockedUsersMessagesVisibility)
3683
+ ? blockedUsersMessagesVisibilitySettingFromJSON(object.blockedUsersMessagesVisibility)
3684
+ : undefined,
3600
3685
  };
3601
3686
  }
3602
- BlockUpdate.fromJSON = fromJSON;
3687
+ UpsertSocialSettingsPayload.fromJSON = fromJSON;
3603
3688
  function toJSON(message) {
3604
3689
  const obj = {};
3605
- message.address !== undefined && (obj.address = message.address);
3606
- message.isBlocked !== undefined && (obj.isBlocked = message.isBlocked);
3690
+ message.privateMessagesPrivacy !== undefined &&
3691
+ (obj.privateMessagesPrivacy = message.privateMessagesPrivacy !== undefined
3692
+ ? privateMessagePrivacySettingToJSON(message.privateMessagesPrivacy)
3693
+ : undefined);
3694
+ message.blockedUsersMessagesVisibility !== undefined &&
3695
+ (obj.blockedUsersMessagesVisibility = message.blockedUsersMessagesVisibility !== undefined
3696
+ ? blockedUsersMessagesVisibilitySettingToJSON(message.blockedUsersMessagesVisibility)
3697
+ : undefined);
3607
3698
  return obj;
3608
3699
  }
3609
- BlockUpdate.toJSON = toJSON;
3700
+ UpsertSocialSettingsPayload.toJSON = toJSON;
3610
3701
  function create(base) {
3611
- return BlockUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
3702
+ return UpsertSocialSettingsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
3612
3703
  }
3613
- BlockUpdate.create = create;
3704
+ UpsertSocialSettingsPayload.create = create;
3614
3705
  function fromPartial(object) {
3615
3706
  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;
3707
+ const message = createBaseUpsertSocialSettingsPayload();
3708
+ message.privateMessagesPrivacy = (_a = object.privateMessagesPrivacy) !== null && _a !== void 0 ? _a : undefined;
3709
+ message.blockedUsersMessagesVisibility = (_b = object.blockedUsersMessagesVisibility) !== null && _b !== void 0 ? _b : undefined;
3619
3710
  return message;
3620
3711
  }
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: {},
3712
+ UpsertSocialSettingsPayload.fromPartial = fromPartial;
3713
+ })(UpsertSocialSettingsPayload || (exports.UpsertSocialSettingsPayload = UpsertSocialSettingsPayload = {}));
3714
+ function createBaseUpsertSocialSettingsResponse() {
3715
+ return { response: undefined };
3716
+ }
3717
+ var UpsertSocialSettingsResponse;
3718
+ (function (UpsertSocialSettingsResponse) {
3719
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3720
+ var _a;
3721
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
3722
+ case "ok":
3723
+ SocialSettings.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
3724
+ break;
3725
+ case "internalServerError":
3726
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
3727
+ break;
3728
+ case "invalidRequest":
3729
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(26).fork()).ldelim();
3730
+ break;
3731
+ }
3732
+ return writer;
3733
+ }
3734
+ UpsertSocialSettingsResponse.encode = encode;
3735
+ function decode(input, length) {
3736
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3737
+ let end = length === undefined ? reader.len : reader.pos + length;
3738
+ const message = createBaseUpsertSocialSettingsResponse();
3739
+ while (reader.pos < end) {
3740
+ const tag = reader.uint32();
3741
+ switch (tag >>> 3) {
3742
+ case 1:
3743
+ if (tag !== 10) {
3744
+ break;
3745
+ }
3746
+ message.response = { $case: "ok", ok: SocialSettings.decode(reader, reader.uint32()) };
3747
+ continue;
3748
+ case 2:
3749
+ if (tag !== 18) {
3750
+ break;
3751
+ }
3752
+ message.response = {
3753
+ $case: "internalServerError",
3754
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
3755
+ };
3756
+ continue;
3757
+ case 3:
3758
+ if (tag !== 26) {
3759
+ break;
3760
+ }
3761
+ message.response = {
3762
+ $case: "invalidRequest",
3763
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
3764
+ };
3765
+ continue;
3766
+ }
3767
+ if ((tag & 7) === 4 || tag === 0) {
3768
+ break;
3769
+ }
3770
+ reader.skipType(tag & 7);
3771
+ }
3772
+ return message;
3773
+ }
3774
+ UpsertSocialSettingsResponse.decode = decode;
3775
+ function fromJSON(object) {
3776
+ return {
3777
+ response: isSet(object.ok)
3778
+ ? { $case: "ok", ok: SocialSettings.fromJSON(object.ok) }
3779
+ : isSet(object.internalServerError)
3780
+ ? {
3781
+ $case: "internalServerError",
3782
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
3783
+ }
3784
+ : isSet(object.invalidRequest)
3785
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
3786
+ : undefined,
3787
+ };
3788
+ }
3789
+ UpsertSocialSettingsResponse.fromJSON = fromJSON;
3790
+ function toJSON(message) {
3791
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
3792
+ const obj = {};
3793
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
3794
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? SocialSettings.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
3795
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3796
+ (obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
3797
+ ? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
3798
+ : undefined);
3799
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
3800
+ (obj.invalidRequest = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.invalidRequest)
3801
+ ? InvalidRequest.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.invalidRequest)
3802
+ : undefined);
3803
+ return obj;
3804
+ }
3805
+ UpsertSocialSettingsResponse.toJSON = toJSON;
3806
+ function create(base) {
3807
+ return UpsertSocialSettingsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
3808
+ }
3809
+ UpsertSocialSettingsResponse.create = create;
3810
+ function fromPartial(object) {
3811
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
3812
+ const message = createBaseUpsertSocialSettingsResponse();
3813
+ 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) {
3814
+ message.response = { $case: "ok", ok: SocialSettings.fromPartial(object.response.ok) };
3815
+ }
3816
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3817
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
3818
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
3819
+ message.response = {
3820
+ $case: "internalServerError",
3821
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
3822
+ };
3823
+ }
3824
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
3825
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.invalidRequest) !== undefined &&
3826
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.invalidRequest) !== null) {
3827
+ message.response = {
3828
+ $case: "invalidRequest",
3829
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
3830
+ };
3831
+ }
3832
+ return message;
3833
+ }
3834
+ UpsertSocialSettingsResponse.fromPartial = fromPartial;
3835
+ })(UpsertSocialSettingsResponse || (exports.UpsertSocialSettingsResponse = UpsertSocialSettingsResponse = {}));
3836
+ function createBaseGetPrivateMessagesSettingsPayload() {
3837
+ return { user: [] };
3838
+ }
3839
+ var GetPrivateMessagesSettingsPayload;
3840
+ (function (GetPrivateMessagesSettingsPayload) {
3841
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3842
+ for (const v of message.user) {
3843
+ User.encode(v, writer.uint32(10).fork()).ldelim();
3844
+ }
3845
+ return writer;
3846
+ }
3847
+ GetPrivateMessagesSettingsPayload.encode = encode;
3848
+ function decode(input, length) {
3849
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3850
+ let end = length === undefined ? reader.len : reader.pos + length;
3851
+ const message = createBaseGetPrivateMessagesSettingsPayload();
3852
+ while (reader.pos < end) {
3853
+ const tag = reader.uint32();
3854
+ switch (tag >>> 3) {
3855
+ case 1:
3856
+ if (tag !== 10) {
3857
+ break;
3858
+ }
3859
+ message.user.push(User.decode(reader, reader.uint32()));
3860
+ continue;
3861
+ }
3862
+ if ((tag & 7) === 4 || tag === 0) {
3863
+ break;
3864
+ }
3865
+ reader.skipType(tag & 7);
3866
+ }
3867
+ return message;
3868
+ }
3869
+ GetPrivateMessagesSettingsPayload.decode = decode;
3870
+ function fromJSON(object) {
3871
+ return { user: Array.isArray(object === null || object === void 0 ? void 0 : object.user) ? object.user.map((e) => User.fromJSON(e)) : [] };
3872
+ }
3873
+ GetPrivateMessagesSettingsPayload.fromJSON = fromJSON;
3874
+ function toJSON(message) {
3875
+ const obj = {};
3876
+ if (message.user) {
3877
+ obj.user = message.user.map((e) => e ? User.toJSON(e) : undefined);
3878
+ }
3879
+ else {
3880
+ obj.user = [];
3881
+ }
3882
+ return obj;
3883
+ }
3884
+ GetPrivateMessagesSettingsPayload.toJSON = toJSON;
3885
+ function create(base) {
3886
+ return GetPrivateMessagesSettingsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
3887
+ }
3888
+ GetPrivateMessagesSettingsPayload.create = create;
3889
+ function fromPartial(object) {
3890
+ var _a;
3891
+ const message = createBaseGetPrivateMessagesSettingsPayload();
3892
+ message.user = ((_a = object.user) === null || _a === void 0 ? void 0 : _a.map((e) => User.fromPartial(e))) || [];
3893
+ return message;
3894
+ }
3895
+ GetPrivateMessagesSettingsPayload.fromPartial = fromPartial;
3896
+ })(GetPrivateMessagesSettingsPayload || (exports.GetPrivateMessagesSettingsPayload = GetPrivateMessagesSettingsPayload = {}));
3897
+ function createBaseGetPrivateMessagesSettingsResponse() {
3898
+ return { response: undefined };
3899
+ }
3900
+ var GetPrivateMessagesSettingsResponse;
3901
+ (function (GetPrivateMessagesSettingsResponse) {
3902
+ function encode(message, writer = minimal_1.default.Writer.create()) {
3903
+ var _a;
3904
+ switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
3905
+ case "ok":
3906
+ GetPrivateMessagesSettingsResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
3907
+ break;
3908
+ case "internalServerError":
3909
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
3910
+ break;
3911
+ case "invalidRequest":
3912
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(26).fork()).ldelim();
3913
+ break;
3914
+ case "profileNotFound":
3915
+ ProfileNotFound.encode(message.response.profileNotFound, writer.uint32(34).fork()).ldelim();
3916
+ break;
3917
+ }
3918
+ return writer;
3919
+ }
3920
+ GetPrivateMessagesSettingsResponse.encode = encode;
3921
+ function decode(input, length) {
3922
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
3923
+ let end = length === undefined ? reader.len : reader.pos + length;
3924
+ const message = createBaseGetPrivateMessagesSettingsResponse();
3925
+ while (reader.pos < end) {
3926
+ const tag = reader.uint32();
3927
+ switch (tag >>> 3) {
3928
+ case 1:
3929
+ if (tag !== 10) {
3930
+ break;
3931
+ }
3932
+ message.response = { $case: "ok", ok: GetPrivateMessagesSettingsResponse_Ok.decode(reader, reader.uint32()) };
3933
+ continue;
3934
+ case 2:
3935
+ if (tag !== 18) {
3936
+ break;
3937
+ }
3938
+ message.response = {
3939
+ $case: "internalServerError",
3940
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
3941
+ };
3942
+ continue;
3943
+ case 3:
3944
+ if (tag !== 26) {
3945
+ break;
3946
+ }
3947
+ message.response = {
3948
+ $case: "invalidRequest",
3949
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
3950
+ };
3951
+ continue;
3952
+ case 4:
3953
+ if (tag !== 34) {
3954
+ break;
3955
+ }
3956
+ message.response = {
3957
+ $case: "profileNotFound",
3958
+ profileNotFound: ProfileNotFound.decode(reader, reader.uint32()),
3959
+ };
3960
+ continue;
3961
+ }
3962
+ if ((tag & 7) === 4 || tag === 0) {
3963
+ break;
3964
+ }
3965
+ reader.skipType(tag & 7);
3966
+ }
3967
+ return message;
3968
+ }
3969
+ GetPrivateMessagesSettingsResponse.decode = decode;
3970
+ function fromJSON(object) {
3971
+ return {
3972
+ response: isSet(object.ok)
3973
+ ? { $case: "ok", ok: GetPrivateMessagesSettingsResponse_Ok.fromJSON(object.ok) }
3974
+ : isSet(object.internalServerError)
3975
+ ? {
3976
+ $case: "internalServerError",
3977
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
3978
+ }
3979
+ : isSet(object.invalidRequest)
3980
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
3981
+ : isSet(object.profileNotFound)
3982
+ ? { $case: "profileNotFound", profileNotFound: ProfileNotFound.fromJSON(object.profileNotFound) }
3983
+ : undefined,
3984
+ };
3985
+ }
3986
+ GetPrivateMessagesSettingsResponse.fromJSON = fromJSON;
3987
+ function toJSON(message) {
3988
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
3989
+ const obj = {};
3990
+ ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "ok" &&
3991
+ (obj.ok = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.ok) ? GetPrivateMessagesSettingsResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.ok) : undefined);
3992
+ ((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
3993
+ (obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
3994
+ ? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
3995
+ : undefined);
3996
+ ((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
3997
+ (obj.invalidRequest = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.invalidRequest)
3998
+ ? InvalidRequest.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.invalidRequest)
3999
+ : undefined);
4000
+ ((_k = message.response) === null || _k === void 0 ? void 0 : _k.$case) === "profileNotFound" &&
4001
+ (obj.profileNotFound = ((_l = message.response) === null || _l === void 0 ? void 0 : _l.profileNotFound)
4002
+ ? ProfileNotFound.toJSON((_m = message.response) === null || _m === void 0 ? void 0 : _m.profileNotFound)
4003
+ : undefined);
4004
+ return obj;
4005
+ }
4006
+ GetPrivateMessagesSettingsResponse.toJSON = toJSON;
4007
+ function create(base) {
4008
+ return GetPrivateMessagesSettingsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
4009
+ }
4010
+ GetPrivateMessagesSettingsResponse.create = create;
4011
+ function fromPartial(object) {
4012
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
4013
+ const message = createBaseGetPrivateMessagesSettingsResponse();
4014
+ 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) {
4015
+ message.response = { $case: "ok", ok: GetPrivateMessagesSettingsResponse_Ok.fromPartial(object.response.ok) };
4016
+ }
4017
+ if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
4018
+ ((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
4019
+ ((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
4020
+ message.response = {
4021
+ $case: "internalServerError",
4022
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
4023
+ };
4024
+ }
4025
+ if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "invalidRequest" &&
4026
+ ((_h = object.response) === null || _h === void 0 ? void 0 : _h.invalidRequest) !== undefined &&
4027
+ ((_j = object.response) === null || _j === void 0 ? void 0 : _j.invalidRequest) !== null) {
4028
+ message.response = {
4029
+ $case: "invalidRequest",
4030
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
4031
+ };
4032
+ }
4033
+ if (((_k = object.response) === null || _k === void 0 ? void 0 : _k.$case) === "profileNotFound" &&
4034
+ ((_l = object.response) === null || _l === void 0 ? void 0 : _l.profileNotFound) !== undefined &&
4035
+ ((_m = object.response) === null || _m === void 0 ? void 0 : _m.profileNotFound) !== null) {
4036
+ message.response = {
4037
+ $case: "profileNotFound",
4038
+ profileNotFound: ProfileNotFound.fromPartial(object.response.profileNotFound),
4039
+ };
4040
+ }
4041
+ return message;
4042
+ }
4043
+ GetPrivateMessagesSettingsResponse.fromPartial = fromPartial;
4044
+ })(GetPrivateMessagesSettingsResponse || (exports.GetPrivateMessagesSettingsResponse = GetPrivateMessagesSettingsResponse = {}));
4045
+ function createBaseGetPrivateMessagesSettingsResponse_PrivateMessagesSettings() {
4046
+ return { user: undefined, privateMessagesPrivacy: 0 };
4047
+ }
4048
+ var GetPrivateMessagesSettingsResponse_PrivateMessagesSettings;
4049
+ (function (GetPrivateMessagesSettingsResponse_PrivateMessagesSettings) {
4050
+ function encode(message, writer = minimal_1.default.Writer.create()) {
4051
+ if (message.user !== undefined) {
4052
+ User.encode(message.user, writer.uint32(10).fork()).ldelim();
4053
+ }
4054
+ if (message.privateMessagesPrivacy !== 0) {
4055
+ writer.uint32(16).int32(message.privateMessagesPrivacy);
4056
+ }
4057
+ return writer;
4058
+ }
4059
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.encode = encode;
4060
+ function decode(input, length) {
4061
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
4062
+ let end = length === undefined ? reader.len : reader.pos + length;
4063
+ const message = createBaseGetPrivateMessagesSettingsResponse_PrivateMessagesSettings();
4064
+ while (reader.pos < end) {
4065
+ const tag = reader.uint32();
4066
+ switch (tag >>> 3) {
4067
+ case 1:
4068
+ if (tag !== 10) {
4069
+ break;
4070
+ }
4071
+ message.user = User.decode(reader, reader.uint32());
4072
+ continue;
4073
+ case 2:
4074
+ if (tag !== 16) {
4075
+ break;
4076
+ }
4077
+ message.privateMessagesPrivacy = reader.int32();
4078
+ continue;
4079
+ }
4080
+ if ((tag & 7) === 4 || tag === 0) {
4081
+ break;
4082
+ }
4083
+ reader.skipType(tag & 7);
4084
+ }
4085
+ return message;
4086
+ }
4087
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.decode = decode;
4088
+ function fromJSON(object) {
4089
+ return {
4090
+ user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
4091
+ privateMessagesPrivacy: isSet(object.privateMessagesPrivacy)
4092
+ ? privateMessagePrivacySettingFromJSON(object.privateMessagesPrivacy)
4093
+ : 0,
4094
+ };
4095
+ }
4096
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.fromJSON = fromJSON;
4097
+ function toJSON(message) {
4098
+ const obj = {};
4099
+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
4100
+ message.privateMessagesPrivacy !== undefined &&
4101
+ (obj.privateMessagesPrivacy = privateMessagePrivacySettingToJSON(message.privateMessagesPrivacy));
4102
+ return obj;
4103
+ }
4104
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.toJSON = toJSON;
4105
+ function create(base) {
4106
+ return GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.fromPartial(base !== null && base !== void 0 ? base : {});
4107
+ }
4108
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.create = create;
4109
+ function fromPartial(object) {
4110
+ var _a;
4111
+ const message = createBaseGetPrivateMessagesSettingsResponse_PrivateMessagesSettings();
4112
+ message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
4113
+ message.privateMessagesPrivacy = (_a = object.privateMessagesPrivacy) !== null && _a !== void 0 ? _a : 0;
4114
+ return message;
4115
+ }
4116
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.fromPartial = fromPartial;
4117
+ })(GetPrivateMessagesSettingsResponse_PrivateMessagesSettings || (exports.GetPrivateMessagesSettingsResponse_PrivateMessagesSettings = GetPrivateMessagesSettingsResponse_PrivateMessagesSettings = {}));
4118
+ function createBaseGetPrivateMessagesSettingsResponse_Ok() {
4119
+ return { settings: [] };
4120
+ }
4121
+ var GetPrivateMessagesSettingsResponse_Ok;
4122
+ (function (GetPrivateMessagesSettingsResponse_Ok) {
4123
+ function encode(message, writer = minimal_1.default.Writer.create()) {
4124
+ for (const v of message.settings) {
4125
+ GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.encode(v, writer.uint32(10).fork()).ldelim();
4126
+ }
4127
+ return writer;
4128
+ }
4129
+ GetPrivateMessagesSettingsResponse_Ok.encode = encode;
4130
+ function decode(input, length) {
4131
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
4132
+ let end = length === undefined ? reader.len : reader.pos + length;
4133
+ const message = createBaseGetPrivateMessagesSettingsResponse_Ok();
4134
+ while (reader.pos < end) {
4135
+ const tag = reader.uint32();
4136
+ switch (tag >>> 3) {
4137
+ case 1:
4138
+ if (tag !== 10) {
4139
+ break;
4140
+ }
4141
+ message.settings.push(GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.decode(reader, reader.uint32()));
4142
+ continue;
4143
+ }
4144
+ if ((tag & 7) === 4 || tag === 0) {
4145
+ break;
4146
+ }
4147
+ reader.skipType(tag & 7);
4148
+ }
4149
+ return message;
4150
+ }
4151
+ GetPrivateMessagesSettingsResponse_Ok.decode = decode;
4152
+ function fromJSON(object) {
4153
+ return {
4154
+ settings: Array.isArray(object === null || object === void 0 ? void 0 : object.settings)
4155
+ ? object.settings.map((e) => GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.fromJSON(e))
4156
+ : [],
4157
+ };
4158
+ }
4159
+ GetPrivateMessagesSettingsResponse_Ok.fromJSON = fromJSON;
4160
+ function toJSON(message) {
4161
+ const obj = {};
4162
+ if (message.settings) {
4163
+ obj.settings = message.settings.map((e) => e ? GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.toJSON(e) : undefined);
4164
+ }
4165
+ else {
4166
+ obj.settings = [];
4167
+ }
4168
+ return obj;
4169
+ }
4170
+ GetPrivateMessagesSettingsResponse_Ok.toJSON = toJSON;
4171
+ function create(base) {
4172
+ return GetPrivateMessagesSettingsResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
4173
+ }
4174
+ GetPrivateMessagesSettingsResponse_Ok.create = create;
4175
+ function fromPartial(object) {
4176
+ var _a;
4177
+ const message = createBaseGetPrivateMessagesSettingsResponse_Ok();
4178
+ message.settings =
4179
+ ((_a = object.settings) === null || _a === void 0 ? void 0 : _a.map((e) => GetPrivateMessagesSettingsResponse_PrivateMessagesSettings.fromPartial(e))) || [];
4180
+ return message;
4181
+ }
4182
+ GetPrivateMessagesSettingsResponse_Ok.fromPartial = fromPartial;
4183
+ })(GetPrivateMessagesSettingsResponse_Ok || (exports.GetPrivateMessagesSettingsResponse_Ok = GetPrivateMessagesSettingsResponse_Ok = {}));
4184
+ function createBaseGetBlockedUsersPayload() {
4185
+ return { pagination: undefined };
4186
+ }
4187
+ var GetBlockedUsersPayload;
4188
+ (function (GetBlockedUsersPayload) {
4189
+ function encode(message, writer = minimal_1.default.Writer.create()) {
4190
+ if (message.pagination !== undefined) {
4191
+ Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
4192
+ }
4193
+ return writer;
4194
+ }
4195
+ GetBlockedUsersPayload.encode = encode;
4196
+ function decode(input, length) {
4197
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
4198
+ let end = length === undefined ? reader.len : reader.pos + length;
4199
+ const message = createBaseGetBlockedUsersPayload();
4200
+ while (reader.pos < end) {
4201
+ const tag = reader.uint32();
4202
+ switch (tag >>> 3) {
4203
+ case 1:
4204
+ if (tag !== 10) {
4205
+ break;
4206
+ }
4207
+ message.pagination = Pagination.decode(reader, reader.uint32());
4208
+ continue;
4209
+ }
4210
+ if ((tag & 7) === 4 || tag === 0) {
4211
+ break;
4212
+ }
4213
+ reader.skipType(tag & 7);
4214
+ }
4215
+ return message;
4216
+ }
4217
+ GetBlockedUsersPayload.decode = decode;
4218
+ function fromJSON(object) {
4219
+ return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
4220
+ }
4221
+ GetBlockedUsersPayload.fromJSON = fromJSON;
4222
+ function toJSON(message) {
4223
+ const obj = {};
4224
+ message.pagination !== undefined &&
4225
+ (obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
4226
+ return obj;
4227
+ }
4228
+ GetBlockedUsersPayload.toJSON = toJSON;
4229
+ function create(base) {
4230
+ return GetBlockedUsersPayload.fromPartial(base !== null && base !== void 0 ? base : {});
4231
+ }
4232
+ GetBlockedUsersPayload.create = create;
4233
+ function fromPartial(object) {
4234
+ const message = createBaseGetBlockedUsersPayload();
4235
+ message.pagination = (object.pagination !== undefined && object.pagination !== null)
4236
+ ? Pagination.fromPartial(object.pagination)
4237
+ : undefined;
4238
+ return message;
4239
+ }
4240
+ GetBlockedUsersPayload.fromPartial = fromPartial;
4241
+ })(GetBlockedUsersPayload || (exports.GetBlockedUsersPayload = GetBlockedUsersPayload = {}));
4242
+ function createBaseGetBlockedUsersResponse() {
4243
+ return { profiles: [], paginationData: undefined };
4244
+ }
4245
+ var GetBlockedUsersResponse;
4246
+ (function (GetBlockedUsersResponse) {
4247
+ function encode(message, writer = minimal_1.default.Writer.create()) {
4248
+ for (const v of message.profiles) {
4249
+ BlockedUserProfile.encode(v, writer.uint32(10).fork()).ldelim();
4250
+ }
4251
+ if (message.paginationData !== undefined) {
4252
+ PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
4253
+ }
4254
+ return writer;
4255
+ }
4256
+ GetBlockedUsersResponse.encode = encode;
4257
+ function decode(input, length) {
4258
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
4259
+ let end = length === undefined ? reader.len : reader.pos + length;
4260
+ const message = createBaseGetBlockedUsersResponse();
4261
+ while (reader.pos < end) {
4262
+ const tag = reader.uint32();
4263
+ switch (tag >>> 3) {
4264
+ case 1:
4265
+ if (tag !== 10) {
4266
+ break;
4267
+ }
4268
+ message.profiles.push(BlockedUserProfile.decode(reader, reader.uint32()));
4269
+ continue;
4270
+ case 2:
4271
+ if (tag !== 18) {
4272
+ break;
4273
+ }
4274
+ message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
4275
+ continue;
4276
+ }
4277
+ if ((tag & 7) === 4 || tag === 0) {
4278
+ break;
4279
+ }
4280
+ reader.skipType(tag & 7);
4281
+ }
4282
+ return message;
4283
+ }
4284
+ GetBlockedUsersResponse.decode = decode;
4285
+ function fromJSON(object) {
4286
+ return {
4287
+ profiles: Array.isArray(object === null || object === void 0 ? void 0 : object.profiles) ? object.profiles.map((e) => BlockedUserProfile.fromJSON(e)) : [],
4288
+ paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
4289
+ };
4290
+ }
4291
+ GetBlockedUsersResponse.fromJSON = fromJSON;
4292
+ function toJSON(message) {
4293
+ const obj = {};
4294
+ if (message.profiles) {
4295
+ obj.profiles = message.profiles.map((e) => e ? BlockedUserProfile.toJSON(e) : undefined);
4296
+ }
4297
+ else {
4298
+ obj.profiles = [];
4299
+ }
4300
+ message.paginationData !== undefined &&
4301
+ (obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
4302
+ return obj;
4303
+ }
4304
+ GetBlockedUsersResponse.toJSON = toJSON;
4305
+ function create(base) {
4306
+ return GetBlockedUsersResponse.fromPartial(base !== null && base !== void 0 ? base : {});
4307
+ }
4308
+ GetBlockedUsersResponse.create = create;
4309
+ function fromPartial(object) {
4310
+ var _a;
4311
+ const message = createBaseGetBlockedUsersResponse();
4312
+ message.profiles = ((_a = object.profiles) === null || _a === void 0 ? void 0 : _a.map((e) => BlockedUserProfile.fromPartial(e))) || [];
4313
+ message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
4314
+ ? PaginatedResponse.fromPartial(object.paginationData)
4315
+ : undefined;
4316
+ return message;
4317
+ }
4318
+ GetBlockedUsersResponse.fromPartial = fromPartial;
4319
+ })(GetBlockedUsersResponse || (exports.GetBlockedUsersResponse = GetBlockedUsersResponse = {}));
4320
+ function createBaseGetBlockingStatusResponse() {
4321
+ return { blockedUsers: [], blockedByUsers: [] };
4322
+ }
4323
+ var GetBlockingStatusResponse;
4324
+ (function (GetBlockingStatusResponse) {
4325
+ function encode(message, writer = minimal_1.default.Writer.create()) {
4326
+ for (const v of message.blockedUsers) {
4327
+ writer.uint32(10).string(v);
4328
+ }
4329
+ for (const v of message.blockedByUsers) {
4330
+ writer.uint32(18).string(v);
4331
+ }
4332
+ return writer;
4333
+ }
4334
+ GetBlockingStatusResponse.encode = encode;
4335
+ function decode(input, length) {
4336
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
4337
+ let end = length === undefined ? reader.len : reader.pos + length;
4338
+ const message = createBaseGetBlockingStatusResponse();
4339
+ while (reader.pos < end) {
4340
+ const tag = reader.uint32();
4341
+ switch (tag >>> 3) {
4342
+ case 1:
4343
+ if (tag !== 10) {
4344
+ break;
4345
+ }
4346
+ message.blockedUsers.push(reader.string());
4347
+ continue;
4348
+ case 2:
4349
+ if (tag !== 18) {
4350
+ break;
4351
+ }
4352
+ message.blockedByUsers.push(reader.string());
4353
+ continue;
4354
+ }
4355
+ if ((tag & 7) === 4 || tag === 0) {
4356
+ break;
4357
+ }
4358
+ reader.skipType(tag & 7);
4359
+ }
4360
+ return message;
4361
+ }
4362
+ GetBlockingStatusResponse.decode = decode;
4363
+ function fromJSON(object) {
4364
+ return {
4365
+ blockedUsers: Array.isArray(object === null || object === void 0 ? void 0 : object.blockedUsers) ? object.blockedUsers.map((e) => String(e)) : [],
4366
+ blockedByUsers: Array.isArray(object === null || object === void 0 ? void 0 : object.blockedByUsers) ? object.blockedByUsers.map((e) => String(e)) : [],
4367
+ };
4368
+ }
4369
+ GetBlockingStatusResponse.fromJSON = fromJSON;
4370
+ function toJSON(message) {
4371
+ const obj = {};
4372
+ if (message.blockedUsers) {
4373
+ obj.blockedUsers = message.blockedUsers.map((e) => e);
4374
+ }
4375
+ else {
4376
+ obj.blockedUsers = [];
4377
+ }
4378
+ if (message.blockedByUsers) {
4379
+ obj.blockedByUsers = message.blockedByUsers.map((e) => e);
4380
+ }
4381
+ else {
4382
+ obj.blockedByUsers = [];
4383
+ }
4384
+ return obj;
4385
+ }
4386
+ GetBlockingStatusResponse.toJSON = toJSON;
4387
+ function create(base) {
4388
+ return GetBlockingStatusResponse.fromPartial(base !== null && base !== void 0 ? base : {});
4389
+ }
4390
+ GetBlockingStatusResponse.create = create;
4391
+ function fromPartial(object) {
4392
+ var _a, _b;
4393
+ const message = createBaseGetBlockingStatusResponse();
4394
+ message.blockedUsers = ((_a = object.blockedUsers) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
4395
+ message.blockedByUsers = ((_b = object.blockedByUsers) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
4396
+ return message;
4397
+ }
4398
+ GetBlockingStatusResponse.fromPartial = fromPartial;
4399
+ })(GetBlockingStatusResponse || (exports.GetBlockingStatusResponse = GetBlockingStatusResponse = {}));
4400
+ function createBaseBlockUpdate() {
4401
+ return { address: "", isBlocked: false };
4402
+ }
4403
+ var BlockUpdate;
4404
+ (function (BlockUpdate) {
4405
+ function encode(message, writer = minimal_1.default.Writer.create()) {
4406
+ if (message.address !== "") {
4407
+ writer.uint32(10).string(message.address);
4408
+ }
4409
+ if (message.isBlocked === true) {
4410
+ writer.uint32(16).bool(message.isBlocked);
4411
+ }
4412
+ return writer;
4413
+ }
4414
+ BlockUpdate.encode = encode;
4415
+ function decode(input, length) {
4416
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
4417
+ let end = length === undefined ? reader.len : reader.pos + length;
4418
+ const message = createBaseBlockUpdate();
4419
+ while (reader.pos < end) {
4420
+ const tag = reader.uint32();
4421
+ switch (tag >>> 3) {
4422
+ case 1:
4423
+ if (tag !== 10) {
4424
+ break;
4425
+ }
4426
+ message.address = reader.string();
4427
+ continue;
4428
+ case 2:
4429
+ if (tag !== 16) {
4430
+ break;
4431
+ }
4432
+ message.isBlocked = reader.bool();
4433
+ continue;
4434
+ }
4435
+ if ((tag & 7) === 4 || tag === 0) {
4436
+ break;
4437
+ }
4438
+ reader.skipType(tag & 7);
4439
+ }
4440
+ return message;
4441
+ }
4442
+ BlockUpdate.decode = decode;
4443
+ function fromJSON(object) {
4444
+ return {
4445
+ address: isSet(object.address) ? String(object.address) : "",
4446
+ isBlocked: isSet(object.isBlocked) ? Boolean(object.isBlocked) : false,
4447
+ };
4448
+ }
4449
+ BlockUpdate.fromJSON = fromJSON;
4450
+ function toJSON(message) {
4451
+ const obj = {};
4452
+ message.address !== undefined && (obj.address = message.address);
4453
+ message.isBlocked !== undefined && (obj.isBlocked = message.isBlocked);
4454
+ return obj;
4455
+ }
4456
+ BlockUpdate.toJSON = toJSON;
4457
+ function create(base) {
4458
+ return BlockUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
4459
+ }
4460
+ BlockUpdate.create = create;
4461
+ function fromPartial(object) {
4462
+ var _a, _b;
4463
+ const message = createBaseBlockUpdate();
4464
+ message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
4465
+ message.isBlocked = (_b = object.isBlocked) !== null && _b !== void 0 ? _b : false;
4466
+ return message;
4467
+ }
4468
+ BlockUpdate.fromPartial = fromPartial;
4469
+ })(BlockUpdate || (exports.BlockUpdate = BlockUpdate = {}));
4470
+ exports.SocialServiceDefinition = {
4471
+ name: "SocialService",
4472
+ fullName: "decentraland.social_service.v2.SocialService",
4473
+ methods: {
4474
+ /** Get the list of friends for the authenticated user */
4475
+ getFriends: {
4476
+ name: "GetFriends",
4477
+ requestType: GetFriendsPayload,
4478
+ requestStream: false,
4479
+ responseType: PaginatedFriendsProfilesResponse,
4480
+ responseStream: false,
4481
+ options: {},
4482
+ },
4483
+ /** Get the list of mutual friends between the authenticated user and the one in the parameter */
4484
+ getMutualFriends: {
4485
+ name: "GetMutualFriends",
4486
+ requestType: GetMutualFriendsPayload,
4487
+ requestStream: false,
4488
+ responseType: PaginatedFriendsProfilesResponse,
4489
+ responseStream: false,
4490
+ options: {},
4491
+ },
4492
+ /** Get the pending friendship requests for the authenticated user */
4493
+ getPendingFriendshipRequests: {
4494
+ name: "GetPendingFriendshipRequests",
4495
+ requestType: GetFriendshipRequestsPayload,
4496
+ requestStream: false,
4497
+ responseType: PaginatedFriendshipRequestsResponse,
4498
+ responseStream: false,
4499
+ options: {},
4500
+ },
4501
+ /** Get the sent friendship requests for the authenticated user */
4502
+ getSentFriendshipRequests: {
4503
+ name: "GetSentFriendshipRequests",
4504
+ requestType: GetFriendshipRequestsPayload,
4505
+ requestStream: false,
4506
+ responseType: PaginatedFriendshipRequestsResponse,
4507
+ responseStream: false,
4508
+ options: {},
4509
+ },
4510
+ /** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
4511
+ upsertFriendship: {
4512
+ name: "UpsertFriendship",
4513
+ requestType: UpsertFriendshipPayload,
4514
+ requestStream: false,
4515
+ responseType: UpsertFriendshipResponse,
4516
+ responseStream: false,
4517
+ options: {},
3671
4518
  },
3672
4519
  /** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
3673
4520
  subscribeToFriendshipUpdates: {
@@ -3736,6 +4583,33 @@ exports.SocialServiceDefinition = {
3736
4583
  responseStream: true,
3737
4584
  options: {},
3738
4585
  },
4586
+ /** Get all the social settings for the authenticated user */
4587
+ getSocialSettings: {
4588
+ name: "GetSocialSettings",
4589
+ requestType: empty_gen_1.Empty,
4590
+ requestStream: false,
4591
+ responseType: GetSocialSettingsResponse,
4592
+ responseStream: false,
4593
+ options: {},
4594
+ },
4595
+ /** Insert or update the social settings for the authenticated user */
4596
+ upsertSocialSettings: {
4597
+ name: "UpsertSocialSettings",
4598
+ requestType: UpsertSocialSettingsPayload,
4599
+ requestStream: false,
4600
+ responseType: UpsertSocialSettingsResponse,
4601
+ responseStream: false,
4602
+ options: {},
4603
+ },
4604
+ /** Get the private messages privacy settings for the requested users */
4605
+ getPrivateMessagesSettings: {
4606
+ name: "GetPrivateMessagesSettings",
4607
+ requestType: GetPrivateMessagesSettingsPayload,
4608
+ requestStream: false,
4609
+ responseType: GetPrivateMessagesSettingsResponse,
4610
+ responseStream: false,
4611
+ options: {},
4612
+ },
3739
4613
  },
3740
4614
  };
3741
4615
  const tsProtoGlobalThis = (() => {