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