@dcl/protocol 1.0.0-13897190826.commit-195803d → 1.0.0-14033082444.commit-84b403d
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/sdk/components/ui_transform.gen.d.ts +30 -0
- package/out-js/decentraland/sdk/components/ui_transform.gen.js +312 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +22 -306
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +75 -1552
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -1
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +379 -1
- package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +945 -2589
- package/package.json +2 -2
- package/proto/decentraland/sdk/components/ui_transform.proto +28 -1
- package/proto/decentraland/social_service/v2/social_service_v2.proto +9 -119
- package/proto/decentraland/sdk/components/light_source.proto +0 -35
|
@@ -52,8 +52,6 @@ export enum FriendshipStatus {
|
|
|
52
52
|
REJECTED = 4,
|
|
53
53
|
DELETED = 5,
|
|
54
54
|
BLOCKED = 6,
|
|
55
|
-
NONE = 7,
|
|
56
|
-
BLOCKED_BY = 8,
|
|
57
55
|
UNRECOGNIZED = -1,
|
|
58
56
|
}
|
|
59
57
|
|
|
@@ -80,12 +78,6 @@ export function friendshipStatusFromJSON(object: any): FriendshipStatus {
|
|
|
80
78
|
case 6:
|
|
81
79
|
case "BLOCKED":
|
|
82
80
|
return FriendshipStatus.BLOCKED;
|
|
83
|
-
case 7:
|
|
84
|
-
case "NONE":
|
|
85
|
-
return FriendshipStatus.NONE;
|
|
86
|
-
case 8:
|
|
87
|
-
case "BLOCKED_BY":
|
|
88
|
-
return FriendshipStatus.BLOCKED_BY;
|
|
89
81
|
case -1:
|
|
90
82
|
case "UNRECOGNIZED":
|
|
91
83
|
default:
|
|
@@ -109,10 +101,6 @@ export function friendshipStatusToJSON(object: FriendshipStatus): string {
|
|
|
109
101
|
return "DELETED";
|
|
110
102
|
case FriendshipStatus.BLOCKED:
|
|
111
103
|
return "BLOCKED";
|
|
112
|
-
case FriendshipStatus.NONE:
|
|
113
|
-
return "NONE";
|
|
114
|
-
case FriendshipStatus.BLOCKED_BY:
|
|
115
|
-
return "BLOCKED_BY";
|
|
116
104
|
case FriendshipStatus.UNRECOGNIZED:
|
|
117
105
|
default:
|
|
118
106
|
return "UNRECOGNIZED";
|
|
@@ -121,19 +109,9 @@ export function friendshipStatusToJSON(object: FriendshipStatus): string {
|
|
|
121
109
|
|
|
122
110
|
/** Errors */
|
|
123
111
|
export interface InvalidFriendshipAction {
|
|
124
|
-
message?: string | undefined;
|
|
125
112
|
}
|
|
126
113
|
|
|
127
114
|
export interface InternalServerError {
|
|
128
|
-
message?: string | undefined;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface InvalidRequest {
|
|
132
|
-
message?: string | undefined;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export interface ProfileNotFound {
|
|
136
|
-
message?: string | undefined;
|
|
137
115
|
}
|
|
138
116
|
|
|
139
117
|
/** Types */
|
|
@@ -141,31 +119,15 @@ export interface User {
|
|
|
141
119
|
address: string;
|
|
142
120
|
}
|
|
143
121
|
|
|
144
|
-
export interface FriendProfile {
|
|
145
|
-
address: string;
|
|
146
|
-
name: string;
|
|
147
|
-
hasClaimedName: boolean;
|
|
148
|
-
profilePictureUrl: string;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface BlockedUserProfile {
|
|
152
|
-
address: string;
|
|
153
|
-
name: string;
|
|
154
|
-
hasClaimedName: boolean;
|
|
155
|
-
profilePictureUrl: string;
|
|
156
|
-
blockedAt?: number | undefined;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
122
|
export interface Pagination {
|
|
160
123
|
limit: number;
|
|
161
124
|
offset: number;
|
|
162
125
|
}
|
|
163
126
|
|
|
164
127
|
export interface FriendshipRequestResponse {
|
|
165
|
-
|
|
128
|
+
user: User | undefined;
|
|
166
129
|
createdAt: number;
|
|
167
130
|
message?: string | undefined;
|
|
168
|
-
id: string;
|
|
169
131
|
}
|
|
170
132
|
|
|
171
133
|
export interface FriendshipRequests {
|
|
@@ -174,6 +136,7 @@ export interface FriendshipRequests {
|
|
|
174
136
|
|
|
175
137
|
export interface GetFriendsPayload {
|
|
176
138
|
pagination?: Pagination | undefined;
|
|
139
|
+
status?: ConnectivityStatus | undefined;
|
|
177
140
|
}
|
|
178
141
|
|
|
179
142
|
export interface GetFriendshipRequestsPayload {
|
|
@@ -221,8 +184,8 @@ export interface PaginatedResponse {
|
|
|
221
184
|
page: number;
|
|
222
185
|
}
|
|
223
186
|
|
|
224
|
-
export interface
|
|
225
|
-
|
|
187
|
+
export interface PaginatedUsersResponse {
|
|
188
|
+
users: User[];
|
|
226
189
|
paginationData: PaginatedResponse | undefined;
|
|
227
190
|
}
|
|
228
191
|
|
|
@@ -245,28 +208,18 @@ export interface UpsertFriendshipResponse {
|
|
|
245
208
|
export interface UpsertFriendshipResponse_Accepted {
|
|
246
209
|
id: string;
|
|
247
210
|
createdAt: number;
|
|
248
|
-
friend: FriendProfile | undefined;
|
|
249
|
-
message?: string | undefined;
|
|
250
211
|
}
|
|
251
212
|
|
|
252
213
|
export interface FriendshipUpdate {
|
|
253
214
|
update?:
|
|
254
|
-
| { $case: "request"; request:
|
|
215
|
+
| { $case: "request"; request: FriendshipRequestResponse }
|
|
255
216
|
| { $case: "accept"; accept: FriendshipUpdate_AcceptResponse }
|
|
256
217
|
| { $case: "reject"; reject: FriendshipUpdate_RejectResponse }
|
|
257
218
|
| { $case: "delete"; delete: FriendshipUpdate_DeleteResponse }
|
|
258
219
|
| { $case: "cancel"; cancel: FriendshipUpdate_CancelResponse }
|
|
259
|
-
| { $case: "block"; block: FriendshipUpdate_BlockResponse }
|
|
260
220
|
| undefined;
|
|
261
221
|
}
|
|
262
222
|
|
|
263
|
-
export interface FriendshipUpdate_RequestResponse {
|
|
264
|
-
friend: FriendProfile | undefined;
|
|
265
|
-
createdAt: number;
|
|
266
|
-
message?: string | undefined;
|
|
267
|
-
id: string;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
223
|
export interface FriendshipUpdate_AcceptResponse {
|
|
271
224
|
user: User | undefined;
|
|
272
225
|
}
|
|
@@ -283,15 +236,6 @@ export interface FriendshipUpdate_CancelResponse {
|
|
|
283
236
|
user: User | undefined;
|
|
284
237
|
}
|
|
285
238
|
|
|
286
|
-
export interface FriendshipUpdate_BlockResponse {
|
|
287
|
-
user: User | undefined;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export interface FriendConnectivityUpdate {
|
|
291
|
-
friend: FriendProfile | undefined;
|
|
292
|
-
status: ConnectivityStatus;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
239
|
export interface GetFriendshipStatusPayload {
|
|
296
240
|
user: User | undefined;
|
|
297
241
|
}
|
|
@@ -308,68 +252,12 @@ export interface GetFriendshipStatusResponse_Ok {
|
|
|
308
252
|
message?: string | undefined;
|
|
309
253
|
}
|
|
310
254
|
|
|
311
|
-
export interface BlockUserPayload {
|
|
312
|
-
user: User | undefined;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export interface BlockUserResponse {
|
|
316
|
-
response?:
|
|
317
|
-
| { $case: "ok"; ok: BlockUserResponse_Ok }
|
|
318
|
-
| { $case: "internalServerError"; internalServerError: InternalServerError }
|
|
319
|
-
| { $case: "invalidRequest"; invalidRequest: InvalidRequest }
|
|
320
|
-
| { $case: "profileNotFound"; profileNotFound: ProfileNotFound }
|
|
321
|
-
| undefined;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export interface BlockUserResponse_Ok {
|
|
325
|
-
profile: BlockedUserProfile | undefined;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export interface UnblockUserPayload {
|
|
329
|
-
user: User | undefined;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export interface UnblockUserResponse {
|
|
333
|
-
response?:
|
|
334
|
-
| { $case: "ok"; ok: UnblockUserResponse_Ok }
|
|
335
|
-
| { $case: "internalServerError"; internalServerError: InternalServerError }
|
|
336
|
-
| { $case: "invalidRequest"; invalidRequest: InvalidRequest }
|
|
337
|
-
| { $case: "profileNotFound"; profileNotFound: ProfileNotFound }
|
|
338
|
-
| undefined;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export interface UnblockUserResponse_Ok {
|
|
342
|
-
profile: BlockedUserProfile | undefined;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export interface GetBlockedUsersPayload {
|
|
346
|
-
pagination?: Pagination | undefined;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export interface GetBlockedUsersResponse {
|
|
350
|
-
profiles: BlockedUserProfile[];
|
|
351
|
-
paginationData: PaginatedResponse | undefined;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
export interface GetBlockingStatusResponse {
|
|
355
|
-
blockedUsers: string[];
|
|
356
|
-
blockedByUsers: string[];
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export interface BlockUpdate {
|
|
360
|
-
address: string;
|
|
361
|
-
isBlocked: boolean;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
255
|
function createBaseInvalidFriendshipAction(): InvalidFriendshipAction {
|
|
365
|
-
return {
|
|
256
|
+
return {};
|
|
366
257
|
}
|
|
367
258
|
|
|
368
259
|
export namespace InvalidFriendshipAction {
|
|
369
|
-
export function encode(
|
|
370
|
-
if (message.message !== undefined) {
|
|
371
|
-
writer.uint32(10).string(message.message);
|
|
372
|
-
}
|
|
260
|
+
export function encode(_: InvalidFriendshipAction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
373
261
|
return writer;
|
|
374
262
|
}
|
|
375
263
|
|
|
@@ -380,13 +268,6 @@ export namespace InvalidFriendshipAction {
|
|
|
380
268
|
while (reader.pos < end) {
|
|
381
269
|
const tag = reader.uint32();
|
|
382
270
|
switch (tag >>> 3) {
|
|
383
|
-
case 1:
|
|
384
|
-
if (tag !== 10) {
|
|
385
|
-
break;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
message.message = reader.string();
|
|
389
|
-
continue;
|
|
390
271
|
}
|
|
391
272
|
if ((tag & 7) === 4 || tag === 0) {
|
|
392
273
|
break;
|
|
@@ -396,13 +277,12 @@ export namespace InvalidFriendshipAction {
|
|
|
396
277
|
return message;
|
|
397
278
|
}
|
|
398
279
|
|
|
399
|
-
export function fromJSON(
|
|
400
|
-
return {
|
|
280
|
+
export function fromJSON(_: any): InvalidFriendshipAction {
|
|
281
|
+
return {};
|
|
401
282
|
}
|
|
402
283
|
|
|
403
|
-
export function toJSON(
|
|
284
|
+
export function toJSON(_: InvalidFriendshipAction): unknown {
|
|
404
285
|
const obj: any = {};
|
|
405
|
-
message.message !== undefined && (obj.message = message.message);
|
|
406
286
|
return obj;
|
|
407
287
|
}
|
|
408
288
|
|
|
@@ -410,24 +290,18 @@ export namespace InvalidFriendshipAction {
|
|
|
410
290
|
return InvalidFriendshipAction.fromPartial(base ?? {});
|
|
411
291
|
}
|
|
412
292
|
|
|
413
|
-
export function fromPartial<I extends Exact<DeepPartial<InvalidFriendshipAction>, I>>(
|
|
414
|
-
object: I,
|
|
415
|
-
): InvalidFriendshipAction {
|
|
293
|
+
export function fromPartial<I extends Exact<DeepPartial<InvalidFriendshipAction>, I>>(_: I): InvalidFriendshipAction {
|
|
416
294
|
const message = createBaseInvalidFriendshipAction();
|
|
417
|
-
message.message = object.message ?? undefined;
|
|
418
295
|
return message;
|
|
419
296
|
}
|
|
420
297
|
}
|
|
421
298
|
|
|
422
299
|
function createBaseInternalServerError(): InternalServerError {
|
|
423
|
-
return {
|
|
300
|
+
return {};
|
|
424
301
|
}
|
|
425
302
|
|
|
426
303
|
export namespace InternalServerError {
|
|
427
|
-
export function encode(
|
|
428
|
-
if (message.message !== undefined) {
|
|
429
|
-
writer.uint32(10).string(message.message);
|
|
430
|
-
}
|
|
304
|
+
export function encode(_: InternalServerError, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
431
305
|
return writer;
|
|
432
306
|
}
|
|
433
307
|
|
|
@@ -438,13 +312,6 @@ export namespace InternalServerError {
|
|
|
438
312
|
while (reader.pos < end) {
|
|
439
313
|
const tag = reader.uint32();
|
|
440
314
|
switch (tag >>> 3) {
|
|
441
|
-
case 1:
|
|
442
|
-
if (tag !== 10) {
|
|
443
|
-
break;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
message.message = reader.string();
|
|
447
|
-
continue;
|
|
448
315
|
}
|
|
449
316
|
if ((tag & 7) === 4 || tag === 0) {
|
|
450
317
|
break;
|
|
@@ -454,13 +321,12 @@ export namespace InternalServerError {
|
|
|
454
321
|
return message;
|
|
455
322
|
}
|
|
456
323
|
|
|
457
|
-
export function fromJSON(
|
|
458
|
-
return {
|
|
324
|
+
export function fromJSON(_: any): InternalServerError {
|
|
325
|
+
return {};
|
|
459
326
|
}
|
|
460
327
|
|
|
461
|
-
export function toJSON(
|
|
328
|
+
export function toJSON(_: InternalServerError): unknown {
|
|
462
329
|
const obj: any = {};
|
|
463
|
-
message.message !== undefined && (obj.message = message.message);
|
|
464
330
|
return obj;
|
|
465
331
|
}
|
|
466
332
|
|
|
@@ -468,29 +334,28 @@ export namespace InternalServerError {
|
|
|
468
334
|
return InternalServerError.fromPartial(base ?? {});
|
|
469
335
|
}
|
|
470
336
|
|
|
471
|
-
export function fromPartial<I extends Exact<DeepPartial<InternalServerError>, I>>(
|
|
337
|
+
export function fromPartial<I extends Exact<DeepPartial<InternalServerError>, I>>(_: I): InternalServerError {
|
|
472
338
|
const message = createBaseInternalServerError();
|
|
473
|
-
message.message = object.message ?? undefined;
|
|
474
339
|
return message;
|
|
475
340
|
}
|
|
476
341
|
}
|
|
477
342
|
|
|
478
|
-
function
|
|
479
|
-
return {
|
|
343
|
+
function createBaseUser(): User {
|
|
344
|
+
return { address: "" };
|
|
480
345
|
}
|
|
481
346
|
|
|
482
|
-
export namespace
|
|
483
|
-
export function encode(message:
|
|
484
|
-
if (message.
|
|
485
|
-
writer.uint32(10).string(message.
|
|
347
|
+
export namespace User {
|
|
348
|
+
export function encode(message: User, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
349
|
+
if (message.address !== "") {
|
|
350
|
+
writer.uint32(10).string(message.address);
|
|
486
351
|
}
|
|
487
352
|
return writer;
|
|
488
353
|
}
|
|
489
354
|
|
|
490
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
355
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): User {
|
|
491
356
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
492
357
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
493
|
-
const message =
|
|
358
|
+
const message = createBaseUser();
|
|
494
359
|
while (reader.pos < end) {
|
|
495
360
|
const tag = reader.uint32();
|
|
496
361
|
switch (tag >>> 3) {
|
|
@@ -499,7 +364,7 @@ export namespace InvalidRequest {
|
|
|
499
364
|
break;
|
|
500
365
|
}
|
|
501
366
|
|
|
502
|
-
message.
|
|
367
|
+
message.address = reader.string();
|
|
503
368
|
continue;
|
|
504
369
|
}
|
|
505
370
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -510,52 +375,62 @@ export namespace InvalidRequest {
|
|
|
510
375
|
return message;
|
|
511
376
|
}
|
|
512
377
|
|
|
513
|
-
export function fromJSON(object: any):
|
|
514
|
-
return {
|
|
378
|
+
export function fromJSON(object: any): User {
|
|
379
|
+
return { address: isSet(object.address) ? String(object.address) : "" };
|
|
515
380
|
}
|
|
516
381
|
|
|
517
|
-
export function toJSON(message:
|
|
382
|
+
export function toJSON(message: User): unknown {
|
|
518
383
|
const obj: any = {};
|
|
519
|
-
message.
|
|
384
|
+
message.address !== undefined && (obj.address = message.address);
|
|
520
385
|
return obj;
|
|
521
386
|
}
|
|
522
387
|
|
|
523
|
-
export function create<I extends Exact<DeepPartial<
|
|
524
|
-
return
|
|
388
|
+
export function create<I extends Exact<DeepPartial<User>, I>>(base?: I): User {
|
|
389
|
+
return User.fromPartial(base ?? {});
|
|
525
390
|
}
|
|
526
391
|
|
|
527
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
528
|
-
const message =
|
|
529
|
-
message.
|
|
392
|
+
export function fromPartial<I extends Exact<DeepPartial<User>, I>>(object: I): User {
|
|
393
|
+
const message = createBaseUser();
|
|
394
|
+
message.address = object.address ?? "";
|
|
530
395
|
return message;
|
|
531
396
|
}
|
|
532
397
|
}
|
|
533
398
|
|
|
534
|
-
function
|
|
535
|
-
return {
|
|
399
|
+
function createBasePagination(): Pagination {
|
|
400
|
+
return { limit: 0, offset: 0 };
|
|
536
401
|
}
|
|
537
402
|
|
|
538
|
-
export namespace
|
|
539
|
-
export function encode(message:
|
|
540
|
-
if (message.
|
|
541
|
-
writer.uint32(
|
|
403
|
+
export namespace Pagination {
|
|
404
|
+
export function encode(message: Pagination, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
405
|
+
if (message.limit !== 0) {
|
|
406
|
+
writer.uint32(8).int32(message.limit);
|
|
407
|
+
}
|
|
408
|
+
if (message.offset !== 0) {
|
|
409
|
+
writer.uint32(16).int32(message.offset);
|
|
542
410
|
}
|
|
543
411
|
return writer;
|
|
544
412
|
}
|
|
545
413
|
|
|
546
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
414
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): Pagination {
|
|
547
415
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
548
416
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
549
|
-
const message =
|
|
417
|
+
const message = createBasePagination();
|
|
550
418
|
while (reader.pos < end) {
|
|
551
419
|
const tag = reader.uint32();
|
|
552
420
|
switch (tag >>> 3) {
|
|
553
421
|
case 1:
|
|
554
|
-
if (tag !==
|
|
422
|
+
if (tag !== 8) {
|
|
555
423
|
break;
|
|
556
424
|
}
|
|
557
425
|
|
|
558
|
-
message.
|
|
426
|
+
message.limit = reader.int32();
|
|
427
|
+
continue;
|
|
428
|
+
case 2:
|
|
429
|
+
if (tag !== 16) {
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
message.offset = reader.int32();
|
|
559
434
|
continue;
|
|
560
435
|
}
|
|
561
436
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -566,43 +441,54 @@ export namespace ProfileNotFound {
|
|
|
566
441
|
return message;
|
|
567
442
|
}
|
|
568
443
|
|
|
569
|
-
export function fromJSON(object: any):
|
|
570
|
-
return {
|
|
444
|
+
export function fromJSON(object: any): Pagination {
|
|
445
|
+
return {
|
|
446
|
+
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
447
|
+
offset: isSet(object.offset) ? Number(object.offset) : 0,
|
|
448
|
+
};
|
|
571
449
|
}
|
|
572
450
|
|
|
573
|
-
export function toJSON(message:
|
|
451
|
+
export function toJSON(message: Pagination): unknown {
|
|
574
452
|
const obj: any = {};
|
|
575
|
-
message.
|
|
453
|
+
message.limit !== undefined && (obj.limit = Math.round(message.limit));
|
|
454
|
+
message.offset !== undefined && (obj.offset = Math.round(message.offset));
|
|
576
455
|
return obj;
|
|
577
456
|
}
|
|
578
457
|
|
|
579
|
-
export function create<I extends Exact<DeepPartial<
|
|
580
|
-
return
|
|
458
|
+
export function create<I extends Exact<DeepPartial<Pagination>, I>>(base?: I): Pagination {
|
|
459
|
+
return Pagination.fromPartial(base ?? {});
|
|
581
460
|
}
|
|
582
461
|
|
|
583
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
584
|
-
const message =
|
|
585
|
-
message.
|
|
462
|
+
export function fromPartial<I extends Exact<DeepPartial<Pagination>, I>>(object: I): Pagination {
|
|
463
|
+
const message = createBasePagination();
|
|
464
|
+
message.limit = object.limit ?? 0;
|
|
465
|
+
message.offset = object.offset ?? 0;
|
|
586
466
|
return message;
|
|
587
467
|
}
|
|
588
468
|
}
|
|
589
469
|
|
|
590
|
-
function
|
|
591
|
-
return {
|
|
470
|
+
function createBaseFriendshipRequestResponse(): FriendshipRequestResponse {
|
|
471
|
+
return { user: undefined, createdAt: 0, message: undefined };
|
|
592
472
|
}
|
|
593
473
|
|
|
594
|
-
export namespace
|
|
595
|
-
export function encode(message:
|
|
596
|
-
if (message.
|
|
597
|
-
writer.uint32(10).
|
|
474
|
+
export namespace FriendshipRequestResponse {
|
|
475
|
+
export function encode(message: FriendshipRequestResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
476
|
+
if (message.user !== undefined) {
|
|
477
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
478
|
+
}
|
|
479
|
+
if (message.createdAt !== 0) {
|
|
480
|
+
writer.uint32(16).int64(message.createdAt);
|
|
481
|
+
}
|
|
482
|
+
if (message.message !== undefined) {
|
|
483
|
+
writer.uint32(26).string(message.message);
|
|
598
484
|
}
|
|
599
485
|
return writer;
|
|
600
486
|
}
|
|
601
487
|
|
|
602
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
488
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipRequestResponse {
|
|
603
489
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
604
490
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
605
|
-
const message =
|
|
491
|
+
const message = createBaseFriendshipRequestResponse();
|
|
606
492
|
while (reader.pos < end) {
|
|
607
493
|
const tag = reader.uint32();
|
|
608
494
|
switch (tag >>> 3) {
|
|
@@ -611,7 +497,21 @@ export namespace User {
|
|
|
611
497
|
break;
|
|
612
498
|
}
|
|
613
499
|
|
|
614
|
-
message.
|
|
500
|
+
message.user = User.decode(reader, reader.uint32());
|
|
501
|
+
continue;
|
|
502
|
+
case 2:
|
|
503
|
+
if (tag !== 16) {
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
message.createdAt = longToNumber(reader.int64() as Long);
|
|
508
|
+
continue;
|
|
509
|
+
case 3:
|
|
510
|
+
if (tag !== 26) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
message.message = reader.string();
|
|
615
515
|
continue;
|
|
616
516
|
}
|
|
617
517
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -622,52 +522,55 @@ export namespace User {
|
|
|
622
522
|
return message;
|
|
623
523
|
}
|
|
624
524
|
|
|
625
|
-
export function fromJSON(object: any):
|
|
626
|
-
return {
|
|
525
|
+
export function fromJSON(object: any): FriendshipRequestResponse {
|
|
526
|
+
return {
|
|
527
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
528
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
529
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
530
|
+
};
|
|
627
531
|
}
|
|
628
532
|
|
|
629
|
-
export function toJSON(message:
|
|
533
|
+
export function toJSON(message: FriendshipRequestResponse): unknown {
|
|
630
534
|
const obj: any = {};
|
|
631
|
-
message.
|
|
535
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
536
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
537
|
+
message.message !== undefined && (obj.message = message.message);
|
|
632
538
|
return obj;
|
|
633
539
|
}
|
|
634
540
|
|
|
635
|
-
export function create<I extends Exact<DeepPartial<
|
|
636
|
-
|
|
541
|
+
export function create<I extends Exact<DeepPartial<FriendshipRequestResponse>, I>>(
|
|
542
|
+
base?: I,
|
|
543
|
+
): FriendshipRequestResponse {
|
|
544
|
+
return FriendshipRequestResponse.fromPartial(base ?? {});
|
|
637
545
|
}
|
|
638
546
|
|
|
639
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
640
|
-
|
|
641
|
-
|
|
547
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipRequestResponse>, I>>(
|
|
548
|
+
object: I,
|
|
549
|
+
): FriendshipRequestResponse {
|
|
550
|
+
const message = createBaseFriendshipRequestResponse();
|
|
551
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
552
|
+
message.createdAt = object.createdAt ?? 0;
|
|
553
|
+
message.message = object.message ?? undefined;
|
|
642
554
|
return message;
|
|
643
555
|
}
|
|
644
556
|
}
|
|
645
557
|
|
|
646
|
-
function
|
|
647
|
-
return {
|
|
558
|
+
function createBaseFriendshipRequests(): FriendshipRequests {
|
|
559
|
+
return { requests: [] };
|
|
648
560
|
}
|
|
649
561
|
|
|
650
|
-
export namespace
|
|
651
|
-
export function encode(message:
|
|
652
|
-
|
|
653
|
-
writer.uint32(10).
|
|
654
|
-
}
|
|
655
|
-
if (message.name !== "") {
|
|
656
|
-
writer.uint32(18).string(message.name);
|
|
657
|
-
}
|
|
658
|
-
if (message.hasClaimedName === true) {
|
|
659
|
-
writer.uint32(24).bool(message.hasClaimedName);
|
|
660
|
-
}
|
|
661
|
-
if (message.profilePictureUrl !== "") {
|
|
662
|
-
writer.uint32(34).string(message.profilePictureUrl);
|
|
562
|
+
export namespace FriendshipRequests {
|
|
563
|
+
export function encode(message: FriendshipRequests, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
564
|
+
for (const v of message.requests) {
|
|
565
|
+
FriendshipRequestResponse.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
663
566
|
}
|
|
664
567
|
return writer;
|
|
665
568
|
}
|
|
666
569
|
|
|
667
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
570
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipRequests {
|
|
668
571
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
669
572
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
670
|
-
const message =
|
|
573
|
+
const message = createBaseFriendshipRequests();
|
|
671
574
|
while (reader.pos < end) {
|
|
672
575
|
const tag = reader.uint32();
|
|
673
576
|
switch (tag >>> 3) {
|
|
@@ -676,28 +579,7 @@ export namespace FriendProfile {
|
|
|
676
579
|
break;
|
|
677
580
|
}
|
|
678
581
|
|
|
679
|
-
message.
|
|
680
|
-
continue;
|
|
681
|
-
case 2:
|
|
682
|
-
if (tag !== 18) {
|
|
683
|
-
break;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
message.name = reader.string();
|
|
687
|
-
continue;
|
|
688
|
-
case 3:
|
|
689
|
-
if (tag !== 24) {
|
|
690
|
-
break;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
message.hasClaimedName = reader.bool();
|
|
694
|
-
continue;
|
|
695
|
-
case 4:
|
|
696
|
-
if (tag !== 34) {
|
|
697
|
-
break;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
message.profilePictureUrl = reader.string();
|
|
582
|
+
message.requests.push(FriendshipRequestResponse.decode(reader, reader.uint32()));
|
|
701
583
|
continue;
|
|
702
584
|
}
|
|
703
585
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -708,66 +590,54 @@ export namespace FriendProfile {
|
|
|
708
590
|
return message;
|
|
709
591
|
}
|
|
710
592
|
|
|
711
|
-
export function fromJSON(object: any):
|
|
593
|
+
export function fromJSON(object: any): FriendshipRequests {
|
|
712
594
|
return {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
profilePictureUrl: isSet(object.profilePictureUrl) ? String(object.profilePictureUrl) : "",
|
|
595
|
+
requests: Array.isArray(object?.requests)
|
|
596
|
+
? object.requests.map((e: any) => FriendshipRequestResponse.fromJSON(e))
|
|
597
|
+
: [],
|
|
717
598
|
};
|
|
718
599
|
}
|
|
719
600
|
|
|
720
|
-
export function toJSON(message:
|
|
601
|
+
export function toJSON(message: FriendshipRequests): unknown {
|
|
721
602
|
const obj: any = {};
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
603
|
+
if (message.requests) {
|
|
604
|
+
obj.requests = message.requests.map((e) => e ? FriendshipRequestResponse.toJSON(e) : undefined);
|
|
605
|
+
} else {
|
|
606
|
+
obj.requests = [];
|
|
607
|
+
}
|
|
726
608
|
return obj;
|
|
727
609
|
}
|
|
728
610
|
|
|
729
|
-
export function create<I extends Exact<DeepPartial<
|
|
730
|
-
return
|
|
611
|
+
export function create<I extends Exact<DeepPartial<FriendshipRequests>, I>>(base?: I): FriendshipRequests {
|
|
612
|
+
return FriendshipRequests.fromPartial(base ?? {});
|
|
731
613
|
}
|
|
732
614
|
|
|
733
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
734
|
-
const message =
|
|
735
|
-
message.
|
|
736
|
-
message
|
|
737
|
-
message.hasClaimedName = object.hasClaimedName ?? false;
|
|
738
|
-
message.profilePictureUrl = object.profilePictureUrl ?? "";
|
|
739
|
-
return message;
|
|
615
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipRequests>, I>>(object: I): FriendshipRequests {
|
|
616
|
+
const message = createBaseFriendshipRequests();
|
|
617
|
+
message.requests = object.requests?.map((e) => FriendshipRequestResponse.fromPartial(e)) || [];
|
|
618
|
+
return message;
|
|
740
619
|
}
|
|
741
620
|
}
|
|
742
621
|
|
|
743
|
-
function
|
|
744
|
-
return {
|
|
622
|
+
function createBaseGetFriendsPayload(): GetFriendsPayload {
|
|
623
|
+
return { pagination: undefined, status: undefined };
|
|
745
624
|
}
|
|
746
625
|
|
|
747
|
-
export namespace
|
|
748
|
-
export function encode(message:
|
|
749
|
-
if (message.
|
|
750
|
-
writer.uint32(10).
|
|
751
|
-
}
|
|
752
|
-
if (message.name !== "") {
|
|
753
|
-
writer.uint32(18).string(message.name);
|
|
754
|
-
}
|
|
755
|
-
if (message.hasClaimedName === true) {
|
|
756
|
-
writer.uint32(24).bool(message.hasClaimedName);
|
|
757
|
-
}
|
|
758
|
-
if (message.profilePictureUrl !== "") {
|
|
759
|
-
writer.uint32(34).string(message.profilePictureUrl);
|
|
626
|
+
export namespace GetFriendsPayload {
|
|
627
|
+
export function encode(message: GetFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
628
|
+
if (message.pagination !== undefined) {
|
|
629
|
+
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
760
630
|
}
|
|
761
|
-
if (message.
|
|
762
|
-
writer.uint32(
|
|
631
|
+
if (message.status !== undefined) {
|
|
632
|
+
writer.uint32(16).int32(message.status);
|
|
763
633
|
}
|
|
764
634
|
return writer;
|
|
765
635
|
}
|
|
766
636
|
|
|
767
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
637
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendsPayload {
|
|
768
638
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
769
639
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
770
|
-
const message =
|
|
640
|
+
const message = createBaseGetFriendsPayload();
|
|
771
641
|
while (reader.pos < end) {
|
|
772
642
|
const tag = reader.uint32();
|
|
773
643
|
switch (tag >>> 3) {
|
|
@@ -776,35 +646,14 @@ export namespace BlockedUserProfile {
|
|
|
776
646
|
break;
|
|
777
647
|
}
|
|
778
648
|
|
|
779
|
-
message.
|
|
649
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
780
650
|
continue;
|
|
781
651
|
case 2:
|
|
782
|
-
if (tag !==
|
|
783
|
-
break;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
message.name = reader.string();
|
|
787
|
-
continue;
|
|
788
|
-
case 3:
|
|
789
|
-
if (tag !== 24) {
|
|
790
|
-
break;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
message.hasClaimedName = reader.bool();
|
|
794
|
-
continue;
|
|
795
|
-
case 4:
|
|
796
|
-
if (tag !== 34) {
|
|
797
|
-
break;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
message.profilePictureUrl = reader.string();
|
|
801
|
-
continue;
|
|
802
|
-
case 5:
|
|
803
|
-
if (tag !== 40) {
|
|
652
|
+
if (tag !== 16) {
|
|
804
653
|
break;
|
|
805
654
|
}
|
|
806
655
|
|
|
807
|
-
message.
|
|
656
|
+
message.status = reader.int32() as any;
|
|
808
657
|
continue;
|
|
809
658
|
}
|
|
810
659
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -815,76 +664,61 @@ export namespace BlockedUserProfile {
|
|
|
815
664
|
return message;
|
|
816
665
|
}
|
|
817
666
|
|
|
818
|
-
export function fromJSON(object: any):
|
|
667
|
+
export function fromJSON(object: any): GetFriendsPayload {
|
|
819
668
|
return {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
hasClaimedName: isSet(object.hasClaimedName) ? Boolean(object.hasClaimedName) : false,
|
|
823
|
-
profilePictureUrl: isSet(object.profilePictureUrl) ? String(object.profilePictureUrl) : "",
|
|
824
|
-
blockedAt: isSet(object.blockedAt) ? Number(object.blockedAt) : undefined,
|
|
669
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
670
|
+
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : undefined,
|
|
825
671
|
};
|
|
826
672
|
}
|
|
827
673
|
|
|
828
|
-
export function toJSON(message:
|
|
674
|
+
export function toJSON(message: GetFriendsPayload): unknown {
|
|
829
675
|
const obj: any = {};
|
|
830
|
-
message.
|
|
831
|
-
|
|
832
|
-
message.
|
|
833
|
-
|
|
834
|
-
message.blockedAt !== undefined && (obj.blockedAt = Math.round(message.blockedAt));
|
|
676
|
+
message.pagination !== undefined &&
|
|
677
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
678
|
+
message.status !== undefined &&
|
|
679
|
+
(obj.status = message.status !== undefined ? connectivityStatusToJSON(message.status) : undefined);
|
|
835
680
|
return obj;
|
|
836
681
|
}
|
|
837
682
|
|
|
838
|
-
export function create<I extends Exact<DeepPartial<
|
|
839
|
-
return
|
|
683
|
+
export function create<I extends Exact<DeepPartial<GetFriendsPayload>, I>>(base?: I): GetFriendsPayload {
|
|
684
|
+
return GetFriendsPayload.fromPartial(base ?? {});
|
|
840
685
|
}
|
|
841
686
|
|
|
842
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
843
|
-
const message =
|
|
844
|
-
message.
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
message.
|
|
848
|
-
message.blockedAt = object.blockedAt ?? undefined;
|
|
687
|
+
export function fromPartial<I extends Exact<DeepPartial<GetFriendsPayload>, I>>(object: I): GetFriendsPayload {
|
|
688
|
+
const message = createBaseGetFriendsPayload();
|
|
689
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
690
|
+
? Pagination.fromPartial(object.pagination)
|
|
691
|
+
: undefined;
|
|
692
|
+
message.status = object.status ?? undefined;
|
|
849
693
|
return message;
|
|
850
694
|
}
|
|
851
695
|
}
|
|
852
696
|
|
|
853
|
-
function
|
|
854
|
-
return {
|
|
697
|
+
function createBaseGetFriendshipRequestsPayload(): GetFriendshipRequestsPayload {
|
|
698
|
+
return { pagination: undefined };
|
|
855
699
|
}
|
|
856
700
|
|
|
857
|
-
export namespace
|
|
858
|
-
export function encode(message:
|
|
859
|
-
if (message.
|
|
860
|
-
writer.uint32(
|
|
861
|
-
}
|
|
862
|
-
if (message.offset !== 0) {
|
|
863
|
-
writer.uint32(16).int32(message.offset);
|
|
701
|
+
export namespace GetFriendshipRequestsPayload {
|
|
702
|
+
export function encode(message: GetFriendshipRequestsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
703
|
+
if (message.pagination !== undefined) {
|
|
704
|
+
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
864
705
|
}
|
|
865
706
|
return writer;
|
|
866
707
|
}
|
|
867
708
|
|
|
868
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
709
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipRequestsPayload {
|
|
869
710
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
870
711
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
871
|
-
const message =
|
|
712
|
+
const message = createBaseGetFriendshipRequestsPayload();
|
|
872
713
|
while (reader.pos < end) {
|
|
873
714
|
const tag = reader.uint32();
|
|
874
715
|
switch (tag >>> 3) {
|
|
875
716
|
case 1:
|
|
876
|
-
if (tag !==
|
|
877
|
-
break;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
message.limit = reader.int32();
|
|
881
|
-
continue;
|
|
882
|
-
case 2:
|
|
883
|
-
if (tag !== 16) {
|
|
717
|
+
if (tag !== 10) {
|
|
884
718
|
break;
|
|
885
719
|
}
|
|
886
720
|
|
|
887
|
-
message.
|
|
721
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
888
722
|
continue;
|
|
889
723
|
}
|
|
890
724
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -895,57 +729,64 @@ export namespace Pagination {
|
|
|
895
729
|
return message;
|
|
896
730
|
}
|
|
897
731
|
|
|
898
|
-
export function fromJSON(object: any):
|
|
899
|
-
return {
|
|
900
|
-
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
901
|
-
offset: isSet(object.offset) ? Number(object.offset) : 0,
|
|
902
|
-
};
|
|
732
|
+
export function fromJSON(object: any): GetFriendshipRequestsPayload {
|
|
733
|
+
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
903
734
|
}
|
|
904
735
|
|
|
905
|
-
export function toJSON(message:
|
|
736
|
+
export function toJSON(message: GetFriendshipRequestsPayload): unknown {
|
|
906
737
|
const obj: any = {};
|
|
907
|
-
message.
|
|
908
|
-
|
|
738
|
+
message.pagination !== undefined &&
|
|
739
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
909
740
|
return obj;
|
|
910
741
|
}
|
|
911
742
|
|
|
912
|
-
export function create<I extends Exact<DeepPartial<
|
|
913
|
-
|
|
743
|
+
export function create<I extends Exact<DeepPartial<GetFriendshipRequestsPayload>, I>>(
|
|
744
|
+
base?: I,
|
|
745
|
+
): GetFriendshipRequestsPayload {
|
|
746
|
+
return GetFriendshipRequestsPayload.fromPartial(base ?? {});
|
|
914
747
|
}
|
|
915
748
|
|
|
916
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
message
|
|
749
|
+
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipRequestsPayload>, I>>(
|
|
750
|
+
object: I,
|
|
751
|
+
): GetFriendshipRequestsPayload {
|
|
752
|
+
const message = createBaseGetFriendshipRequestsPayload();
|
|
753
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
754
|
+
? Pagination.fromPartial(object.pagination)
|
|
755
|
+
: undefined;
|
|
920
756
|
return message;
|
|
921
757
|
}
|
|
922
758
|
}
|
|
923
759
|
|
|
924
|
-
function
|
|
925
|
-
return {
|
|
760
|
+
function createBaseUpsertFriendshipPayload(): UpsertFriendshipPayload {
|
|
761
|
+
return { action: undefined };
|
|
926
762
|
}
|
|
927
763
|
|
|
928
|
-
export namespace
|
|
929
|
-
export function encode(message:
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
764
|
+
export namespace UpsertFriendshipPayload {
|
|
765
|
+
export function encode(message: UpsertFriendshipPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
766
|
+
switch (message.action?.$case) {
|
|
767
|
+
case "request":
|
|
768
|
+
UpsertFriendshipPayload_RequestPayload.encode(message.action.request, writer.uint32(10).fork()).ldelim();
|
|
769
|
+
break;
|
|
770
|
+
case "accept":
|
|
771
|
+
UpsertFriendshipPayload_AcceptPayload.encode(message.action.accept, writer.uint32(18).fork()).ldelim();
|
|
772
|
+
break;
|
|
773
|
+
case "reject":
|
|
774
|
+
UpsertFriendshipPayload_RejectPayload.encode(message.action.reject, writer.uint32(34).fork()).ldelim();
|
|
775
|
+
break;
|
|
776
|
+
case "delete":
|
|
777
|
+
UpsertFriendshipPayload_DeletePayload.encode(message.action.delete, writer.uint32(42).fork()).ldelim();
|
|
778
|
+
break;
|
|
779
|
+
case "cancel":
|
|
780
|
+
UpsertFriendshipPayload_CancelPayload.encode(message.action.cancel, writer.uint32(50).fork()).ldelim();
|
|
781
|
+
break;
|
|
941
782
|
}
|
|
942
783
|
return writer;
|
|
943
784
|
}
|
|
944
785
|
|
|
945
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
786
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload {
|
|
946
787
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
947
788
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
948
|
-
const message =
|
|
789
|
+
const message = createBaseUpsertFriendshipPayload();
|
|
949
790
|
while (reader.pos < end) {
|
|
950
791
|
const tag = reader.uint32();
|
|
951
792
|
switch (tag >>> 3) {
|
|
@@ -954,28 +795,50 @@ export namespace FriendshipRequestResponse {
|
|
|
954
795
|
break;
|
|
955
796
|
}
|
|
956
797
|
|
|
957
|
-
message.
|
|
798
|
+
message.action = {
|
|
799
|
+
$case: "request",
|
|
800
|
+
request: UpsertFriendshipPayload_RequestPayload.decode(reader, reader.uint32()),
|
|
801
|
+
};
|
|
958
802
|
continue;
|
|
959
803
|
case 2:
|
|
960
|
-
if (tag !==
|
|
804
|
+
if (tag !== 18) {
|
|
961
805
|
break;
|
|
962
806
|
}
|
|
963
807
|
|
|
964
|
-
message.
|
|
808
|
+
message.action = {
|
|
809
|
+
$case: "accept",
|
|
810
|
+
accept: UpsertFriendshipPayload_AcceptPayload.decode(reader, reader.uint32()),
|
|
811
|
+
};
|
|
965
812
|
continue;
|
|
966
|
-
case
|
|
967
|
-
if (tag !==
|
|
813
|
+
case 4:
|
|
814
|
+
if (tag !== 34) {
|
|
968
815
|
break;
|
|
969
816
|
}
|
|
970
817
|
|
|
971
|
-
message.
|
|
818
|
+
message.action = {
|
|
819
|
+
$case: "reject",
|
|
820
|
+
reject: UpsertFriendshipPayload_RejectPayload.decode(reader, reader.uint32()),
|
|
821
|
+
};
|
|
972
822
|
continue;
|
|
973
|
-
case
|
|
974
|
-
if (tag !==
|
|
823
|
+
case 5:
|
|
824
|
+
if (tag !== 42) {
|
|
975
825
|
break;
|
|
976
826
|
}
|
|
977
827
|
|
|
978
|
-
message.
|
|
828
|
+
message.action = {
|
|
829
|
+
$case: "delete",
|
|
830
|
+
delete: UpsertFriendshipPayload_DeletePayload.decode(reader, reader.uint32()),
|
|
831
|
+
};
|
|
832
|
+
continue;
|
|
833
|
+
case 6:
|
|
834
|
+
if (tag !== 50) {
|
|
835
|
+
break;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
message.action = {
|
|
839
|
+
$case: "cancel",
|
|
840
|
+
cancel: UpsertFriendshipPayload_CancelPayload.decode(reader, reader.uint32()),
|
|
841
|
+
};
|
|
979
842
|
continue;
|
|
980
843
|
}
|
|
981
844
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -986,1264 +849,111 @@ export namespace FriendshipRequestResponse {
|
|
|
986
849
|
return message;
|
|
987
850
|
}
|
|
988
851
|
|
|
989
|
-
export function fromJSON(object: any):
|
|
852
|
+
export function fromJSON(object: any): UpsertFriendshipPayload {
|
|
990
853
|
return {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
854
|
+
action: isSet(object.request)
|
|
855
|
+
? { $case: "request", request: UpsertFriendshipPayload_RequestPayload.fromJSON(object.request) }
|
|
856
|
+
: isSet(object.accept)
|
|
857
|
+
? { $case: "accept", accept: UpsertFriendshipPayload_AcceptPayload.fromJSON(object.accept) }
|
|
858
|
+
: isSet(object.reject)
|
|
859
|
+
? { $case: "reject", reject: UpsertFriendshipPayload_RejectPayload.fromJSON(object.reject) }
|
|
860
|
+
: isSet(object.delete)
|
|
861
|
+
? { $case: "delete", delete: UpsertFriendshipPayload_DeletePayload.fromJSON(object.delete) }
|
|
862
|
+
: isSet(object.cancel)
|
|
863
|
+
? { $case: "cancel", cancel: UpsertFriendshipPayload_CancelPayload.fromJSON(object.cancel) }
|
|
864
|
+
: undefined,
|
|
995
865
|
};
|
|
996
866
|
}
|
|
997
867
|
|
|
998
|
-
export function toJSON(message:
|
|
868
|
+
export function toJSON(message: UpsertFriendshipPayload): unknown {
|
|
999
869
|
const obj: any = {};
|
|
1000
|
-
message.
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
870
|
+
message.action?.$case === "request" &&
|
|
871
|
+
(obj.request = message.action?.request
|
|
872
|
+
? UpsertFriendshipPayload_RequestPayload.toJSON(message.action?.request)
|
|
873
|
+
: undefined);
|
|
874
|
+
message.action?.$case === "accept" &&
|
|
875
|
+
(obj.accept = message.action?.accept
|
|
876
|
+
? UpsertFriendshipPayload_AcceptPayload.toJSON(message.action?.accept)
|
|
877
|
+
: undefined);
|
|
878
|
+
message.action?.$case === "reject" &&
|
|
879
|
+
(obj.reject = message.action?.reject
|
|
880
|
+
? UpsertFriendshipPayload_RejectPayload.toJSON(message.action?.reject)
|
|
881
|
+
: undefined);
|
|
882
|
+
message.action?.$case === "delete" &&
|
|
883
|
+
(obj.delete = message.action?.delete
|
|
884
|
+
? UpsertFriendshipPayload_DeletePayload.toJSON(message.action?.delete)
|
|
885
|
+
: undefined);
|
|
886
|
+
message.action?.$case === "cancel" &&
|
|
887
|
+
(obj.cancel = message.action?.cancel
|
|
888
|
+
? UpsertFriendshipPayload_CancelPayload.toJSON(message.action?.cancel)
|
|
889
|
+
: undefined);
|
|
1004
890
|
return obj;
|
|
1005
891
|
}
|
|
1006
892
|
|
|
1007
|
-
export function create<I extends Exact<DeepPartial<
|
|
1008
|
-
base
|
|
1009
|
-
): FriendshipRequestResponse {
|
|
1010
|
-
return FriendshipRequestResponse.fromPartial(base ?? {});
|
|
893
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload>, I>>(base?: I): UpsertFriendshipPayload {
|
|
894
|
+
return UpsertFriendshipPayload.fromPartial(base ?? {});
|
|
1011
895
|
}
|
|
1012
896
|
|
|
1013
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
897
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload>, I>>(
|
|
1014
898
|
object: I,
|
|
1015
|
-
):
|
|
1016
|
-
const message =
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
message.message = object.message ?? undefined;
|
|
1022
|
-
message.id = object.id ?? "";
|
|
1023
|
-
return message;
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
function createBaseFriendshipRequests(): FriendshipRequests {
|
|
1028
|
-
return { requests: [] };
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
export namespace FriendshipRequests {
|
|
1032
|
-
export function encode(message: FriendshipRequests, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1033
|
-
for (const v of message.requests) {
|
|
1034
|
-
FriendshipRequestResponse.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1035
|
-
}
|
|
1036
|
-
return writer;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipRequests {
|
|
1040
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1041
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1042
|
-
const message = createBaseFriendshipRequests();
|
|
1043
|
-
while (reader.pos < end) {
|
|
1044
|
-
const tag = reader.uint32();
|
|
1045
|
-
switch (tag >>> 3) {
|
|
1046
|
-
case 1:
|
|
1047
|
-
if (tag !== 10) {
|
|
1048
|
-
break;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
message.requests.push(FriendshipRequestResponse.decode(reader, reader.uint32()));
|
|
1052
|
-
continue;
|
|
1053
|
-
}
|
|
1054
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1055
|
-
break;
|
|
1056
|
-
}
|
|
1057
|
-
reader.skipType(tag & 7);
|
|
1058
|
-
}
|
|
1059
|
-
return message;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
export function fromJSON(object: any): FriendshipRequests {
|
|
1063
|
-
return {
|
|
1064
|
-
requests: Array.isArray(object?.requests)
|
|
1065
|
-
? object.requests.map((e: any) => FriendshipRequestResponse.fromJSON(e))
|
|
1066
|
-
: [],
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
export function toJSON(message: FriendshipRequests): unknown {
|
|
1071
|
-
const obj: any = {};
|
|
1072
|
-
if (message.requests) {
|
|
1073
|
-
obj.requests = message.requests.map((e) => e ? FriendshipRequestResponse.toJSON(e) : undefined);
|
|
1074
|
-
} else {
|
|
1075
|
-
obj.requests = [];
|
|
1076
|
-
}
|
|
1077
|
-
return obj;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
export function create<I extends Exact<DeepPartial<FriendshipRequests>, I>>(base?: I): FriendshipRequests {
|
|
1081
|
-
return FriendshipRequests.fromPartial(base ?? {});
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipRequests>, I>>(object: I): FriendshipRequests {
|
|
1085
|
-
const message = createBaseFriendshipRequests();
|
|
1086
|
-
message.requests = object.requests?.map((e) => FriendshipRequestResponse.fromPartial(e)) || [];
|
|
1087
|
-
return message;
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
function createBaseGetFriendsPayload(): GetFriendsPayload {
|
|
1092
|
-
return { pagination: undefined };
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
export namespace GetFriendsPayload {
|
|
1096
|
-
export function encode(message: GetFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1097
|
-
if (message.pagination !== undefined) {
|
|
1098
|
-
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1099
|
-
}
|
|
1100
|
-
return writer;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendsPayload {
|
|
1104
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1105
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1106
|
-
const message = createBaseGetFriendsPayload();
|
|
1107
|
-
while (reader.pos < end) {
|
|
1108
|
-
const tag = reader.uint32();
|
|
1109
|
-
switch (tag >>> 3) {
|
|
1110
|
-
case 1:
|
|
1111
|
-
if (tag !== 10) {
|
|
1112
|
-
break;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
1116
|
-
continue;
|
|
1117
|
-
}
|
|
1118
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1119
|
-
break;
|
|
1120
|
-
}
|
|
1121
|
-
reader.skipType(tag & 7);
|
|
1122
|
-
}
|
|
1123
|
-
return message;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
export function fromJSON(object: any): GetFriendsPayload {
|
|
1127
|
-
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
export function toJSON(message: GetFriendsPayload): unknown {
|
|
1131
|
-
const obj: any = {};
|
|
1132
|
-
message.pagination !== undefined &&
|
|
1133
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
1134
|
-
return obj;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
export function create<I extends Exact<DeepPartial<GetFriendsPayload>, I>>(base?: I): GetFriendsPayload {
|
|
1138
|
-
return GetFriendsPayload.fromPartial(base ?? {});
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendsPayload>, I>>(object: I): GetFriendsPayload {
|
|
1142
|
-
const message = createBaseGetFriendsPayload();
|
|
1143
|
-
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1144
|
-
? Pagination.fromPartial(object.pagination)
|
|
1145
|
-
: undefined;
|
|
1146
|
-
return message;
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
function createBaseGetFriendshipRequestsPayload(): GetFriendshipRequestsPayload {
|
|
1151
|
-
return { pagination: undefined };
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
export namespace GetFriendshipRequestsPayload {
|
|
1155
|
-
export function encode(message: GetFriendshipRequestsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1156
|
-
if (message.pagination !== undefined) {
|
|
1157
|
-
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1158
|
-
}
|
|
1159
|
-
return writer;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipRequestsPayload {
|
|
1163
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1164
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1165
|
-
const message = createBaseGetFriendshipRequestsPayload();
|
|
1166
|
-
while (reader.pos < end) {
|
|
1167
|
-
const tag = reader.uint32();
|
|
1168
|
-
switch (tag >>> 3) {
|
|
1169
|
-
case 1:
|
|
1170
|
-
if (tag !== 10) {
|
|
1171
|
-
break;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
1175
|
-
continue;
|
|
1176
|
-
}
|
|
1177
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1178
|
-
break;
|
|
1179
|
-
}
|
|
1180
|
-
reader.skipType(tag & 7);
|
|
1181
|
-
}
|
|
1182
|
-
return message;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
export function fromJSON(object: any): GetFriendshipRequestsPayload {
|
|
1186
|
-
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
export function toJSON(message: GetFriendshipRequestsPayload): unknown {
|
|
1190
|
-
const obj: any = {};
|
|
1191
|
-
message.pagination !== undefined &&
|
|
1192
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
1193
|
-
return obj;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
export function create<I extends Exact<DeepPartial<GetFriendshipRequestsPayload>, I>>(
|
|
1197
|
-
base?: I,
|
|
1198
|
-
): GetFriendshipRequestsPayload {
|
|
1199
|
-
return GetFriendshipRequestsPayload.fromPartial(base ?? {});
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipRequestsPayload>, I>>(
|
|
1203
|
-
object: I,
|
|
1204
|
-
): GetFriendshipRequestsPayload {
|
|
1205
|
-
const message = createBaseGetFriendshipRequestsPayload();
|
|
1206
|
-
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1207
|
-
? Pagination.fromPartial(object.pagination)
|
|
1208
|
-
: undefined;
|
|
1209
|
-
return message;
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
function createBaseUpsertFriendshipPayload(): UpsertFriendshipPayload {
|
|
1214
|
-
return { action: undefined };
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
export namespace UpsertFriendshipPayload {
|
|
1218
|
-
export function encode(message: UpsertFriendshipPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1219
|
-
switch (message.action?.$case) {
|
|
1220
|
-
case "request":
|
|
1221
|
-
UpsertFriendshipPayload_RequestPayload.encode(message.action.request, writer.uint32(10).fork()).ldelim();
|
|
1222
|
-
break;
|
|
1223
|
-
case "accept":
|
|
1224
|
-
UpsertFriendshipPayload_AcceptPayload.encode(message.action.accept, writer.uint32(18).fork()).ldelim();
|
|
1225
|
-
break;
|
|
1226
|
-
case "reject":
|
|
1227
|
-
UpsertFriendshipPayload_RejectPayload.encode(message.action.reject, writer.uint32(34).fork()).ldelim();
|
|
1228
|
-
break;
|
|
1229
|
-
case "delete":
|
|
1230
|
-
UpsertFriendshipPayload_DeletePayload.encode(message.action.delete, writer.uint32(42).fork()).ldelim();
|
|
1231
|
-
break;
|
|
1232
|
-
case "cancel":
|
|
1233
|
-
UpsertFriendshipPayload_CancelPayload.encode(message.action.cancel, writer.uint32(50).fork()).ldelim();
|
|
1234
|
-
break;
|
|
1235
|
-
}
|
|
1236
|
-
return writer;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload {
|
|
1240
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1241
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1242
|
-
const message = createBaseUpsertFriendshipPayload();
|
|
1243
|
-
while (reader.pos < end) {
|
|
1244
|
-
const tag = reader.uint32();
|
|
1245
|
-
switch (tag >>> 3) {
|
|
1246
|
-
case 1:
|
|
1247
|
-
if (tag !== 10) {
|
|
1248
|
-
break;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
message.action = {
|
|
1252
|
-
$case: "request",
|
|
1253
|
-
request: UpsertFriendshipPayload_RequestPayload.decode(reader, reader.uint32()),
|
|
1254
|
-
};
|
|
1255
|
-
continue;
|
|
1256
|
-
case 2:
|
|
1257
|
-
if (tag !== 18) {
|
|
1258
|
-
break;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
message.action = {
|
|
1262
|
-
$case: "accept",
|
|
1263
|
-
accept: UpsertFriendshipPayload_AcceptPayload.decode(reader, reader.uint32()),
|
|
1264
|
-
};
|
|
1265
|
-
continue;
|
|
1266
|
-
case 4:
|
|
1267
|
-
if (tag !== 34) {
|
|
1268
|
-
break;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
message.action = {
|
|
1272
|
-
$case: "reject",
|
|
1273
|
-
reject: UpsertFriendshipPayload_RejectPayload.decode(reader, reader.uint32()),
|
|
1274
|
-
};
|
|
1275
|
-
continue;
|
|
1276
|
-
case 5:
|
|
1277
|
-
if (tag !== 42) {
|
|
1278
|
-
break;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
message.action = {
|
|
1282
|
-
$case: "delete",
|
|
1283
|
-
delete: UpsertFriendshipPayload_DeletePayload.decode(reader, reader.uint32()),
|
|
1284
|
-
};
|
|
1285
|
-
continue;
|
|
1286
|
-
case 6:
|
|
1287
|
-
if (tag !== 50) {
|
|
1288
|
-
break;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
message.action = {
|
|
1292
|
-
$case: "cancel",
|
|
1293
|
-
cancel: UpsertFriendshipPayload_CancelPayload.decode(reader, reader.uint32()),
|
|
1294
|
-
};
|
|
1295
|
-
continue;
|
|
1296
|
-
}
|
|
1297
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1298
|
-
break;
|
|
1299
|
-
}
|
|
1300
|
-
reader.skipType(tag & 7);
|
|
1301
|
-
}
|
|
1302
|
-
return message;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
export function fromJSON(object: any): UpsertFriendshipPayload {
|
|
1306
|
-
return {
|
|
1307
|
-
action: isSet(object.request)
|
|
1308
|
-
? { $case: "request", request: UpsertFriendshipPayload_RequestPayload.fromJSON(object.request) }
|
|
1309
|
-
: isSet(object.accept)
|
|
1310
|
-
? { $case: "accept", accept: UpsertFriendshipPayload_AcceptPayload.fromJSON(object.accept) }
|
|
1311
|
-
: isSet(object.reject)
|
|
1312
|
-
? { $case: "reject", reject: UpsertFriendshipPayload_RejectPayload.fromJSON(object.reject) }
|
|
1313
|
-
: isSet(object.delete)
|
|
1314
|
-
? { $case: "delete", delete: UpsertFriendshipPayload_DeletePayload.fromJSON(object.delete) }
|
|
1315
|
-
: isSet(object.cancel)
|
|
1316
|
-
? { $case: "cancel", cancel: UpsertFriendshipPayload_CancelPayload.fromJSON(object.cancel) }
|
|
1317
|
-
: undefined,
|
|
1318
|
-
};
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
export function toJSON(message: UpsertFriendshipPayload): unknown {
|
|
1322
|
-
const obj: any = {};
|
|
1323
|
-
message.action?.$case === "request" &&
|
|
1324
|
-
(obj.request = message.action?.request
|
|
1325
|
-
? UpsertFriendshipPayload_RequestPayload.toJSON(message.action?.request)
|
|
1326
|
-
: undefined);
|
|
1327
|
-
message.action?.$case === "accept" &&
|
|
1328
|
-
(obj.accept = message.action?.accept
|
|
1329
|
-
? UpsertFriendshipPayload_AcceptPayload.toJSON(message.action?.accept)
|
|
1330
|
-
: undefined);
|
|
1331
|
-
message.action?.$case === "reject" &&
|
|
1332
|
-
(obj.reject = message.action?.reject
|
|
1333
|
-
? UpsertFriendshipPayload_RejectPayload.toJSON(message.action?.reject)
|
|
1334
|
-
: undefined);
|
|
1335
|
-
message.action?.$case === "delete" &&
|
|
1336
|
-
(obj.delete = message.action?.delete
|
|
1337
|
-
? UpsertFriendshipPayload_DeletePayload.toJSON(message.action?.delete)
|
|
1338
|
-
: undefined);
|
|
1339
|
-
message.action?.$case === "cancel" &&
|
|
1340
|
-
(obj.cancel = message.action?.cancel
|
|
1341
|
-
? UpsertFriendshipPayload_CancelPayload.toJSON(message.action?.cancel)
|
|
1342
|
-
: undefined);
|
|
1343
|
-
return obj;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload>, I>>(base?: I): UpsertFriendshipPayload {
|
|
1347
|
-
return UpsertFriendshipPayload.fromPartial(base ?? {});
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload>, I>>(
|
|
1351
|
-
object: I,
|
|
1352
|
-
): UpsertFriendshipPayload {
|
|
1353
|
-
const message = createBaseUpsertFriendshipPayload();
|
|
1354
|
-
if (object.action?.$case === "request" && object.action?.request !== undefined && object.action?.request !== null) {
|
|
1355
|
-
message.action = {
|
|
1356
|
-
$case: "request",
|
|
1357
|
-
request: UpsertFriendshipPayload_RequestPayload.fromPartial(object.action.request),
|
|
1358
|
-
};
|
|
1359
|
-
}
|
|
1360
|
-
if (object.action?.$case === "accept" && object.action?.accept !== undefined && object.action?.accept !== null) {
|
|
1361
|
-
message.action = {
|
|
1362
|
-
$case: "accept",
|
|
1363
|
-
accept: UpsertFriendshipPayload_AcceptPayload.fromPartial(object.action.accept),
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
if (object.action?.$case === "reject" && object.action?.reject !== undefined && object.action?.reject !== null) {
|
|
1367
|
-
message.action = {
|
|
1368
|
-
$case: "reject",
|
|
1369
|
-
reject: UpsertFriendshipPayload_RejectPayload.fromPartial(object.action.reject),
|
|
1370
|
-
};
|
|
1371
|
-
}
|
|
1372
|
-
if (object.action?.$case === "delete" && object.action?.delete !== undefined && object.action?.delete !== null) {
|
|
1373
|
-
message.action = {
|
|
1374
|
-
$case: "delete",
|
|
1375
|
-
delete: UpsertFriendshipPayload_DeletePayload.fromPartial(object.action.delete),
|
|
1376
|
-
};
|
|
1377
|
-
}
|
|
1378
|
-
if (object.action?.$case === "cancel" && object.action?.cancel !== undefined && object.action?.cancel !== null) {
|
|
1379
|
-
message.action = {
|
|
1380
|
-
$case: "cancel",
|
|
1381
|
-
cancel: UpsertFriendshipPayload_CancelPayload.fromPartial(object.action.cancel),
|
|
1382
|
-
};
|
|
1383
|
-
}
|
|
1384
|
-
return message;
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
function createBaseUpsertFriendshipPayload_RequestPayload(): UpsertFriendshipPayload_RequestPayload {
|
|
1389
|
-
return { user: undefined, message: undefined };
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
export namespace UpsertFriendshipPayload_RequestPayload {
|
|
1393
|
-
export function encode(
|
|
1394
|
-
message: UpsertFriendshipPayload_RequestPayload,
|
|
1395
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1396
|
-
): _m0.Writer {
|
|
1397
|
-
if (message.user !== undefined) {
|
|
1398
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1399
|
-
}
|
|
1400
|
-
if (message.message !== undefined) {
|
|
1401
|
-
writer.uint32(26).string(message.message);
|
|
1402
|
-
}
|
|
1403
|
-
return writer;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_RequestPayload {
|
|
1407
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1408
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1409
|
-
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
1410
|
-
while (reader.pos < end) {
|
|
1411
|
-
const tag = reader.uint32();
|
|
1412
|
-
switch (tag >>> 3) {
|
|
1413
|
-
case 1:
|
|
1414
|
-
if (tag !== 10) {
|
|
1415
|
-
break;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1419
|
-
continue;
|
|
1420
|
-
case 3:
|
|
1421
|
-
if (tag !== 26) {
|
|
1422
|
-
break;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
message.message = reader.string();
|
|
1426
|
-
continue;
|
|
1427
|
-
}
|
|
1428
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1429
|
-
break;
|
|
1430
|
-
}
|
|
1431
|
-
reader.skipType(tag & 7);
|
|
1432
|
-
}
|
|
1433
|
-
return message;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_RequestPayload {
|
|
1437
|
-
return {
|
|
1438
|
-
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
1439
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
1440
|
-
};
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
export function toJSON(message: UpsertFriendshipPayload_RequestPayload): unknown {
|
|
1444
|
-
const obj: any = {};
|
|
1445
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1446
|
-
message.message !== undefined && (obj.message = message.message);
|
|
1447
|
-
return obj;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_RequestPayload>, I>>(
|
|
1451
|
-
base?: I,
|
|
1452
|
-
): UpsertFriendshipPayload_RequestPayload {
|
|
1453
|
-
return UpsertFriendshipPayload_RequestPayload.fromPartial(base ?? {});
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_RequestPayload>, I>>(
|
|
1457
|
-
object: I,
|
|
1458
|
-
): UpsertFriendshipPayload_RequestPayload {
|
|
1459
|
-
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
1460
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1461
|
-
message.message = object.message ?? undefined;
|
|
1462
|
-
return message;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
function createBaseUpsertFriendshipPayload_AcceptPayload(): UpsertFriendshipPayload_AcceptPayload {
|
|
1467
|
-
return { user: undefined };
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
export namespace UpsertFriendshipPayload_AcceptPayload {
|
|
1471
|
-
export function encode(
|
|
1472
|
-
message: UpsertFriendshipPayload_AcceptPayload,
|
|
1473
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1474
|
-
): _m0.Writer {
|
|
1475
|
-
if (message.user !== undefined) {
|
|
1476
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1477
|
-
}
|
|
1478
|
-
return writer;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_AcceptPayload {
|
|
1482
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1483
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1484
|
-
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
1485
|
-
while (reader.pos < end) {
|
|
1486
|
-
const tag = reader.uint32();
|
|
1487
|
-
switch (tag >>> 3) {
|
|
1488
|
-
case 1:
|
|
1489
|
-
if (tag !== 10) {
|
|
1490
|
-
break;
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1494
|
-
continue;
|
|
1495
|
-
}
|
|
1496
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1497
|
-
break;
|
|
1498
|
-
}
|
|
1499
|
-
reader.skipType(tag & 7);
|
|
1500
|
-
}
|
|
1501
|
-
return message;
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_AcceptPayload {
|
|
1505
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
export function toJSON(message: UpsertFriendshipPayload_AcceptPayload): unknown {
|
|
1509
|
-
const obj: any = {};
|
|
1510
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1511
|
-
return obj;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_AcceptPayload>, I>>(
|
|
1515
|
-
base?: I,
|
|
1516
|
-
): UpsertFriendshipPayload_AcceptPayload {
|
|
1517
|
-
return UpsertFriendshipPayload_AcceptPayload.fromPartial(base ?? {});
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_AcceptPayload>, I>>(
|
|
1521
|
-
object: I,
|
|
1522
|
-
): UpsertFriendshipPayload_AcceptPayload {
|
|
1523
|
-
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
1524
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1525
|
-
return message;
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
function createBaseUpsertFriendshipPayload_RejectPayload(): UpsertFriendshipPayload_RejectPayload {
|
|
1530
|
-
return { user: undefined };
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
export namespace UpsertFriendshipPayload_RejectPayload {
|
|
1534
|
-
export function encode(
|
|
1535
|
-
message: UpsertFriendshipPayload_RejectPayload,
|
|
1536
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1537
|
-
): _m0.Writer {
|
|
1538
|
-
if (message.user !== undefined) {
|
|
1539
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1540
|
-
}
|
|
1541
|
-
return writer;
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_RejectPayload {
|
|
1545
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1546
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1547
|
-
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
1548
|
-
while (reader.pos < end) {
|
|
1549
|
-
const tag = reader.uint32();
|
|
1550
|
-
switch (tag >>> 3) {
|
|
1551
|
-
case 1:
|
|
1552
|
-
if (tag !== 10) {
|
|
1553
|
-
break;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1557
|
-
continue;
|
|
1558
|
-
}
|
|
1559
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1560
|
-
break;
|
|
1561
|
-
}
|
|
1562
|
-
reader.skipType(tag & 7);
|
|
1563
|
-
}
|
|
1564
|
-
return message;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_RejectPayload {
|
|
1568
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
export function toJSON(message: UpsertFriendshipPayload_RejectPayload): unknown {
|
|
1572
|
-
const obj: any = {};
|
|
1573
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1574
|
-
return obj;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_RejectPayload>, I>>(
|
|
1578
|
-
base?: I,
|
|
1579
|
-
): UpsertFriendshipPayload_RejectPayload {
|
|
1580
|
-
return UpsertFriendshipPayload_RejectPayload.fromPartial(base ?? {});
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_RejectPayload>, I>>(
|
|
1584
|
-
object: I,
|
|
1585
|
-
): UpsertFriendshipPayload_RejectPayload {
|
|
1586
|
-
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
1587
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1588
|
-
return message;
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
function createBaseUpsertFriendshipPayload_DeletePayload(): UpsertFriendshipPayload_DeletePayload {
|
|
1593
|
-
return { user: undefined };
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
export namespace UpsertFriendshipPayload_DeletePayload {
|
|
1597
|
-
export function encode(
|
|
1598
|
-
message: UpsertFriendshipPayload_DeletePayload,
|
|
1599
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1600
|
-
): _m0.Writer {
|
|
1601
|
-
if (message.user !== undefined) {
|
|
1602
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1603
|
-
}
|
|
1604
|
-
return writer;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_DeletePayload {
|
|
1608
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1609
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1610
|
-
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
1611
|
-
while (reader.pos < end) {
|
|
1612
|
-
const tag = reader.uint32();
|
|
1613
|
-
switch (tag >>> 3) {
|
|
1614
|
-
case 1:
|
|
1615
|
-
if (tag !== 10) {
|
|
1616
|
-
break;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1620
|
-
continue;
|
|
1621
|
-
}
|
|
1622
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1623
|
-
break;
|
|
1624
|
-
}
|
|
1625
|
-
reader.skipType(tag & 7);
|
|
1626
|
-
}
|
|
1627
|
-
return message;
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_DeletePayload {
|
|
1631
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
export function toJSON(message: UpsertFriendshipPayload_DeletePayload): unknown {
|
|
1635
|
-
const obj: any = {};
|
|
1636
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1637
|
-
return obj;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_DeletePayload>, I>>(
|
|
1641
|
-
base?: I,
|
|
1642
|
-
): UpsertFriendshipPayload_DeletePayload {
|
|
1643
|
-
return UpsertFriendshipPayload_DeletePayload.fromPartial(base ?? {});
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_DeletePayload>, I>>(
|
|
1647
|
-
object: I,
|
|
1648
|
-
): UpsertFriendshipPayload_DeletePayload {
|
|
1649
|
-
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
1650
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1651
|
-
return message;
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
function createBaseUpsertFriendshipPayload_CancelPayload(): UpsertFriendshipPayload_CancelPayload {
|
|
1656
|
-
return { user: undefined };
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
|
-
export namespace UpsertFriendshipPayload_CancelPayload {
|
|
1660
|
-
export function encode(
|
|
1661
|
-
message: UpsertFriendshipPayload_CancelPayload,
|
|
1662
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1663
|
-
): _m0.Writer {
|
|
1664
|
-
if (message.user !== undefined) {
|
|
1665
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1666
|
-
}
|
|
1667
|
-
return writer;
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_CancelPayload {
|
|
1671
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1672
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1673
|
-
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
1674
|
-
while (reader.pos < end) {
|
|
1675
|
-
const tag = reader.uint32();
|
|
1676
|
-
switch (tag >>> 3) {
|
|
1677
|
-
case 1:
|
|
1678
|
-
if (tag !== 10) {
|
|
1679
|
-
break;
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1683
|
-
continue;
|
|
1684
|
-
}
|
|
1685
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1686
|
-
break;
|
|
1687
|
-
}
|
|
1688
|
-
reader.skipType(tag & 7);
|
|
1689
|
-
}
|
|
1690
|
-
return message;
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_CancelPayload {
|
|
1694
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
export function toJSON(message: UpsertFriendshipPayload_CancelPayload): unknown {
|
|
1698
|
-
const obj: any = {};
|
|
1699
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1700
|
-
return obj;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_CancelPayload>, I>>(
|
|
1704
|
-
base?: I,
|
|
1705
|
-
): UpsertFriendshipPayload_CancelPayload {
|
|
1706
|
-
return UpsertFriendshipPayload_CancelPayload.fromPartial(base ?? {});
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_CancelPayload>, I>>(
|
|
1710
|
-
object: I,
|
|
1711
|
-
): UpsertFriendshipPayload_CancelPayload {
|
|
1712
|
-
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
1713
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1714
|
-
return message;
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
function createBaseGetMutualFriendsPayload(): GetMutualFriendsPayload {
|
|
1719
|
-
return { user: undefined, pagination: undefined };
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
export namespace GetMutualFriendsPayload {
|
|
1723
|
-
export function encode(message: GetMutualFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1724
|
-
if (message.user !== undefined) {
|
|
1725
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1726
|
-
}
|
|
1727
|
-
if (message.pagination !== undefined) {
|
|
1728
|
-
Pagination.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1729
|
-
}
|
|
1730
|
-
return writer;
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetMutualFriendsPayload {
|
|
1734
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1735
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1736
|
-
const message = createBaseGetMutualFriendsPayload();
|
|
1737
|
-
while (reader.pos < end) {
|
|
1738
|
-
const tag = reader.uint32();
|
|
1739
|
-
switch (tag >>> 3) {
|
|
1740
|
-
case 1:
|
|
1741
|
-
if (tag !== 10) {
|
|
1742
|
-
break;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1746
|
-
continue;
|
|
1747
|
-
case 2:
|
|
1748
|
-
if (tag !== 18) {
|
|
1749
|
-
break;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
1753
|
-
continue;
|
|
1754
|
-
}
|
|
1755
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1756
|
-
break;
|
|
1757
|
-
}
|
|
1758
|
-
reader.skipType(tag & 7);
|
|
1759
|
-
}
|
|
1760
|
-
return message;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
export function fromJSON(object: any): GetMutualFriendsPayload {
|
|
1764
|
-
return {
|
|
1765
|
-
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
1766
|
-
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
1767
|
-
};
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
export function toJSON(message: GetMutualFriendsPayload): unknown {
|
|
1771
|
-
const obj: any = {};
|
|
1772
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1773
|
-
message.pagination !== undefined &&
|
|
1774
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
1775
|
-
return obj;
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
export function create<I extends Exact<DeepPartial<GetMutualFriendsPayload>, I>>(base?: I): GetMutualFriendsPayload {
|
|
1779
|
-
return GetMutualFriendsPayload.fromPartial(base ?? {});
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
export function fromPartial<I extends Exact<DeepPartial<GetMutualFriendsPayload>, I>>(
|
|
1783
|
-
object: I,
|
|
1784
|
-
): GetMutualFriendsPayload {
|
|
1785
|
-
const message = createBaseGetMutualFriendsPayload();
|
|
1786
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1787
|
-
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1788
|
-
? Pagination.fromPartial(object.pagination)
|
|
1789
|
-
: undefined;
|
|
1790
|
-
return message;
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
function createBasePaginatedResponse(): PaginatedResponse {
|
|
1795
|
-
return { total: 0, page: 0 };
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
export namespace PaginatedResponse {
|
|
1799
|
-
export function encode(message: PaginatedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1800
|
-
if (message.total !== 0) {
|
|
1801
|
-
writer.uint32(8).int32(message.total);
|
|
1802
|
-
}
|
|
1803
|
-
if (message.page !== 0) {
|
|
1804
|
-
writer.uint32(16).int32(message.page);
|
|
1805
|
-
}
|
|
1806
|
-
return writer;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedResponse {
|
|
1810
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1811
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1812
|
-
const message = createBasePaginatedResponse();
|
|
1813
|
-
while (reader.pos < end) {
|
|
1814
|
-
const tag = reader.uint32();
|
|
1815
|
-
switch (tag >>> 3) {
|
|
1816
|
-
case 1:
|
|
1817
|
-
if (tag !== 8) {
|
|
1818
|
-
break;
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
message.total = reader.int32();
|
|
1822
|
-
continue;
|
|
1823
|
-
case 2:
|
|
1824
|
-
if (tag !== 16) {
|
|
1825
|
-
break;
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
message.page = reader.int32();
|
|
1829
|
-
continue;
|
|
1830
|
-
}
|
|
1831
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1832
|
-
break;
|
|
1833
|
-
}
|
|
1834
|
-
reader.skipType(tag & 7);
|
|
1835
|
-
}
|
|
1836
|
-
return message;
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
export function fromJSON(object: any): PaginatedResponse {
|
|
1840
|
-
return {
|
|
1841
|
-
total: isSet(object.total) ? Number(object.total) : 0,
|
|
1842
|
-
page: isSet(object.page) ? Number(object.page) : 0,
|
|
1843
|
-
};
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
export function toJSON(message: PaginatedResponse): unknown {
|
|
1847
|
-
const obj: any = {};
|
|
1848
|
-
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
1849
|
-
message.page !== undefined && (obj.page = Math.round(message.page));
|
|
1850
|
-
return obj;
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
export function create<I extends Exact<DeepPartial<PaginatedResponse>, I>>(base?: I): PaginatedResponse {
|
|
1854
|
-
return PaginatedResponse.fromPartial(base ?? {});
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
export function fromPartial<I extends Exact<DeepPartial<PaginatedResponse>, I>>(object: I): PaginatedResponse {
|
|
1858
|
-
const message = createBasePaginatedResponse();
|
|
1859
|
-
message.total = object.total ?? 0;
|
|
1860
|
-
message.page = object.page ?? 0;
|
|
1861
|
-
return message;
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
function createBasePaginatedFriendsProfilesResponse(): PaginatedFriendsProfilesResponse {
|
|
1866
|
-
return { friends: [], paginationData: undefined };
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
export namespace PaginatedFriendsProfilesResponse {
|
|
1870
|
-
export function encode(
|
|
1871
|
-
message: PaginatedFriendsProfilesResponse,
|
|
1872
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1873
|
-
): _m0.Writer {
|
|
1874
|
-
for (const v of message.friends) {
|
|
1875
|
-
FriendProfile.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1876
|
-
}
|
|
1877
|
-
if (message.paginationData !== undefined) {
|
|
1878
|
-
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
1879
|
-
}
|
|
1880
|
-
return writer;
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedFriendsProfilesResponse {
|
|
1884
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1885
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1886
|
-
const message = createBasePaginatedFriendsProfilesResponse();
|
|
1887
|
-
while (reader.pos < end) {
|
|
1888
|
-
const tag = reader.uint32();
|
|
1889
|
-
switch (tag >>> 3) {
|
|
1890
|
-
case 1:
|
|
1891
|
-
if (tag !== 10) {
|
|
1892
|
-
break;
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
message.friends.push(FriendProfile.decode(reader, reader.uint32()));
|
|
1896
|
-
continue;
|
|
1897
|
-
case 2:
|
|
1898
|
-
if (tag !== 18) {
|
|
1899
|
-
break;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1903
|
-
continue;
|
|
1904
|
-
}
|
|
1905
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1906
|
-
break;
|
|
1907
|
-
}
|
|
1908
|
-
reader.skipType(tag & 7);
|
|
1909
|
-
}
|
|
1910
|
-
return message;
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
export function fromJSON(object: any): PaginatedFriendsProfilesResponse {
|
|
1914
|
-
return {
|
|
1915
|
-
friends: Array.isArray(object?.friends) ? object.friends.map((e: any) => FriendProfile.fromJSON(e)) : [],
|
|
1916
|
-
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1917
|
-
};
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
export function toJSON(message: PaginatedFriendsProfilesResponse): unknown {
|
|
1921
|
-
const obj: any = {};
|
|
1922
|
-
if (message.friends) {
|
|
1923
|
-
obj.friends = message.friends.map((e) => e ? FriendProfile.toJSON(e) : undefined);
|
|
1924
|
-
} else {
|
|
1925
|
-
obj.friends = [];
|
|
1926
|
-
}
|
|
1927
|
-
message.paginationData !== undefined &&
|
|
1928
|
-
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1929
|
-
return obj;
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
export function create<I extends Exact<DeepPartial<PaginatedFriendsProfilesResponse>, I>>(
|
|
1933
|
-
base?: I,
|
|
1934
|
-
): PaginatedFriendsProfilesResponse {
|
|
1935
|
-
return PaginatedFriendsProfilesResponse.fromPartial(base ?? {});
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
export function fromPartial<I extends Exact<DeepPartial<PaginatedFriendsProfilesResponse>, I>>(
|
|
1939
|
-
object: I,
|
|
1940
|
-
): PaginatedFriendsProfilesResponse {
|
|
1941
|
-
const message = createBasePaginatedFriendsProfilesResponse();
|
|
1942
|
-
message.friends = object.friends?.map((e) => FriendProfile.fromPartial(e)) || [];
|
|
1943
|
-
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1944
|
-
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1945
|
-
: undefined;
|
|
1946
|
-
return message;
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
function createBasePaginatedFriendshipRequestsResponse(): PaginatedFriendshipRequestsResponse {
|
|
1951
|
-
return { response: undefined, paginationData: undefined };
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
export namespace PaginatedFriendshipRequestsResponse {
|
|
1955
|
-
export function encode(
|
|
1956
|
-
message: PaginatedFriendshipRequestsResponse,
|
|
1957
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1958
|
-
): _m0.Writer {
|
|
1959
|
-
switch (message.response?.$case) {
|
|
1960
|
-
case "requests":
|
|
1961
|
-
FriendshipRequests.encode(message.response.requests, writer.uint32(10).fork()).ldelim();
|
|
1962
|
-
break;
|
|
1963
|
-
case "internalServerError":
|
|
1964
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
1965
|
-
break;
|
|
1966
|
-
}
|
|
1967
|
-
if (message.paginationData !== undefined) {
|
|
1968
|
-
PaginatedResponse.encode(message.paginationData, writer.uint32(26).fork()).ldelim();
|
|
1969
|
-
}
|
|
1970
|
-
return writer;
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedFriendshipRequestsResponse {
|
|
1974
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1975
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1976
|
-
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1977
|
-
while (reader.pos < end) {
|
|
1978
|
-
const tag = reader.uint32();
|
|
1979
|
-
switch (tag >>> 3) {
|
|
1980
|
-
case 1:
|
|
1981
|
-
if (tag !== 10) {
|
|
1982
|
-
break;
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
message.response = { $case: "requests", requests: FriendshipRequests.decode(reader, reader.uint32()) };
|
|
1986
|
-
continue;
|
|
1987
|
-
case 2:
|
|
1988
|
-
if (tag !== 18) {
|
|
1989
|
-
break;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
message.response = {
|
|
1993
|
-
$case: "internalServerError",
|
|
1994
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1995
|
-
};
|
|
1996
|
-
continue;
|
|
1997
|
-
case 3:
|
|
1998
|
-
if (tag !== 26) {
|
|
1999
|
-
break;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
2003
|
-
continue;
|
|
2004
|
-
}
|
|
2005
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2006
|
-
break;
|
|
2007
|
-
}
|
|
2008
|
-
reader.skipType(tag & 7);
|
|
2009
|
-
}
|
|
2010
|
-
return message;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
export function fromJSON(object: any): PaginatedFriendshipRequestsResponse {
|
|
2014
|
-
return {
|
|
2015
|
-
response: isSet(object.requests)
|
|
2016
|
-
? { $case: "requests", requests: FriendshipRequests.fromJSON(object.requests) }
|
|
2017
|
-
: isSet(object.internalServerError)
|
|
2018
|
-
? {
|
|
2019
|
-
$case: "internalServerError",
|
|
2020
|
-
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
2021
|
-
}
|
|
2022
|
-
: undefined,
|
|
2023
|
-
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
2024
|
-
};
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
export function toJSON(message: PaginatedFriendshipRequestsResponse): unknown {
|
|
2028
|
-
const obj: any = {};
|
|
2029
|
-
message.response?.$case === "requests" &&
|
|
2030
|
-
(obj.requests = message.response?.requests ? FriendshipRequests.toJSON(message.response?.requests) : undefined);
|
|
2031
|
-
message.response?.$case === "internalServerError" &&
|
|
2032
|
-
(obj.internalServerError = message.response?.internalServerError
|
|
2033
|
-
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
2034
|
-
: undefined);
|
|
2035
|
-
message.paginationData !== undefined &&
|
|
2036
|
-
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
2037
|
-
return obj;
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
export function create<I extends Exact<DeepPartial<PaginatedFriendshipRequestsResponse>, I>>(
|
|
2041
|
-
base?: I,
|
|
2042
|
-
): PaginatedFriendshipRequestsResponse {
|
|
2043
|
-
return PaginatedFriendshipRequestsResponse.fromPartial(base ?? {});
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
export function fromPartial<I extends Exact<DeepPartial<PaginatedFriendshipRequestsResponse>, I>>(
|
|
2047
|
-
object: I,
|
|
2048
|
-
): PaginatedFriendshipRequestsResponse {
|
|
2049
|
-
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
2050
|
-
if (
|
|
2051
|
-
object.response?.$case === "requests" &&
|
|
2052
|
-
object.response?.requests !== undefined &&
|
|
2053
|
-
object.response?.requests !== null
|
|
2054
|
-
) {
|
|
2055
|
-
message.response = { $case: "requests", requests: FriendshipRequests.fromPartial(object.response.requests) };
|
|
2056
|
-
}
|
|
2057
|
-
if (
|
|
2058
|
-
object.response?.$case === "internalServerError" &&
|
|
2059
|
-
object.response?.internalServerError !== undefined &&
|
|
2060
|
-
object.response?.internalServerError !== null
|
|
2061
|
-
) {
|
|
2062
|
-
message.response = {
|
|
2063
|
-
$case: "internalServerError",
|
|
2064
|
-
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
899
|
+
): UpsertFriendshipPayload {
|
|
900
|
+
const message = createBaseUpsertFriendshipPayload();
|
|
901
|
+
if (object.action?.$case === "request" && object.action?.request !== undefined && object.action?.request !== null) {
|
|
902
|
+
message.action = {
|
|
903
|
+
$case: "request",
|
|
904
|
+
request: UpsertFriendshipPayload_RequestPayload.fromPartial(object.action.request),
|
|
2065
905
|
};
|
|
2066
906
|
}
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
function createBaseUpsertFriendshipResponse(): UpsertFriendshipResponse {
|
|
2075
|
-
return { response: undefined };
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
export namespace UpsertFriendshipResponse {
|
|
2079
|
-
export function encode(message: UpsertFriendshipResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2080
|
-
switch (message.response?.$case) {
|
|
2081
|
-
case "accepted":
|
|
2082
|
-
UpsertFriendshipResponse_Accepted.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
2083
|
-
break;
|
|
2084
|
-
case "invalidFriendshipAction":
|
|
2085
|
-
InvalidFriendshipAction.encode(message.response.invalidFriendshipAction, writer.uint32(18).fork()).ldelim();
|
|
2086
|
-
break;
|
|
2087
|
-
case "internalServerError":
|
|
2088
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(26).fork()).ldelim();
|
|
2089
|
-
break;
|
|
2090
|
-
}
|
|
2091
|
-
return writer;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipResponse {
|
|
2095
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2096
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2097
|
-
const message = createBaseUpsertFriendshipResponse();
|
|
2098
|
-
while (reader.pos < end) {
|
|
2099
|
-
const tag = reader.uint32();
|
|
2100
|
-
switch (tag >>> 3) {
|
|
2101
|
-
case 1:
|
|
2102
|
-
if (tag !== 10) {
|
|
2103
|
-
break;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
message.response = {
|
|
2107
|
-
$case: "accepted",
|
|
2108
|
-
accepted: UpsertFriendshipResponse_Accepted.decode(reader, reader.uint32()),
|
|
2109
|
-
};
|
|
2110
|
-
continue;
|
|
2111
|
-
case 2:
|
|
2112
|
-
if (tag !== 18) {
|
|
2113
|
-
break;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
message.response = {
|
|
2117
|
-
$case: "invalidFriendshipAction",
|
|
2118
|
-
invalidFriendshipAction: InvalidFriendshipAction.decode(reader, reader.uint32()),
|
|
2119
|
-
};
|
|
2120
|
-
continue;
|
|
2121
|
-
case 3:
|
|
2122
|
-
if (tag !== 26) {
|
|
2123
|
-
break;
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
message.response = {
|
|
2127
|
-
$case: "internalServerError",
|
|
2128
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
2129
|
-
};
|
|
2130
|
-
continue;
|
|
2131
|
-
}
|
|
2132
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2133
|
-
break;
|
|
2134
|
-
}
|
|
2135
|
-
reader.skipType(tag & 7);
|
|
2136
|
-
}
|
|
2137
|
-
return message;
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
export function fromJSON(object: any): UpsertFriendshipResponse {
|
|
2141
|
-
return {
|
|
2142
|
-
response: isSet(object.accepted)
|
|
2143
|
-
? { $case: "accepted", accepted: UpsertFriendshipResponse_Accepted.fromJSON(object.accepted) }
|
|
2144
|
-
: isSet(object.invalidFriendshipAction)
|
|
2145
|
-
? {
|
|
2146
|
-
$case: "invalidFriendshipAction",
|
|
2147
|
-
invalidFriendshipAction: InvalidFriendshipAction.fromJSON(object.invalidFriendshipAction),
|
|
2148
|
-
}
|
|
2149
|
-
: isSet(object.internalServerError)
|
|
2150
|
-
? {
|
|
2151
|
-
$case: "internalServerError",
|
|
2152
|
-
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
2153
|
-
}
|
|
2154
|
-
: undefined,
|
|
2155
|
-
};
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
export function toJSON(message: UpsertFriendshipResponse): unknown {
|
|
2159
|
-
const obj: any = {};
|
|
2160
|
-
message.response?.$case === "accepted" &&
|
|
2161
|
-
(obj.accepted = message.response?.accepted
|
|
2162
|
-
? UpsertFriendshipResponse_Accepted.toJSON(message.response?.accepted)
|
|
2163
|
-
: undefined);
|
|
2164
|
-
message.response?.$case === "invalidFriendshipAction" &&
|
|
2165
|
-
(obj.invalidFriendshipAction = message.response?.invalidFriendshipAction
|
|
2166
|
-
? InvalidFriendshipAction.toJSON(message.response?.invalidFriendshipAction)
|
|
2167
|
-
: undefined);
|
|
2168
|
-
message.response?.$case === "internalServerError" &&
|
|
2169
|
-
(obj.internalServerError = message.response?.internalServerError
|
|
2170
|
-
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
2171
|
-
: undefined);
|
|
2172
|
-
return obj;
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipResponse>, I>>(
|
|
2176
|
-
base?: I,
|
|
2177
|
-
): UpsertFriendshipResponse {
|
|
2178
|
-
return UpsertFriendshipResponse.fromPartial(base ?? {});
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipResponse>, I>>(
|
|
2182
|
-
object: I,
|
|
2183
|
-
): UpsertFriendshipResponse {
|
|
2184
|
-
const message = createBaseUpsertFriendshipResponse();
|
|
2185
|
-
if (
|
|
2186
|
-
object.response?.$case === "accepted" &&
|
|
2187
|
-
object.response?.accepted !== undefined &&
|
|
2188
|
-
object.response?.accepted !== null
|
|
2189
|
-
) {
|
|
2190
|
-
message.response = {
|
|
2191
|
-
$case: "accepted",
|
|
2192
|
-
accepted: UpsertFriendshipResponse_Accepted.fromPartial(object.response.accepted),
|
|
907
|
+
if (object.action?.$case === "accept" && object.action?.accept !== undefined && object.action?.accept !== null) {
|
|
908
|
+
message.action = {
|
|
909
|
+
$case: "accept",
|
|
910
|
+
accept: UpsertFriendshipPayload_AcceptPayload.fromPartial(object.action.accept),
|
|
2193
911
|
};
|
|
2194
912
|
}
|
|
2195
|
-
if (
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
) {
|
|
2200
|
-
message.response = {
|
|
2201
|
-
$case: "invalidFriendshipAction",
|
|
2202
|
-
invalidFriendshipAction: InvalidFriendshipAction.fromPartial(object.response.invalidFriendshipAction),
|
|
913
|
+
if (object.action?.$case === "reject" && object.action?.reject !== undefined && object.action?.reject !== null) {
|
|
914
|
+
message.action = {
|
|
915
|
+
$case: "reject",
|
|
916
|
+
reject: UpsertFriendshipPayload_RejectPayload.fromPartial(object.action.reject),
|
|
2203
917
|
};
|
|
2204
918
|
}
|
|
2205
|
-
if (
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
919
|
+
if (object.action?.$case === "delete" && object.action?.delete !== undefined && object.action?.delete !== null) {
|
|
920
|
+
message.action = {
|
|
921
|
+
$case: "delete",
|
|
922
|
+
delete: UpsertFriendshipPayload_DeletePayload.fromPartial(object.action.delete),
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
if (object.action?.$case === "cancel" && object.action?.cancel !== undefined && object.action?.cancel !== null) {
|
|
926
|
+
message.action = {
|
|
927
|
+
$case: "cancel",
|
|
928
|
+
cancel: UpsertFriendshipPayload_CancelPayload.fromPartial(object.action.cancel),
|
|
2213
929
|
};
|
|
2214
930
|
}
|
|
2215
931
|
return message;
|
|
2216
932
|
}
|
|
2217
933
|
}
|
|
2218
934
|
|
|
2219
|
-
function
|
|
2220
|
-
return {
|
|
935
|
+
function createBaseUpsertFriendshipPayload_RequestPayload(): UpsertFriendshipPayload_RequestPayload {
|
|
936
|
+
return { user: undefined, message: undefined };
|
|
2221
937
|
}
|
|
2222
938
|
|
|
2223
|
-
export namespace
|
|
939
|
+
export namespace UpsertFriendshipPayload_RequestPayload {
|
|
2224
940
|
export function encode(
|
|
2225
|
-
message:
|
|
941
|
+
message: UpsertFriendshipPayload_RequestPayload,
|
|
2226
942
|
writer: _m0.Writer = _m0.Writer.create(),
|
|
2227
943
|
): _m0.Writer {
|
|
2228
|
-
if (message.
|
|
2229
|
-
writer.uint32(10).
|
|
2230
|
-
}
|
|
2231
|
-
if (message.createdAt !== 0) {
|
|
2232
|
-
writer.uint32(16).int64(message.createdAt);
|
|
2233
|
-
}
|
|
2234
|
-
if (message.friend !== undefined) {
|
|
2235
|
-
FriendProfile.encode(message.friend, writer.uint32(26).fork()).ldelim();
|
|
944
|
+
if (message.user !== undefined) {
|
|
945
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2236
946
|
}
|
|
2237
947
|
if (message.message !== undefined) {
|
|
2238
|
-
writer.uint32(
|
|
948
|
+
writer.uint32(26).string(message.message);
|
|
2239
949
|
}
|
|
2240
950
|
return writer;
|
|
2241
951
|
}
|
|
2242
952
|
|
|
2243
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
953
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_RequestPayload {
|
|
2244
954
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2245
955
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2246
|
-
const message =
|
|
956
|
+
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
2247
957
|
while (reader.pos < end) {
|
|
2248
958
|
const tag = reader.uint32();
|
|
2249
959
|
switch (tag >>> 3) {
|
|
@@ -2252,27 +962,13 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
2252
962
|
break;
|
|
2253
963
|
}
|
|
2254
964
|
|
|
2255
|
-
message.
|
|
2256
|
-
continue;
|
|
2257
|
-
case 2:
|
|
2258
|
-
if (tag !== 16) {
|
|
2259
|
-
break;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
message.createdAt = longToNumber(reader.int64() as Long);
|
|
965
|
+
message.user = User.decode(reader, reader.uint32());
|
|
2263
966
|
continue;
|
|
2264
967
|
case 3:
|
|
2265
968
|
if (tag !== 26) {
|
|
2266
969
|
break;
|
|
2267
970
|
}
|
|
2268
971
|
|
|
2269
|
-
message.friend = FriendProfile.decode(reader, reader.uint32());
|
|
2270
|
-
continue;
|
|
2271
|
-
case 4:
|
|
2272
|
-
if (tag !== 34) {
|
|
2273
|
-
break;
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
972
|
message.message = reader.string();
|
|
2277
973
|
continue;
|
|
2278
974
|
}
|
|
@@ -2284,238 +980,55 @@ export namespace UpsertFriendshipResponse_Accepted {
|
|
|
2284
980
|
return message;
|
|
2285
981
|
}
|
|
2286
982
|
|
|
2287
|
-
export function fromJSON(object: any):
|
|
983
|
+
export function fromJSON(object: any): UpsertFriendshipPayload_RequestPayload {
|
|
2288
984
|
return {
|
|
2289
|
-
|
|
2290
|
-
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
2291
|
-
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
985
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
2292
986
|
message: isSet(object.message) ? String(object.message) : undefined,
|
|
2293
987
|
};
|
|
2294
988
|
}
|
|
2295
989
|
|
|
2296
|
-
export function toJSON(message:
|
|
990
|
+
export function toJSON(message: UpsertFriendshipPayload_RequestPayload): unknown {
|
|
2297
991
|
const obj: any = {};
|
|
2298
|
-
message.
|
|
2299
|
-
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
2300
|
-
message.friend !== undefined && (obj.friend = message.friend ? FriendProfile.toJSON(message.friend) : undefined);
|
|
992
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2301
993
|
message.message !== undefined && (obj.message = message.message);
|
|
2302
994
|
return obj;
|
|
2303
995
|
}
|
|
2304
996
|
|
|
2305
|
-
export function create<I extends Exact<DeepPartial<
|
|
997
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_RequestPayload>, I>>(
|
|
2306
998
|
base?: I,
|
|
2307
|
-
):
|
|
2308
|
-
return
|
|
999
|
+
): UpsertFriendshipPayload_RequestPayload {
|
|
1000
|
+
return UpsertFriendshipPayload_RequestPayload.fromPartial(base ?? {});
|
|
2309
1001
|
}
|
|
2310
1002
|
|
|
2311
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1003
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_RequestPayload>, I>>(
|
|
2312
1004
|
object: I,
|
|
2313
|
-
):
|
|
2314
|
-
const message =
|
|
2315
|
-
message.
|
|
2316
|
-
message.createdAt = object.createdAt ?? 0;
|
|
2317
|
-
message.friend = (object.friend !== undefined && object.friend !== null)
|
|
2318
|
-
? FriendProfile.fromPartial(object.friend)
|
|
2319
|
-
: undefined;
|
|
1005
|
+
): UpsertFriendshipPayload_RequestPayload {
|
|
1006
|
+
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
1007
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2320
1008
|
message.message = object.message ?? undefined;
|
|
2321
1009
|
return message;
|
|
2322
1010
|
}
|
|
2323
1011
|
}
|
|
2324
1012
|
|
|
2325
|
-
function
|
|
2326
|
-
return {
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
export namespace FriendshipUpdate {
|
|
2330
|
-
export function encode(message: FriendshipUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2331
|
-
switch (message.update?.$case) {
|
|
2332
|
-
case "request":
|
|
2333
|
-
FriendshipUpdate_RequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
2334
|
-
break;
|
|
2335
|
-
case "accept":
|
|
2336
|
-
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
2337
|
-
break;
|
|
2338
|
-
case "reject":
|
|
2339
|
-
FriendshipUpdate_RejectResponse.encode(message.update.reject, writer.uint32(26).fork()).ldelim();
|
|
2340
|
-
break;
|
|
2341
|
-
case "delete":
|
|
2342
|
-
FriendshipUpdate_DeleteResponse.encode(message.update.delete, writer.uint32(34).fork()).ldelim();
|
|
2343
|
-
break;
|
|
2344
|
-
case "cancel":
|
|
2345
|
-
FriendshipUpdate_CancelResponse.encode(message.update.cancel, writer.uint32(42).fork()).ldelim();
|
|
2346
|
-
break;
|
|
2347
|
-
case "block":
|
|
2348
|
-
FriendshipUpdate_BlockResponse.encode(message.update.block, writer.uint32(50).fork()).ldelim();
|
|
2349
|
-
break;
|
|
2350
|
-
}
|
|
2351
|
-
return writer;
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate {
|
|
2355
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2356
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2357
|
-
const message = createBaseFriendshipUpdate();
|
|
2358
|
-
while (reader.pos < end) {
|
|
2359
|
-
const tag = reader.uint32();
|
|
2360
|
-
switch (tag >>> 3) {
|
|
2361
|
-
case 1:
|
|
2362
|
-
if (tag !== 10) {
|
|
2363
|
-
break;
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
message.update = {
|
|
2367
|
-
$case: "request",
|
|
2368
|
-
request: FriendshipUpdate_RequestResponse.decode(reader, reader.uint32()),
|
|
2369
|
-
};
|
|
2370
|
-
continue;
|
|
2371
|
-
case 2:
|
|
2372
|
-
if (tag !== 18) {
|
|
2373
|
-
break;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.decode(reader, reader.uint32()) };
|
|
2377
|
-
continue;
|
|
2378
|
-
case 3:
|
|
2379
|
-
if (tag !== 26) {
|
|
2380
|
-
break;
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.decode(reader, reader.uint32()) };
|
|
2384
|
-
continue;
|
|
2385
|
-
case 4:
|
|
2386
|
-
if (tag !== 34) {
|
|
2387
|
-
break;
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.decode(reader, reader.uint32()) };
|
|
2391
|
-
continue;
|
|
2392
|
-
case 5:
|
|
2393
|
-
if (tag !== 42) {
|
|
2394
|
-
break;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.decode(reader, reader.uint32()) };
|
|
2398
|
-
continue;
|
|
2399
|
-
case 6:
|
|
2400
|
-
if (tag !== 50) {
|
|
2401
|
-
break;
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
message.update = { $case: "block", block: FriendshipUpdate_BlockResponse.decode(reader, reader.uint32()) };
|
|
2405
|
-
continue;
|
|
2406
|
-
}
|
|
2407
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2408
|
-
break;
|
|
2409
|
-
}
|
|
2410
|
-
reader.skipType(tag & 7);
|
|
2411
|
-
}
|
|
2412
|
-
return message;
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
export function fromJSON(object: any): FriendshipUpdate {
|
|
2416
|
-
return {
|
|
2417
|
-
update: isSet(object.request)
|
|
2418
|
-
? { $case: "request", request: FriendshipUpdate_RequestResponse.fromJSON(object.request) }
|
|
2419
|
-
: isSet(object.accept)
|
|
2420
|
-
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
2421
|
-
: isSet(object.reject)
|
|
2422
|
-
? { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromJSON(object.reject) }
|
|
2423
|
-
: isSet(object.delete)
|
|
2424
|
-
? { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromJSON(object.delete) }
|
|
2425
|
-
: isSet(object.cancel)
|
|
2426
|
-
? { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromJSON(object.cancel) }
|
|
2427
|
-
: isSet(object.block)
|
|
2428
|
-
? { $case: "block", block: FriendshipUpdate_BlockResponse.fromJSON(object.block) }
|
|
2429
|
-
: undefined,
|
|
2430
|
-
};
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
export function toJSON(message: FriendshipUpdate): unknown {
|
|
2434
|
-
const obj: any = {};
|
|
2435
|
-
message.update?.$case === "request" &&
|
|
2436
|
-
(obj.request = message.update?.request
|
|
2437
|
-
? FriendshipUpdate_RequestResponse.toJSON(message.update?.request)
|
|
2438
|
-
: undefined);
|
|
2439
|
-
message.update?.$case === "accept" &&
|
|
2440
|
-
(obj.accept = message.update?.accept
|
|
2441
|
-
? FriendshipUpdate_AcceptResponse.toJSON(message.update?.accept)
|
|
2442
|
-
: undefined);
|
|
2443
|
-
message.update?.$case === "reject" &&
|
|
2444
|
-
(obj.reject = message.update?.reject
|
|
2445
|
-
? FriendshipUpdate_RejectResponse.toJSON(message.update?.reject)
|
|
2446
|
-
: undefined);
|
|
2447
|
-
message.update?.$case === "delete" &&
|
|
2448
|
-
(obj.delete = message.update?.delete
|
|
2449
|
-
? FriendshipUpdate_DeleteResponse.toJSON(message.update?.delete)
|
|
2450
|
-
: undefined);
|
|
2451
|
-
message.update?.$case === "cancel" &&
|
|
2452
|
-
(obj.cancel = message.update?.cancel
|
|
2453
|
-
? FriendshipUpdate_CancelResponse.toJSON(message.update?.cancel)
|
|
2454
|
-
: undefined);
|
|
2455
|
-
message.update?.$case === "block" &&
|
|
2456
|
-
(obj.block = message.update?.block ? FriendshipUpdate_BlockResponse.toJSON(message.update?.block) : undefined);
|
|
2457
|
-
return obj;
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(base?: I): FriendshipUpdate {
|
|
2461
|
-
return FriendshipUpdate.fromPartial(base ?? {});
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(object: I): FriendshipUpdate {
|
|
2465
|
-
const message = createBaseFriendshipUpdate();
|
|
2466
|
-
if (object.update?.$case === "request" && object.update?.request !== undefined && object.update?.request !== null) {
|
|
2467
|
-
message.update = {
|
|
2468
|
-
$case: "request",
|
|
2469
|
-
request: FriendshipUpdate_RequestResponse.fromPartial(object.update.request),
|
|
2470
|
-
};
|
|
2471
|
-
}
|
|
2472
|
-
if (object.update?.$case === "accept" && object.update?.accept !== undefined && object.update?.accept !== null) {
|
|
2473
|
-
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
2474
|
-
}
|
|
2475
|
-
if (object.update?.$case === "reject" && object.update?.reject !== undefined && object.update?.reject !== null) {
|
|
2476
|
-
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromPartial(object.update.reject) };
|
|
2477
|
-
}
|
|
2478
|
-
if (object.update?.$case === "delete" && object.update?.delete !== undefined && object.update?.delete !== null) {
|
|
2479
|
-
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromPartial(object.update.delete) };
|
|
2480
|
-
}
|
|
2481
|
-
if (object.update?.$case === "cancel" && object.update?.cancel !== undefined && object.update?.cancel !== null) {
|
|
2482
|
-
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromPartial(object.update.cancel) };
|
|
2483
|
-
}
|
|
2484
|
-
if (object.update?.$case === "block" && object.update?.block !== undefined && object.update?.block !== null) {
|
|
2485
|
-
message.update = { $case: "block", block: FriendshipUpdate_BlockResponse.fromPartial(object.update.block) };
|
|
2486
|
-
}
|
|
2487
|
-
return message;
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
function createBaseFriendshipUpdate_RequestResponse(): FriendshipUpdate_RequestResponse {
|
|
2492
|
-
return { friend: undefined, createdAt: 0, message: undefined, id: "" };
|
|
1013
|
+
function createBaseUpsertFriendshipPayload_AcceptPayload(): UpsertFriendshipPayload_AcceptPayload {
|
|
1014
|
+
return { user: undefined };
|
|
2493
1015
|
}
|
|
2494
1016
|
|
|
2495
|
-
export namespace
|
|
1017
|
+
export namespace UpsertFriendshipPayload_AcceptPayload {
|
|
2496
1018
|
export function encode(
|
|
2497
|
-
message:
|
|
1019
|
+
message: UpsertFriendshipPayload_AcceptPayload,
|
|
2498
1020
|
writer: _m0.Writer = _m0.Writer.create(),
|
|
2499
|
-
): _m0.Writer {
|
|
2500
|
-
if (message.
|
|
2501
|
-
|
|
2502
|
-
}
|
|
2503
|
-
if (message.createdAt !== 0) {
|
|
2504
|
-
writer.uint32(16).int64(message.createdAt);
|
|
2505
|
-
}
|
|
2506
|
-
if (message.message !== undefined) {
|
|
2507
|
-
writer.uint32(26).string(message.message);
|
|
2508
|
-
}
|
|
2509
|
-
if (message.id !== "") {
|
|
2510
|
-
writer.uint32(34).string(message.id);
|
|
1021
|
+
): _m0.Writer {
|
|
1022
|
+
if (message.user !== undefined) {
|
|
1023
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2511
1024
|
}
|
|
2512
1025
|
return writer;
|
|
2513
1026
|
}
|
|
2514
1027
|
|
|
2515
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1028
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_AcceptPayload {
|
|
2516
1029
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2517
1030
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2518
|
-
const message =
|
|
1031
|
+
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
2519
1032
|
while (reader.pos < end) {
|
|
2520
1033
|
const tag = reader.uint32();
|
|
2521
1034
|
switch (tag >>> 3) {
|
|
@@ -2524,28 +1037,7 @@ export namespace FriendshipUpdate_RequestResponse {
|
|
|
2524
1037
|
break;
|
|
2525
1038
|
}
|
|
2526
1039
|
|
|
2527
|
-
message.
|
|
2528
|
-
continue;
|
|
2529
|
-
case 2:
|
|
2530
|
-
if (tag !== 16) {
|
|
2531
|
-
break;
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
message.createdAt = longToNumber(reader.int64() as Long);
|
|
2535
|
-
continue;
|
|
2536
|
-
case 3:
|
|
2537
|
-
if (tag !== 26) {
|
|
2538
|
-
break;
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
message.message = reader.string();
|
|
2542
|
-
continue;
|
|
2543
|
-
case 4:
|
|
2544
|
-
if (tag !== 34) {
|
|
2545
|
-
break;
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
|
-
message.id = reader.string();
|
|
1040
|
+
message.user = User.decode(reader, reader.uint32());
|
|
2549
1041
|
continue;
|
|
2550
1042
|
}
|
|
2551
1043
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -2556,51 +1048,38 @@ export namespace FriendshipUpdate_RequestResponse {
|
|
|
2556
1048
|
return message;
|
|
2557
1049
|
}
|
|
2558
1050
|
|
|
2559
|
-
export function fromJSON(object: any):
|
|
2560
|
-
return {
|
|
2561
|
-
friend: isSet(object.friend) ? FriendProfile.fromJSON(object.friend) : undefined,
|
|
2562
|
-
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
2563
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
2564
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
2565
|
-
};
|
|
1051
|
+
export function fromJSON(object: any): UpsertFriendshipPayload_AcceptPayload {
|
|
1052
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2566
1053
|
}
|
|
2567
1054
|
|
|
2568
|
-
export function toJSON(message:
|
|
1055
|
+
export function toJSON(message: UpsertFriendshipPayload_AcceptPayload): unknown {
|
|
2569
1056
|
const obj: any = {};
|
|
2570
|
-
message.
|
|
2571
|
-
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
2572
|
-
message.message !== undefined && (obj.message = message.message);
|
|
2573
|
-
message.id !== undefined && (obj.id = message.id);
|
|
1057
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2574
1058
|
return obj;
|
|
2575
1059
|
}
|
|
2576
1060
|
|
|
2577
|
-
export function create<I extends Exact<DeepPartial<
|
|
1061
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_AcceptPayload>, I>>(
|
|
2578
1062
|
base?: I,
|
|
2579
|
-
):
|
|
2580
|
-
return
|
|
1063
|
+
): UpsertFriendshipPayload_AcceptPayload {
|
|
1064
|
+
return UpsertFriendshipPayload_AcceptPayload.fromPartial(base ?? {});
|
|
2581
1065
|
}
|
|
2582
1066
|
|
|
2583
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1067
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_AcceptPayload>, I>>(
|
|
2584
1068
|
object: I,
|
|
2585
|
-
):
|
|
2586
|
-
const message =
|
|
2587
|
-
message.
|
|
2588
|
-
? FriendProfile.fromPartial(object.friend)
|
|
2589
|
-
: undefined;
|
|
2590
|
-
message.createdAt = object.createdAt ?? 0;
|
|
2591
|
-
message.message = object.message ?? undefined;
|
|
2592
|
-
message.id = object.id ?? "";
|
|
1069
|
+
): UpsertFriendshipPayload_AcceptPayload {
|
|
1070
|
+
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
1071
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2593
1072
|
return message;
|
|
2594
1073
|
}
|
|
2595
1074
|
}
|
|
2596
1075
|
|
|
2597
|
-
function
|
|
1076
|
+
function createBaseUpsertFriendshipPayload_RejectPayload(): UpsertFriendshipPayload_RejectPayload {
|
|
2598
1077
|
return { user: undefined };
|
|
2599
1078
|
}
|
|
2600
1079
|
|
|
2601
|
-
export namespace
|
|
1080
|
+
export namespace UpsertFriendshipPayload_RejectPayload {
|
|
2602
1081
|
export function encode(
|
|
2603
|
-
message:
|
|
1082
|
+
message: UpsertFriendshipPayload_RejectPayload,
|
|
2604
1083
|
writer: _m0.Writer = _m0.Writer.create(),
|
|
2605
1084
|
): _m0.Writer {
|
|
2606
1085
|
if (message.user !== undefined) {
|
|
@@ -2609,10 +1088,10 @@ export namespace FriendshipUpdate_AcceptResponse {
|
|
|
2609
1088
|
return writer;
|
|
2610
1089
|
}
|
|
2611
1090
|
|
|
2612
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1091
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_RejectPayload {
|
|
2613
1092
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2614
1093
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2615
|
-
const message =
|
|
1094
|
+
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
2616
1095
|
while (reader.pos < end) {
|
|
2617
1096
|
const tag = reader.uint32();
|
|
2618
1097
|
switch (tag >>> 3) {
|
|
@@ -2632,38 +1111,38 @@ export namespace FriendshipUpdate_AcceptResponse {
|
|
|
2632
1111
|
return message;
|
|
2633
1112
|
}
|
|
2634
1113
|
|
|
2635
|
-
export function fromJSON(object: any):
|
|
1114
|
+
export function fromJSON(object: any): UpsertFriendshipPayload_RejectPayload {
|
|
2636
1115
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2637
1116
|
}
|
|
2638
1117
|
|
|
2639
|
-
export function toJSON(message:
|
|
1118
|
+
export function toJSON(message: UpsertFriendshipPayload_RejectPayload): unknown {
|
|
2640
1119
|
const obj: any = {};
|
|
2641
1120
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2642
1121
|
return obj;
|
|
2643
1122
|
}
|
|
2644
1123
|
|
|
2645
|
-
export function create<I extends Exact<DeepPartial<
|
|
1124
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_RejectPayload>, I>>(
|
|
2646
1125
|
base?: I,
|
|
2647
|
-
):
|
|
2648
|
-
return
|
|
1126
|
+
): UpsertFriendshipPayload_RejectPayload {
|
|
1127
|
+
return UpsertFriendshipPayload_RejectPayload.fromPartial(base ?? {});
|
|
2649
1128
|
}
|
|
2650
1129
|
|
|
2651
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1130
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_RejectPayload>, I>>(
|
|
2652
1131
|
object: I,
|
|
2653
|
-
):
|
|
2654
|
-
const message =
|
|
1132
|
+
): UpsertFriendshipPayload_RejectPayload {
|
|
1133
|
+
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
2655
1134
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2656
1135
|
return message;
|
|
2657
1136
|
}
|
|
2658
1137
|
}
|
|
2659
1138
|
|
|
2660
|
-
function
|
|
1139
|
+
function createBaseUpsertFriendshipPayload_DeletePayload(): UpsertFriendshipPayload_DeletePayload {
|
|
2661
1140
|
return { user: undefined };
|
|
2662
1141
|
}
|
|
2663
1142
|
|
|
2664
|
-
export namespace
|
|
1143
|
+
export namespace UpsertFriendshipPayload_DeletePayload {
|
|
2665
1144
|
export function encode(
|
|
2666
|
-
message:
|
|
1145
|
+
message: UpsertFriendshipPayload_DeletePayload,
|
|
2667
1146
|
writer: _m0.Writer = _m0.Writer.create(),
|
|
2668
1147
|
): _m0.Writer {
|
|
2669
1148
|
if (message.user !== undefined) {
|
|
@@ -2672,10 +1151,10 @@ export namespace FriendshipUpdate_RejectResponse {
|
|
|
2672
1151
|
return writer;
|
|
2673
1152
|
}
|
|
2674
1153
|
|
|
2675
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1154
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_DeletePayload {
|
|
2676
1155
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2677
1156
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2678
|
-
const message =
|
|
1157
|
+
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
2679
1158
|
while (reader.pos < end) {
|
|
2680
1159
|
const tag = reader.uint32();
|
|
2681
1160
|
switch (tag >>> 3) {
|
|
@@ -2695,38 +1174,38 @@ export namespace FriendshipUpdate_RejectResponse {
|
|
|
2695
1174
|
return message;
|
|
2696
1175
|
}
|
|
2697
1176
|
|
|
2698
|
-
export function fromJSON(object: any):
|
|
1177
|
+
export function fromJSON(object: any): UpsertFriendshipPayload_DeletePayload {
|
|
2699
1178
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2700
1179
|
}
|
|
2701
1180
|
|
|
2702
|
-
export function toJSON(message:
|
|
1181
|
+
export function toJSON(message: UpsertFriendshipPayload_DeletePayload): unknown {
|
|
2703
1182
|
const obj: any = {};
|
|
2704
1183
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2705
1184
|
return obj;
|
|
2706
1185
|
}
|
|
2707
1186
|
|
|
2708
|
-
export function create<I extends Exact<DeepPartial<
|
|
1187
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_DeletePayload>, I>>(
|
|
2709
1188
|
base?: I,
|
|
2710
|
-
):
|
|
2711
|
-
return
|
|
1189
|
+
): UpsertFriendshipPayload_DeletePayload {
|
|
1190
|
+
return UpsertFriendshipPayload_DeletePayload.fromPartial(base ?? {});
|
|
2712
1191
|
}
|
|
2713
1192
|
|
|
2714
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1193
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_DeletePayload>, I>>(
|
|
2715
1194
|
object: I,
|
|
2716
|
-
):
|
|
2717
|
-
const message =
|
|
1195
|
+
): UpsertFriendshipPayload_DeletePayload {
|
|
1196
|
+
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
2718
1197
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2719
1198
|
return message;
|
|
2720
1199
|
}
|
|
2721
1200
|
}
|
|
2722
1201
|
|
|
2723
|
-
function
|
|
1202
|
+
function createBaseUpsertFriendshipPayload_CancelPayload(): UpsertFriendshipPayload_CancelPayload {
|
|
2724
1203
|
return { user: undefined };
|
|
2725
1204
|
}
|
|
2726
1205
|
|
|
2727
|
-
export namespace
|
|
1206
|
+
export namespace UpsertFriendshipPayload_CancelPayload {
|
|
2728
1207
|
export function encode(
|
|
2729
|
-
message:
|
|
1208
|
+
message: UpsertFriendshipPayload_CancelPayload,
|
|
2730
1209
|
writer: _m0.Writer = _m0.Writer.create(),
|
|
2731
1210
|
): _m0.Writer {
|
|
2732
1211
|
if (message.user !== undefined) {
|
|
@@ -2735,10 +1214,10 @@ export namespace FriendshipUpdate_DeleteResponse {
|
|
|
2735
1214
|
return writer;
|
|
2736
1215
|
}
|
|
2737
1216
|
|
|
2738
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1217
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_CancelPayload {
|
|
2739
1218
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2740
1219
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2741
|
-
const message =
|
|
1220
|
+
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
2742
1221
|
while (reader.pos < end) {
|
|
2743
1222
|
const tag = reader.uint32();
|
|
2744
1223
|
switch (tag >>> 3) {
|
|
@@ -2758,50 +1237,50 @@ export namespace FriendshipUpdate_DeleteResponse {
|
|
|
2758
1237
|
return message;
|
|
2759
1238
|
}
|
|
2760
1239
|
|
|
2761
|
-
export function fromJSON(object: any):
|
|
1240
|
+
export function fromJSON(object: any): UpsertFriendshipPayload_CancelPayload {
|
|
2762
1241
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2763
1242
|
}
|
|
2764
1243
|
|
|
2765
|
-
export function toJSON(message:
|
|
1244
|
+
export function toJSON(message: UpsertFriendshipPayload_CancelPayload): unknown {
|
|
2766
1245
|
const obj: any = {};
|
|
2767
1246
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2768
1247
|
return obj;
|
|
2769
1248
|
}
|
|
2770
1249
|
|
|
2771
|
-
export function create<I extends Exact<DeepPartial<
|
|
1250
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_CancelPayload>, I>>(
|
|
2772
1251
|
base?: I,
|
|
2773
|
-
):
|
|
2774
|
-
return
|
|
1252
|
+
): UpsertFriendshipPayload_CancelPayload {
|
|
1253
|
+
return UpsertFriendshipPayload_CancelPayload.fromPartial(base ?? {});
|
|
2775
1254
|
}
|
|
2776
1255
|
|
|
2777
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1256
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_CancelPayload>, I>>(
|
|
2778
1257
|
object: I,
|
|
2779
|
-
):
|
|
2780
|
-
const message =
|
|
1258
|
+
): UpsertFriendshipPayload_CancelPayload {
|
|
1259
|
+
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
2781
1260
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2782
1261
|
return message;
|
|
2783
1262
|
}
|
|
2784
1263
|
}
|
|
2785
1264
|
|
|
2786
|
-
function
|
|
2787
|
-
return { user: undefined };
|
|
1265
|
+
function createBaseGetMutualFriendsPayload(): GetMutualFriendsPayload {
|
|
1266
|
+
return { user: undefined, pagination: undefined };
|
|
2788
1267
|
}
|
|
2789
1268
|
|
|
2790
|
-
export namespace
|
|
2791
|
-
export function encode(
|
|
2792
|
-
message: FriendshipUpdate_CancelResponse,
|
|
2793
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
2794
|
-
): _m0.Writer {
|
|
1269
|
+
export namespace GetMutualFriendsPayload {
|
|
1270
|
+
export function encode(message: GetMutualFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2795
1271
|
if (message.user !== undefined) {
|
|
2796
1272
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2797
1273
|
}
|
|
1274
|
+
if (message.pagination !== undefined) {
|
|
1275
|
+
Pagination.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1276
|
+
}
|
|
2798
1277
|
return writer;
|
|
2799
1278
|
}
|
|
2800
1279
|
|
|
2801
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1280
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetMutualFriendsPayload {
|
|
2802
1281
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2803
1282
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2804
|
-
const message =
|
|
1283
|
+
const message = createBaseGetMutualFriendsPayload();
|
|
2805
1284
|
while (reader.pos < end) {
|
|
2806
1285
|
const tag = reader.uint32();
|
|
2807
1286
|
switch (tag >>> 3) {
|
|
@@ -2812,6 +1291,13 @@ export namespace FriendshipUpdate_CancelResponse {
|
|
|
2812
1291
|
|
|
2813
1292
|
message.user = User.decode(reader, reader.uint32());
|
|
2814
1293
|
continue;
|
|
1294
|
+
case 2:
|
|
1295
|
+
if (tag !== 18) {
|
|
1296
|
+
break;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
1300
|
+
continue;
|
|
2815
1301
|
}
|
|
2816
1302
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2817
1303
|
break;
|
|
@@ -2821,59 +1307,72 @@ export namespace FriendshipUpdate_CancelResponse {
|
|
|
2821
1307
|
return message;
|
|
2822
1308
|
}
|
|
2823
1309
|
|
|
2824
|
-
export function fromJSON(object: any):
|
|
2825
|
-
return {
|
|
1310
|
+
export function fromJSON(object: any): GetMutualFriendsPayload {
|
|
1311
|
+
return {
|
|
1312
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
1313
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
1314
|
+
};
|
|
2826
1315
|
}
|
|
2827
1316
|
|
|
2828
|
-
export function toJSON(message:
|
|
1317
|
+
export function toJSON(message: GetMutualFriendsPayload): unknown {
|
|
2829
1318
|
const obj: any = {};
|
|
2830
1319
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1320
|
+
message.pagination !== undefined &&
|
|
1321
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
2831
1322
|
return obj;
|
|
2832
1323
|
}
|
|
2833
1324
|
|
|
2834
|
-
export function create<I extends Exact<DeepPartial<
|
|
2835
|
-
base
|
|
2836
|
-
): FriendshipUpdate_CancelResponse {
|
|
2837
|
-
return FriendshipUpdate_CancelResponse.fromPartial(base ?? {});
|
|
1325
|
+
export function create<I extends Exact<DeepPartial<GetMutualFriendsPayload>, I>>(base?: I): GetMutualFriendsPayload {
|
|
1326
|
+
return GetMutualFriendsPayload.fromPartial(base ?? {});
|
|
2838
1327
|
}
|
|
2839
1328
|
|
|
2840
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1329
|
+
export function fromPartial<I extends Exact<DeepPartial<GetMutualFriendsPayload>, I>>(
|
|
2841
1330
|
object: I,
|
|
2842
|
-
):
|
|
2843
|
-
const message =
|
|
1331
|
+
): GetMutualFriendsPayload {
|
|
1332
|
+
const message = createBaseGetMutualFriendsPayload();
|
|
2844
1333
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1334
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1335
|
+
? Pagination.fromPartial(object.pagination)
|
|
1336
|
+
: undefined;
|
|
2845
1337
|
return message;
|
|
2846
1338
|
}
|
|
2847
1339
|
}
|
|
2848
1340
|
|
|
2849
|
-
function
|
|
2850
|
-
return {
|
|
1341
|
+
function createBasePaginatedResponse(): PaginatedResponse {
|
|
1342
|
+
return { total: 0, page: 0 };
|
|
2851
1343
|
}
|
|
2852
1344
|
|
|
2853
|
-
export namespace
|
|
2854
|
-
export function encode(
|
|
2855
|
-
message
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
if (message.
|
|
2859
|
-
|
|
1345
|
+
export namespace PaginatedResponse {
|
|
1346
|
+
export function encode(message: PaginatedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1347
|
+
if (message.total !== 0) {
|
|
1348
|
+
writer.uint32(8).int32(message.total);
|
|
1349
|
+
}
|
|
1350
|
+
if (message.page !== 0) {
|
|
1351
|
+
writer.uint32(16).int32(message.page);
|
|
2860
1352
|
}
|
|
2861
1353
|
return writer;
|
|
2862
1354
|
}
|
|
2863
1355
|
|
|
2864
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1356
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedResponse {
|
|
2865
1357
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2866
1358
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2867
|
-
const message =
|
|
1359
|
+
const message = createBasePaginatedResponse();
|
|
2868
1360
|
while (reader.pos < end) {
|
|
2869
1361
|
const tag = reader.uint32();
|
|
2870
1362
|
switch (tag >>> 3) {
|
|
2871
1363
|
case 1:
|
|
2872
|
-
if (tag !==
|
|
1364
|
+
if (tag !== 8) {
|
|
2873
1365
|
break;
|
|
2874
1366
|
}
|
|
2875
1367
|
|
|
2876
|
-
message.
|
|
1368
|
+
message.total = reader.int32();
|
|
1369
|
+
continue;
|
|
1370
|
+
case 2:
|
|
1371
|
+
if (tag !== 16) {
|
|
1372
|
+
break;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
message.page = reader.int32();
|
|
2877
1376
|
continue;
|
|
2878
1377
|
}
|
|
2879
1378
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -2884,50 +1383,51 @@ export namespace FriendshipUpdate_BlockResponse {
|
|
|
2884
1383
|
return message;
|
|
2885
1384
|
}
|
|
2886
1385
|
|
|
2887
|
-
export function fromJSON(object: any):
|
|
2888
|
-
return {
|
|
1386
|
+
export function fromJSON(object: any): PaginatedResponse {
|
|
1387
|
+
return {
|
|
1388
|
+
total: isSet(object.total) ? Number(object.total) : 0,
|
|
1389
|
+
page: isSet(object.page) ? Number(object.page) : 0,
|
|
1390
|
+
};
|
|
2889
1391
|
}
|
|
2890
1392
|
|
|
2891
|
-
export function toJSON(message:
|
|
1393
|
+
export function toJSON(message: PaginatedResponse): unknown {
|
|
2892
1394
|
const obj: any = {};
|
|
2893
|
-
message.
|
|
1395
|
+
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
1396
|
+
message.page !== undefined && (obj.page = Math.round(message.page));
|
|
2894
1397
|
return obj;
|
|
2895
1398
|
}
|
|
2896
1399
|
|
|
2897
|
-
export function create<I extends Exact<DeepPartial<
|
|
2898
|
-
base
|
|
2899
|
-
): FriendshipUpdate_BlockResponse {
|
|
2900
|
-
return FriendshipUpdate_BlockResponse.fromPartial(base ?? {});
|
|
1400
|
+
export function create<I extends Exact<DeepPartial<PaginatedResponse>, I>>(base?: I): PaginatedResponse {
|
|
1401
|
+
return PaginatedResponse.fromPartial(base ?? {});
|
|
2901
1402
|
}
|
|
2902
1403
|
|
|
2903
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1404
|
+
export function fromPartial<I extends Exact<DeepPartial<PaginatedResponse>, I>>(object: I): PaginatedResponse {
|
|
1405
|
+
const message = createBasePaginatedResponse();
|
|
1406
|
+
message.total = object.total ?? 0;
|
|
1407
|
+
message.page = object.page ?? 0;
|
|
2908
1408
|
return message;
|
|
2909
1409
|
}
|
|
2910
1410
|
}
|
|
2911
1411
|
|
|
2912
|
-
function
|
|
2913
|
-
return {
|
|
1412
|
+
function createBasePaginatedUsersResponse(): PaginatedUsersResponse {
|
|
1413
|
+
return { users: [], paginationData: undefined };
|
|
2914
1414
|
}
|
|
2915
1415
|
|
|
2916
|
-
export namespace
|
|
2917
|
-
export function encode(message:
|
|
2918
|
-
|
|
2919
|
-
|
|
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();
|
|
2920
1420
|
}
|
|
2921
|
-
if (message.
|
|
2922
|
-
writer.uint32(
|
|
1421
|
+
if (message.paginationData !== undefined) {
|
|
1422
|
+
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
2923
1423
|
}
|
|
2924
1424
|
return writer;
|
|
2925
1425
|
}
|
|
2926
1426
|
|
|
2927
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1427
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedUsersResponse {
|
|
2928
1428
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2929
1429
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2930
|
-
const message =
|
|
1430
|
+
const message = createBasePaginatedUsersResponse();
|
|
2931
1431
|
while (reader.pos < end) {
|
|
2932
1432
|
const tag = reader.uint32();
|
|
2933
1433
|
switch (tag >>> 3) {
|
|
@@ -2936,14 +1436,14 @@ export namespace FriendConnectivityUpdate {
|
|
|
2936
1436
|
break;
|
|
2937
1437
|
}
|
|
2938
1438
|
|
|
2939
|
-
message.
|
|
1439
|
+
message.users.push(User.decode(reader, reader.uint32()));
|
|
2940
1440
|
continue;
|
|
2941
1441
|
case 2:
|
|
2942
|
-
if (tag !==
|
|
1442
|
+
if (tag !== 18) {
|
|
2943
1443
|
break;
|
|
2944
1444
|
}
|
|
2945
1445
|
|
|
2946
|
-
message.
|
|
1446
|
+
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
2947
1447
|
continue;
|
|
2948
1448
|
}
|
|
2949
1449
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -2954,54 +1454,68 @@ export namespace FriendConnectivityUpdate {
|
|
|
2954
1454
|
return message;
|
|
2955
1455
|
}
|
|
2956
1456
|
|
|
2957
|
-
export function fromJSON(object: any):
|
|
1457
|
+
export function fromJSON(object: any): PaginatedUsersResponse {
|
|
2958
1458
|
return {
|
|
2959
|
-
|
|
2960
|
-
|
|
1459
|
+
users: Array.isArray(object?.users) ? object.users.map((e: any) => User.fromJSON(e)) : [],
|
|
1460
|
+
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
2961
1461
|
};
|
|
2962
1462
|
}
|
|
2963
1463
|
|
|
2964
|
-
export function toJSON(message:
|
|
1464
|
+
export function toJSON(message: PaginatedUsersResponse): unknown {
|
|
2965
1465
|
const obj: any = {};
|
|
2966
|
-
|
|
2967
|
-
|
|
1466
|
+
if (message.users) {
|
|
1467
|
+
obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);
|
|
1468
|
+
} else {
|
|
1469
|
+
obj.users = [];
|
|
1470
|
+
}
|
|
1471
|
+
message.paginationData !== undefined &&
|
|
1472
|
+
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
2968
1473
|
return obj;
|
|
2969
1474
|
}
|
|
2970
1475
|
|
|
2971
|
-
export function create<I extends Exact<DeepPartial<
|
|
2972
|
-
base
|
|
2973
|
-
): FriendConnectivityUpdate {
|
|
2974
|
-
return FriendConnectivityUpdate.fromPartial(base ?? {});
|
|
1476
|
+
export function create<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(base?: I): PaginatedUsersResponse {
|
|
1477
|
+
return PaginatedUsersResponse.fromPartial(base ?? {});
|
|
2975
1478
|
}
|
|
2976
1479
|
|
|
2977
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1480
|
+
export function fromPartial<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(
|
|
2978
1481
|
object: I,
|
|
2979
|
-
):
|
|
2980
|
-
const message =
|
|
2981
|
-
message.
|
|
2982
|
-
|
|
1482
|
+
): PaginatedUsersResponse {
|
|
1483
|
+
const message = createBasePaginatedUsersResponse();
|
|
1484
|
+
message.users = object.users?.map((e) => User.fromPartial(e)) || [];
|
|
1485
|
+
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1486
|
+
? PaginatedResponse.fromPartial(object.paginationData)
|
|
2983
1487
|
: undefined;
|
|
2984
|
-
message.status = object.status ?? 0;
|
|
2985
1488
|
return message;
|
|
2986
1489
|
}
|
|
2987
1490
|
}
|
|
2988
1491
|
|
|
2989
|
-
function
|
|
2990
|
-
return {
|
|
1492
|
+
function createBasePaginatedFriendshipRequestsResponse(): PaginatedFriendshipRequestsResponse {
|
|
1493
|
+
return { response: undefined, paginationData: undefined };
|
|
2991
1494
|
}
|
|
2992
1495
|
|
|
2993
|
-
export namespace
|
|
2994
|
-
export function encode(
|
|
2995
|
-
|
|
2996
|
-
|
|
1496
|
+
export namespace PaginatedFriendshipRequestsResponse {
|
|
1497
|
+
export function encode(
|
|
1498
|
+
message: PaginatedFriendshipRequestsResponse,
|
|
1499
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
1500
|
+
): _m0.Writer {
|
|
1501
|
+
switch (message.response?.$case) {
|
|
1502
|
+
case "requests":
|
|
1503
|
+
FriendshipRequests.encode(message.response.requests, writer.uint32(10).fork()).ldelim();
|
|
1504
|
+
break;
|
|
1505
|
+
case "internalServerError":
|
|
1506
|
+
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1509
|
+
if (message.paginationData !== undefined) {
|
|
1510
|
+
PaginatedResponse.encode(message.paginationData, writer.uint32(26).fork()).ldelim();
|
|
2997
1511
|
}
|
|
2998
1512
|
return writer;
|
|
2999
1513
|
}
|
|
3000
1514
|
|
|
3001
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1515
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedFriendshipRequestsResponse {
|
|
3002
1516
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3003
1517
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3004
|
-
const message =
|
|
1518
|
+
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
3005
1519
|
while (reader.pos < end) {
|
|
3006
1520
|
const tag = reader.uint32();
|
|
3007
1521
|
switch (tag >>> 3) {
|
|
@@ -3010,7 +1524,24 @@ export namespace GetFriendshipStatusPayload {
|
|
|
3010
1524
|
break;
|
|
3011
1525
|
}
|
|
3012
1526
|
|
|
3013
|
-
message.
|
|
1527
|
+
message.response = { $case: "requests", requests: FriendshipRequests.decode(reader, reader.uint32()) };
|
|
1528
|
+
continue;
|
|
1529
|
+
case 2:
|
|
1530
|
+
if (tag !== 18) {
|
|
1531
|
+
break;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
message.response = {
|
|
1535
|
+
$case: "internalServerError",
|
|
1536
|
+
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1537
|
+
};
|
|
1538
|
+
continue;
|
|
1539
|
+
case 3:
|
|
1540
|
+
if (tag !== 26) {
|
|
1541
|
+
break;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
3014
1545
|
continue;
|
|
3015
1546
|
}
|
|
3016
1547
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3021,52 +1552,91 @@ export namespace GetFriendshipStatusPayload {
|
|
|
3021
1552
|
return message;
|
|
3022
1553
|
}
|
|
3023
1554
|
|
|
3024
|
-
export function fromJSON(object: any):
|
|
3025
|
-
return {
|
|
1555
|
+
export function fromJSON(object: any): PaginatedFriendshipRequestsResponse {
|
|
1556
|
+
return {
|
|
1557
|
+
response: isSet(object.requests)
|
|
1558
|
+
? { $case: "requests", requests: FriendshipRequests.fromJSON(object.requests) }
|
|
1559
|
+
: isSet(object.internalServerError)
|
|
1560
|
+
? {
|
|
1561
|
+
$case: "internalServerError",
|
|
1562
|
+
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
1563
|
+
}
|
|
1564
|
+
: undefined,
|
|
1565
|
+
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1566
|
+
};
|
|
3026
1567
|
}
|
|
3027
1568
|
|
|
3028
|
-
export function toJSON(message:
|
|
1569
|
+
export function toJSON(message: PaginatedFriendshipRequestsResponse): unknown {
|
|
3029
1570
|
const obj: any = {};
|
|
3030
|
-
message.
|
|
1571
|
+
message.response?.$case === "requests" &&
|
|
1572
|
+
(obj.requests = message.response?.requests ? FriendshipRequests.toJSON(message.response?.requests) : undefined);
|
|
1573
|
+
message.response?.$case === "internalServerError" &&
|
|
1574
|
+
(obj.internalServerError = message.response?.internalServerError
|
|
1575
|
+
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
1576
|
+
: undefined);
|
|
1577
|
+
message.paginationData !== undefined &&
|
|
1578
|
+
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
3031
1579
|
return obj;
|
|
3032
1580
|
}
|
|
3033
1581
|
|
|
3034
|
-
export function create<I extends Exact<DeepPartial<
|
|
1582
|
+
export function create<I extends Exact<DeepPartial<PaginatedFriendshipRequestsResponse>, I>>(
|
|
3035
1583
|
base?: I,
|
|
3036
|
-
):
|
|
3037
|
-
return
|
|
1584
|
+
): PaginatedFriendshipRequestsResponse {
|
|
1585
|
+
return PaginatedFriendshipRequestsResponse.fromPartial(base ?? {});
|
|
3038
1586
|
}
|
|
3039
1587
|
|
|
3040
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1588
|
+
export function fromPartial<I extends Exact<DeepPartial<PaginatedFriendshipRequestsResponse>, I>>(
|
|
3041
1589
|
object: I,
|
|
3042
|
-
):
|
|
3043
|
-
const message =
|
|
3044
|
-
|
|
1590
|
+
): PaginatedFriendshipRequestsResponse {
|
|
1591
|
+
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1592
|
+
if (
|
|
1593
|
+
object.response?.$case === "requests" &&
|
|
1594
|
+
object.response?.requests !== undefined &&
|
|
1595
|
+
object.response?.requests !== null
|
|
1596
|
+
) {
|
|
1597
|
+
message.response = { $case: "requests", requests: FriendshipRequests.fromPartial(object.response.requests) };
|
|
1598
|
+
}
|
|
1599
|
+
if (
|
|
1600
|
+
object.response?.$case === "internalServerError" &&
|
|
1601
|
+
object.response?.internalServerError !== undefined &&
|
|
1602
|
+
object.response?.internalServerError !== null
|
|
1603
|
+
) {
|
|
1604
|
+
message.response = {
|
|
1605
|
+
$case: "internalServerError",
|
|
1606
|
+
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1610
|
+
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1611
|
+
: undefined;
|
|
3045
1612
|
return message;
|
|
3046
1613
|
}
|
|
3047
1614
|
}
|
|
3048
1615
|
|
|
3049
|
-
function
|
|
1616
|
+
function createBaseUpsertFriendshipResponse(): UpsertFriendshipResponse {
|
|
3050
1617
|
return { response: undefined };
|
|
3051
1618
|
}
|
|
3052
1619
|
|
|
3053
|
-
export namespace
|
|
3054
|
-
export function encode(message:
|
|
1620
|
+
export namespace UpsertFriendshipResponse {
|
|
1621
|
+
export function encode(message: UpsertFriendshipResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
3055
1622
|
switch (message.response?.$case) {
|
|
3056
1623
|
case "accepted":
|
|
3057
|
-
|
|
1624
|
+
UpsertFriendshipResponse_Accepted.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
1625
|
+
break;
|
|
1626
|
+
case "invalidFriendshipAction":
|
|
1627
|
+
InvalidFriendshipAction.encode(message.response.invalidFriendshipAction, writer.uint32(18).fork()).ldelim();
|
|
3058
1628
|
break;
|
|
3059
1629
|
case "internalServerError":
|
|
3060
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(
|
|
1630
|
+
InternalServerError.encode(message.response.internalServerError, writer.uint32(26).fork()).ldelim();
|
|
3061
1631
|
break;
|
|
3062
1632
|
}
|
|
3063
1633
|
return writer;
|
|
3064
1634
|
}
|
|
3065
1635
|
|
|
3066
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1636
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipResponse {
|
|
3067
1637
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3068
1638
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3069
|
-
const message =
|
|
1639
|
+
const message = createBaseUpsertFriendshipResponse();
|
|
3070
1640
|
while (reader.pos < end) {
|
|
3071
1641
|
const tag = reader.uint32();
|
|
3072
1642
|
switch (tag >>> 3) {
|
|
@@ -3077,7 +1647,7 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3077
1647
|
|
|
3078
1648
|
message.response = {
|
|
3079
1649
|
$case: "accepted",
|
|
3080
|
-
accepted:
|
|
1650
|
+
accepted: UpsertFriendshipResponse_Accepted.decode(reader, reader.uint32()),
|
|
3081
1651
|
};
|
|
3082
1652
|
continue;
|
|
3083
1653
|
case 2:
|
|
@@ -3085,6 +1655,16 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3085
1655
|
break;
|
|
3086
1656
|
}
|
|
3087
1657
|
|
|
1658
|
+
message.response = {
|
|
1659
|
+
$case: "invalidFriendshipAction",
|
|
1660
|
+
invalidFriendshipAction: InvalidFriendshipAction.decode(reader, reader.uint32()),
|
|
1661
|
+
};
|
|
1662
|
+
continue;
|
|
1663
|
+
case 3:
|
|
1664
|
+
if (tag !== 26) {
|
|
1665
|
+
break;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
3088
1668
|
message.response = {
|
|
3089
1669
|
$case: "internalServerError",
|
|
3090
1670
|
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
@@ -3099,10 +1679,15 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3099
1679
|
return message;
|
|
3100
1680
|
}
|
|
3101
1681
|
|
|
3102
|
-
export function fromJSON(object: any):
|
|
1682
|
+
export function fromJSON(object: any): UpsertFriendshipResponse {
|
|
3103
1683
|
return {
|
|
3104
1684
|
response: isSet(object.accepted)
|
|
3105
|
-
? { $case: "accepted", accepted:
|
|
1685
|
+
? { $case: "accepted", accepted: UpsertFriendshipResponse_Accepted.fromJSON(object.accepted) }
|
|
1686
|
+
: isSet(object.invalidFriendshipAction)
|
|
1687
|
+
? {
|
|
1688
|
+
$case: "invalidFriendshipAction",
|
|
1689
|
+
invalidFriendshipAction: InvalidFriendshipAction.fromJSON(object.invalidFriendshipAction),
|
|
1690
|
+
}
|
|
3106
1691
|
: isSet(object.internalServerError)
|
|
3107
1692
|
? {
|
|
3108
1693
|
$case: "internalServerError",
|
|
@@ -3112,11 +1697,15 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3112
1697
|
};
|
|
3113
1698
|
}
|
|
3114
1699
|
|
|
3115
|
-
export function toJSON(message:
|
|
1700
|
+
export function toJSON(message: UpsertFriendshipResponse): unknown {
|
|
3116
1701
|
const obj: any = {};
|
|
3117
1702
|
message.response?.$case === "accepted" &&
|
|
3118
1703
|
(obj.accepted = message.response?.accepted
|
|
3119
|
-
?
|
|
1704
|
+
? UpsertFriendshipResponse_Accepted.toJSON(message.response?.accepted)
|
|
1705
|
+
: undefined);
|
|
1706
|
+
message.response?.$case === "invalidFriendshipAction" &&
|
|
1707
|
+
(obj.invalidFriendshipAction = message.response?.invalidFriendshipAction
|
|
1708
|
+
? InvalidFriendshipAction.toJSON(message.response?.invalidFriendshipAction)
|
|
3120
1709
|
: undefined);
|
|
3121
1710
|
message.response?.$case === "internalServerError" &&
|
|
3122
1711
|
(obj.internalServerError = message.response?.internalServerError
|
|
@@ -3125,16 +1714,16 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3125
1714
|
return obj;
|
|
3126
1715
|
}
|
|
3127
1716
|
|
|
3128
|
-
export function create<I extends Exact<DeepPartial<
|
|
1717
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipResponse>, I>>(
|
|
3129
1718
|
base?: I,
|
|
3130
|
-
):
|
|
3131
|
-
return
|
|
1719
|
+
): UpsertFriendshipResponse {
|
|
1720
|
+
return UpsertFriendshipResponse.fromPartial(base ?? {});
|
|
3132
1721
|
}
|
|
3133
1722
|
|
|
3134
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
1723
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipResponse>, I>>(
|
|
3135
1724
|
object: I,
|
|
3136
|
-
):
|
|
3137
|
-
const message =
|
|
1725
|
+
): UpsertFriendshipResponse {
|
|
1726
|
+
const message = createBaseUpsertFriendshipResponse();
|
|
3138
1727
|
if (
|
|
3139
1728
|
object.response?.$case === "accepted" &&
|
|
3140
1729
|
object.response?.accepted !== undefined &&
|
|
@@ -3142,7 +1731,17 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3142
1731
|
) {
|
|
3143
1732
|
message.response = {
|
|
3144
1733
|
$case: "accepted",
|
|
3145
|
-
accepted:
|
|
1734
|
+
accepted: UpsertFriendshipResponse_Accepted.fromPartial(object.response.accepted),
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
if (
|
|
1738
|
+
object.response?.$case === "invalidFriendshipAction" &&
|
|
1739
|
+
object.response?.invalidFriendshipAction !== undefined &&
|
|
1740
|
+
object.response?.invalidFriendshipAction !== null
|
|
1741
|
+
) {
|
|
1742
|
+
message.response = {
|
|
1743
|
+
$case: "invalidFriendshipAction",
|
|
1744
|
+
invalidFriendshipAction: InvalidFriendshipAction.fromPartial(object.response.invalidFriendshipAction),
|
|
3146
1745
|
};
|
|
3147
1746
|
}
|
|
3148
1747
|
if (
|
|
@@ -3159,44 +1758,44 @@ export namespace GetFriendshipStatusResponse {
|
|
|
3159
1758
|
}
|
|
3160
1759
|
}
|
|
3161
1760
|
|
|
3162
|
-
function
|
|
3163
|
-
return {
|
|
1761
|
+
function createBaseUpsertFriendshipResponse_Accepted(): UpsertFriendshipResponse_Accepted {
|
|
1762
|
+
return { id: "", createdAt: 0 };
|
|
3164
1763
|
}
|
|
3165
1764
|
|
|
3166
|
-
export namespace
|
|
1765
|
+
export namespace UpsertFriendshipResponse_Accepted {
|
|
3167
1766
|
export function encode(
|
|
3168
|
-
message:
|
|
1767
|
+
message: UpsertFriendshipResponse_Accepted,
|
|
3169
1768
|
writer: _m0.Writer = _m0.Writer.create(),
|
|
3170
1769
|
): _m0.Writer {
|
|
3171
|
-
if (message.
|
|
3172
|
-
writer.uint32(
|
|
1770
|
+
if (message.id !== "") {
|
|
1771
|
+
writer.uint32(10).string(message.id);
|
|
3173
1772
|
}
|
|
3174
|
-
if (message.
|
|
3175
|
-
writer.uint32(
|
|
1773
|
+
if (message.createdAt !== 0) {
|
|
1774
|
+
writer.uint32(16).int64(message.createdAt);
|
|
3176
1775
|
}
|
|
3177
1776
|
return writer;
|
|
3178
1777
|
}
|
|
3179
1778
|
|
|
3180
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1779
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipResponse_Accepted {
|
|
3181
1780
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3182
1781
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3183
|
-
const message =
|
|
1782
|
+
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
3184
1783
|
while (reader.pos < end) {
|
|
3185
1784
|
const tag = reader.uint32();
|
|
3186
1785
|
switch (tag >>> 3) {
|
|
3187
1786
|
case 1:
|
|
3188
|
-
if (tag !==
|
|
1787
|
+
if (tag !== 10) {
|
|
3189
1788
|
break;
|
|
3190
1789
|
}
|
|
3191
1790
|
|
|
3192
|
-
message.
|
|
1791
|
+
message.id = reader.string();
|
|
3193
1792
|
continue;
|
|
3194
1793
|
case 2:
|
|
3195
|
-
if (tag !==
|
|
1794
|
+
if (tag !== 16) {
|
|
3196
1795
|
break;
|
|
3197
1796
|
}
|
|
3198
1797
|
|
|
3199
|
-
message.
|
|
1798
|
+
message.createdAt = longToNumber(reader.int64() as Long);
|
|
3200
1799
|
continue;
|
|
3201
1800
|
}
|
|
3202
1801
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3207,119 +1806,66 @@ export namespace GetFriendshipStatusResponse_Ok {
|
|
|
3207
1806
|
return message;
|
|
3208
1807
|
}
|
|
3209
1808
|
|
|
3210
|
-
export function fromJSON(object: any):
|
|
1809
|
+
export function fromJSON(object: any): UpsertFriendshipResponse_Accepted {
|
|
3211
1810
|
return {
|
|
3212
|
-
|
|
3213
|
-
|
|
1811
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
1812
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
3214
1813
|
};
|
|
3215
1814
|
}
|
|
3216
1815
|
|
|
3217
|
-
export function toJSON(message:
|
|
1816
|
+
export function toJSON(message: UpsertFriendshipResponse_Accepted): unknown {
|
|
3218
1817
|
const obj: any = {};
|
|
3219
|
-
message.
|
|
3220
|
-
message.
|
|
1818
|
+
message.id !== undefined && (obj.id = message.id);
|
|
1819
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
3221
1820
|
return obj;
|
|
3222
1821
|
}
|
|
3223
1822
|
|
|
3224
|
-
export function create<I extends Exact<DeepPartial<
|
|
1823
|
+
export function create<I extends Exact<DeepPartial<UpsertFriendshipResponse_Accepted>, I>>(
|
|
3225
1824
|
base?: I,
|
|
3226
|
-
):
|
|
3227
|
-
return
|
|
3228
|
-
}
|
|
3229
|
-
|
|
3230
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusResponse_Ok>, I>>(
|
|
3231
|
-
object: I,
|
|
3232
|
-
): GetFriendshipStatusResponse_Ok {
|
|
3233
|
-
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
3234
|
-
message.status = object.status ?? 0;
|
|
3235
|
-
message.message = object.message ?? undefined;
|
|
3236
|
-
return message;
|
|
3237
|
-
}
|
|
3238
|
-
}
|
|
3239
|
-
|
|
3240
|
-
function createBaseBlockUserPayload(): BlockUserPayload {
|
|
3241
|
-
return { user: undefined };
|
|
3242
|
-
}
|
|
3243
|
-
|
|
3244
|
-
export namespace BlockUserPayload {
|
|
3245
|
-
export function encode(message: BlockUserPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
3246
|
-
if (message.user !== undefined) {
|
|
3247
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
3248
|
-
}
|
|
3249
|
-
return writer;
|
|
3250
|
-
}
|
|
3251
|
-
|
|
3252
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): BlockUserPayload {
|
|
3253
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3254
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3255
|
-
const message = createBaseBlockUserPayload();
|
|
3256
|
-
while (reader.pos < end) {
|
|
3257
|
-
const tag = reader.uint32();
|
|
3258
|
-
switch (tag >>> 3) {
|
|
3259
|
-
case 1:
|
|
3260
|
-
if (tag !== 10) {
|
|
3261
|
-
break;
|
|
3262
|
-
}
|
|
3263
|
-
|
|
3264
|
-
message.user = User.decode(reader, reader.uint32());
|
|
3265
|
-
continue;
|
|
3266
|
-
}
|
|
3267
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3268
|
-
break;
|
|
3269
|
-
}
|
|
3270
|
-
reader.skipType(tag & 7);
|
|
3271
|
-
}
|
|
3272
|
-
return message;
|
|
3273
|
-
}
|
|
3274
|
-
|
|
3275
|
-
export function fromJSON(object: any): BlockUserPayload {
|
|
3276
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
export function toJSON(message: BlockUserPayload): unknown {
|
|
3280
|
-
const obj: any = {};
|
|
3281
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
3282
|
-
return obj;
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
export function create<I extends Exact<DeepPartial<BlockUserPayload>, I>>(base?: I): BlockUserPayload {
|
|
3286
|
-
return BlockUserPayload.fromPartial(base ?? {});
|
|
1825
|
+
): UpsertFriendshipResponse_Accepted {
|
|
1826
|
+
return UpsertFriendshipResponse_Accepted.fromPartial(base ?? {});
|
|
3287
1827
|
}
|
|
3288
1828
|
|
|
3289
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
3290
|
-
|
|
3291
|
-
|
|
1829
|
+
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipResponse_Accepted>, I>>(
|
|
1830
|
+
object: I,
|
|
1831
|
+
): UpsertFriendshipResponse_Accepted {
|
|
1832
|
+
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1833
|
+
message.id = object.id ?? "";
|
|
1834
|
+
message.createdAt = object.createdAt ?? 0;
|
|
3292
1835
|
return message;
|
|
3293
1836
|
}
|
|
3294
1837
|
}
|
|
3295
1838
|
|
|
3296
|
-
function
|
|
3297
|
-
return {
|
|
1839
|
+
function createBaseFriendshipUpdate(): FriendshipUpdate {
|
|
1840
|
+
return { update: undefined };
|
|
3298
1841
|
}
|
|
3299
1842
|
|
|
3300
|
-
export namespace
|
|
3301
|
-
export function encode(message:
|
|
3302
|
-
switch (message.
|
|
3303
|
-
case "
|
|
3304
|
-
|
|
1843
|
+
export namespace FriendshipUpdate {
|
|
1844
|
+
export function encode(message: FriendshipUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1845
|
+
switch (message.update?.$case) {
|
|
1846
|
+
case "request":
|
|
1847
|
+
FriendshipRequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
3305
1848
|
break;
|
|
3306
|
-
case "
|
|
3307
|
-
|
|
1849
|
+
case "accept":
|
|
1850
|
+
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
1851
|
+
break;
|
|
1852
|
+
case "reject":
|
|
1853
|
+
FriendshipUpdate_RejectResponse.encode(message.update.reject, writer.uint32(26).fork()).ldelim();
|
|
3308
1854
|
break;
|
|
3309
|
-
case "
|
|
3310
|
-
|
|
1855
|
+
case "delete":
|
|
1856
|
+
FriendshipUpdate_DeleteResponse.encode(message.update.delete, writer.uint32(34).fork()).ldelim();
|
|
3311
1857
|
break;
|
|
3312
|
-
case "
|
|
3313
|
-
|
|
1858
|
+
case "cancel":
|
|
1859
|
+
FriendshipUpdate_CancelResponse.encode(message.update.cancel, writer.uint32(42).fork()).ldelim();
|
|
3314
1860
|
break;
|
|
3315
1861
|
}
|
|
3316
1862
|
return writer;
|
|
3317
1863
|
}
|
|
3318
1864
|
|
|
3319
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1865
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate {
|
|
3320
1866
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3321
1867
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3322
|
-
const message =
|
|
1868
|
+
const message = createBaseFriendshipUpdate();
|
|
3323
1869
|
while (reader.pos < end) {
|
|
3324
1870
|
const tag = reader.uint32();
|
|
3325
1871
|
switch (tag >>> 3) {
|
|
@@ -3328,37 +1874,35 @@ export namespace BlockUserResponse {
|
|
|
3328
1874
|
break;
|
|
3329
1875
|
}
|
|
3330
1876
|
|
|
3331
|
-
message.
|
|
1877
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.decode(reader, reader.uint32()) };
|
|
3332
1878
|
continue;
|
|
3333
1879
|
case 2:
|
|
3334
1880
|
if (tag !== 18) {
|
|
3335
1881
|
break;
|
|
3336
1882
|
}
|
|
3337
1883
|
|
|
3338
|
-
message.
|
|
3339
|
-
$case: "internalServerError",
|
|
3340
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
3341
|
-
};
|
|
1884
|
+
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.decode(reader, reader.uint32()) };
|
|
3342
1885
|
continue;
|
|
3343
1886
|
case 3:
|
|
3344
1887
|
if (tag !== 26) {
|
|
3345
1888
|
break;
|
|
3346
1889
|
}
|
|
3347
1890
|
|
|
3348
|
-
message.
|
|
3349
|
-
$case: "invalidRequest",
|
|
3350
|
-
invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
|
|
3351
|
-
};
|
|
1891
|
+
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.decode(reader, reader.uint32()) };
|
|
3352
1892
|
continue;
|
|
3353
1893
|
case 4:
|
|
3354
1894
|
if (tag !== 34) {
|
|
3355
1895
|
break;
|
|
3356
1896
|
}
|
|
3357
1897
|
|
|
3358
|
-
message.
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
1898
|
+
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.decode(reader, reader.uint32()) };
|
|
1899
|
+
continue;
|
|
1900
|
+
case 5:
|
|
1901
|
+
if (tag !== 42) {
|
|
1902
|
+
break;
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.decode(reader, reader.uint32()) };
|
|
3362
1906
|
continue;
|
|
3363
1907
|
}
|
|
3364
1908
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3369,160 +1913,89 @@ export namespace BlockUserResponse {
|
|
|
3369
1913
|
return message;
|
|
3370
1914
|
}
|
|
3371
1915
|
|
|
3372
|
-
export function fromJSON(object: any):
|
|
1916
|
+
export function fromJSON(object: any): FriendshipUpdate {
|
|
3373
1917
|
return {
|
|
3374
|
-
|
|
3375
|
-
? { $case: "
|
|
3376
|
-
: isSet(object.
|
|
3377
|
-
? {
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
:
|
|
3382
|
-
|
|
3383
|
-
:
|
|
3384
|
-
? { $case: "profileNotFound", profileNotFound: ProfileNotFound.fromJSON(object.profileNotFound) }
|
|
1918
|
+
update: isSet(object.request)
|
|
1919
|
+
? { $case: "request", request: FriendshipRequestResponse.fromJSON(object.request) }
|
|
1920
|
+
: isSet(object.accept)
|
|
1921
|
+
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
1922
|
+
: isSet(object.reject)
|
|
1923
|
+
? { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromJSON(object.reject) }
|
|
1924
|
+
: isSet(object.delete)
|
|
1925
|
+
? { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromJSON(object.delete) }
|
|
1926
|
+
: isSet(object.cancel)
|
|
1927
|
+
? { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromJSON(object.cancel) }
|
|
3385
1928
|
: undefined,
|
|
3386
1929
|
};
|
|
3387
1930
|
}
|
|
3388
1931
|
|
|
3389
|
-
export function toJSON(message:
|
|
1932
|
+
export function toJSON(message: FriendshipUpdate): unknown {
|
|
3390
1933
|
const obj: any = {};
|
|
3391
|
-
message.
|
|
3392
|
-
(obj.
|
|
3393
|
-
message.
|
|
3394
|
-
(obj.
|
|
3395
|
-
?
|
|
1934
|
+
message.update?.$case === "request" &&
|
|
1935
|
+
(obj.request = message.update?.request ? FriendshipRequestResponse.toJSON(message.update?.request) : undefined);
|
|
1936
|
+
message.update?.$case === "accept" &&
|
|
1937
|
+
(obj.accept = message.update?.accept
|
|
1938
|
+
? FriendshipUpdate_AcceptResponse.toJSON(message.update?.accept)
|
|
1939
|
+
: undefined);
|
|
1940
|
+
message.update?.$case === "reject" &&
|
|
1941
|
+
(obj.reject = message.update?.reject
|
|
1942
|
+
? FriendshipUpdate_RejectResponse.toJSON(message.update?.reject)
|
|
3396
1943
|
: undefined);
|
|
3397
|
-
message.
|
|
3398
|
-
(obj.
|
|
3399
|
-
?
|
|
1944
|
+
message.update?.$case === "delete" &&
|
|
1945
|
+
(obj.delete = message.update?.delete
|
|
1946
|
+
? FriendshipUpdate_DeleteResponse.toJSON(message.update?.delete)
|
|
3400
1947
|
: undefined);
|
|
3401
|
-
message.
|
|
3402
|
-
(obj.
|
|
3403
|
-
?
|
|
1948
|
+
message.update?.$case === "cancel" &&
|
|
1949
|
+
(obj.cancel = message.update?.cancel
|
|
1950
|
+
? FriendshipUpdate_CancelResponse.toJSON(message.update?.cancel)
|
|
3404
1951
|
: undefined);
|
|
3405
1952
|
return obj;
|
|
3406
1953
|
}
|
|
3407
1954
|
|
|
3408
|
-
export function create<I extends Exact<DeepPartial<
|
|
3409
|
-
return
|
|
1955
|
+
export function create<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(base?: I): FriendshipUpdate {
|
|
1956
|
+
return FriendshipUpdate.fromPartial(base ?? {});
|
|
3410
1957
|
}
|
|
3411
1958
|
|
|
3412
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
3413
|
-
const message =
|
|
3414
|
-
if (object.
|
|
3415
|
-
message.
|
|
3416
|
-
}
|
|
3417
|
-
if (
|
|
3418
|
-
object.response?.$case === "internalServerError" &&
|
|
3419
|
-
object.response?.internalServerError !== undefined &&
|
|
3420
|
-
object.response?.internalServerError !== null
|
|
3421
|
-
) {
|
|
3422
|
-
message.response = {
|
|
3423
|
-
$case: "internalServerError",
|
|
3424
|
-
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
3425
|
-
};
|
|
1959
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(object: I): FriendshipUpdate {
|
|
1960
|
+
const message = createBaseFriendshipUpdate();
|
|
1961
|
+
if (object.update?.$case === "request" && object.update?.request !== undefined && object.update?.request !== null) {
|
|
1962
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.fromPartial(object.update.request) };
|
|
3426
1963
|
}
|
|
3427
|
-
if (
|
|
3428
|
-
|
|
3429
|
-
object.response?.invalidRequest !== undefined &&
|
|
3430
|
-
object.response?.invalidRequest !== null
|
|
3431
|
-
) {
|
|
3432
|
-
message.response = {
|
|
3433
|
-
$case: "invalidRequest",
|
|
3434
|
-
invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
|
|
3435
|
-
};
|
|
1964
|
+
if (object.update?.$case === "accept" && object.update?.accept !== undefined && object.update?.accept !== null) {
|
|
1965
|
+
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
3436
1966
|
}
|
|
3437
|
-
if (
|
|
3438
|
-
|
|
3439
|
-
object.response?.profileNotFound !== undefined &&
|
|
3440
|
-
object.response?.profileNotFound !== null
|
|
3441
|
-
) {
|
|
3442
|
-
message.response = {
|
|
3443
|
-
$case: "profileNotFound",
|
|
3444
|
-
profileNotFound: ProfileNotFound.fromPartial(object.response.profileNotFound),
|
|
3445
|
-
};
|
|
1967
|
+
if (object.update?.$case === "reject" && object.update?.reject !== undefined && object.update?.reject !== null) {
|
|
1968
|
+
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromPartial(object.update.reject) };
|
|
3446
1969
|
}
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
}
|
|
3450
|
-
|
|
3451
|
-
function createBaseBlockUserResponse_Ok(): BlockUserResponse_Ok {
|
|
3452
|
-
return { profile: undefined };
|
|
3453
|
-
}
|
|
3454
|
-
|
|
3455
|
-
export namespace BlockUserResponse_Ok {
|
|
3456
|
-
export function encode(message: BlockUserResponse_Ok, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
3457
|
-
if (message.profile !== undefined) {
|
|
3458
|
-
BlockedUserProfile.encode(message.profile, writer.uint32(10).fork()).ldelim();
|
|
1970
|
+
if (object.update?.$case === "delete" && object.update?.delete !== undefined && object.update?.delete !== null) {
|
|
1971
|
+
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromPartial(object.update.delete) };
|
|
3459
1972
|
}
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): BlockUserResponse_Ok {
|
|
3464
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3465
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3466
|
-
const message = createBaseBlockUserResponse_Ok();
|
|
3467
|
-
while (reader.pos < end) {
|
|
3468
|
-
const tag = reader.uint32();
|
|
3469
|
-
switch (tag >>> 3) {
|
|
3470
|
-
case 1:
|
|
3471
|
-
if (tag !== 10) {
|
|
3472
|
-
break;
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
message.profile = BlockedUserProfile.decode(reader, reader.uint32());
|
|
3476
|
-
continue;
|
|
3477
|
-
}
|
|
3478
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3479
|
-
break;
|
|
3480
|
-
}
|
|
3481
|
-
reader.skipType(tag & 7);
|
|
1973
|
+
if (object.update?.$case === "cancel" && object.update?.cancel !== undefined && object.update?.cancel !== null) {
|
|
1974
|
+
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromPartial(object.update.cancel) };
|
|
3482
1975
|
}
|
|
3483
1976
|
return message;
|
|
3484
1977
|
}
|
|
3485
|
-
|
|
3486
|
-
export function fromJSON(object: any): BlockUserResponse_Ok {
|
|
3487
|
-
return { profile: isSet(object.profile) ? BlockedUserProfile.fromJSON(object.profile) : undefined };
|
|
3488
|
-
}
|
|
3489
|
-
|
|
3490
|
-
export function toJSON(message: BlockUserResponse_Ok): unknown {
|
|
3491
|
-
const obj: any = {};
|
|
3492
|
-
message.profile !== undefined &&
|
|
3493
|
-
(obj.profile = message.profile ? BlockedUserProfile.toJSON(message.profile) : undefined);
|
|
3494
|
-
return obj;
|
|
3495
|
-
}
|
|
3496
|
-
|
|
3497
|
-
export function create<I extends Exact<DeepPartial<BlockUserResponse_Ok>, I>>(base?: I): BlockUserResponse_Ok {
|
|
3498
|
-
return BlockUserResponse_Ok.fromPartial(base ?? {});
|
|
3499
|
-
}
|
|
3500
|
-
|
|
3501
|
-
export function fromPartial<I extends Exact<DeepPartial<BlockUserResponse_Ok>, I>>(object: I): BlockUserResponse_Ok {
|
|
3502
|
-
const message = createBaseBlockUserResponse_Ok();
|
|
3503
|
-
message.profile = (object.profile !== undefined && object.profile !== null)
|
|
3504
|
-
? BlockedUserProfile.fromPartial(object.profile)
|
|
3505
|
-
: undefined;
|
|
3506
|
-
return message;
|
|
3507
|
-
}
|
|
3508
1978
|
}
|
|
3509
1979
|
|
|
3510
|
-
function
|
|
1980
|
+
function createBaseFriendshipUpdate_AcceptResponse(): FriendshipUpdate_AcceptResponse {
|
|
3511
1981
|
return { user: undefined };
|
|
3512
1982
|
}
|
|
3513
1983
|
|
|
3514
|
-
export namespace
|
|
3515
|
-
export function encode(
|
|
1984
|
+
export namespace FriendshipUpdate_AcceptResponse {
|
|
1985
|
+
export function encode(
|
|
1986
|
+
message: FriendshipUpdate_AcceptResponse,
|
|
1987
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
1988
|
+
): _m0.Writer {
|
|
3516
1989
|
if (message.user !== undefined) {
|
|
3517
1990
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
3518
1991
|
}
|
|
3519
1992
|
return writer;
|
|
3520
1993
|
}
|
|
3521
1994
|
|
|
3522
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
1995
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_AcceptResponse {
|
|
3523
1996
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3524
1997
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3525
|
-
const message =
|
|
1998
|
+
const message = createBaseFriendshipUpdate_AcceptResponse();
|
|
3526
1999
|
while (reader.pos < end) {
|
|
3527
2000
|
const tag = reader.uint32();
|
|
3528
2001
|
switch (tag >>> 3) {
|
|
@@ -3542,54 +2015,50 @@ export namespace UnblockUserPayload {
|
|
|
3542
2015
|
return message;
|
|
3543
2016
|
}
|
|
3544
2017
|
|
|
3545
|
-
export function fromJSON(object: any):
|
|
2018
|
+
export function fromJSON(object: any): FriendshipUpdate_AcceptResponse {
|
|
3546
2019
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
3547
2020
|
}
|
|
3548
2021
|
|
|
3549
|
-
export function toJSON(message:
|
|
2022
|
+
export function toJSON(message: FriendshipUpdate_AcceptResponse): unknown {
|
|
3550
2023
|
const obj: any = {};
|
|
3551
2024
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
3552
2025
|
return obj;
|
|
3553
2026
|
}
|
|
3554
2027
|
|
|
3555
|
-
export function create<I extends Exact<DeepPartial<
|
|
3556
|
-
|
|
2028
|
+
export function create<I extends Exact<DeepPartial<FriendshipUpdate_AcceptResponse>, I>>(
|
|
2029
|
+
base?: I,
|
|
2030
|
+
): FriendshipUpdate_AcceptResponse {
|
|
2031
|
+
return FriendshipUpdate_AcceptResponse.fromPartial(base ?? {});
|
|
3557
2032
|
}
|
|
3558
2033
|
|
|
3559
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
3560
|
-
|
|
2034
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_AcceptResponse>, I>>(
|
|
2035
|
+
object: I,
|
|
2036
|
+
): FriendshipUpdate_AcceptResponse {
|
|
2037
|
+
const message = createBaseFriendshipUpdate_AcceptResponse();
|
|
3561
2038
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
3562
2039
|
return message;
|
|
3563
2040
|
}
|
|
3564
2041
|
}
|
|
3565
2042
|
|
|
3566
|
-
function
|
|
3567
|
-
return {
|
|
2043
|
+
function createBaseFriendshipUpdate_RejectResponse(): FriendshipUpdate_RejectResponse {
|
|
2044
|
+
return { user: undefined };
|
|
3568
2045
|
}
|
|
3569
2046
|
|
|
3570
|
-
export namespace
|
|
3571
|
-
export function encode(
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
3578
|
-
break;
|
|
3579
|
-
case "invalidRequest":
|
|
3580
|
-
InvalidRequest.encode(message.response.invalidRequest, writer.uint32(26).fork()).ldelim();
|
|
3581
|
-
break;
|
|
3582
|
-
case "profileNotFound":
|
|
3583
|
-
ProfileNotFound.encode(message.response.profileNotFound, writer.uint32(34).fork()).ldelim();
|
|
3584
|
-
break;
|
|
2047
|
+
export namespace FriendshipUpdate_RejectResponse {
|
|
2048
|
+
export function encode(
|
|
2049
|
+
message: FriendshipUpdate_RejectResponse,
|
|
2050
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
2051
|
+
): _m0.Writer {
|
|
2052
|
+
if (message.user !== undefined) {
|
|
2053
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
3585
2054
|
}
|
|
3586
2055
|
return writer;
|
|
3587
2056
|
}
|
|
3588
2057
|
|
|
3589
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2058
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_RejectResponse {
|
|
3590
2059
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3591
2060
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3592
|
-
const message =
|
|
2061
|
+
const message = createBaseFriendshipUpdate_RejectResponse();
|
|
3593
2062
|
while (reader.pos < end) {
|
|
3594
2063
|
const tag = reader.uint32();
|
|
3595
2064
|
switch (tag >>> 3) {
|
|
@@ -3598,37 +2067,7 @@ export namespace UnblockUserResponse {
|
|
|
3598
2067
|
break;
|
|
3599
2068
|
}
|
|
3600
2069
|
|
|
3601
|
-
message.
|
|
3602
|
-
continue;
|
|
3603
|
-
case 2:
|
|
3604
|
-
if (tag !== 18) {
|
|
3605
|
-
break;
|
|
3606
|
-
}
|
|
3607
|
-
|
|
3608
|
-
message.response = {
|
|
3609
|
-
$case: "internalServerError",
|
|
3610
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
3611
|
-
};
|
|
3612
|
-
continue;
|
|
3613
|
-
case 3:
|
|
3614
|
-
if (tag !== 26) {
|
|
3615
|
-
break;
|
|
3616
|
-
}
|
|
3617
|
-
|
|
3618
|
-
message.response = {
|
|
3619
|
-
$case: "invalidRequest",
|
|
3620
|
-
invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
|
|
3621
|
-
};
|
|
3622
|
-
continue;
|
|
3623
|
-
case 4:
|
|
3624
|
-
if (tag !== 34) {
|
|
3625
|
-
break;
|
|
3626
|
-
}
|
|
3627
|
-
|
|
3628
|
-
message.response = {
|
|
3629
|
-
$case: "profileNotFound",
|
|
3630
|
-
profileNotFound: ProfileNotFound.decode(reader, reader.uint32()),
|
|
3631
|
-
};
|
|
2070
|
+
message.user = User.decode(reader, reader.uint32());
|
|
3632
2071
|
continue;
|
|
3633
2072
|
}
|
|
3634
2073
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3639,101 +2078,50 @@ export namespace UnblockUserResponse {
|
|
|
3639
2078
|
return message;
|
|
3640
2079
|
}
|
|
3641
2080
|
|
|
3642
|
-
export function fromJSON(object: any):
|
|
3643
|
-
return {
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
message
|
|
3662
|
-
|
|
3663
|
-
message.response?.$case === "internalServerError" &&
|
|
3664
|
-
(obj.internalServerError = message.response?.internalServerError
|
|
3665
|
-
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
3666
|
-
: undefined);
|
|
3667
|
-
message.response?.$case === "invalidRequest" &&
|
|
3668
|
-
(obj.invalidRequest = message.response?.invalidRequest
|
|
3669
|
-
? InvalidRequest.toJSON(message.response?.invalidRequest)
|
|
3670
|
-
: undefined);
|
|
3671
|
-
message.response?.$case === "profileNotFound" &&
|
|
3672
|
-
(obj.profileNotFound = message.response?.profileNotFound
|
|
3673
|
-
? ProfileNotFound.toJSON(message.response?.profileNotFound)
|
|
3674
|
-
: undefined);
|
|
3675
|
-
return obj;
|
|
3676
|
-
}
|
|
3677
|
-
|
|
3678
|
-
export function create<I extends Exact<DeepPartial<UnblockUserResponse>, I>>(base?: I): UnblockUserResponse {
|
|
3679
|
-
return UnblockUserResponse.fromPartial(base ?? {});
|
|
3680
|
-
}
|
|
3681
|
-
|
|
3682
|
-
export function fromPartial<I extends Exact<DeepPartial<UnblockUserResponse>, I>>(object: I): UnblockUserResponse {
|
|
3683
|
-
const message = createBaseUnblockUserResponse();
|
|
3684
|
-
if (object.response?.$case === "ok" && object.response?.ok !== undefined && object.response?.ok !== null) {
|
|
3685
|
-
message.response = { $case: "ok", ok: UnblockUserResponse_Ok.fromPartial(object.response.ok) };
|
|
3686
|
-
}
|
|
3687
|
-
if (
|
|
3688
|
-
object.response?.$case === "internalServerError" &&
|
|
3689
|
-
object.response?.internalServerError !== undefined &&
|
|
3690
|
-
object.response?.internalServerError !== null
|
|
3691
|
-
) {
|
|
3692
|
-
message.response = {
|
|
3693
|
-
$case: "internalServerError",
|
|
3694
|
-
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
3695
|
-
};
|
|
3696
|
-
}
|
|
3697
|
-
if (
|
|
3698
|
-
object.response?.$case === "invalidRequest" &&
|
|
3699
|
-
object.response?.invalidRequest !== undefined &&
|
|
3700
|
-
object.response?.invalidRequest !== null
|
|
3701
|
-
) {
|
|
3702
|
-
message.response = {
|
|
3703
|
-
$case: "invalidRequest",
|
|
3704
|
-
invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
|
|
3705
|
-
};
|
|
3706
|
-
}
|
|
3707
|
-
if (
|
|
3708
|
-
object.response?.$case === "profileNotFound" &&
|
|
3709
|
-
object.response?.profileNotFound !== undefined &&
|
|
3710
|
-
object.response?.profileNotFound !== null
|
|
3711
|
-
) {
|
|
3712
|
-
message.response = {
|
|
3713
|
-
$case: "profileNotFound",
|
|
3714
|
-
profileNotFound: ProfileNotFound.fromPartial(object.response.profileNotFound),
|
|
3715
|
-
};
|
|
3716
|
-
}
|
|
2081
|
+
export function fromJSON(object: any): FriendshipUpdate_RejectResponse {
|
|
2082
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
export function toJSON(message: FriendshipUpdate_RejectResponse): unknown {
|
|
2086
|
+
const obj: any = {};
|
|
2087
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2088
|
+
return obj;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
export function create<I extends Exact<DeepPartial<FriendshipUpdate_RejectResponse>, I>>(
|
|
2092
|
+
base?: I,
|
|
2093
|
+
): FriendshipUpdate_RejectResponse {
|
|
2094
|
+
return FriendshipUpdate_RejectResponse.fromPartial(base ?? {});
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_RejectResponse>, I>>(
|
|
2098
|
+
object: I,
|
|
2099
|
+
): FriendshipUpdate_RejectResponse {
|
|
2100
|
+
const message = createBaseFriendshipUpdate_RejectResponse();
|
|
2101
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
3717
2102
|
return message;
|
|
3718
2103
|
}
|
|
3719
2104
|
}
|
|
3720
2105
|
|
|
3721
|
-
function
|
|
3722
|
-
return {
|
|
2106
|
+
function createBaseFriendshipUpdate_DeleteResponse(): FriendshipUpdate_DeleteResponse {
|
|
2107
|
+
return { user: undefined };
|
|
3723
2108
|
}
|
|
3724
2109
|
|
|
3725
|
-
export namespace
|
|
3726
|
-
export function encode(
|
|
3727
|
-
|
|
3728
|
-
|
|
2110
|
+
export namespace FriendshipUpdate_DeleteResponse {
|
|
2111
|
+
export function encode(
|
|
2112
|
+
message: FriendshipUpdate_DeleteResponse,
|
|
2113
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
2114
|
+
): _m0.Writer {
|
|
2115
|
+
if (message.user !== undefined) {
|
|
2116
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
3729
2117
|
}
|
|
3730
2118
|
return writer;
|
|
3731
2119
|
}
|
|
3732
2120
|
|
|
3733
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2121
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_DeleteResponse {
|
|
3734
2122
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3735
2123
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3736
|
-
const message =
|
|
2124
|
+
const message = createBaseFriendshipUpdate_DeleteResponse();
|
|
3737
2125
|
while (reader.pos < end) {
|
|
3738
2126
|
const tag = reader.uint32();
|
|
3739
2127
|
switch (tag >>> 3) {
|
|
@@ -3742,7 +2130,7 @@ export namespace UnblockUserResponse_Ok {
|
|
|
3742
2130
|
break;
|
|
3743
2131
|
}
|
|
3744
2132
|
|
|
3745
|
-
message.
|
|
2133
|
+
message.user = User.decode(reader, reader.uint32());
|
|
3746
2134
|
continue;
|
|
3747
2135
|
}
|
|
3748
2136
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3753,48 +2141,50 @@ export namespace UnblockUserResponse_Ok {
|
|
|
3753
2141
|
return message;
|
|
3754
2142
|
}
|
|
3755
2143
|
|
|
3756
|
-
export function fromJSON(object: any):
|
|
3757
|
-
return {
|
|
2144
|
+
export function fromJSON(object: any): FriendshipUpdate_DeleteResponse {
|
|
2145
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
3758
2146
|
}
|
|
3759
2147
|
|
|
3760
|
-
export function toJSON(message:
|
|
2148
|
+
export function toJSON(message: FriendshipUpdate_DeleteResponse): unknown {
|
|
3761
2149
|
const obj: any = {};
|
|
3762
|
-
message.
|
|
3763
|
-
(obj.profile = message.profile ? BlockedUserProfile.toJSON(message.profile) : undefined);
|
|
2150
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
3764
2151
|
return obj;
|
|
3765
2152
|
}
|
|
3766
2153
|
|
|
3767
|
-
export function create<I extends Exact<DeepPartial<
|
|
3768
|
-
|
|
2154
|
+
export function create<I extends Exact<DeepPartial<FriendshipUpdate_DeleteResponse>, I>>(
|
|
2155
|
+
base?: I,
|
|
2156
|
+
): FriendshipUpdate_DeleteResponse {
|
|
2157
|
+
return FriendshipUpdate_DeleteResponse.fromPartial(base ?? {});
|
|
3769
2158
|
}
|
|
3770
2159
|
|
|
3771
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
2160
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_DeleteResponse>, I>>(
|
|
3772
2161
|
object: I,
|
|
3773
|
-
):
|
|
3774
|
-
const message =
|
|
3775
|
-
message.
|
|
3776
|
-
? BlockedUserProfile.fromPartial(object.profile)
|
|
3777
|
-
: undefined;
|
|
2162
|
+
): FriendshipUpdate_DeleteResponse {
|
|
2163
|
+
const message = createBaseFriendshipUpdate_DeleteResponse();
|
|
2164
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
3778
2165
|
return message;
|
|
3779
2166
|
}
|
|
3780
2167
|
}
|
|
3781
2168
|
|
|
3782
|
-
function
|
|
3783
|
-
return {
|
|
2169
|
+
function createBaseFriendshipUpdate_CancelResponse(): FriendshipUpdate_CancelResponse {
|
|
2170
|
+
return { user: undefined };
|
|
3784
2171
|
}
|
|
3785
2172
|
|
|
3786
|
-
export namespace
|
|
3787
|
-
export function encode(
|
|
3788
|
-
|
|
3789
|
-
|
|
2173
|
+
export namespace FriendshipUpdate_CancelResponse {
|
|
2174
|
+
export function encode(
|
|
2175
|
+
message: FriendshipUpdate_CancelResponse,
|
|
2176
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
2177
|
+
): _m0.Writer {
|
|
2178
|
+
if (message.user !== undefined) {
|
|
2179
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
3790
2180
|
}
|
|
3791
2181
|
return writer;
|
|
3792
2182
|
}
|
|
3793
2183
|
|
|
3794
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2184
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_CancelResponse {
|
|
3795
2185
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3796
2186
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3797
|
-
const message =
|
|
2187
|
+
const message = createBaseFriendshipUpdate_CancelResponse();
|
|
3798
2188
|
while (reader.pos < end) {
|
|
3799
2189
|
const tag = reader.uint32();
|
|
3800
2190
|
switch (tag >>> 3) {
|
|
@@ -3803,7 +2193,7 @@ export namespace GetBlockedUsersPayload {
|
|
|
3803
2193
|
break;
|
|
3804
2194
|
}
|
|
3805
2195
|
|
|
3806
|
-
message.
|
|
2196
|
+
message.user = User.decode(reader, reader.uint32());
|
|
3807
2197
|
continue;
|
|
3808
2198
|
}
|
|
3809
2199
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3814,51 +2204,47 @@ export namespace GetBlockedUsersPayload {
|
|
|
3814
2204
|
return message;
|
|
3815
2205
|
}
|
|
3816
2206
|
|
|
3817
|
-
export function fromJSON(object: any):
|
|
3818
|
-
return {
|
|
2207
|
+
export function fromJSON(object: any): FriendshipUpdate_CancelResponse {
|
|
2208
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
3819
2209
|
}
|
|
3820
2210
|
|
|
3821
|
-
export function toJSON(message:
|
|
2211
|
+
export function toJSON(message: FriendshipUpdate_CancelResponse): unknown {
|
|
3822
2212
|
const obj: any = {};
|
|
3823
|
-
message.
|
|
3824
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
2213
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
3825
2214
|
return obj;
|
|
3826
2215
|
}
|
|
3827
2216
|
|
|
3828
|
-
export function create<I extends Exact<DeepPartial<
|
|
3829
|
-
|
|
2217
|
+
export function create<I extends Exact<DeepPartial<FriendshipUpdate_CancelResponse>, I>>(
|
|
2218
|
+
base?: I,
|
|
2219
|
+
): FriendshipUpdate_CancelResponse {
|
|
2220
|
+
return FriendshipUpdate_CancelResponse.fromPartial(base ?? {});
|
|
3830
2221
|
}
|
|
3831
2222
|
|
|
3832
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
2223
|
+
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_CancelResponse>, I>>(
|
|
3833
2224
|
object: I,
|
|
3834
|
-
):
|
|
3835
|
-
const message =
|
|
3836
|
-
message.
|
|
3837
|
-
? Pagination.fromPartial(object.pagination)
|
|
3838
|
-
: undefined;
|
|
2225
|
+
): FriendshipUpdate_CancelResponse {
|
|
2226
|
+
const message = createBaseFriendshipUpdate_CancelResponse();
|
|
2227
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
3839
2228
|
return message;
|
|
3840
2229
|
}
|
|
3841
2230
|
}
|
|
3842
2231
|
|
|
3843
|
-
function
|
|
3844
|
-
return {
|
|
2232
|
+
function createBaseGetFriendshipStatusPayload(): GetFriendshipStatusPayload {
|
|
2233
|
+
return { user: undefined };
|
|
3845
2234
|
}
|
|
3846
2235
|
|
|
3847
|
-
export namespace
|
|
3848
|
-
export function encode(message:
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
}
|
|
3852
|
-
if (message.paginationData !== undefined) {
|
|
3853
|
-
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
2236
|
+
export namespace GetFriendshipStatusPayload {
|
|
2237
|
+
export function encode(message: GetFriendshipStatusPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2238
|
+
if (message.user !== undefined) {
|
|
2239
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
3854
2240
|
}
|
|
3855
2241
|
return writer;
|
|
3856
2242
|
}
|
|
3857
2243
|
|
|
3858
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2244
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusPayload {
|
|
3859
2245
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3860
2246
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3861
|
-
const message =
|
|
2247
|
+
const message = createBaseGetFriendshipStatusPayload();
|
|
3862
2248
|
while (reader.pos < end) {
|
|
3863
2249
|
const tag = reader.uint32();
|
|
3864
2250
|
switch (tag >>> 3) {
|
|
@@ -3867,14 +2253,7 @@ export namespace GetBlockedUsersResponse {
|
|
|
3867
2253
|
break;
|
|
3868
2254
|
}
|
|
3869
2255
|
|
|
3870
|
-
message.
|
|
3871
|
-
continue;
|
|
3872
|
-
case 2:
|
|
3873
|
-
if (tag !== 18) {
|
|
3874
|
-
break;
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
|
-
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
2256
|
+
message.user = User.decode(reader, reader.uint32());
|
|
3878
2257
|
continue;
|
|
3879
2258
|
}
|
|
3880
2259
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3885,60 +2264,52 @@ export namespace GetBlockedUsersResponse {
|
|
|
3885
2264
|
return message;
|
|
3886
2265
|
}
|
|
3887
2266
|
|
|
3888
|
-
export function fromJSON(object: any):
|
|
3889
|
-
return {
|
|
3890
|
-
profiles: Array.isArray(object?.profiles) ? object.profiles.map((e: any) => BlockedUserProfile.fromJSON(e)) : [],
|
|
3891
|
-
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
3892
|
-
};
|
|
2267
|
+
export function fromJSON(object: any): GetFriendshipStatusPayload {
|
|
2268
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
3893
2269
|
}
|
|
3894
2270
|
|
|
3895
|
-
export function toJSON(message:
|
|
2271
|
+
export function toJSON(message: GetFriendshipStatusPayload): unknown {
|
|
3896
2272
|
const obj: any = {};
|
|
3897
|
-
|
|
3898
|
-
obj.profiles = message.profiles.map((e) => e ? BlockedUserProfile.toJSON(e) : undefined);
|
|
3899
|
-
} else {
|
|
3900
|
-
obj.profiles = [];
|
|
3901
|
-
}
|
|
3902
|
-
message.paginationData !== undefined &&
|
|
3903
|
-
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
2273
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
3904
2274
|
return obj;
|
|
3905
2275
|
}
|
|
3906
2276
|
|
|
3907
|
-
export function create<I extends Exact<DeepPartial<
|
|
3908
|
-
|
|
2277
|
+
export function create<I extends Exact<DeepPartial<GetFriendshipStatusPayload>, I>>(
|
|
2278
|
+
base?: I,
|
|
2279
|
+
): GetFriendshipStatusPayload {
|
|
2280
|
+
return GetFriendshipStatusPayload.fromPartial(base ?? {});
|
|
3909
2281
|
}
|
|
3910
2282
|
|
|
3911
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
2283
|
+
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusPayload>, I>>(
|
|
3912
2284
|
object: I,
|
|
3913
|
-
):
|
|
3914
|
-
const message =
|
|
3915
|
-
message.
|
|
3916
|
-
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
3917
|
-
? PaginatedResponse.fromPartial(object.paginationData)
|
|
3918
|
-
: undefined;
|
|
2285
|
+
): GetFriendshipStatusPayload {
|
|
2286
|
+
const message = createBaseGetFriendshipStatusPayload();
|
|
2287
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
3919
2288
|
return message;
|
|
3920
2289
|
}
|
|
3921
2290
|
}
|
|
3922
2291
|
|
|
3923
|
-
function
|
|
3924
|
-
return {
|
|
2292
|
+
function createBaseGetFriendshipStatusResponse(): GetFriendshipStatusResponse {
|
|
2293
|
+
return { response: undefined };
|
|
3925
2294
|
}
|
|
3926
2295
|
|
|
3927
|
-
export namespace
|
|
3928
|
-
export function encode(message:
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
2296
|
+
export namespace GetFriendshipStatusResponse {
|
|
2297
|
+
export function encode(message: GetFriendshipStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2298
|
+
switch (message.response?.$case) {
|
|
2299
|
+
case "accepted":
|
|
2300
|
+
GetFriendshipStatusResponse_Ok.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
2301
|
+
break;
|
|
2302
|
+
case "internalServerError":
|
|
2303
|
+
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
2304
|
+
break;
|
|
3934
2305
|
}
|
|
3935
2306
|
return writer;
|
|
3936
2307
|
}
|
|
3937
2308
|
|
|
3938
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2309
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusResponse {
|
|
3939
2310
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3940
2311
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3941
|
-
const message =
|
|
2312
|
+
const message = createBaseGetFriendshipStatusResponse();
|
|
3942
2313
|
while (reader.pos < end) {
|
|
3943
2314
|
const tag = reader.uint32();
|
|
3944
2315
|
switch (tag >>> 3) {
|
|
@@ -3947,14 +2318,20 @@ export namespace GetBlockingStatusResponse {
|
|
|
3947
2318
|
break;
|
|
3948
2319
|
}
|
|
3949
2320
|
|
|
3950
|
-
message.
|
|
2321
|
+
message.response = {
|
|
2322
|
+
$case: "accepted",
|
|
2323
|
+
accepted: GetFriendshipStatusResponse_Ok.decode(reader, reader.uint32()),
|
|
2324
|
+
};
|
|
3951
2325
|
continue;
|
|
3952
2326
|
case 2:
|
|
3953
2327
|
if (tag !== 18) {
|
|
3954
2328
|
break;
|
|
3955
2329
|
}
|
|
3956
2330
|
|
|
3957
|
-
message.
|
|
2331
|
+
message.response = {
|
|
2332
|
+
$case: "internalServerError",
|
|
2333
|
+
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
2334
|
+
};
|
|
3958
2335
|
continue;
|
|
3959
2336
|
}
|
|
3960
2337
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3965,79 +2342,104 @@ export namespace GetBlockingStatusResponse {
|
|
|
3965
2342
|
return message;
|
|
3966
2343
|
}
|
|
3967
2344
|
|
|
3968
|
-
export function fromJSON(object: any):
|
|
2345
|
+
export function fromJSON(object: any): GetFriendshipStatusResponse {
|
|
3969
2346
|
return {
|
|
3970
|
-
|
|
3971
|
-
|
|
2347
|
+
response: isSet(object.accepted)
|
|
2348
|
+
? { $case: "accepted", accepted: GetFriendshipStatusResponse_Ok.fromJSON(object.accepted) }
|
|
2349
|
+
: isSet(object.internalServerError)
|
|
2350
|
+
? {
|
|
2351
|
+
$case: "internalServerError",
|
|
2352
|
+
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
2353
|
+
}
|
|
2354
|
+
: undefined,
|
|
3972
2355
|
};
|
|
3973
2356
|
}
|
|
3974
2357
|
|
|
3975
|
-
export function toJSON(message:
|
|
2358
|
+
export function toJSON(message: GetFriendshipStatusResponse): unknown {
|
|
3976
2359
|
const obj: any = {};
|
|
3977
|
-
|
|
3978
|
-
obj.
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
obj.blockedByUsers = [];
|
|
3986
|
-
}
|
|
2360
|
+
message.response?.$case === "accepted" &&
|
|
2361
|
+
(obj.accepted = message.response?.accepted
|
|
2362
|
+
? GetFriendshipStatusResponse_Ok.toJSON(message.response?.accepted)
|
|
2363
|
+
: undefined);
|
|
2364
|
+
message.response?.$case === "internalServerError" &&
|
|
2365
|
+
(obj.internalServerError = message.response?.internalServerError
|
|
2366
|
+
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
2367
|
+
: undefined);
|
|
3987
2368
|
return obj;
|
|
3988
2369
|
}
|
|
3989
2370
|
|
|
3990
|
-
export function create<I extends Exact<DeepPartial<
|
|
2371
|
+
export function create<I extends Exact<DeepPartial<GetFriendshipStatusResponse>, I>>(
|
|
3991
2372
|
base?: I,
|
|
3992
|
-
):
|
|
3993
|
-
return
|
|
2373
|
+
): GetFriendshipStatusResponse {
|
|
2374
|
+
return GetFriendshipStatusResponse.fromPartial(base ?? {});
|
|
3994
2375
|
}
|
|
3995
2376
|
|
|
3996
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
2377
|
+
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusResponse>, I>>(
|
|
3997
2378
|
object: I,
|
|
3998
|
-
):
|
|
3999
|
-
const message =
|
|
4000
|
-
|
|
4001
|
-
|
|
2379
|
+
): GetFriendshipStatusResponse {
|
|
2380
|
+
const message = createBaseGetFriendshipStatusResponse();
|
|
2381
|
+
if (
|
|
2382
|
+
object.response?.$case === "accepted" &&
|
|
2383
|
+
object.response?.accepted !== undefined &&
|
|
2384
|
+
object.response?.accepted !== null
|
|
2385
|
+
) {
|
|
2386
|
+
message.response = {
|
|
2387
|
+
$case: "accepted",
|
|
2388
|
+
accepted: GetFriendshipStatusResponse_Ok.fromPartial(object.response.accepted),
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
if (
|
|
2392
|
+
object.response?.$case === "internalServerError" &&
|
|
2393
|
+
object.response?.internalServerError !== undefined &&
|
|
2394
|
+
object.response?.internalServerError !== null
|
|
2395
|
+
) {
|
|
2396
|
+
message.response = {
|
|
2397
|
+
$case: "internalServerError",
|
|
2398
|
+
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
2399
|
+
};
|
|
2400
|
+
}
|
|
4002
2401
|
return message;
|
|
4003
2402
|
}
|
|
4004
2403
|
}
|
|
4005
2404
|
|
|
4006
|
-
function
|
|
4007
|
-
return {
|
|
2405
|
+
function createBaseGetFriendshipStatusResponse_Ok(): GetFriendshipStatusResponse_Ok {
|
|
2406
|
+
return { status: 0, message: undefined };
|
|
4008
2407
|
}
|
|
4009
2408
|
|
|
4010
|
-
export namespace
|
|
4011
|
-
export function encode(
|
|
4012
|
-
|
|
4013
|
-
|
|
2409
|
+
export namespace GetFriendshipStatusResponse_Ok {
|
|
2410
|
+
export function encode(
|
|
2411
|
+
message: GetFriendshipStatusResponse_Ok,
|
|
2412
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
2413
|
+
): _m0.Writer {
|
|
2414
|
+
if (message.status !== 0) {
|
|
2415
|
+
writer.uint32(8).int32(message.status);
|
|
4014
2416
|
}
|
|
4015
|
-
if (message.
|
|
4016
|
-
writer.uint32(
|
|
2417
|
+
if (message.message !== undefined) {
|
|
2418
|
+
writer.uint32(18).string(message.message);
|
|
4017
2419
|
}
|
|
4018
2420
|
return writer;
|
|
4019
2421
|
}
|
|
4020
2422
|
|
|
4021
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2423
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusResponse_Ok {
|
|
4022
2424
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
4023
2425
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4024
|
-
const message =
|
|
2426
|
+
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
4025
2427
|
while (reader.pos < end) {
|
|
4026
2428
|
const tag = reader.uint32();
|
|
4027
2429
|
switch (tag >>> 3) {
|
|
4028
2430
|
case 1:
|
|
4029
|
-
if (tag !==
|
|
2431
|
+
if (tag !== 8) {
|
|
4030
2432
|
break;
|
|
4031
2433
|
}
|
|
4032
2434
|
|
|
4033
|
-
message.
|
|
2435
|
+
message.status = reader.int32() as any;
|
|
4034
2436
|
continue;
|
|
4035
2437
|
case 2:
|
|
4036
|
-
if (tag !==
|
|
2438
|
+
if (tag !== 18) {
|
|
4037
2439
|
break;
|
|
4038
2440
|
}
|
|
4039
2441
|
|
|
4040
|
-
message.
|
|
2442
|
+
message.message = reader.string();
|
|
4041
2443
|
continue;
|
|
4042
2444
|
}
|
|
4043
2445
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -4048,28 +2450,32 @@ export namespace BlockUpdate {
|
|
|
4048
2450
|
return message;
|
|
4049
2451
|
}
|
|
4050
2452
|
|
|
4051
|
-
export function fromJSON(object: any):
|
|
2453
|
+
export function fromJSON(object: any): GetFriendshipStatusResponse_Ok {
|
|
4052
2454
|
return {
|
|
4053
|
-
|
|
4054
|
-
|
|
2455
|
+
status: isSet(object.status) ? friendshipStatusFromJSON(object.status) : 0,
|
|
2456
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
4055
2457
|
};
|
|
4056
2458
|
}
|
|
4057
2459
|
|
|
4058
|
-
export function toJSON(message:
|
|
2460
|
+
export function toJSON(message: GetFriendshipStatusResponse_Ok): unknown {
|
|
4059
2461
|
const obj: any = {};
|
|
4060
|
-
message.
|
|
4061
|
-
message.
|
|
2462
|
+
message.status !== undefined && (obj.status = friendshipStatusToJSON(message.status));
|
|
2463
|
+
message.message !== undefined && (obj.message = message.message);
|
|
4062
2464
|
return obj;
|
|
4063
2465
|
}
|
|
4064
2466
|
|
|
4065
|
-
export function create<I extends Exact<DeepPartial<
|
|
4066
|
-
|
|
2467
|
+
export function create<I extends Exact<DeepPartial<GetFriendshipStatusResponse_Ok>, I>>(
|
|
2468
|
+
base?: I,
|
|
2469
|
+
): GetFriendshipStatusResponse_Ok {
|
|
2470
|
+
return GetFriendshipStatusResponse_Ok.fromPartial(base ?? {});
|
|
4067
2471
|
}
|
|
4068
2472
|
|
|
4069
|
-
export function fromPartial<I extends Exact<DeepPartial<
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
message
|
|
2473
|
+
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusResponse_Ok>, I>>(
|
|
2474
|
+
object: I,
|
|
2475
|
+
): GetFriendshipStatusResponse_Ok {
|
|
2476
|
+
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
2477
|
+
message.status = object.status ?? 0;
|
|
2478
|
+
message.message = object.message ?? undefined;
|
|
4073
2479
|
return message;
|
|
4074
2480
|
}
|
|
4075
2481
|
}
|
|
@@ -4084,7 +2490,7 @@ export const SocialServiceDefinition = {
|
|
|
4084
2490
|
name: "GetFriends",
|
|
4085
2491
|
requestType: GetFriendsPayload,
|
|
4086
2492
|
requestStream: false,
|
|
4087
|
-
responseType:
|
|
2493
|
+
responseType: PaginatedUsersResponse,
|
|
4088
2494
|
responseStream: false,
|
|
4089
2495
|
options: {},
|
|
4090
2496
|
},
|
|
@@ -4093,7 +2499,7 @@ export const SocialServiceDefinition = {
|
|
|
4093
2499
|
name: "GetMutualFriends",
|
|
4094
2500
|
requestType: GetMutualFriendsPayload,
|
|
4095
2501
|
requestStream: false,
|
|
4096
|
-
responseType:
|
|
2502
|
+
responseType: PaginatedUsersResponse,
|
|
4097
2503
|
responseStream: false,
|
|
4098
2504
|
options: {},
|
|
4099
2505
|
},
|
|
@@ -4133,7 +2539,6 @@ export const SocialServiceDefinition = {
|
|
|
4133
2539
|
responseStream: true,
|
|
4134
2540
|
options: {},
|
|
4135
2541
|
},
|
|
4136
|
-
/** Get the friendship status between the authenticated user and the one in the parameter */
|
|
4137
2542
|
getFriendshipStatus: {
|
|
4138
2543
|
name: "GetFriendshipStatus",
|
|
4139
2544
|
requestType: GetFriendshipStatusPayload,
|
|
@@ -4142,55 +2547,6 @@ export const SocialServiceDefinition = {
|
|
|
4142
2547
|
responseStream: false,
|
|
4143
2548
|
options: {},
|
|
4144
2549
|
},
|
|
4145
|
-
/** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
|
|
4146
|
-
subscribeToFriendConnectivityUpdates: {
|
|
4147
|
-
name: "SubscribeToFriendConnectivityUpdates",
|
|
4148
|
-
requestType: Empty,
|
|
4149
|
-
requestStream: false,
|
|
4150
|
-
responseType: FriendConnectivityUpdate,
|
|
4151
|
-
responseStream: true,
|
|
4152
|
-
options: {},
|
|
4153
|
-
},
|
|
4154
|
-
blockUser: {
|
|
4155
|
-
name: "BlockUser",
|
|
4156
|
-
requestType: BlockUserPayload,
|
|
4157
|
-
requestStream: false,
|
|
4158
|
-
responseType: BlockUserResponse,
|
|
4159
|
-
responseStream: false,
|
|
4160
|
-
options: {},
|
|
4161
|
-
},
|
|
4162
|
-
unblockUser: {
|
|
4163
|
-
name: "UnblockUser",
|
|
4164
|
-
requestType: UnblockUserPayload,
|
|
4165
|
-
requestStream: false,
|
|
4166
|
-
responseType: UnblockUserResponse,
|
|
4167
|
-
responseStream: false,
|
|
4168
|
-
options: {},
|
|
4169
|
-
},
|
|
4170
|
-
getBlockedUsers: {
|
|
4171
|
-
name: "GetBlockedUsers",
|
|
4172
|
-
requestType: GetBlockedUsersPayload,
|
|
4173
|
-
requestStream: false,
|
|
4174
|
-
responseType: GetBlockedUsersResponse,
|
|
4175
|
-
responseStream: false,
|
|
4176
|
-
options: {},
|
|
4177
|
-
},
|
|
4178
|
-
getBlockingStatus: {
|
|
4179
|
-
name: "GetBlockingStatus",
|
|
4180
|
-
requestType: Empty,
|
|
4181
|
-
requestStream: false,
|
|
4182
|
-
responseType: GetBlockingStatusResponse,
|
|
4183
|
-
responseStream: false,
|
|
4184
|
-
options: {},
|
|
4185
|
-
},
|
|
4186
|
-
subscribeToBlockUpdates: {
|
|
4187
|
-
name: "SubscribeToBlockUpdates",
|
|
4188
|
-
requestType: Empty,
|
|
4189
|
-
requestStream: false,
|
|
4190
|
-
responseType: BlockUpdate,
|
|
4191
|
-
responseStream: true,
|
|
4192
|
-
options: {},
|
|
4193
|
-
},
|
|
4194
2550
|
},
|
|
4195
2551
|
} as const;
|
|
4196
2552
|
|