@dcl/protocol 1.0.0-13143749736.commit-5fbeb3c → 1.0.0-13373633961.commit-e07ccb6
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.
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +67 -14
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +368 -58
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -1
- package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +416 -59
- package/package.json +2 -2
- package/proto/decentraland/social_service/v2/social_service_v2.proto +33 -7
|
@@ -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.
|
|
6
|
+
exports.SocialServiceDefinition = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendConnectivityUpdate = 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.FriendProfile = exports.User = 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,7 @@ 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";
|
|
62
63
|
FriendshipStatus[FriendshipStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
63
64
|
})(FriendshipStatus || (exports.FriendshipStatus = FriendshipStatus = {}));
|
|
64
65
|
function friendshipStatusFromJSON(object) {
|
|
@@ -84,6 +85,9 @@ function friendshipStatusFromJSON(object) {
|
|
|
84
85
|
case 6:
|
|
85
86
|
case "BLOCKED":
|
|
86
87
|
return FriendshipStatus.BLOCKED;
|
|
88
|
+
case 7:
|
|
89
|
+
case "NONE":
|
|
90
|
+
return FriendshipStatus.NONE;
|
|
87
91
|
case -1:
|
|
88
92
|
case "UNRECOGNIZED":
|
|
89
93
|
default:
|
|
@@ -106,6 +110,8 @@ function friendshipStatusToJSON(object) {
|
|
|
106
110
|
return "DELETED";
|
|
107
111
|
case FriendshipStatus.BLOCKED:
|
|
108
112
|
return "BLOCKED";
|
|
113
|
+
case FriendshipStatus.NONE:
|
|
114
|
+
return "NONE";
|
|
109
115
|
case FriendshipStatus.UNRECOGNIZED:
|
|
110
116
|
default:
|
|
111
117
|
return "UNRECOGNIZED";
|
|
@@ -255,6 +261,100 @@ var User;
|
|
|
255
261
|
}
|
|
256
262
|
User.fromPartial = fromPartial;
|
|
257
263
|
})(User || (exports.User = User = {}));
|
|
264
|
+
function createBaseFriendProfile() {
|
|
265
|
+
return { address: "", name: "", hasClaimedName: false, profilePictureUrl: "" };
|
|
266
|
+
}
|
|
267
|
+
var FriendProfile;
|
|
268
|
+
(function (FriendProfile) {
|
|
269
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
270
|
+
if (message.address !== "") {
|
|
271
|
+
writer.uint32(10).string(message.address);
|
|
272
|
+
}
|
|
273
|
+
if (message.name !== "") {
|
|
274
|
+
writer.uint32(18).string(message.name);
|
|
275
|
+
}
|
|
276
|
+
if (message.hasClaimedName === true) {
|
|
277
|
+
writer.uint32(24).bool(message.hasClaimedName);
|
|
278
|
+
}
|
|
279
|
+
if (message.profilePictureUrl !== "") {
|
|
280
|
+
writer.uint32(34).string(message.profilePictureUrl);
|
|
281
|
+
}
|
|
282
|
+
return writer;
|
|
283
|
+
}
|
|
284
|
+
FriendProfile.encode = encode;
|
|
285
|
+
function decode(input, length) {
|
|
286
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
287
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
288
|
+
const message = createBaseFriendProfile();
|
|
289
|
+
while (reader.pos < end) {
|
|
290
|
+
const tag = reader.uint32();
|
|
291
|
+
switch (tag >>> 3) {
|
|
292
|
+
case 1:
|
|
293
|
+
if (tag !== 10) {
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
message.address = reader.string();
|
|
297
|
+
continue;
|
|
298
|
+
case 2:
|
|
299
|
+
if (tag !== 18) {
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
message.name = reader.string();
|
|
303
|
+
continue;
|
|
304
|
+
case 3:
|
|
305
|
+
if (tag !== 24) {
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
message.hasClaimedName = reader.bool();
|
|
309
|
+
continue;
|
|
310
|
+
case 4:
|
|
311
|
+
if (tag !== 34) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
message.profilePictureUrl = reader.string();
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
reader.skipType(tag & 7);
|
|
321
|
+
}
|
|
322
|
+
return message;
|
|
323
|
+
}
|
|
324
|
+
FriendProfile.decode = decode;
|
|
325
|
+
function fromJSON(object) {
|
|
326
|
+
return {
|
|
327
|
+
address: isSet(object.address) ? String(object.address) : "",
|
|
328
|
+
name: isSet(object.name) ? String(object.name) : "",
|
|
329
|
+
hasClaimedName: isSet(object.hasClaimedName) ? Boolean(object.hasClaimedName) : false,
|
|
330
|
+
profilePictureUrl: isSet(object.profilePictureUrl) ? String(object.profilePictureUrl) : "",
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
FriendProfile.fromJSON = fromJSON;
|
|
334
|
+
function toJSON(message) {
|
|
335
|
+
const obj = {};
|
|
336
|
+
message.address !== undefined && (obj.address = message.address);
|
|
337
|
+
message.name !== undefined && (obj.name = message.name);
|
|
338
|
+
message.hasClaimedName !== undefined && (obj.hasClaimedName = message.hasClaimedName);
|
|
339
|
+
message.profilePictureUrl !== undefined && (obj.profilePictureUrl = message.profilePictureUrl);
|
|
340
|
+
return obj;
|
|
341
|
+
}
|
|
342
|
+
FriendProfile.toJSON = toJSON;
|
|
343
|
+
function create(base) {
|
|
344
|
+
return FriendProfile.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
345
|
+
}
|
|
346
|
+
FriendProfile.create = create;
|
|
347
|
+
function fromPartial(object) {
|
|
348
|
+
var _a, _b, _c, _d;
|
|
349
|
+
const message = createBaseFriendProfile();
|
|
350
|
+
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
|
|
351
|
+
message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
|
|
352
|
+
message.hasClaimedName = (_c = object.hasClaimedName) !== null && _c !== void 0 ? _c : false;
|
|
353
|
+
message.profilePictureUrl = (_d = object.profilePictureUrl) !== null && _d !== void 0 ? _d : "";
|
|
354
|
+
return message;
|
|
355
|
+
}
|
|
356
|
+
FriendProfile.fromPartial = fromPartial;
|
|
357
|
+
})(FriendProfile || (exports.FriendProfile = FriendProfile = {}));
|
|
258
358
|
function createBasePagination() {
|
|
259
359
|
return { limit: 0, offset: 0 };
|
|
260
360
|
}
|
|
@@ -326,13 +426,13 @@ var Pagination;
|
|
|
326
426
|
Pagination.fromPartial = fromPartial;
|
|
327
427
|
})(Pagination || (exports.Pagination = Pagination = {}));
|
|
328
428
|
function createBaseFriendshipRequestResponse() {
|
|
329
|
-
return {
|
|
429
|
+
return { friend: undefined, createdAt: 0, message: undefined, id: "" };
|
|
330
430
|
}
|
|
331
431
|
var FriendshipRequestResponse;
|
|
332
432
|
(function (FriendshipRequestResponse) {
|
|
333
433
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
334
|
-
if (message.
|
|
335
|
-
|
|
434
|
+
if (message.friend !== undefined) {
|
|
435
|
+
FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
|
|
336
436
|
}
|
|
337
437
|
if (message.createdAt !== 0) {
|
|
338
438
|
writer.uint32(16).int64(message.createdAt);
|
|
@@ -340,6 +440,9 @@ var FriendshipRequestResponse;
|
|
|
340
440
|
if (message.message !== undefined) {
|
|
341
441
|
writer.uint32(26).string(message.message);
|
|
342
442
|
}
|
|
443
|
+
if (message.id !== "") {
|
|
444
|
+
writer.uint32(34).string(message.id);
|
|
445
|
+
}
|
|
343
446
|
return writer;
|
|
344
447
|
}
|
|
345
448
|
FriendshipRequestResponse.encode = encode;
|
|
@@ -354,7 +457,7 @@ var FriendshipRequestResponse;
|
|
|
354
457
|
if (tag !== 10) {
|
|
355
458
|
break;
|
|
356
459
|
}
|
|
357
|
-
message.
|
|
460
|
+
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
358
461
|
continue;
|
|
359
462
|
case 2:
|
|
360
463
|
if (tag !== 16) {
|
|
@@ -368,6 +471,12 @@ var FriendshipRequestResponse;
|
|
|
368
471
|
}
|
|
369
472
|
message.message = reader.string();
|
|
370
473
|
continue;
|
|
474
|
+
case 4:
|
|
475
|
+
if (tag !== 34) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
message.id = reader.string();
|
|
479
|
+
continue;
|
|
371
480
|
}
|
|
372
481
|
if ((tag & 7) === 4 || tag === 0) {
|
|
373
482
|
break;
|
|
@@ -379,17 +488,19 @@ var FriendshipRequestResponse;
|
|
|
379
488
|
FriendshipRequestResponse.decode = decode;
|
|
380
489
|
function fromJSON(object) {
|
|
381
490
|
return {
|
|
382
|
-
|
|
491
|
+
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
383
492
|
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
384
493
|
message: isSet(object.message) ? String(object.message) : undefined,
|
|
494
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
385
495
|
};
|
|
386
496
|
}
|
|
387
497
|
FriendshipRequestResponse.fromJSON = fromJSON;
|
|
388
498
|
function toJSON(message) {
|
|
389
499
|
const obj = {};
|
|
390
|
-
message.
|
|
500
|
+
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
391
501
|
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
392
502
|
message.message !== undefined && (obj.message = message.message);
|
|
503
|
+
message.id !== undefined && (obj.id = message.id);
|
|
393
504
|
return obj;
|
|
394
505
|
}
|
|
395
506
|
FriendshipRequestResponse.toJSON = toJSON;
|
|
@@ -398,11 +509,14 @@ var FriendshipRequestResponse;
|
|
|
398
509
|
}
|
|
399
510
|
FriendshipRequestResponse.create = create;
|
|
400
511
|
function fromPartial(object) {
|
|
401
|
-
var _a, _b;
|
|
512
|
+
var _a, _b, _c;
|
|
402
513
|
const message = createBaseFriendshipRequestResponse();
|
|
403
|
-
message.
|
|
514
|
+
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
515
|
+
? FriendProfile.fromPartial(object.friend)
|
|
516
|
+
: undefined;
|
|
404
517
|
message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : 0;
|
|
405
518
|
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
|
|
519
|
+
message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
|
|
406
520
|
return message;
|
|
407
521
|
}
|
|
408
522
|
FriendshipRequestResponse.fromPartial = fromPartial;
|
|
@@ -473,7 +587,7 @@ var FriendshipRequests;
|
|
|
473
587
|
FriendshipRequests.fromPartial = fromPartial;
|
|
474
588
|
})(FriendshipRequests || (exports.FriendshipRequests = FriendshipRequests = {}));
|
|
475
589
|
function createBaseGetFriendsPayload() {
|
|
476
|
-
return { pagination: undefined
|
|
590
|
+
return { pagination: undefined };
|
|
477
591
|
}
|
|
478
592
|
var GetFriendsPayload;
|
|
479
593
|
(function (GetFriendsPayload) {
|
|
@@ -481,9 +595,6 @@ var GetFriendsPayload;
|
|
|
481
595
|
if (message.pagination !== undefined) {
|
|
482
596
|
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
483
597
|
}
|
|
484
|
-
if (message.status !== undefined) {
|
|
485
|
-
writer.uint32(16).int32(message.status);
|
|
486
|
-
}
|
|
487
598
|
return writer;
|
|
488
599
|
}
|
|
489
600
|
GetFriendsPayload.encode = encode;
|
|
@@ -500,12 +611,6 @@ var GetFriendsPayload;
|
|
|
500
611
|
}
|
|
501
612
|
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
502
613
|
continue;
|
|
503
|
-
case 2:
|
|
504
|
-
if (tag !== 16) {
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
message.status = reader.int32();
|
|
508
|
-
continue;
|
|
509
614
|
}
|
|
510
615
|
if ((tag & 7) === 4 || tag === 0) {
|
|
511
616
|
break;
|
|
@@ -516,18 +621,13 @@ var GetFriendsPayload;
|
|
|
516
621
|
}
|
|
517
622
|
GetFriendsPayload.decode = decode;
|
|
518
623
|
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
|
-
};
|
|
624
|
+
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
523
625
|
}
|
|
524
626
|
GetFriendsPayload.fromJSON = fromJSON;
|
|
525
627
|
function toJSON(message) {
|
|
526
628
|
const obj = {};
|
|
527
629
|
message.pagination !== undefined &&
|
|
528
630
|
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
529
|
-
message.status !== undefined &&
|
|
530
|
-
(obj.status = message.status !== undefined ? connectivityStatusToJSON(message.status) : undefined);
|
|
531
631
|
return obj;
|
|
532
632
|
}
|
|
533
633
|
GetFriendsPayload.toJSON = toJSON;
|
|
@@ -536,12 +636,10 @@ var GetFriendsPayload;
|
|
|
536
636
|
}
|
|
537
637
|
GetFriendsPayload.create = create;
|
|
538
638
|
function fromPartial(object) {
|
|
539
|
-
var _a;
|
|
540
639
|
const message = createBaseGetFriendsPayload();
|
|
541
640
|
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
542
641
|
? Pagination.fromPartial(object.pagination)
|
|
543
642
|
: undefined;
|
|
544
|
-
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : undefined;
|
|
545
643
|
return message;
|
|
546
644
|
}
|
|
547
645
|
GetFriendsPayload.fromPartial = fromPartial;
|
|
@@ -1207,25 +1305,25 @@ var PaginatedResponse;
|
|
|
1207
1305
|
}
|
|
1208
1306
|
PaginatedResponse.fromPartial = fromPartial;
|
|
1209
1307
|
})(PaginatedResponse || (exports.PaginatedResponse = PaginatedResponse = {}));
|
|
1210
|
-
function
|
|
1211
|
-
return {
|
|
1308
|
+
function createBasePaginatedFriendsProfilesResponse() {
|
|
1309
|
+
return { friends: [], paginationData: undefined };
|
|
1212
1310
|
}
|
|
1213
|
-
var
|
|
1214
|
-
(function (
|
|
1311
|
+
var PaginatedFriendsProfilesResponse;
|
|
1312
|
+
(function (PaginatedFriendsProfilesResponse) {
|
|
1215
1313
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1216
|
-
for (const v of message.
|
|
1217
|
-
|
|
1314
|
+
for (const v of message.friends) {
|
|
1315
|
+
FriendProfile.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1218
1316
|
}
|
|
1219
1317
|
if (message.paginationData !== undefined) {
|
|
1220
1318
|
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
1221
1319
|
}
|
|
1222
1320
|
return writer;
|
|
1223
1321
|
}
|
|
1224
|
-
|
|
1322
|
+
PaginatedFriendsProfilesResponse.encode = encode;
|
|
1225
1323
|
function decode(input, length) {
|
|
1226
1324
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1227
1325
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1228
|
-
const message =
|
|
1326
|
+
const message = createBasePaginatedFriendsProfilesResponse();
|
|
1229
1327
|
while (reader.pos < end) {
|
|
1230
1328
|
const tag = reader.uint32();
|
|
1231
1329
|
switch (tag >>> 3) {
|
|
@@ -1233,7 +1331,7 @@ var PaginatedUsersResponse;
|
|
|
1233
1331
|
if (tag !== 10) {
|
|
1234
1332
|
break;
|
|
1235
1333
|
}
|
|
1236
|
-
message.
|
|
1334
|
+
message.friends.push(FriendProfile.decode(reader, reader.uint32()));
|
|
1237
1335
|
continue;
|
|
1238
1336
|
case 2:
|
|
1239
1337
|
if (tag !== 18) {
|
|
@@ -1249,42 +1347,42 @@ var PaginatedUsersResponse;
|
|
|
1249
1347
|
}
|
|
1250
1348
|
return message;
|
|
1251
1349
|
}
|
|
1252
|
-
|
|
1350
|
+
PaginatedFriendsProfilesResponse.decode = decode;
|
|
1253
1351
|
function fromJSON(object) {
|
|
1254
1352
|
return {
|
|
1255
|
-
|
|
1353
|
+
friends: Array.isArray(object === null || object === void 0 ? void 0 : object.friends) ? object.friends.map((e) => FriendProfile.fromJSON(e)) : [],
|
|
1256
1354
|
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1257
1355
|
};
|
|
1258
1356
|
}
|
|
1259
|
-
|
|
1357
|
+
PaginatedFriendsProfilesResponse.fromJSON = fromJSON;
|
|
1260
1358
|
function toJSON(message) {
|
|
1261
1359
|
const obj = {};
|
|
1262
|
-
if (message.
|
|
1263
|
-
obj.
|
|
1360
|
+
if (message.friends) {
|
|
1361
|
+
obj.friends = message.friends.map((e) => e ? FriendProfile.toJSON(e) : undefined);
|
|
1264
1362
|
}
|
|
1265
1363
|
else {
|
|
1266
|
-
obj.
|
|
1364
|
+
obj.friends = [];
|
|
1267
1365
|
}
|
|
1268
1366
|
message.paginationData !== undefined &&
|
|
1269
1367
|
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1270
1368
|
return obj;
|
|
1271
1369
|
}
|
|
1272
|
-
|
|
1370
|
+
PaginatedFriendsProfilesResponse.toJSON = toJSON;
|
|
1273
1371
|
function create(base) {
|
|
1274
|
-
return
|
|
1372
|
+
return PaginatedFriendsProfilesResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1275
1373
|
}
|
|
1276
|
-
|
|
1374
|
+
PaginatedFriendsProfilesResponse.create = create;
|
|
1277
1375
|
function fromPartial(object) {
|
|
1278
1376
|
var _a;
|
|
1279
|
-
const message =
|
|
1280
|
-
message.
|
|
1377
|
+
const message = createBasePaginatedFriendsProfilesResponse();
|
|
1378
|
+
message.friends = ((_a = object.friends) === null || _a === void 0 ? void 0 : _a.map((e) => FriendProfile.fromPartial(e))) || [];
|
|
1281
1379
|
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1282
1380
|
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1283
1381
|
: undefined;
|
|
1284
1382
|
return message;
|
|
1285
1383
|
}
|
|
1286
|
-
|
|
1287
|
-
})(
|
|
1384
|
+
PaginatedFriendsProfilesResponse.fromPartial = fromPartial;
|
|
1385
|
+
})(PaginatedFriendsProfilesResponse || (exports.PaginatedFriendsProfilesResponse = PaginatedFriendsProfilesResponse = {}));
|
|
1288
1386
|
function createBasePaginatedFriendshipRequestsResponse() {
|
|
1289
1387
|
return { response: undefined, paginationData: undefined };
|
|
1290
1388
|
}
|
|
@@ -1534,7 +1632,7 @@ var UpsertFriendshipResponse;
|
|
|
1534
1632
|
UpsertFriendshipResponse.fromPartial = fromPartial;
|
|
1535
1633
|
})(UpsertFriendshipResponse || (exports.UpsertFriendshipResponse = UpsertFriendshipResponse = {}));
|
|
1536
1634
|
function createBaseUpsertFriendshipResponse_Accepted() {
|
|
1537
|
-
return { id: "", createdAt: 0 };
|
|
1635
|
+
return { id: "", createdAt: 0, friend: undefined, message: undefined };
|
|
1538
1636
|
}
|
|
1539
1637
|
var UpsertFriendshipResponse_Accepted;
|
|
1540
1638
|
(function (UpsertFriendshipResponse_Accepted) {
|
|
@@ -1545,6 +1643,12 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1545
1643
|
if (message.createdAt !== 0) {
|
|
1546
1644
|
writer.uint32(16).int64(message.createdAt);
|
|
1547
1645
|
}
|
|
1646
|
+
if (message.friend !== undefined) {
|
|
1647
|
+
FriendProfile.encode(message.friend, writer.uint32(26).fork()).ldelim();
|
|
1648
|
+
}
|
|
1649
|
+
if (message.message !== undefined) {
|
|
1650
|
+
writer.uint32(34).string(message.message);
|
|
1651
|
+
}
|
|
1548
1652
|
return writer;
|
|
1549
1653
|
}
|
|
1550
1654
|
UpsertFriendshipResponse_Accepted.encode = encode;
|
|
@@ -1567,6 +1671,18 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1567
1671
|
}
|
|
1568
1672
|
message.createdAt = longToNumber(reader.int64());
|
|
1569
1673
|
continue;
|
|
1674
|
+
case 3:
|
|
1675
|
+
if (tag !== 26) {
|
|
1676
|
+
break;
|
|
1677
|
+
}
|
|
1678
|
+
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
1679
|
+
continue;
|
|
1680
|
+
case 4:
|
|
1681
|
+
if (tag !== 34) {
|
|
1682
|
+
break;
|
|
1683
|
+
}
|
|
1684
|
+
message.message = reader.string();
|
|
1685
|
+
continue;
|
|
1570
1686
|
}
|
|
1571
1687
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1572
1688
|
break;
|
|
@@ -1580,6 +1696,8 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1580
1696
|
return {
|
|
1581
1697
|
id: isSet(object.id) ? String(object.id) : "",
|
|
1582
1698
|
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
1699
|
+
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
1700
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
1583
1701
|
};
|
|
1584
1702
|
}
|
|
1585
1703
|
UpsertFriendshipResponse_Accepted.fromJSON = fromJSON;
|
|
@@ -1587,6 +1705,8 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1587
1705
|
const obj = {};
|
|
1588
1706
|
message.id !== undefined && (obj.id = message.id);
|
|
1589
1707
|
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
1708
|
+
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
1709
|
+
message.message !== undefined && (obj.message = message.message);
|
|
1590
1710
|
return obj;
|
|
1591
1711
|
}
|
|
1592
1712
|
UpsertFriendshipResponse_Accepted.toJSON = toJSON;
|
|
@@ -1595,10 +1715,14 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1595
1715
|
}
|
|
1596
1716
|
UpsertFriendshipResponse_Accepted.create = create;
|
|
1597
1717
|
function fromPartial(object) {
|
|
1598
|
-
var _a, _b;
|
|
1718
|
+
var _a, _b, _c;
|
|
1599
1719
|
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1600
1720
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
1601
1721
|
message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : 0;
|
|
1722
|
+
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
1723
|
+
? FriendProfile.fromPartial(object.friend)
|
|
1724
|
+
: undefined;
|
|
1725
|
+
message.message = (_c = object.message) !== null && _c !== void 0 ? _c : undefined;
|
|
1602
1726
|
return message;
|
|
1603
1727
|
}
|
|
1604
1728
|
UpsertFriendshipResponse_Accepted.fromPartial = fromPartial;
|
|
@@ -1612,7 +1736,7 @@ var FriendshipUpdate;
|
|
|
1612
1736
|
var _a;
|
|
1613
1737
|
switch ((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
1614
1738
|
case "request":
|
|
1615
|
-
|
|
1739
|
+
FriendshipUpdate_RequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
1616
1740
|
break;
|
|
1617
1741
|
case "accept":
|
|
1618
1742
|
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
@@ -1641,7 +1765,10 @@ var FriendshipUpdate;
|
|
|
1641
1765
|
if (tag !== 10) {
|
|
1642
1766
|
break;
|
|
1643
1767
|
}
|
|
1644
|
-
message.update = {
|
|
1768
|
+
message.update = {
|
|
1769
|
+
$case: "request",
|
|
1770
|
+
request: FriendshipUpdate_RequestResponse.decode(reader, reader.uint32()),
|
|
1771
|
+
};
|
|
1645
1772
|
continue;
|
|
1646
1773
|
case 2:
|
|
1647
1774
|
if (tag !== 18) {
|
|
@@ -1679,7 +1806,7 @@ var FriendshipUpdate;
|
|
|
1679
1806
|
function fromJSON(object) {
|
|
1680
1807
|
return {
|
|
1681
1808
|
update: isSet(object.request)
|
|
1682
|
-
? { $case: "request", request:
|
|
1809
|
+
? { $case: "request", request: FriendshipUpdate_RequestResponse.fromJSON(object.request) }
|
|
1683
1810
|
: isSet(object.accept)
|
|
1684
1811
|
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
1685
1812
|
: isSet(object.reject)
|
|
@@ -1696,7 +1823,9 @@ var FriendshipUpdate;
|
|
|
1696
1823
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1697
1824
|
const obj = {};
|
|
1698
1825
|
((_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)
|
|
1826
|
+
(obj.request = ((_b = message.update) === null || _b === void 0 ? void 0 : _b.request)
|
|
1827
|
+
? FriendshipUpdate_RequestResponse.toJSON((_c = message.update) === null || _c === void 0 ? void 0 : _c.request)
|
|
1828
|
+
: undefined);
|
|
1700
1829
|
((_d = message.update) === null || _d === void 0 ? void 0 : _d.$case) === "accept" &&
|
|
1701
1830
|
(obj.accept = ((_e = message.update) === null || _e === void 0 ? void 0 : _e.accept)
|
|
1702
1831
|
? FriendshipUpdate_AcceptResponse.toJSON((_f = message.update) === null || _f === void 0 ? void 0 : _f.accept)
|
|
@@ -1724,7 +1853,10 @@ var FriendshipUpdate;
|
|
|
1724
1853
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1725
1854
|
const message = createBaseFriendshipUpdate();
|
|
1726
1855
|
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 = {
|
|
1856
|
+
message.update = {
|
|
1857
|
+
$case: "request",
|
|
1858
|
+
request: FriendshipUpdate_RequestResponse.fromPartial(object.update.request),
|
|
1859
|
+
};
|
|
1728
1860
|
}
|
|
1729
1861
|
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
1862
|
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
@@ -1742,6 +1874,102 @@ var FriendshipUpdate;
|
|
|
1742
1874
|
}
|
|
1743
1875
|
FriendshipUpdate.fromPartial = fromPartial;
|
|
1744
1876
|
})(FriendshipUpdate || (exports.FriendshipUpdate = FriendshipUpdate = {}));
|
|
1877
|
+
function createBaseFriendshipUpdate_RequestResponse() {
|
|
1878
|
+
return { friend: undefined, createdAt: 0, message: undefined, id: "" };
|
|
1879
|
+
}
|
|
1880
|
+
var FriendshipUpdate_RequestResponse;
|
|
1881
|
+
(function (FriendshipUpdate_RequestResponse) {
|
|
1882
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1883
|
+
if (message.friend !== undefined) {
|
|
1884
|
+
FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
|
|
1885
|
+
}
|
|
1886
|
+
if (message.createdAt !== 0) {
|
|
1887
|
+
writer.uint32(16).int64(message.createdAt);
|
|
1888
|
+
}
|
|
1889
|
+
if (message.message !== undefined) {
|
|
1890
|
+
writer.uint32(26).string(message.message);
|
|
1891
|
+
}
|
|
1892
|
+
if (message.id !== "") {
|
|
1893
|
+
writer.uint32(34).string(message.id);
|
|
1894
|
+
}
|
|
1895
|
+
return writer;
|
|
1896
|
+
}
|
|
1897
|
+
FriendshipUpdate_RequestResponse.encode = encode;
|
|
1898
|
+
function decode(input, length) {
|
|
1899
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1900
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1901
|
+
const message = createBaseFriendshipUpdate_RequestResponse();
|
|
1902
|
+
while (reader.pos < end) {
|
|
1903
|
+
const tag = reader.uint32();
|
|
1904
|
+
switch (tag >>> 3) {
|
|
1905
|
+
case 1:
|
|
1906
|
+
if (tag !== 10) {
|
|
1907
|
+
break;
|
|
1908
|
+
}
|
|
1909
|
+
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
1910
|
+
continue;
|
|
1911
|
+
case 2:
|
|
1912
|
+
if (tag !== 16) {
|
|
1913
|
+
break;
|
|
1914
|
+
}
|
|
1915
|
+
message.createdAt = longToNumber(reader.int64());
|
|
1916
|
+
continue;
|
|
1917
|
+
case 3:
|
|
1918
|
+
if (tag !== 26) {
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
message.message = reader.string();
|
|
1922
|
+
continue;
|
|
1923
|
+
case 4:
|
|
1924
|
+
if (tag !== 34) {
|
|
1925
|
+
break;
|
|
1926
|
+
}
|
|
1927
|
+
message.id = reader.string();
|
|
1928
|
+
continue;
|
|
1929
|
+
}
|
|
1930
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1931
|
+
break;
|
|
1932
|
+
}
|
|
1933
|
+
reader.skipType(tag & 7);
|
|
1934
|
+
}
|
|
1935
|
+
return message;
|
|
1936
|
+
}
|
|
1937
|
+
FriendshipUpdate_RequestResponse.decode = decode;
|
|
1938
|
+
function fromJSON(object) {
|
|
1939
|
+
return {
|
|
1940
|
+
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
1941
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
1942
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
1943
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
FriendshipUpdate_RequestResponse.fromJSON = fromJSON;
|
|
1947
|
+
function toJSON(message) {
|
|
1948
|
+
const obj = {};
|
|
1949
|
+
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
1950
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
1951
|
+
message.message !== undefined && (obj.message = message.message);
|
|
1952
|
+
message.id !== undefined && (obj.id = message.id);
|
|
1953
|
+
return obj;
|
|
1954
|
+
}
|
|
1955
|
+
FriendshipUpdate_RequestResponse.toJSON = toJSON;
|
|
1956
|
+
function create(base) {
|
|
1957
|
+
return FriendshipUpdate_RequestResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1958
|
+
}
|
|
1959
|
+
FriendshipUpdate_RequestResponse.create = create;
|
|
1960
|
+
function fromPartial(object) {
|
|
1961
|
+
var _a, _b, _c;
|
|
1962
|
+
const message = createBaseFriendshipUpdate_RequestResponse();
|
|
1963
|
+
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
1964
|
+
? FriendProfile.fromPartial(object.friend)
|
|
1965
|
+
: undefined;
|
|
1966
|
+
message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : 0;
|
|
1967
|
+
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
|
|
1968
|
+
message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
|
|
1969
|
+
return message;
|
|
1970
|
+
}
|
|
1971
|
+
FriendshipUpdate_RequestResponse.fromPartial = fromPartial;
|
|
1972
|
+
})(FriendshipUpdate_RequestResponse || (exports.FriendshipUpdate_RequestResponse = FriendshipUpdate_RequestResponse = {}));
|
|
1745
1973
|
function createBaseFriendshipUpdate_AcceptResponse() {
|
|
1746
1974
|
return { user: undefined };
|
|
1747
1975
|
}
|
|
@@ -1962,6 +2190,78 @@ var FriendshipUpdate_CancelResponse;
|
|
|
1962
2190
|
}
|
|
1963
2191
|
FriendshipUpdate_CancelResponse.fromPartial = fromPartial;
|
|
1964
2192
|
})(FriendshipUpdate_CancelResponse || (exports.FriendshipUpdate_CancelResponse = FriendshipUpdate_CancelResponse = {}));
|
|
2193
|
+
function createBaseFriendConnectivityUpdate() {
|
|
2194
|
+
return { friend: undefined, status: 0 };
|
|
2195
|
+
}
|
|
2196
|
+
var FriendConnectivityUpdate;
|
|
2197
|
+
(function (FriendConnectivityUpdate) {
|
|
2198
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2199
|
+
if (message.friend !== undefined) {
|
|
2200
|
+
FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
|
|
2201
|
+
}
|
|
2202
|
+
if (message.status !== 0) {
|
|
2203
|
+
writer.uint32(16).int32(message.status);
|
|
2204
|
+
}
|
|
2205
|
+
return writer;
|
|
2206
|
+
}
|
|
2207
|
+
FriendConnectivityUpdate.encode = encode;
|
|
2208
|
+
function decode(input, length) {
|
|
2209
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2210
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2211
|
+
const message = createBaseFriendConnectivityUpdate();
|
|
2212
|
+
while (reader.pos < end) {
|
|
2213
|
+
const tag = reader.uint32();
|
|
2214
|
+
switch (tag >>> 3) {
|
|
2215
|
+
case 1:
|
|
2216
|
+
if (tag !== 10) {
|
|
2217
|
+
break;
|
|
2218
|
+
}
|
|
2219
|
+
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
2220
|
+
continue;
|
|
2221
|
+
case 2:
|
|
2222
|
+
if (tag !== 16) {
|
|
2223
|
+
break;
|
|
2224
|
+
}
|
|
2225
|
+
message.status = reader.int32();
|
|
2226
|
+
continue;
|
|
2227
|
+
}
|
|
2228
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2229
|
+
break;
|
|
2230
|
+
}
|
|
2231
|
+
reader.skipType(tag & 7);
|
|
2232
|
+
}
|
|
2233
|
+
return message;
|
|
2234
|
+
}
|
|
2235
|
+
FriendConnectivityUpdate.decode = decode;
|
|
2236
|
+
function fromJSON(object) {
|
|
2237
|
+
return {
|
|
2238
|
+
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
2239
|
+
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : 0,
|
|
2240
|
+
};
|
|
2241
|
+
}
|
|
2242
|
+
FriendConnectivityUpdate.fromJSON = fromJSON;
|
|
2243
|
+
function toJSON(message) {
|
|
2244
|
+
const obj = {};
|
|
2245
|
+
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
2246
|
+
message.status !== undefined && (obj.status = connectivityStatusToJSON(message.status));
|
|
2247
|
+
return obj;
|
|
2248
|
+
}
|
|
2249
|
+
FriendConnectivityUpdate.toJSON = toJSON;
|
|
2250
|
+
function create(base) {
|
|
2251
|
+
return FriendConnectivityUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2252
|
+
}
|
|
2253
|
+
FriendConnectivityUpdate.create = create;
|
|
2254
|
+
function fromPartial(object) {
|
|
2255
|
+
var _a;
|
|
2256
|
+
const message = createBaseFriendConnectivityUpdate();
|
|
2257
|
+
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
2258
|
+
? FriendProfile.fromPartial(object.friend)
|
|
2259
|
+
: undefined;
|
|
2260
|
+
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : 0;
|
|
2261
|
+
return message;
|
|
2262
|
+
}
|
|
2263
|
+
FriendConnectivityUpdate.fromPartial = fromPartial;
|
|
2264
|
+
})(FriendConnectivityUpdate || (exports.FriendConnectivityUpdate = FriendConnectivityUpdate = {}));
|
|
1965
2265
|
function createBaseGetFriendshipStatusPayload() {
|
|
1966
2266
|
return { user: undefined };
|
|
1967
2267
|
}
|
|
@@ -2202,7 +2502,7 @@ exports.SocialServiceDefinition = {
|
|
|
2202
2502
|
name: "GetFriends",
|
|
2203
2503
|
requestType: GetFriendsPayload,
|
|
2204
2504
|
requestStream: false,
|
|
2205
|
-
responseType:
|
|
2505
|
+
responseType: PaginatedFriendsProfilesResponse,
|
|
2206
2506
|
responseStream: false,
|
|
2207
2507
|
options: {},
|
|
2208
2508
|
},
|
|
@@ -2211,7 +2511,7 @@ exports.SocialServiceDefinition = {
|
|
|
2211
2511
|
name: "GetMutualFriends",
|
|
2212
2512
|
requestType: GetMutualFriendsPayload,
|
|
2213
2513
|
requestStream: false,
|
|
2214
|
-
responseType:
|
|
2514
|
+
responseType: PaginatedFriendsProfilesResponse,
|
|
2215
2515
|
responseStream: false,
|
|
2216
2516
|
options: {},
|
|
2217
2517
|
},
|
|
@@ -2251,6 +2551,7 @@ exports.SocialServiceDefinition = {
|
|
|
2251
2551
|
responseStream: true,
|
|
2252
2552
|
options: {},
|
|
2253
2553
|
},
|
|
2554
|
+
/** Get the friendship status between the authenticated user and the one in the parameter */
|
|
2254
2555
|
getFriendshipStatus: {
|
|
2255
2556
|
name: "GetFriendshipStatus",
|
|
2256
2557
|
requestType: GetFriendshipStatusPayload,
|
|
@@ -2259,6 +2560,15 @@ exports.SocialServiceDefinition = {
|
|
|
2259
2560
|
responseStream: false,
|
|
2260
2561
|
options: {},
|
|
2261
2562
|
},
|
|
2563
|
+
/** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
|
|
2564
|
+
subscribeToFriendConnectivityUpdates: {
|
|
2565
|
+
name: "SubscribeToFriendConnectivityUpdates",
|
|
2566
|
+
requestType: empty_gen_1.Empty,
|
|
2567
|
+
requestStream: false,
|
|
2568
|
+
responseType: FriendConnectivityUpdate,
|
|
2569
|
+
responseStream: true,
|
|
2570
|
+
options: {},
|
|
2571
|
+
},
|
|
2262
2572
|
},
|
|
2263
2573
|
};
|
|
2264
2574
|
const tsProtoGlobalThis = (() => {
|