@dcl/protocol 1.0.0-13373633961.commit-e07ccb6 → 1.0.0-13589257140.commit-dc6f088
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/kernel/apis/restricted_actions.gen.d.ts +1 -0
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +16 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +14 -67
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +58 -368
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +18 -1
- package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +59 -416
- package/package.json +2 -2
- package/proto/decentraland/kernel/apis/restricted_actions.proto +1 -0
- package/proto/decentraland/social_service/v2/social_service_v2.proto +7 -33
- package/proto/decentraland/sdk/components/light_source.proto +0 -35
|
@@ -52,7 +52,6 @@ export enum FriendshipStatus {
|
|
|
52
52
|
REJECTED = 4,
|
|
53
53
|
DELETED = 5,
|
|
54
54
|
BLOCKED = 6,
|
|
55
|
-
NONE = 7,
|
|
56
55
|
UNRECOGNIZED = -1,
|
|
57
56
|
}
|
|
58
57
|
|
|
@@ -79,9 +78,6 @@ export function friendshipStatusFromJSON(object: any): FriendshipStatus {
|
|
|
79
78
|
case 6:
|
|
80
79
|
case "BLOCKED":
|
|
81
80
|
return FriendshipStatus.BLOCKED;
|
|
82
|
-
case 7:
|
|
83
|
-
case "NONE":
|
|
84
|
-
return FriendshipStatus.NONE;
|
|
85
81
|
case -1:
|
|
86
82
|
case "UNRECOGNIZED":
|
|
87
83
|
default:
|
|
@@ -105,8 +101,6 @@ export function friendshipStatusToJSON(object: FriendshipStatus): string {
|
|
|
105
101
|
return "DELETED";
|
|
106
102
|
case FriendshipStatus.BLOCKED:
|
|
107
103
|
return "BLOCKED";
|
|
108
|
-
case FriendshipStatus.NONE:
|
|
109
|
-
return "NONE";
|
|
110
104
|
case FriendshipStatus.UNRECOGNIZED:
|
|
111
105
|
default:
|
|
112
106
|
return "UNRECOGNIZED";
|
|
@@ -125,23 +119,15 @@ export interface User {
|
|
|
125
119
|
address: string;
|
|
126
120
|
}
|
|
127
121
|
|
|
128
|
-
export interface FriendProfile {
|
|
129
|
-
address: string;
|
|
130
|
-
name: string;
|
|
131
|
-
hasClaimedName: boolean;
|
|
132
|
-
profilePictureUrl: string;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
122
|
export interface Pagination {
|
|
136
123
|
limit: number;
|
|
137
124
|
offset: number;
|
|
138
125
|
}
|
|
139
126
|
|
|
140
127
|
export interface FriendshipRequestResponse {
|
|
141
|
-
|
|
128
|
+
user: User | undefined;
|
|
142
129
|
createdAt: number;
|
|
143
130
|
message?: string | undefined;
|
|
144
|
-
id: string;
|
|
145
131
|
}
|
|
146
132
|
|
|
147
133
|
export interface FriendshipRequests {
|
|
@@ -150,6 +136,7 @@ export interface FriendshipRequests {
|
|
|
150
136
|
|
|
151
137
|
export interface GetFriendsPayload {
|
|
152
138
|
pagination?: Pagination | undefined;
|
|
139
|
+
status?: ConnectivityStatus | undefined;
|
|
153
140
|
}
|
|
154
141
|
|
|
155
142
|
export interface GetFriendshipRequestsPayload {
|
|
@@ -197,8 +184,8 @@ export interface PaginatedResponse {
|
|
|
197
184
|
page: number;
|
|
198
185
|
}
|
|
199
186
|
|
|
200
|
-
export interface
|
|
201
|
-
|
|
187
|
+
export interface PaginatedUsersResponse {
|
|
188
|
+
users: User[];
|
|
202
189
|
paginationData: PaginatedResponse | undefined;
|
|
203
190
|
}
|
|
204
191
|
|
|
@@ -221,13 +208,11 @@ export interface UpsertFriendshipResponse {
|
|
|
221
208
|
export interface UpsertFriendshipResponse_Accepted {
|
|
222
209
|
id: string;
|
|
223
210
|
createdAt: number;
|
|
224
|
-
friend: FriendProfile | undefined;
|
|
225
|
-
message?: string | undefined;
|
|
226
211
|
}
|
|
227
212
|
|
|
228
213
|
export interface FriendshipUpdate {
|
|
229
214
|
update?:
|
|
230
|
-
| { $case: "request"; request:
|
|
215
|
+
| { $case: "request"; request: FriendshipRequestResponse }
|
|
231
216
|
| { $case: "accept"; accept: FriendshipUpdate_AcceptResponse }
|
|
232
217
|
| { $case: "reject"; reject: FriendshipUpdate_RejectResponse }
|
|
233
218
|
| { $case: "delete"; delete: FriendshipUpdate_DeleteResponse }
|
|
@@ -235,13 +220,6 @@ export interface FriendshipUpdate {
|
|
|
235
220
|
| undefined;
|
|
236
221
|
}
|
|
237
222
|
|
|
238
|
-
export interface FriendshipUpdate_RequestResponse {
|
|
239
|
-
friend: FriendProfile | undefined;
|
|
240
|
-
createdAt: number;
|
|
241
|
-
message?: string | undefined;
|
|
242
|
-
id: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
223
|
export interface FriendshipUpdate_AcceptResponse {
|
|
246
224
|
user: User | undefined;
|
|
247
225
|
}
|
|
@@ -258,11 +236,6 @@ export interface FriendshipUpdate_CancelResponse {
|
|
|
258
236
|
user: User | undefined;
|
|
259
237
|
}
|
|
260
238
|
|
|
261
|
-
export interface FriendConnectivityUpdate {
|
|
262
|
-
friend: FriendProfile | undefined;
|
|
263
|
-
status: ConnectivityStatus;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
239
|
export interface GetFriendshipStatusPayload {
|
|
267
240
|
user: User | undefined;
|
|
268
241
|
}
|
|
@@ -423,103 +396,6 @@ export namespace User {
|
|
|
423
396
|
}
|
|
424
397
|
}
|
|
425
398
|
|
|
426
|
-
function createBaseFriendProfile(): FriendProfile {
|
|
427
|
-
return { address: "", name: "", hasClaimedName: false, profilePictureUrl: "" };
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export namespace FriendProfile {
|
|
431
|
-
export function encode(message: FriendProfile, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
432
|
-
if (message.address !== "") {
|
|
433
|
-
writer.uint32(10).string(message.address);
|
|
434
|
-
}
|
|
435
|
-
if (message.name !== "") {
|
|
436
|
-
writer.uint32(18).string(message.name);
|
|
437
|
-
}
|
|
438
|
-
if (message.hasClaimedName === true) {
|
|
439
|
-
writer.uint32(24).bool(message.hasClaimedName);
|
|
440
|
-
}
|
|
441
|
-
if (message.profilePictureUrl !== "") {
|
|
442
|
-
writer.uint32(34).string(message.profilePictureUrl);
|
|
443
|
-
}
|
|
444
|
-
return writer;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendProfile {
|
|
448
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
449
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
450
|
-
const message = createBaseFriendProfile();
|
|
451
|
-
while (reader.pos < end) {
|
|
452
|
-
const tag = reader.uint32();
|
|
453
|
-
switch (tag >>> 3) {
|
|
454
|
-
case 1:
|
|
455
|
-
if (tag !== 10) {
|
|
456
|
-
break;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
message.address = reader.string();
|
|
460
|
-
continue;
|
|
461
|
-
case 2:
|
|
462
|
-
if (tag !== 18) {
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
message.name = reader.string();
|
|
467
|
-
continue;
|
|
468
|
-
case 3:
|
|
469
|
-
if (tag !== 24) {
|
|
470
|
-
break;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
message.hasClaimedName = reader.bool();
|
|
474
|
-
continue;
|
|
475
|
-
case 4:
|
|
476
|
-
if (tag !== 34) {
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
message.profilePictureUrl = reader.string();
|
|
481
|
-
continue;
|
|
482
|
-
}
|
|
483
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
484
|
-
break;
|
|
485
|
-
}
|
|
486
|
-
reader.skipType(tag & 7);
|
|
487
|
-
}
|
|
488
|
-
return message;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
export function fromJSON(object: any): FriendProfile {
|
|
492
|
-
return {
|
|
493
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
494
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
495
|
-
hasClaimedName: isSet(object.hasClaimedName) ? Boolean(object.hasClaimedName) : false,
|
|
496
|
-
profilePictureUrl: isSet(object.profilePictureUrl) ? String(object.profilePictureUrl) : "",
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
export function toJSON(message: FriendProfile): unknown {
|
|
501
|
-
const obj: any = {};
|
|
502
|
-
message.address !== undefined && (obj.address = message.address);
|
|
503
|
-
message.name !== undefined && (obj.name = message.name);
|
|
504
|
-
message.hasClaimedName !== undefined && (obj.hasClaimedName = message.hasClaimedName);
|
|
505
|
-
message.profilePictureUrl !== undefined && (obj.profilePictureUrl = message.profilePictureUrl);
|
|
506
|
-
return obj;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
export function create<I extends Exact<DeepPartial<FriendProfile>, I>>(base?: I): FriendProfile {
|
|
510
|
-
return FriendProfile.fromPartial(base ?? {});
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendProfile>, I>>(object: I): FriendProfile {
|
|
514
|
-
const message = createBaseFriendProfile();
|
|
515
|
-
message.address = object.address ?? "";
|
|
516
|
-
message.name = object.name ?? "";
|
|
517
|
-
message.hasClaimedName = object.hasClaimedName ?? false;
|
|
518
|
-
message.profilePictureUrl = object.profilePictureUrl ?? "";
|
|
519
|
-
return message;
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
399
|
function createBasePagination(): Pagination {
|
|
524
400
|
return { limit: 0, offset: 0 };
|
|
525
401
|
}
|
|
@@ -592,13 +468,13 @@ export namespace Pagination {
|
|
|
592
468
|
}
|
|
593
469
|
|
|
594
470
|
function createBaseFriendshipRequestResponse(): FriendshipRequestResponse {
|
|
595
|
-
return {
|
|
471
|
+
return { user: undefined, createdAt: 0, message: undefined };
|
|
596
472
|
}
|
|
597
473
|
|
|
598
474
|
export namespace FriendshipRequestResponse {
|
|
599
475
|
export function encode(message: FriendshipRequestResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
600
|
-
if (message.
|
|
601
|
-
|
|
476
|
+
if (message.user !== undefined) {
|
|
477
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
602
478
|
}
|
|
603
479
|
if (message.createdAt !== 0) {
|
|
604
480
|
writer.uint32(16).int64(message.createdAt);
|
|
@@ -606,9 +482,6 @@ export namespace FriendshipRequestResponse {
|
|
|
606
482
|
if (message.message !== undefined) {
|
|
607
483
|
writer.uint32(26).string(message.message);
|
|
608
484
|
}
|
|
609
|
-
if (message.id !== "") {
|
|
610
|
-
writer.uint32(34).string(message.id);
|
|
611
|
-
}
|
|
612
485
|
return writer;
|
|
613
486
|
}
|
|
614
487
|
|
|
@@ -624,7 +497,7 @@ export namespace FriendshipRequestResponse {
|
|
|
624
497
|
break;
|
|
625
498
|
}
|
|
626
499
|
|
|
627
|
-
message.
|
|
500
|
+
message.user = User.decode(reader, reader.uint32());
|
|
628
501
|
continue;
|
|
629
502
|
case 2:
|
|
630
503
|
if (tag !== 16) {
|
|
@@ -640,13 +513,6 @@ export namespace FriendshipRequestResponse {
|
|
|
640
513
|
|
|
641
514
|
message.message = reader.string();
|
|
642
515
|
continue;
|
|
643
|
-
case 4:
|
|
644
|
-
if (tag !== 34) {
|
|
645
|
-
break;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
message.id = reader.string();
|
|
649
|
-
continue;
|
|
650
516
|
}
|
|
651
517
|
if ((tag & 7) === 4 || tag === 0) {
|
|
652
518
|
break;
|
|
@@ -658,19 +524,17 @@ export namespace FriendshipRequestResponse {
|
|
|
658
524
|
|
|
659
525
|
export function fromJSON(object: any): FriendshipRequestResponse {
|
|
660
526
|
return {
|
|
661
|
-
|
|
527
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
662
528
|
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
663
529
|
message: isSet(object.message) ? String(object.message) : undefined,
|
|
664
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
665
530
|
};
|
|
666
531
|
}
|
|
667
532
|
|
|
668
533
|
export function toJSON(message: FriendshipRequestResponse): unknown {
|
|
669
534
|
const obj: any = {};
|
|
670
|
-
message.
|
|
535
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
671
536
|
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
672
537
|
message.message !== undefined && (obj.message = message.message);
|
|
673
|
-
message.id !== undefined && (obj.id = message.id);
|
|
674
538
|
return obj;
|
|
675
539
|
}
|
|
676
540
|
|
|
@@ -684,12 +548,9 @@ export namespace FriendshipRequestResponse {
|
|
|
684
548
|
object: I,
|
|
685
549
|
): FriendshipRequestResponse {
|
|
686
550
|
const message = createBaseFriendshipRequestResponse();
|
|
687
|
-
message.
|
|
688
|
-
? FriendProfile.fromPartial(object.friend)
|
|
689
|
-
: undefined;
|
|
551
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
690
552
|
message.createdAt = object.createdAt ?? 0;
|
|
691
553
|
message.message = object.message ?? undefined;
|
|
692
|
-
message.id = object.id ?? "";
|
|
693
554
|
return message;
|
|
694
555
|
}
|
|
695
556
|
}
|
|
@@ -759,7 +620,7 @@ export namespace FriendshipRequests {
|
|
|
759
620
|
}
|
|
760
621
|
|
|
761
622
|
function createBaseGetFriendsPayload(): GetFriendsPayload {
|
|
762
|
-
return { pagination: undefined };
|
|
623
|
+
return { pagination: undefined, status: undefined };
|
|
763
624
|
}
|
|
764
625
|
|
|
765
626
|
export namespace GetFriendsPayload {
|
|
@@ -767,6 +628,9 @@ export namespace GetFriendsPayload {
|
|
|
767
628
|
if (message.pagination !== undefined) {
|
|
768
629
|
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
769
630
|
}
|
|
631
|
+
if (message.status !== undefined) {
|
|
632
|
+
writer.uint32(16).int32(message.status);
|
|
633
|
+
}
|
|
770
634
|
return writer;
|
|
771
635
|
}
|
|
772
636
|
|
|
@@ -784,6 +648,13 @@ export namespace GetFriendsPayload {
|
|
|
784
648
|
|
|
785
649
|
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
786
650
|
continue;
|
|
651
|
+
case 2:
|
|
652
|
+
if (tag !== 16) {
|
|
653
|
+
break;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
message.status = reader.int32() as any;
|
|
657
|
+
continue;
|
|
787
658
|
}
|
|
788
659
|
if ((tag & 7) === 4 || tag === 0) {
|
|
789
660
|
break;
|
|
@@ -794,13 +665,18 @@ export namespace GetFriendsPayload {
|
|
|
794
665
|
}
|
|
795
666
|
|
|
796
667
|
export function fromJSON(object: any): GetFriendsPayload {
|
|
797
|
-
return {
|
|
668
|
+
return {
|
|
669
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
670
|
+
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : undefined,
|
|
671
|
+
};
|
|
798
672
|
}
|
|
799
673
|
|
|
800
674
|
export function toJSON(message: GetFriendsPayload): unknown {
|
|
801
675
|
const obj: any = {};
|
|
802
676
|
message.pagination !== undefined &&
|
|
803
677
|
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
678
|
+
message.status !== undefined &&
|
|
679
|
+
(obj.status = message.status !== undefined ? connectivityStatusToJSON(message.status) : undefined);
|
|
804
680
|
return obj;
|
|
805
681
|
}
|
|
806
682
|
|
|
@@ -813,6 +689,7 @@ export namespace GetFriendsPayload {
|
|
|
813
689
|
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
814
690
|
? Pagination.fromPartial(object.pagination)
|
|
815
691
|
: undefined;
|
|
692
|
+
message.status = object.status ?? undefined;
|
|
816
693
|
return message;
|
|
817
694
|
}
|
|
818
695
|
}
|
|
@@ -1532,17 +1409,14 @@ export namespace PaginatedResponse {
|
|
|
1532
1409
|
}
|
|
1533
1410
|
}
|
|
1534
1411
|
|
|
1535
|
-
function
|
|
1536
|
-
return {
|
|
1412
|
+
function createBasePaginatedUsersResponse(): PaginatedUsersResponse {
|
|
1413
|
+
return { users: [], paginationData: undefined };
|
|
1537
1414
|
}
|
|
1538
1415
|
|
|
1539
|
-
export namespace
|
|
1540
|
-
export function encode(
|
|
1541
|
-
message
|
|
1542
|
-
|
|
1543
|
-
): _m0.Writer {
|
|
1544
|
-
for (const v of message.friends) {
|
|
1545
|
-
FriendProfile.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1416
|
+
export namespace PaginatedUsersResponse {
|
|
1417
|
+
export function encode(message: PaginatedUsersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1418
|
+
for (const v of message.users) {
|
|
1419
|
+
User.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1546
1420
|
}
|
|
1547
1421
|
if (message.paginationData !== undefined) {
|
|
1548
1422
|
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
@@ -1550,10 +1424,10 @@ export namespace PaginatedFriendsProfilesResponse {
|
|
|
1550
1424
|
return writer;
|
|
1551
1425
|
}
|
|
1552
1426
|
|
|
1553
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1427
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedUsersResponse {
|
|
1554
1428
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1555
1429
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1556
|
-
const message =
|
|
1430
|
+
const message = createBasePaginatedUsersResponse();
|
|
1557
1431
|
while (reader.pos < end) {
|
|
1558
1432
|
const tag = reader.uint32();
|
|
1559
1433
|
switch (tag >>> 3) {
|
|
@@ -1562,7 +1436,7 @@ export namespace PaginatedFriendsProfilesResponse {
|
|
|
1562
1436
|
break;
|
|
1563
1437
|
}
|
|
1564
1438
|
|
|
1565
|
-
message.
|
|
1439
|
+
message.users.push(User.decode(reader, reader.uint32()));
|
|
1566
1440
|
continue;
|
|
1567
1441
|
case 2:
|
|
1568
1442
|
if (tag !== 18) {
|
|
@@ -1580,36 +1454,34 @@ export namespace PaginatedFriendsProfilesResponse {
|
|
|
1580
1454
|
return message;
|
|
1581
1455
|
}
|
|
1582
1456
|
|
|
1583
|
-
export function fromJSON(object: any):
|
|
1457
|
+
export function fromJSON(object: any): PaginatedUsersResponse {
|
|
1584
1458
|
return {
|
|
1585
|
-
|
|
1459
|
+
users: Array.isArray(object?.users) ? object.users.map((e: any) => User.fromJSON(e)) : [],
|
|
1586
1460
|
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1587
1461
|
};
|
|
1588
1462
|
}
|
|
1589
1463
|
|
|
1590
|
-
export function toJSON(message:
|
|
1464
|
+
export function toJSON(message: PaginatedUsersResponse): unknown {
|
|
1591
1465
|
const obj: any = {};
|
|
1592
|
-
if (message.
|
|
1593
|
-
obj.
|
|
1466
|
+
if (message.users) {
|
|
1467
|
+
obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);
|
|
1594
1468
|
} else {
|
|
1595
|
-
obj.
|
|
1469
|
+
obj.users = [];
|
|
1596
1470
|
}
|
|
1597
1471
|
message.paginationData !== undefined &&
|
|
1598
1472
|
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1599
1473
|
return obj;
|
|
1600
1474
|
}
|
|
1601
1475
|
|
|
1602
|
-
export function create<I extends Exact<DeepPartial<
|
|
1603
|
-
base
|
|
1604
|
-
): PaginatedFriendsProfilesResponse {
|
|
1605
|
-
return PaginatedFriendsProfilesResponse.fromPartial(base ?? {});
|
|
1476
|
+
export function create<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(base?: I): PaginatedUsersResponse {
|
|
1477
|
+
return PaginatedUsersResponse.fromPartial(base ?? {});
|
|
1606
1478
|
}
|
|
1607
1479
|
|
|
1608
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1480
|
+
export function fromPartial<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(
|
|
1609
1481
|
object: I,
|
|
1610
|
-
):
|
|
1611
|
-
const message =
|
|
1612
|
-
message.
|
|
1482
|
+
): PaginatedUsersResponse {
|
|
1483
|
+
const message = createBasePaginatedUsersResponse();
|
|
1484
|
+
message.users = object.users?.map((e) => User.fromPartial(e)) || [];
|
|
1613
1485
|
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1614
1486
|
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1615
1487
|
: undefined;
|
|
@@ -1887,7 +1759,7 @@ export namespace UpsertFriendshipResponse {
|
|
|
1887
1759
|
}
|
|
1888
1760
|
|
|
1889
1761
|
function createBaseUpsertFriendshipResponse_Accepted(): UpsertFriendshipResponse_Accepted {
|
|
1890
|
-
return { id: "", createdAt: 0
|
|
1762
|
+
return { id: "", createdAt: 0 };
|
|
1891
1763
|
}
|
|
1892
1764
|
|
|
1893
1765
|
export namespace UpsertFriendshipResponse_Accepted {
|
|
@@ -1901,12 +1773,6 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
1901
1773
|
if (message.createdAt !== 0) {
|
|
1902
1774
|
writer.uint32(16).int64(message.createdAt);
|
|
1903
1775
|
}
|
|
1904
|
-
if (message.friend !== undefined) {
|
|
1905
|
-
FriendProfile.encode(message.friend, writer.uint32(26).fork()).ldelim();
|
|
1906
|
-
}
|
|
1907
|
-
if (message.message !== undefined) {
|
|
1908
|
-
writer.uint32(34).string(message.message);
|
|
1909
|
-
}
|
|
1910
1776
|
return writer;
|
|
1911
1777
|
}
|
|
1912
1778
|
|
|
@@ -1931,20 +1797,6 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
1931
1797
|
|
|
1932
1798
|
message.createdAt = longToNumber(reader.int64() as Long);
|
|
1933
1799
|
continue;
|
|
1934
|
-
case 3:
|
|
1935
|
-
if (tag !== 26) {
|
|
1936
|
-
break;
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
1940
|
-
continue;
|
|
1941
|
-
case 4:
|
|
1942
|
-
if (tag !== 34) {
|
|
1943
|
-
break;
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
message.message = reader.string();
|
|
1947
|
-
continue;
|
|
1948
1800
|
}
|
|
1949
1801
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1950
1802
|
break;
|
|
@@ -1958,8 +1810,6 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
1958
1810
|
return {
|
|
1959
1811
|
id: isSet(object.id) ? String(object.id) : "",
|
|
1960
1812
|
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
1961
|
-
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
1962
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
1963
1813
|
};
|
|
1964
1814
|
}
|
|
1965
1815
|
|
|
@@ -1967,8 +1817,6 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
1967
1817
|
const obj: any = {};
|
|
1968
1818
|
message.id !== undefined && (obj.id = message.id);
|
|
1969
1819
|
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
1970
|
-
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
1971
|
-
message.message !== undefined && (obj.message = message.message);
|
|
1972
1820
|
return obj;
|
|
1973
1821
|
}
|
|
1974
1822
|
|
|
@@ -1984,10 +1832,6 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
1984
1832
|
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1985
1833
|
message.id = object.id ?? "";
|
|
1986
1834
|
message.createdAt = object.createdAt ?? 0;
|
|
1987
|
-
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
1988
|
-
? FriendProfile.fromPartial(object.friend)
|
|
1989
|
-
: undefined;
|
|
1990
|
-
message.message = object.message ?? undefined;
|
|
1991
1835
|
return message;
|
|
1992
1836
|
}
|
|
1993
1837
|
}
|
|
@@ -2000,7 +1844,7 @@ export namespace FriendshipUpdate {
|
|
|
2000
1844
|
export function encode(message: FriendshipUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2001
1845
|
switch (message.update?.$case) {
|
|
2002
1846
|
case "request":
|
|
2003
|
-
|
|
1847
|
+
FriendshipRequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
2004
1848
|
break;
|
|
2005
1849
|
case "accept":
|
|
2006
1850
|
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
@@ -2030,10 +1874,7 @@ export namespace FriendshipUpdate {
|
|
|
2030
1874
|
break;
|
|
2031
1875
|
}
|
|
2032
1876
|
|
|
2033
|
-
message.update = {
|
|
2034
|
-
$case: "request",
|
|
2035
|
-
request: FriendshipUpdate_RequestResponse.decode(reader, reader.uint32()),
|
|
2036
|
-
};
|
|
1877
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.decode(reader, reader.uint32()) };
|
|
2037
1878
|
continue;
|
|
2038
1879
|
case 2:
|
|
2039
1880
|
if (tag !== 18) {
|
|
@@ -2075,7 +1916,7 @@ export namespace FriendshipUpdate {
|
|
|
2075
1916
|
export function fromJSON(object: any): FriendshipUpdate {
|
|
2076
1917
|
return {
|
|
2077
1918
|
update: isSet(object.request)
|
|
2078
|
-
? { $case: "request", request:
|
|
1919
|
+
? { $case: "request", request: FriendshipRequestResponse.fromJSON(object.request) }
|
|
2079
1920
|
: isSet(object.accept)
|
|
2080
1921
|
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
2081
1922
|
: isSet(object.reject)
|
|
@@ -2091,9 +1932,7 @@ export namespace FriendshipUpdate {
|
|
|
2091
1932
|
export function toJSON(message: FriendshipUpdate): unknown {
|
|
2092
1933
|
const obj: any = {};
|
|
2093
1934
|
message.update?.$case === "request" &&
|
|
2094
|
-
(obj.request = message.update?.request
|
|
2095
|
-
? FriendshipUpdate_RequestResponse.toJSON(message.update?.request)
|
|
2096
|
-
: undefined);
|
|
1935
|
+
(obj.request = message.update?.request ? FriendshipRequestResponse.toJSON(message.update?.request) : undefined);
|
|
2097
1936
|
message.update?.$case === "accept" &&
|
|
2098
1937
|
(obj.accept = message.update?.accept
|
|
2099
1938
|
? FriendshipUpdate_AcceptResponse.toJSON(message.update?.accept)
|
|
@@ -2120,10 +1959,7 @@ export namespace FriendshipUpdate {
|
|
|
2120
1959
|
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(object: I): FriendshipUpdate {
|
|
2121
1960
|
const message = createBaseFriendshipUpdate();
|
|
2122
1961
|
if (object.update?.$case === "request" && object.update?.request !== undefined && object.update?.request !== null) {
|
|
2123
|
-
message.update = {
|
|
2124
|
-
$case: "request",
|
|
2125
|
-
request: FriendshipUpdate_RequestResponse.fromPartial(object.update.request),
|
|
2126
|
-
};
|
|
1962
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.fromPartial(object.update.request) };
|
|
2127
1963
|
}
|
|
2128
1964
|
if (object.update?.$case === "accept" && object.update?.accept !== undefined && object.update?.accept !== null) {
|
|
2129
1965
|
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
@@ -2141,112 +1977,6 @@ export namespace FriendshipUpdate {
|
|
|
2141
1977
|
}
|
|
2142
1978
|
}
|
|
2143
1979
|
|
|
2144
|
-
function createBaseFriendshipUpdate_RequestResponse(): FriendshipUpdate_RequestResponse {
|
|
2145
|
-
return { friend: undefined, createdAt: 0, message: undefined, id: "" };
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
export namespace FriendshipUpdate_RequestResponse {
|
|
2149
|
-
export function encode(
|
|
2150
|
-
message: FriendshipUpdate_RequestResponse,
|
|
2151
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
2152
|
-
): _m0.Writer {
|
|
2153
|
-
if (message.friend !== undefined) {
|
|
2154
|
-
FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
|
|
2155
|
-
}
|
|
2156
|
-
if (message.createdAt !== 0) {
|
|
2157
|
-
writer.uint32(16).int64(message.createdAt);
|
|
2158
|
-
}
|
|
2159
|
-
if (message.message !== undefined) {
|
|
2160
|
-
writer.uint32(26).string(message.message);
|
|
2161
|
-
}
|
|
2162
|
-
if (message.id !== "") {
|
|
2163
|
-
writer.uint32(34).string(message.id);
|
|
2164
|
-
}
|
|
2165
|
-
return writer;
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_RequestResponse {
|
|
2169
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2170
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2171
|
-
const message = createBaseFriendshipUpdate_RequestResponse();
|
|
2172
|
-
while (reader.pos < end) {
|
|
2173
|
-
const tag = reader.uint32();
|
|
2174
|
-
switch (tag >>> 3) {
|
|
2175
|
-
case 1:
|
|
2176
|
-
if (tag !== 10) {
|
|
2177
|
-
break;
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
2181
|
-
continue;
|
|
2182
|
-
case 2:
|
|
2183
|
-
if (tag !== 16) {
|
|
2184
|
-
break;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
message.createdAt = longToNumber(reader.int64() as Long);
|
|
2188
|
-
continue;
|
|
2189
|
-
case 3:
|
|
2190
|
-
if (tag !== 26) {
|
|
2191
|
-
break;
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
message.message = reader.string();
|
|
2195
|
-
continue;
|
|
2196
|
-
case 4:
|
|
2197
|
-
if (tag !== 34) {
|
|
2198
|
-
break;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
message.id = reader.string();
|
|
2202
|
-
continue;
|
|
2203
|
-
}
|
|
2204
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2205
|
-
break;
|
|
2206
|
-
}
|
|
2207
|
-
reader.skipType(tag & 7);
|
|
2208
|
-
}
|
|
2209
|
-
return message;
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
export function fromJSON(object: any): FriendshipUpdate_RequestResponse {
|
|
2213
|
-
return {
|
|
2214
|
-
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
2215
|
-
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
2216
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
2217
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
2218
|
-
};
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
export function toJSON(message: FriendshipUpdate_RequestResponse): unknown {
|
|
2222
|
-
const obj: any = {};
|
|
2223
|
-
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
2224
|
-
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
2225
|
-
message.message !== undefined && (obj.message = message.message);
|
|
2226
|
-
message.id !== undefined && (obj.id = message.id);
|
|
2227
|
-
return obj;
|
|
2228
|
-
}
|
|
2229
|
-
|
|
2230
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate_RequestResponse>, I>>(
|
|
2231
|
-
base?: I,
|
|
2232
|
-
): FriendshipUpdate_RequestResponse {
|
|
2233
|
-
return FriendshipUpdate_RequestResponse.fromPartial(base ?? {});
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_RequestResponse>, I>>(
|
|
2237
|
-
object: I,
|
|
2238
|
-
): FriendshipUpdate_RequestResponse {
|
|
2239
|
-
const message = createBaseFriendshipUpdate_RequestResponse();
|
|
2240
|
-
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
2241
|
-
? FriendProfile.fromPartial(object.friend)
|
|
2242
|
-
: undefined;
|
|
2243
|
-
message.createdAt = object.createdAt ?? 0;
|
|
2244
|
-
message.message = object.message ?? undefined;
|
|
2245
|
-
message.id = object.id ?? "";
|
|
2246
|
-
return message;
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
1980
|
function createBaseFriendshipUpdate_AcceptResponse(): FriendshipUpdate_AcceptResponse {
|
|
2251
1981
|
return { user: undefined };
|
|
2252
1982
|
}
|
|
@@ -2499,83 +2229,6 @@ export namespace FriendshipUpdate_CancelResponse {
|
|
|
2499
2229
|
}
|
|
2500
2230
|
}
|
|
2501
2231
|
|
|
2502
|
-
function createBaseFriendConnectivityUpdate(): FriendConnectivityUpdate {
|
|
2503
|
-
return { friend: undefined, status: 0 };
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
export namespace FriendConnectivityUpdate {
|
|
2507
|
-
export function encode(message: FriendConnectivityUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2508
|
-
if (message.friend !== undefined) {
|
|
2509
|
-
FriendProfile.encode(message.friend, writer.uint32(10).fork()).ldelim();
|
|
2510
|
-
}
|
|
2511
|
-
if (message.status !== 0) {
|
|
2512
|
-
writer.uint32(16).int32(message.status);
|
|
2513
|
-
}
|
|
2514
|
-
return writer;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendConnectivityUpdate {
|
|
2518
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2519
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2520
|
-
const message = createBaseFriendConnectivityUpdate();
|
|
2521
|
-
while (reader.pos < end) {
|
|
2522
|
-
const tag = reader.uint32();
|
|
2523
|
-
switch (tag >>> 3) {
|
|
2524
|
-
case 1:
|
|
2525
|
-
if (tag !== 10) {
|
|
2526
|
-
break;
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
2530
|
-
continue;
|
|
2531
|
-
case 2:
|
|
2532
|
-
if (tag !== 16) {
|
|
2533
|
-
break;
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
message.status = reader.int32() as any;
|
|
2537
|
-
continue;
|
|
2538
|
-
}
|
|
2539
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2540
|
-
break;
|
|
2541
|
-
}
|
|
2542
|
-
reader.skipType(tag & 7);
|
|
2543
|
-
}
|
|
2544
|
-
return message;
|
|
2545
|
-
}
|
|
2546
|
-
|
|
2547
|
-
export function fromJSON(object: any): FriendConnectivityUpdate {
|
|
2548
|
-
return {
|
|
2549
|
-
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
2550
|
-
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : 0,
|
|
2551
|
-
};
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
|
-
export function toJSON(message: FriendConnectivityUpdate): unknown {
|
|
2555
|
-
const obj: any = {};
|
|
2556
|
-
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
2557
|
-
message.status !== undefined && (obj.status = connectivityStatusToJSON(message.status));
|
|
2558
|
-
return obj;
|
|
2559
|
-
}
|
|
2560
|
-
|
|
2561
|
-
export function create<I extends Exact<DeepPartial<FriendConnectivityUpdate>, I>>(
|
|
2562
|
-
base?: I,
|
|
2563
|
-
): FriendConnectivityUpdate {
|
|
2564
|
-
return FriendConnectivityUpdate.fromPartial(base ?? {});
|
|
2565
|
-
}
|
|
2566
|
-
|
|
2567
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendConnectivityUpdate>, I>>(
|
|
2568
|
-
object: I,
|
|
2569
|
-
): FriendConnectivityUpdate {
|
|
2570
|
-
const message = createBaseFriendConnectivityUpdate();
|
|
2571
|
-
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
2572
|
-
? FriendProfile.fromPartial(object.friend)
|
|
2573
|
-
: undefined;
|
|
2574
|
-
message.status = object.status ?? 0;
|
|
2575
|
-
return message;
|
|
2576
|
-
}
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
2232
|
function createBaseGetFriendshipStatusPayload(): GetFriendshipStatusPayload {
|
|
2580
2233
|
return { user: undefined };
|
|
2581
2234
|
}
|
|
@@ -2837,7 +2490,7 @@ export const SocialServiceDefinition = {
|
|
|
2837
2490
|
name: "GetFriends",
|
|
2838
2491
|
requestType: GetFriendsPayload,
|
|
2839
2492
|
requestStream: false,
|
|
2840
|
-
responseType:
|
|
2493
|
+
responseType: PaginatedUsersResponse,
|
|
2841
2494
|
responseStream: false,
|
|
2842
2495
|
options: {},
|
|
2843
2496
|
},
|
|
@@ -2846,7 +2499,7 @@ export const SocialServiceDefinition = {
|
|
|
2846
2499
|
name: "GetMutualFriends",
|
|
2847
2500
|
requestType: GetMutualFriendsPayload,
|
|
2848
2501
|
requestStream: false,
|
|
2849
|
-
responseType:
|
|
2502
|
+
responseType: PaginatedUsersResponse,
|
|
2850
2503
|
responseStream: false,
|
|
2851
2504
|
options: {},
|
|
2852
2505
|
},
|
|
@@ -2886,7 +2539,6 @@ export const SocialServiceDefinition = {
|
|
|
2886
2539
|
responseStream: true,
|
|
2887
2540
|
options: {},
|
|
2888
2541
|
},
|
|
2889
|
-
/** Get the friendship status between the authenticated user and the one in the parameter */
|
|
2890
2542
|
getFriendshipStatus: {
|
|
2891
2543
|
name: "GetFriendshipStatus",
|
|
2892
2544
|
requestType: GetFriendshipStatusPayload,
|
|
@@ -2895,15 +2547,6 @@ export const SocialServiceDefinition = {
|
|
|
2895
2547
|
responseStream: false,
|
|
2896
2548
|
options: {},
|
|
2897
2549
|
},
|
|
2898
|
-
/** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
|
|
2899
|
-
subscribeToFriendConnectivityUpdates: {
|
|
2900
|
-
name: "SubscribeToFriendConnectivityUpdates",
|
|
2901
|
-
requestType: Empty,
|
|
2902
|
-
requestStream: false,
|
|
2903
|
-
responseType: FriendConnectivityUpdate,
|
|
2904
|
-
responseStream: true,
|
|
2905
|
-
options: {},
|
|
2906
|
-
},
|
|
2907
2550
|
},
|
|
2908
2551
|
} as const;
|
|
2909
2552
|
|