@dcl/protocol 1.0.0-12988319503.commit-ea9043b → 1.0.0-13090552068.commit-b71756b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out-js/decentraland/kernel/apis/communications_controller.gen.d.ts +16 -0
- package/out-js/decentraland/kernel/apis/communications_controller.gen.js +103 -4
- package/out-js/decentraland/kernel/apis/communications_controller.gen.js.map +1 -1
- package/out-js/decentraland/{social/friendships/friendships.gen.d.ts → social_service/v1/social_service_v1.gen.d.ts} +3 -2
- package/out-js/decentraland/{social/friendships/friendships.gen.js → social_service/v1/social_service_v1.gen.js} +3 -3
- package/out-js/decentraland/social_service/v1/social_service_v1.gen.js.map +1 -0
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +479 -0
- package/out-js/decentraland/{social_service_v2/social_service.gen.js → social_service/v2/social_service_v2.gen.js} +1133 -395
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -0
- package/out-ts/decentraland/kernel/apis/communications_controller.gen.ts +109 -2
- package/out-ts/decentraland/{social/friendships/friendships.gen.ts → social_service/v1/social_service_v1.gen.ts} +3 -2
- package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +2598 -0
- package/package.json +2 -2
- package/proto/decentraland/kernel/apis/communications_controller.proto +6 -0
- package/proto/decentraland/{social/friendships/friendships.proto → social_service/v1/social_service_v1.proto} +2 -1
- package/proto/decentraland/social_service/v2/social_service_v2.proto +159 -0
- package/public/social.proto +3 -1
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +0 -1
- package/out-js/decentraland/social_service_v2/social_service.gen.d.ts +0 -357
- package/out-js/decentraland/social_service_v2/social_service.gen.js.map +0 -1
- package/out-js/social_service_v2.gen.d.ts +0 -1
- package/out-js/social_service_v2.gen.js +0 -6
- package/out-js/social_service_v2.gen.js.map +0 -1
- package/out-ts/decentraland/social_service_v2/social_service.gen.ts +0 -1709
- package/out-ts/social_service_v2.gen.ts +0 -3
- package/proto/decentraland/social_service_v2/social_service.proto +0 -111
- package/public/social_service_v2.proto +0 -4
|
@@ -3,12 +3,114 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SocialServiceDefinition = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.
|
|
6
|
+
exports.SocialServiceDefinition = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendshipUpdate_CancelResponse = exports.FriendshipUpdate_DeleteResponse = exports.FriendshipUpdate_RejectResponse = exports.FriendshipUpdate_AcceptResponse = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.PaginatedFriendshipRequestsResponse = exports.PaginatedUsersResponse = exports.PaginatedResponse = exports.GetMutualFriendsPayload = exports.UpsertFriendshipPayload_CancelPayload = exports.UpsertFriendshipPayload_DeletePayload = exports.UpsertFriendshipPayload_RejectPayload = exports.UpsertFriendshipPayload_AcceptPayload = exports.UpsertFriendshipPayload_RequestPayload = exports.UpsertFriendshipPayload = exports.GetFriendshipRequestsPayload = exports.GetFriendsPayload = exports.FriendshipRequests = exports.FriendshipRequestResponse = exports.Pagination = exports.User = exports.InternalServerError = exports.InvalidFriendshipAction = exports.FriendshipStatus = exports.ConnectivityStatus = exports.protobufPackage = void 0;
|
|
7
|
+
exports.connectivityStatusFromJSON = connectivityStatusFromJSON;
|
|
8
|
+
exports.connectivityStatusToJSON = connectivityStatusToJSON;
|
|
9
|
+
exports.friendshipStatusFromJSON = friendshipStatusFromJSON;
|
|
10
|
+
exports.friendshipStatusToJSON = friendshipStatusToJSON;
|
|
7
11
|
/* eslint-disable */
|
|
8
12
|
const long_1 = __importDefault(require("long"));
|
|
9
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const empty_gen_1 = require("
|
|
11
|
-
exports.protobufPackage = "decentraland.
|
|
14
|
+
const empty_gen_1 = require("../../../google/protobuf/empty.gen");
|
|
15
|
+
exports.protobufPackage = "decentraland.social_service.v2";
|
|
16
|
+
var ConnectivityStatus;
|
|
17
|
+
(function (ConnectivityStatus) {
|
|
18
|
+
ConnectivityStatus[ConnectivityStatus["ONLINE"] = 0] = "ONLINE";
|
|
19
|
+
ConnectivityStatus[ConnectivityStatus["OFFLINE"] = 1] = "OFFLINE";
|
|
20
|
+
ConnectivityStatus[ConnectivityStatus["AWAY"] = 2] = "AWAY";
|
|
21
|
+
ConnectivityStatus[ConnectivityStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
|
+
})(ConnectivityStatus || (exports.ConnectivityStatus = ConnectivityStatus = {}));
|
|
23
|
+
function connectivityStatusFromJSON(object) {
|
|
24
|
+
switch (object) {
|
|
25
|
+
case 0:
|
|
26
|
+
case "ONLINE":
|
|
27
|
+
return ConnectivityStatus.ONLINE;
|
|
28
|
+
case 1:
|
|
29
|
+
case "OFFLINE":
|
|
30
|
+
return ConnectivityStatus.OFFLINE;
|
|
31
|
+
case 2:
|
|
32
|
+
case "AWAY":
|
|
33
|
+
return ConnectivityStatus.AWAY;
|
|
34
|
+
case -1:
|
|
35
|
+
case "UNRECOGNIZED":
|
|
36
|
+
default:
|
|
37
|
+
return ConnectivityStatus.UNRECOGNIZED;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function connectivityStatusToJSON(object) {
|
|
41
|
+
switch (object) {
|
|
42
|
+
case ConnectivityStatus.ONLINE:
|
|
43
|
+
return "ONLINE";
|
|
44
|
+
case ConnectivityStatus.OFFLINE:
|
|
45
|
+
return "OFFLINE";
|
|
46
|
+
case ConnectivityStatus.AWAY:
|
|
47
|
+
return "AWAY";
|
|
48
|
+
case ConnectivityStatus.UNRECOGNIZED:
|
|
49
|
+
default:
|
|
50
|
+
return "UNRECOGNIZED";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var FriendshipStatus;
|
|
54
|
+
(function (FriendshipStatus) {
|
|
55
|
+
FriendshipStatus[FriendshipStatus["REQUEST_SENT"] = 0] = "REQUEST_SENT";
|
|
56
|
+
FriendshipStatus[FriendshipStatus["REQUEST_RECEIVED"] = 1] = "REQUEST_RECEIVED";
|
|
57
|
+
FriendshipStatus[FriendshipStatus["CANCELED"] = 2] = "CANCELED";
|
|
58
|
+
FriendshipStatus[FriendshipStatus["ACCEPTED"] = 3] = "ACCEPTED";
|
|
59
|
+
FriendshipStatus[FriendshipStatus["REJECTED"] = 4] = "REJECTED";
|
|
60
|
+
FriendshipStatus[FriendshipStatus["DELETED"] = 5] = "DELETED";
|
|
61
|
+
FriendshipStatus[FriendshipStatus["BLOCKED"] = 6] = "BLOCKED";
|
|
62
|
+
FriendshipStatus[FriendshipStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
63
|
+
})(FriendshipStatus || (exports.FriendshipStatus = FriendshipStatus = {}));
|
|
64
|
+
function friendshipStatusFromJSON(object) {
|
|
65
|
+
switch (object) {
|
|
66
|
+
case 0:
|
|
67
|
+
case "REQUEST_SENT":
|
|
68
|
+
return FriendshipStatus.REQUEST_SENT;
|
|
69
|
+
case 1:
|
|
70
|
+
case "REQUEST_RECEIVED":
|
|
71
|
+
return FriendshipStatus.REQUEST_RECEIVED;
|
|
72
|
+
case 2:
|
|
73
|
+
case "CANCELED":
|
|
74
|
+
return FriendshipStatus.CANCELED;
|
|
75
|
+
case 3:
|
|
76
|
+
case "ACCEPTED":
|
|
77
|
+
return FriendshipStatus.ACCEPTED;
|
|
78
|
+
case 4:
|
|
79
|
+
case "REJECTED":
|
|
80
|
+
return FriendshipStatus.REJECTED;
|
|
81
|
+
case 5:
|
|
82
|
+
case "DELETED":
|
|
83
|
+
return FriendshipStatus.DELETED;
|
|
84
|
+
case 6:
|
|
85
|
+
case "BLOCKED":
|
|
86
|
+
return FriendshipStatus.BLOCKED;
|
|
87
|
+
case -1:
|
|
88
|
+
case "UNRECOGNIZED":
|
|
89
|
+
default:
|
|
90
|
+
return FriendshipStatus.UNRECOGNIZED;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function friendshipStatusToJSON(object) {
|
|
94
|
+
switch (object) {
|
|
95
|
+
case FriendshipStatus.REQUEST_SENT:
|
|
96
|
+
return "REQUEST_SENT";
|
|
97
|
+
case FriendshipStatus.REQUEST_RECEIVED:
|
|
98
|
+
return "REQUEST_RECEIVED";
|
|
99
|
+
case FriendshipStatus.CANCELED:
|
|
100
|
+
return "CANCELED";
|
|
101
|
+
case FriendshipStatus.ACCEPTED:
|
|
102
|
+
return "ACCEPTED";
|
|
103
|
+
case FriendshipStatus.REJECTED:
|
|
104
|
+
return "REJECTED";
|
|
105
|
+
case FriendshipStatus.DELETED:
|
|
106
|
+
return "DELETED";
|
|
107
|
+
case FriendshipStatus.BLOCKED:
|
|
108
|
+
return "BLOCKED";
|
|
109
|
+
case FriendshipStatus.UNRECOGNIZED:
|
|
110
|
+
default:
|
|
111
|
+
return "UNRECOGNIZED";
|
|
112
|
+
}
|
|
113
|
+
}
|
|
12
114
|
function createBaseInvalidFriendshipAction() {
|
|
13
115
|
return {};
|
|
14
116
|
}
|
|
@@ -153,48 +255,39 @@ var User;
|
|
|
153
255
|
}
|
|
154
256
|
User.fromPartial = fromPartial;
|
|
155
257
|
})(User || (exports.User = User = {}));
|
|
156
|
-
function
|
|
157
|
-
return {
|
|
258
|
+
function createBasePagination() {
|
|
259
|
+
return { limit: 0, offset: 0 };
|
|
158
260
|
}
|
|
159
|
-
var
|
|
160
|
-
(function (
|
|
261
|
+
var Pagination;
|
|
262
|
+
(function (Pagination) {
|
|
161
263
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
162
|
-
if (message.
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
if (message.createdAt !== 0) {
|
|
166
|
-
writer.uint32(16).int64(message.createdAt);
|
|
264
|
+
if (message.limit !== 0) {
|
|
265
|
+
writer.uint32(8).int32(message.limit);
|
|
167
266
|
}
|
|
168
|
-
if (message.
|
|
169
|
-
writer.uint32(
|
|
267
|
+
if (message.offset !== 0) {
|
|
268
|
+
writer.uint32(16).int32(message.offset);
|
|
170
269
|
}
|
|
171
270
|
return writer;
|
|
172
271
|
}
|
|
173
|
-
|
|
272
|
+
Pagination.encode = encode;
|
|
174
273
|
function decode(input, length) {
|
|
175
274
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
176
275
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
177
|
-
const message =
|
|
276
|
+
const message = createBasePagination();
|
|
178
277
|
while (reader.pos < end) {
|
|
179
278
|
const tag = reader.uint32();
|
|
180
279
|
switch (tag >>> 3) {
|
|
181
280
|
case 1:
|
|
182
|
-
if (tag !==
|
|
281
|
+
if (tag !== 8) {
|
|
183
282
|
break;
|
|
184
283
|
}
|
|
185
|
-
message.
|
|
284
|
+
message.limit = reader.int32();
|
|
186
285
|
continue;
|
|
187
286
|
case 2:
|
|
188
287
|
if (tag !== 16) {
|
|
189
288
|
break;
|
|
190
289
|
}
|
|
191
|
-
message.
|
|
192
|
-
continue;
|
|
193
|
-
case 3:
|
|
194
|
-
if (tag !== 26) {
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
message.message = reader.string();
|
|
290
|
+
message.offset = reader.int32();
|
|
198
291
|
continue;
|
|
199
292
|
}
|
|
200
293
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -204,56 +297,56 @@ var RequestResponse;
|
|
|
204
297
|
}
|
|
205
298
|
return message;
|
|
206
299
|
}
|
|
207
|
-
|
|
300
|
+
Pagination.decode = decode;
|
|
208
301
|
function fromJSON(object) {
|
|
209
302
|
return {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
303
|
+
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
304
|
+
offset: isSet(object.offset) ? Number(object.offset) : 0,
|
|
213
305
|
};
|
|
214
306
|
}
|
|
215
|
-
|
|
307
|
+
Pagination.fromJSON = fromJSON;
|
|
216
308
|
function toJSON(message) {
|
|
217
309
|
const obj = {};
|
|
218
|
-
message.
|
|
219
|
-
message.
|
|
220
|
-
message.message !== undefined && (obj.message = message.message);
|
|
310
|
+
message.limit !== undefined && (obj.limit = Math.round(message.limit));
|
|
311
|
+
message.offset !== undefined && (obj.offset = Math.round(message.offset));
|
|
221
312
|
return obj;
|
|
222
313
|
}
|
|
223
|
-
|
|
314
|
+
Pagination.toJSON = toJSON;
|
|
224
315
|
function create(base) {
|
|
225
|
-
return
|
|
316
|
+
return Pagination.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
226
317
|
}
|
|
227
|
-
|
|
318
|
+
Pagination.create = create;
|
|
228
319
|
function fromPartial(object) {
|
|
229
320
|
var _a, _b;
|
|
230
|
-
const message =
|
|
231
|
-
message.
|
|
232
|
-
message.
|
|
233
|
-
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
|
|
321
|
+
const message = createBasePagination();
|
|
322
|
+
message.limit = (_a = object.limit) !== null && _a !== void 0 ? _a : 0;
|
|
323
|
+
message.offset = (_b = object.offset) !== null && _b !== void 0 ? _b : 0;
|
|
234
324
|
return message;
|
|
235
325
|
}
|
|
236
|
-
|
|
237
|
-
})(
|
|
238
|
-
function
|
|
239
|
-
return { user: undefined, message: undefined };
|
|
326
|
+
Pagination.fromPartial = fromPartial;
|
|
327
|
+
})(Pagination || (exports.Pagination = Pagination = {}));
|
|
328
|
+
function createBaseFriendshipRequestResponse() {
|
|
329
|
+
return { user: undefined, createdAt: 0, message: undefined };
|
|
240
330
|
}
|
|
241
|
-
var
|
|
242
|
-
(function (
|
|
331
|
+
var FriendshipRequestResponse;
|
|
332
|
+
(function (FriendshipRequestResponse) {
|
|
243
333
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
244
334
|
if (message.user !== undefined) {
|
|
245
335
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
246
336
|
}
|
|
337
|
+
if (message.createdAt !== 0) {
|
|
338
|
+
writer.uint32(16).int64(message.createdAt);
|
|
339
|
+
}
|
|
247
340
|
if (message.message !== undefined) {
|
|
248
341
|
writer.uint32(26).string(message.message);
|
|
249
342
|
}
|
|
250
343
|
return writer;
|
|
251
344
|
}
|
|
252
|
-
|
|
345
|
+
FriendshipRequestResponse.encode = encode;
|
|
253
346
|
function decode(input, length) {
|
|
254
347
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
255
348
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
256
|
-
const message =
|
|
349
|
+
const message = createBaseFriendshipRequestResponse();
|
|
257
350
|
while (reader.pos < end) {
|
|
258
351
|
const tag = reader.uint32();
|
|
259
352
|
switch (tag >>> 3) {
|
|
@@ -263,6 +356,12 @@ var RequestPayload;
|
|
|
263
356
|
}
|
|
264
357
|
message.user = User.decode(reader, reader.uint32());
|
|
265
358
|
continue;
|
|
359
|
+
case 2:
|
|
360
|
+
if (tag !== 16) {
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
message.createdAt = longToNumber(reader.int64());
|
|
364
|
+
continue;
|
|
266
365
|
case 3:
|
|
267
366
|
if (tag !== 26) {
|
|
268
367
|
break;
|
|
@@ -277,50 +376,53 @@ var RequestPayload;
|
|
|
277
376
|
}
|
|
278
377
|
return message;
|
|
279
378
|
}
|
|
280
|
-
|
|
379
|
+
FriendshipRequestResponse.decode = decode;
|
|
281
380
|
function fromJSON(object) {
|
|
282
381
|
return {
|
|
283
382
|
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
383
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
284
384
|
message: isSet(object.message) ? String(object.message) : undefined,
|
|
285
385
|
};
|
|
286
386
|
}
|
|
287
|
-
|
|
387
|
+
FriendshipRequestResponse.fromJSON = fromJSON;
|
|
288
388
|
function toJSON(message) {
|
|
289
389
|
const obj = {};
|
|
290
390
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
391
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
291
392
|
message.message !== undefined && (obj.message = message.message);
|
|
292
393
|
return obj;
|
|
293
394
|
}
|
|
294
|
-
|
|
395
|
+
FriendshipRequestResponse.toJSON = toJSON;
|
|
295
396
|
function create(base) {
|
|
296
|
-
return
|
|
397
|
+
return FriendshipRequestResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
297
398
|
}
|
|
298
|
-
|
|
399
|
+
FriendshipRequestResponse.create = create;
|
|
299
400
|
function fromPartial(object) {
|
|
300
|
-
var _a;
|
|
301
|
-
const message =
|
|
401
|
+
var _a, _b;
|
|
402
|
+
const message = createBaseFriendshipRequestResponse();
|
|
302
403
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
303
|
-
message.
|
|
404
|
+
message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : 0;
|
|
405
|
+
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
|
|
304
406
|
return message;
|
|
305
407
|
}
|
|
306
|
-
|
|
307
|
-
})(
|
|
308
|
-
function
|
|
408
|
+
FriendshipRequestResponse.fromPartial = fromPartial;
|
|
409
|
+
})(FriendshipRequestResponse || (exports.FriendshipRequestResponse = FriendshipRequestResponse = {}));
|
|
410
|
+
function createBaseFriendshipRequests() {
|
|
309
411
|
return { requests: [] };
|
|
310
412
|
}
|
|
311
|
-
var
|
|
312
|
-
(function (
|
|
413
|
+
var FriendshipRequests;
|
|
414
|
+
(function (FriendshipRequests) {
|
|
313
415
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
314
416
|
for (const v of message.requests) {
|
|
315
|
-
|
|
417
|
+
FriendshipRequestResponse.encode(v, writer.uint32(10).fork()).ldelim();
|
|
316
418
|
}
|
|
317
419
|
return writer;
|
|
318
420
|
}
|
|
319
|
-
|
|
421
|
+
FriendshipRequests.encode = encode;
|
|
320
422
|
function decode(input, length) {
|
|
321
423
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
322
424
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
323
|
-
const message =
|
|
425
|
+
const message = createBaseFriendshipRequests();
|
|
324
426
|
while (reader.pos < end) {
|
|
325
427
|
const tag = reader.uint32();
|
|
326
428
|
switch (tag >>> 3) {
|
|
@@ -328,7 +430,7 @@ var Requests;
|
|
|
328
430
|
if (tag !== 10) {
|
|
329
431
|
break;
|
|
330
432
|
}
|
|
331
|
-
message.requests.push(
|
|
433
|
+
message.requests.push(FriendshipRequestResponse.decode(reader, reader.uint32()));
|
|
332
434
|
continue;
|
|
333
435
|
}
|
|
334
436
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -338,52 +440,57 @@ var Requests;
|
|
|
338
440
|
}
|
|
339
441
|
return message;
|
|
340
442
|
}
|
|
341
|
-
|
|
443
|
+
FriendshipRequests.decode = decode;
|
|
342
444
|
function fromJSON(object) {
|
|
343
445
|
return {
|
|
344
|
-
requests: Array.isArray(object === null || object === void 0 ? void 0 : object.requests)
|
|
446
|
+
requests: Array.isArray(object === null || object === void 0 ? void 0 : object.requests)
|
|
447
|
+
? object.requests.map((e) => FriendshipRequestResponse.fromJSON(e))
|
|
448
|
+
: [],
|
|
345
449
|
};
|
|
346
450
|
}
|
|
347
|
-
|
|
451
|
+
FriendshipRequests.fromJSON = fromJSON;
|
|
348
452
|
function toJSON(message) {
|
|
349
453
|
const obj = {};
|
|
350
454
|
if (message.requests) {
|
|
351
|
-
obj.requests = message.requests.map((e) => e ?
|
|
455
|
+
obj.requests = message.requests.map((e) => e ? FriendshipRequestResponse.toJSON(e) : undefined);
|
|
352
456
|
}
|
|
353
457
|
else {
|
|
354
458
|
obj.requests = [];
|
|
355
459
|
}
|
|
356
460
|
return obj;
|
|
357
461
|
}
|
|
358
|
-
|
|
462
|
+
FriendshipRequests.toJSON = toJSON;
|
|
359
463
|
function create(base) {
|
|
360
|
-
return
|
|
464
|
+
return FriendshipRequests.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
361
465
|
}
|
|
362
|
-
|
|
466
|
+
FriendshipRequests.create = create;
|
|
363
467
|
function fromPartial(object) {
|
|
364
468
|
var _a;
|
|
365
|
-
const message =
|
|
366
|
-
message.requests = ((_a = object.requests) === null || _a === void 0 ? void 0 : _a.map((e) =>
|
|
469
|
+
const message = createBaseFriendshipRequests();
|
|
470
|
+
message.requests = ((_a = object.requests) === null || _a === void 0 ? void 0 : _a.map((e) => FriendshipRequestResponse.fromPartial(e))) || [];
|
|
367
471
|
return message;
|
|
368
472
|
}
|
|
369
|
-
|
|
370
|
-
})(
|
|
371
|
-
function
|
|
372
|
-
return {
|
|
473
|
+
FriendshipRequests.fromPartial = fromPartial;
|
|
474
|
+
})(FriendshipRequests || (exports.FriendshipRequests = FriendshipRequests = {}));
|
|
475
|
+
function createBaseGetFriendsPayload() {
|
|
476
|
+
return { pagination: undefined, status: undefined };
|
|
373
477
|
}
|
|
374
|
-
var
|
|
375
|
-
(function (
|
|
478
|
+
var GetFriendsPayload;
|
|
479
|
+
(function (GetFriendsPayload) {
|
|
376
480
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
377
|
-
if (message.
|
|
378
|
-
|
|
481
|
+
if (message.pagination !== undefined) {
|
|
482
|
+
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
483
|
+
}
|
|
484
|
+
if (message.status !== undefined) {
|
|
485
|
+
writer.uint32(16).int32(message.status);
|
|
379
486
|
}
|
|
380
487
|
return writer;
|
|
381
488
|
}
|
|
382
|
-
|
|
489
|
+
GetFriendsPayload.encode = encode;
|
|
383
490
|
function decode(input, length) {
|
|
384
491
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
385
492
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
386
|
-
const message =
|
|
493
|
+
const message = createBaseGetFriendsPayload();
|
|
387
494
|
while (reader.pos < end) {
|
|
388
495
|
const tag = reader.uint32();
|
|
389
496
|
switch (tag >>> 3) {
|
|
@@ -391,7 +498,13 @@ var AcceptResponse;
|
|
|
391
498
|
if (tag !== 10) {
|
|
392
499
|
break;
|
|
393
500
|
}
|
|
394
|
-
message.
|
|
501
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
502
|
+
continue;
|
|
503
|
+
case 2:
|
|
504
|
+
if (tag !== 16) {
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
message.status = reader.int32();
|
|
395
508
|
continue;
|
|
396
509
|
}
|
|
397
510
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -401,44 +514,54 @@ var AcceptResponse;
|
|
|
401
514
|
}
|
|
402
515
|
return message;
|
|
403
516
|
}
|
|
404
|
-
|
|
517
|
+
GetFriendsPayload.decode = decode;
|
|
405
518
|
function fromJSON(object) {
|
|
406
|
-
return {
|
|
519
|
+
return {
|
|
520
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
521
|
+
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : undefined,
|
|
522
|
+
};
|
|
407
523
|
}
|
|
408
|
-
|
|
524
|
+
GetFriendsPayload.fromJSON = fromJSON;
|
|
409
525
|
function toJSON(message) {
|
|
410
526
|
const obj = {};
|
|
411
|
-
message.
|
|
527
|
+
message.pagination !== undefined &&
|
|
528
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
529
|
+
message.status !== undefined &&
|
|
530
|
+
(obj.status = message.status !== undefined ? connectivityStatusToJSON(message.status) : undefined);
|
|
412
531
|
return obj;
|
|
413
532
|
}
|
|
414
|
-
|
|
533
|
+
GetFriendsPayload.toJSON = toJSON;
|
|
415
534
|
function create(base) {
|
|
416
|
-
return
|
|
535
|
+
return GetFriendsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
417
536
|
}
|
|
418
|
-
|
|
537
|
+
GetFriendsPayload.create = create;
|
|
419
538
|
function fromPartial(object) {
|
|
420
|
-
|
|
421
|
-
message
|
|
539
|
+
var _a;
|
|
540
|
+
const message = createBaseGetFriendsPayload();
|
|
541
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
542
|
+
? Pagination.fromPartial(object.pagination)
|
|
543
|
+
: undefined;
|
|
544
|
+
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : undefined;
|
|
422
545
|
return message;
|
|
423
546
|
}
|
|
424
|
-
|
|
425
|
-
})(
|
|
426
|
-
function
|
|
427
|
-
return {
|
|
547
|
+
GetFriendsPayload.fromPartial = fromPartial;
|
|
548
|
+
})(GetFriendsPayload || (exports.GetFriendsPayload = GetFriendsPayload = {}));
|
|
549
|
+
function createBaseGetFriendshipRequestsPayload() {
|
|
550
|
+
return { pagination: undefined };
|
|
428
551
|
}
|
|
429
|
-
var
|
|
430
|
-
(function (
|
|
552
|
+
var GetFriendshipRequestsPayload;
|
|
553
|
+
(function (GetFriendshipRequestsPayload) {
|
|
431
554
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
432
|
-
if (message.
|
|
433
|
-
|
|
555
|
+
if (message.pagination !== undefined) {
|
|
556
|
+
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
434
557
|
}
|
|
435
558
|
return writer;
|
|
436
559
|
}
|
|
437
|
-
|
|
560
|
+
GetFriendshipRequestsPayload.encode = encode;
|
|
438
561
|
function decode(input, length) {
|
|
439
562
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
440
563
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
441
|
-
const message =
|
|
564
|
+
const message = createBaseGetFriendshipRequestsPayload();
|
|
442
565
|
while (reader.pos < end) {
|
|
443
566
|
const tag = reader.uint32();
|
|
444
567
|
switch (tag >>> 3) {
|
|
@@ -446,7 +569,7 @@ var AcceptPayload;
|
|
|
446
569
|
if (tag !== 10) {
|
|
447
570
|
break;
|
|
448
571
|
}
|
|
449
|
-
message.
|
|
572
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
450
573
|
continue;
|
|
451
574
|
}
|
|
452
575
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -456,44 +579,62 @@ var AcceptPayload;
|
|
|
456
579
|
}
|
|
457
580
|
return message;
|
|
458
581
|
}
|
|
459
|
-
|
|
582
|
+
GetFriendshipRequestsPayload.decode = decode;
|
|
460
583
|
function fromJSON(object) {
|
|
461
|
-
return {
|
|
584
|
+
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
462
585
|
}
|
|
463
|
-
|
|
586
|
+
GetFriendshipRequestsPayload.fromJSON = fromJSON;
|
|
464
587
|
function toJSON(message) {
|
|
465
588
|
const obj = {};
|
|
466
|
-
message.
|
|
589
|
+
message.pagination !== undefined &&
|
|
590
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
467
591
|
return obj;
|
|
468
592
|
}
|
|
469
|
-
|
|
593
|
+
GetFriendshipRequestsPayload.toJSON = toJSON;
|
|
470
594
|
function create(base) {
|
|
471
|
-
return
|
|
595
|
+
return GetFriendshipRequestsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
472
596
|
}
|
|
473
|
-
|
|
597
|
+
GetFriendshipRequestsPayload.create = create;
|
|
474
598
|
function fromPartial(object) {
|
|
475
|
-
const message =
|
|
476
|
-
message.
|
|
599
|
+
const message = createBaseGetFriendshipRequestsPayload();
|
|
600
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
601
|
+
? Pagination.fromPartial(object.pagination)
|
|
602
|
+
: undefined;
|
|
477
603
|
return message;
|
|
478
604
|
}
|
|
479
|
-
|
|
480
|
-
})(
|
|
481
|
-
function
|
|
482
|
-
return {
|
|
605
|
+
GetFriendshipRequestsPayload.fromPartial = fromPartial;
|
|
606
|
+
})(GetFriendshipRequestsPayload || (exports.GetFriendshipRequestsPayload = GetFriendshipRequestsPayload = {}));
|
|
607
|
+
function createBaseUpsertFriendshipPayload() {
|
|
608
|
+
return { action: undefined };
|
|
483
609
|
}
|
|
484
|
-
var
|
|
485
|
-
(function (
|
|
610
|
+
var UpsertFriendshipPayload;
|
|
611
|
+
(function (UpsertFriendshipPayload) {
|
|
486
612
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
487
|
-
|
|
488
|
-
|
|
613
|
+
var _a;
|
|
614
|
+
switch ((_a = message.action) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
615
|
+
case "request":
|
|
616
|
+
UpsertFriendshipPayload_RequestPayload.encode(message.action.request, writer.uint32(10).fork()).ldelim();
|
|
617
|
+
break;
|
|
618
|
+
case "accept":
|
|
619
|
+
UpsertFriendshipPayload_AcceptPayload.encode(message.action.accept, writer.uint32(18).fork()).ldelim();
|
|
620
|
+
break;
|
|
621
|
+
case "reject":
|
|
622
|
+
UpsertFriendshipPayload_RejectPayload.encode(message.action.reject, writer.uint32(34).fork()).ldelim();
|
|
623
|
+
break;
|
|
624
|
+
case "delete":
|
|
625
|
+
UpsertFriendshipPayload_DeletePayload.encode(message.action.delete, writer.uint32(42).fork()).ldelim();
|
|
626
|
+
break;
|
|
627
|
+
case "cancel":
|
|
628
|
+
UpsertFriendshipPayload_CancelPayload.encode(message.action.cancel, writer.uint32(50).fork()).ldelim();
|
|
629
|
+
break;
|
|
489
630
|
}
|
|
490
631
|
return writer;
|
|
491
632
|
}
|
|
492
|
-
|
|
633
|
+
UpsertFriendshipPayload.encode = encode;
|
|
493
634
|
function decode(input, length) {
|
|
494
635
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
495
636
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
496
|
-
const message =
|
|
637
|
+
const message = createBaseUpsertFriendshipPayload();
|
|
497
638
|
while (reader.pos < end) {
|
|
498
639
|
const tag = reader.uint32();
|
|
499
640
|
switch (tag >>> 3) {
|
|
@@ -501,7 +642,46 @@ var RejectResponse;
|
|
|
501
642
|
if (tag !== 10) {
|
|
502
643
|
break;
|
|
503
644
|
}
|
|
504
|
-
message.
|
|
645
|
+
message.action = {
|
|
646
|
+
$case: "request",
|
|
647
|
+
request: UpsertFriendshipPayload_RequestPayload.decode(reader, reader.uint32()),
|
|
648
|
+
};
|
|
649
|
+
continue;
|
|
650
|
+
case 2:
|
|
651
|
+
if (tag !== 18) {
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
654
|
+
message.action = {
|
|
655
|
+
$case: "accept",
|
|
656
|
+
accept: UpsertFriendshipPayload_AcceptPayload.decode(reader, reader.uint32()),
|
|
657
|
+
};
|
|
658
|
+
continue;
|
|
659
|
+
case 4:
|
|
660
|
+
if (tag !== 34) {
|
|
661
|
+
break;
|
|
662
|
+
}
|
|
663
|
+
message.action = {
|
|
664
|
+
$case: "reject",
|
|
665
|
+
reject: UpsertFriendshipPayload_RejectPayload.decode(reader, reader.uint32()),
|
|
666
|
+
};
|
|
667
|
+
continue;
|
|
668
|
+
case 5:
|
|
669
|
+
if (tag !== 42) {
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
message.action = {
|
|
673
|
+
$case: "delete",
|
|
674
|
+
delete: UpsertFriendshipPayload_DeletePayload.decode(reader, reader.uint32()),
|
|
675
|
+
};
|
|
676
|
+
continue;
|
|
677
|
+
case 6:
|
|
678
|
+
if (tag !== 50) {
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
message.action = {
|
|
682
|
+
$case: "cancel",
|
|
683
|
+
cancel: UpsertFriendshipPayload_CancelPayload.decode(reader, reader.uint32()),
|
|
684
|
+
};
|
|
505
685
|
continue;
|
|
506
686
|
}
|
|
507
687
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -511,44 +691,109 @@ var RejectResponse;
|
|
|
511
691
|
}
|
|
512
692
|
return message;
|
|
513
693
|
}
|
|
514
|
-
|
|
694
|
+
UpsertFriendshipPayload.decode = decode;
|
|
515
695
|
function fromJSON(object) {
|
|
516
|
-
return {
|
|
696
|
+
return {
|
|
697
|
+
action: isSet(object.request)
|
|
698
|
+
? { $case: "request", request: UpsertFriendshipPayload_RequestPayload.fromJSON(object.request) }
|
|
699
|
+
: isSet(object.accept)
|
|
700
|
+
? { $case: "accept", accept: UpsertFriendshipPayload_AcceptPayload.fromJSON(object.accept) }
|
|
701
|
+
: isSet(object.reject)
|
|
702
|
+
? { $case: "reject", reject: UpsertFriendshipPayload_RejectPayload.fromJSON(object.reject) }
|
|
703
|
+
: isSet(object.delete)
|
|
704
|
+
? { $case: "delete", delete: UpsertFriendshipPayload_DeletePayload.fromJSON(object.delete) }
|
|
705
|
+
: isSet(object.cancel)
|
|
706
|
+
? { $case: "cancel", cancel: UpsertFriendshipPayload_CancelPayload.fromJSON(object.cancel) }
|
|
707
|
+
: undefined,
|
|
708
|
+
};
|
|
517
709
|
}
|
|
518
|
-
|
|
710
|
+
UpsertFriendshipPayload.fromJSON = fromJSON;
|
|
519
711
|
function toJSON(message) {
|
|
712
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
520
713
|
const obj = {};
|
|
521
|
-
message.
|
|
714
|
+
((_a = message.action) === null || _a === void 0 ? void 0 : _a.$case) === "request" &&
|
|
715
|
+
(obj.request = ((_b = message.action) === null || _b === void 0 ? void 0 : _b.request)
|
|
716
|
+
? UpsertFriendshipPayload_RequestPayload.toJSON((_c = message.action) === null || _c === void 0 ? void 0 : _c.request)
|
|
717
|
+
: undefined);
|
|
718
|
+
((_d = message.action) === null || _d === void 0 ? void 0 : _d.$case) === "accept" &&
|
|
719
|
+
(obj.accept = ((_e = message.action) === null || _e === void 0 ? void 0 : _e.accept)
|
|
720
|
+
? UpsertFriendshipPayload_AcceptPayload.toJSON((_f = message.action) === null || _f === void 0 ? void 0 : _f.accept)
|
|
721
|
+
: undefined);
|
|
722
|
+
((_g = message.action) === null || _g === void 0 ? void 0 : _g.$case) === "reject" &&
|
|
723
|
+
(obj.reject = ((_h = message.action) === null || _h === void 0 ? void 0 : _h.reject)
|
|
724
|
+
? UpsertFriendshipPayload_RejectPayload.toJSON((_j = message.action) === null || _j === void 0 ? void 0 : _j.reject)
|
|
725
|
+
: undefined);
|
|
726
|
+
((_k = message.action) === null || _k === void 0 ? void 0 : _k.$case) === "delete" &&
|
|
727
|
+
(obj.delete = ((_l = message.action) === null || _l === void 0 ? void 0 : _l.delete)
|
|
728
|
+
? UpsertFriendshipPayload_DeletePayload.toJSON((_m = message.action) === null || _m === void 0 ? void 0 : _m.delete)
|
|
729
|
+
: undefined);
|
|
730
|
+
((_o = message.action) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" &&
|
|
731
|
+
(obj.cancel = ((_p = message.action) === null || _p === void 0 ? void 0 : _p.cancel)
|
|
732
|
+
? UpsertFriendshipPayload_CancelPayload.toJSON((_q = message.action) === null || _q === void 0 ? void 0 : _q.cancel)
|
|
733
|
+
: undefined);
|
|
522
734
|
return obj;
|
|
523
735
|
}
|
|
524
|
-
|
|
736
|
+
UpsertFriendshipPayload.toJSON = toJSON;
|
|
525
737
|
function create(base) {
|
|
526
|
-
return
|
|
738
|
+
return UpsertFriendshipPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
527
739
|
}
|
|
528
|
-
|
|
740
|
+
UpsertFriendshipPayload.create = create;
|
|
529
741
|
function fromPartial(object) {
|
|
530
|
-
|
|
531
|
-
message
|
|
742
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
743
|
+
const message = createBaseUpsertFriendshipPayload();
|
|
744
|
+
if (((_a = object.action) === null || _a === void 0 ? void 0 : _a.$case) === "request" && ((_b = object.action) === null || _b === void 0 ? void 0 : _b.request) !== undefined && ((_c = object.action) === null || _c === void 0 ? void 0 : _c.request) !== null) {
|
|
745
|
+
message.action = {
|
|
746
|
+
$case: "request",
|
|
747
|
+
request: UpsertFriendshipPayload_RequestPayload.fromPartial(object.action.request),
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
if (((_d = object.action) === null || _d === void 0 ? void 0 : _d.$case) === "accept" && ((_e = object.action) === null || _e === void 0 ? void 0 : _e.accept) !== undefined && ((_f = object.action) === null || _f === void 0 ? void 0 : _f.accept) !== null) {
|
|
751
|
+
message.action = {
|
|
752
|
+
$case: "accept",
|
|
753
|
+
accept: UpsertFriendshipPayload_AcceptPayload.fromPartial(object.action.accept),
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
if (((_g = object.action) === null || _g === void 0 ? void 0 : _g.$case) === "reject" && ((_h = object.action) === null || _h === void 0 ? void 0 : _h.reject) !== undefined && ((_j = object.action) === null || _j === void 0 ? void 0 : _j.reject) !== null) {
|
|
757
|
+
message.action = {
|
|
758
|
+
$case: "reject",
|
|
759
|
+
reject: UpsertFriendshipPayload_RejectPayload.fromPartial(object.action.reject),
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
if (((_k = object.action) === null || _k === void 0 ? void 0 : _k.$case) === "delete" && ((_l = object.action) === null || _l === void 0 ? void 0 : _l.delete) !== undefined && ((_m = object.action) === null || _m === void 0 ? void 0 : _m.delete) !== null) {
|
|
763
|
+
message.action = {
|
|
764
|
+
$case: "delete",
|
|
765
|
+
delete: UpsertFriendshipPayload_DeletePayload.fromPartial(object.action.delete),
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
if (((_o = object.action) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" && ((_p = object.action) === null || _p === void 0 ? void 0 : _p.cancel) !== undefined && ((_q = object.action) === null || _q === void 0 ? void 0 : _q.cancel) !== null) {
|
|
769
|
+
message.action = {
|
|
770
|
+
$case: "cancel",
|
|
771
|
+
cancel: UpsertFriendshipPayload_CancelPayload.fromPartial(object.action.cancel),
|
|
772
|
+
};
|
|
773
|
+
}
|
|
532
774
|
return message;
|
|
533
775
|
}
|
|
534
|
-
|
|
535
|
-
})(
|
|
536
|
-
function
|
|
537
|
-
return { user: undefined };
|
|
776
|
+
UpsertFriendshipPayload.fromPartial = fromPartial;
|
|
777
|
+
})(UpsertFriendshipPayload || (exports.UpsertFriendshipPayload = UpsertFriendshipPayload = {}));
|
|
778
|
+
function createBaseUpsertFriendshipPayload_RequestPayload() {
|
|
779
|
+
return { user: undefined, message: undefined };
|
|
538
780
|
}
|
|
539
|
-
var
|
|
540
|
-
(function (
|
|
781
|
+
var UpsertFriendshipPayload_RequestPayload;
|
|
782
|
+
(function (UpsertFriendshipPayload_RequestPayload) {
|
|
541
783
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
542
784
|
if (message.user !== undefined) {
|
|
543
785
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
544
786
|
}
|
|
787
|
+
if (message.message !== undefined) {
|
|
788
|
+
writer.uint32(26).string(message.message);
|
|
789
|
+
}
|
|
545
790
|
return writer;
|
|
546
791
|
}
|
|
547
|
-
|
|
792
|
+
UpsertFriendshipPayload_RequestPayload.encode = encode;
|
|
548
793
|
function decode(input, length) {
|
|
549
794
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
550
795
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
551
|
-
const message =
|
|
796
|
+
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
552
797
|
while (reader.pos < end) {
|
|
553
798
|
const tag = reader.uint32();
|
|
554
799
|
switch (tag >>> 3) {
|
|
@@ -558,6 +803,12 @@ var RejectPayload;
|
|
|
558
803
|
}
|
|
559
804
|
message.user = User.decode(reader, reader.uint32());
|
|
560
805
|
continue;
|
|
806
|
+
case 3:
|
|
807
|
+
if (tag !== 26) {
|
|
808
|
+
break;
|
|
809
|
+
}
|
|
810
|
+
message.message = reader.string();
|
|
811
|
+
continue;
|
|
561
812
|
}
|
|
562
813
|
if ((tag & 7) === 4 || tag === 0) {
|
|
563
814
|
break;
|
|
@@ -566,44 +817,50 @@ var RejectPayload;
|
|
|
566
817
|
}
|
|
567
818
|
return message;
|
|
568
819
|
}
|
|
569
|
-
|
|
820
|
+
UpsertFriendshipPayload_RequestPayload.decode = decode;
|
|
570
821
|
function fromJSON(object) {
|
|
571
|
-
return {
|
|
822
|
+
return {
|
|
823
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
824
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
825
|
+
};
|
|
572
826
|
}
|
|
573
|
-
|
|
827
|
+
UpsertFriendshipPayload_RequestPayload.fromJSON = fromJSON;
|
|
574
828
|
function toJSON(message) {
|
|
575
829
|
const obj = {};
|
|
576
830
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
831
|
+
message.message !== undefined && (obj.message = message.message);
|
|
577
832
|
return obj;
|
|
578
833
|
}
|
|
579
|
-
|
|
834
|
+
UpsertFriendshipPayload_RequestPayload.toJSON = toJSON;
|
|
580
835
|
function create(base) {
|
|
581
|
-
return
|
|
836
|
+
return UpsertFriendshipPayload_RequestPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
582
837
|
}
|
|
583
|
-
|
|
838
|
+
UpsertFriendshipPayload_RequestPayload.create = create;
|
|
584
839
|
function fromPartial(object) {
|
|
585
|
-
|
|
840
|
+
var _a;
|
|
841
|
+
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
586
842
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
843
|
+
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
|
|
587
844
|
return message;
|
|
588
845
|
}
|
|
589
|
-
|
|
590
|
-
})(
|
|
591
|
-
function
|
|
846
|
+
UpsertFriendshipPayload_RequestPayload.fromPartial = fromPartial;
|
|
847
|
+
})(UpsertFriendshipPayload_RequestPayload || (exports.UpsertFriendshipPayload_RequestPayload = UpsertFriendshipPayload_RequestPayload = {}));
|
|
848
|
+
function createBaseUpsertFriendshipPayload_AcceptPayload() {
|
|
592
849
|
return { user: undefined };
|
|
593
850
|
}
|
|
594
|
-
var
|
|
595
|
-
(function (
|
|
851
|
+
var UpsertFriendshipPayload_AcceptPayload;
|
|
852
|
+
(function (UpsertFriendshipPayload_AcceptPayload) {
|
|
596
853
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
597
854
|
if (message.user !== undefined) {
|
|
598
855
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
599
856
|
}
|
|
600
857
|
return writer;
|
|
601
858
|
}
|
|
602
|
-
|
|
859
|
+
UpsertFriendshipPayload_AcceptPayload.encode = encode;
|
|
603
860
|
function decode(input, length) {
|
|
604
861
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
605
862
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
606
|
-
const message =
|
|
863
|
+
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
607
864
|
while (reader.pos < end) {
|
|
608
865
|
const tag = reader.uint32();
|
|
609
866
|
switch (tag >>> 3) {
|
|
@@ -621,44 +878,44 @@ var DeleteResponse;
|
|
|
621
878
|
}
|
|
622
879
|
return message;
|
|
623
880
|
}
|
|
624
|
-
|
|
881
|
+
UpsertFriendshipPayload_AcceptPayload.decode = decode;
|
|
625
882
|
function fromJSON(object) {
|
|
626
883
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
627
884
|
}
|
|
628
|
-
|
|
885
|
+
UpsertFriendshipPayload_AcceptPayload.fromJSON = fromJSON;
|
|
629
886
|
function toJSON(message) {
|
|
630
887
|
const obj = {};
|
|
631
888
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
632
889
|
return obj;
|
|
633
890
|
}
|
|
634
|
-
|
|
891
|
+
UpsertFriendshipPayload_AcceptPayload.toJSON = toJSON;
|
|
635
892
|
function create(base) {
|
|
636
|
-
return
|
|
893
|
+
return UpsertFriendshipPayload_AcceptPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
637
894
|
}
|
|
638
|
-
|
|
895
|
+
UpsertFriendshipPayload_AcceptPayload.create = create;
|
|
639
896
|
function fromPartial(object) {
|
|
640
|
-
const message =
|
|
897
|
+
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
641
898
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
642
899
|
return message;
|
|
643
900
|
}
|
|
644
|
-
|
|
645
|
-
})(
|
|
646
|
-
function
|
|
901
|
+
UpsertFriendshipPayload_AcceptPayload.fromPartial = fromPartial;
|
|
902
|
+
})(UpsertFriendshipPayload_AcceptPayload || (exports.UpsertFriendshipPayload_AcceptPayload = UpsertFriendshipPayload_AcceptPayload = {}));
|
|
903
|
+
function createBaseUpsertFriendshipPayload_RejectPayload() {
|
|
647
904
|
return { user: undefined };
|
|
648
905
|
}
|
|
649
|
-
var
|
|
650
|
-
(function (
|
|
906
|
+
var UpsertFriendshipPayload_RejectPayload;
|
|
907
|
+
(function (UpsertFriendshipPayload_RejectPayload) {
|
|
651
908
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
652
909
|
if (message.user !== undefined) {
|
|
653
910
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
654
911
|
}
|
|
655
912
|
return writer;
|
|
656
913
|
}
|
|
657
|
-
|
|
914
|
+
UpsertFriendshipPayload_RejectPayload.encode = encode;
|
|
658
915
|
function decode(input, length) {
|
|
659
916
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
660
917
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
661
|
-
const message =
|
|
918
|
+
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
662
919
|
while (reader.pos < end) {
|
|
663
920
|
const tag = reader.uint32();
|
|
664
921
|
switch (tag >>> 3) {
|
|
@@ -676,44 +933,44 @@ var DeletePayload;
|
|
|
676
933
|
}
|
|
677
934
|
return message;
|
|
678
935
|
}
|
|
679
|
-
|
|
936
|
+
UpsertFriendshipPayload_RejectPayload.decode = decode;
|
|
680
937
|
function fromJSON(object) {
|
|
681
938
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
682
939
|
}
|
|
683
|
-
|
|
940
|
+
UpsertFriendshipPayload_RejectPayload.fromJSON = fromJSON;
|
|
684
941
|
function toJSON(message) {
|
|
685
942
|
const obj = {};
|
|
686
943
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
687
944
|
return obj;
|
|
688
945
|
}
|
|
689
|
-
|
|
946
|
+
UpsertFriendshipPayload_RejectPayload.toJSON = toJSON;
|
|
690
947
|
function create(base) {
|
|
691
|
-
return
|
|
948
|
+
return UpsertFriendshipPayload_RejectPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
692
949
|
}
|
|
693
|
-
|
|
950
|
+
UpsertFriendshipPayload_RejectPayload.create = create;
|
|
694
951
|
function fromPartial(object) {
|
|
695
|
-
const message =
|
|
952
|
+
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
696
953
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
697
954
|
return message;
|
|
698
955
|
}
|
|
699
|
-
|
|
700
|
-
})(
|
|
701
|
-
function
|
|
956
|
+
UpsertFriendshipPayload_RejectPayload.fromPartial = fromPartial;
|
|
957
|
+
})(UpsertFriendshipPayload_RejectPayload || (exports.UpsertFriendshipPayload_RejectPayload = UpsertFriendshipPayload_RejectPayload = {}));
|
|
958
|
+
function createBaseUpsertFriendshipPayload_DeletePayload() {
|
|
702
959
|
return { user: undefined };
|
|
703
960
|
}
|
|
704
|
-
var
|
|
705
|
-
(function (
|
|
961
|
+
var UpsertFriendshipPayload_DeletePayload;
|
|
962
|
+
(function (UpsertFriendshipPayload_DeletePayload) {
|
|
706
963
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
707
964
|
if (message.user !== undefined) {
|
|
708
965
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
709
966
|
}
|
|
710
967
|
return writer;
|
|
711
968
|
}
|
|
712
|
-
|
|
969
|
+
UpsertFriendshipPayload_DeletePayload.encode = encode;
|
|
713
970
|
function decode(input, length) {
|
|
714
971
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
715
972
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
716
|
-
const message =
|
|
973
|
+
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
717
974
|
while (reader.pos < end) {
|
|
718
975
|
const tag = reader.uint32();
|
|
719
976
|
switch (tag >>> 3) {
|
|
@@ -731,44 +988,44 @@ var CancelResponse;
|
|
|
731
988
|
}
|
|
732
989
|
return message;
|
|
733
990
|
}
|
|
734
|
-
|
|
991
|
+
UpsertFriendshipPayload_DeletePayload.decode = decode;
|
|
735
992
|
function fromJSON(object) {
|
|
736
993
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
737
994
|
}
|
|
738
|
-
|
|
995
|
+
UpsertFriendshipPayload_DeletePayload.fromJSON = fromJSON;
|
|
739
996
|
function toJSON(message) {
|
|
740
997
|
const obj = {};
|
|
741
998
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
742
999
|
return obj;
|
|
743
1000
|
}
|
|
744
|
-
|
|
1001
|
+
UpsertFriendshipPayload_DeletePayload.toJSON = toJSON;
|
|
745
1002
|
function create(base) {
|
|
746
|
-
return
|
|
1003
|
+
return UpsertFriendshipPayload_DeletePayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
747
1004
|
}
|
|
748
|
-
|
|
1005
|
+
UpsertFriendshipPayload_DeletePayload.create = create;
|
|
749
1006
|
function fromPartial(object) {
|
|
750
|
-
const message =
|
|
1007
|
+
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
751
1008
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
752
1009
|
return message;
|
|
753
1010
|
}
|
|
754
|
-
|
|
755
|
-
})(
|
|
756
|
-
function
|
|
1011
|
+
UpsertFriendshipPayload_DeletePayload.fromPartial = fromPartial;
|
|
1012
|
+
})(UpsertFriendshipPayload_DeletePayload || (exports.UpsertFriendshipPayload_DeletePayload = UpsertFriendshipPayload_DeletePayload = {}));
|
|
1013
|
+
function createBaseUpsertFriendshipPayload_CancelPayload() {
|
|
757
1014
|
return { user: undefined };
|
|
758
1015
|
}
|
|
759
|
-
var
|
|
760
|
-
(function (
|
|
1016
|
+
var UpsertFriendshipPayload_CancelPayload;
|
|
1017
|
+
(function (UpsertFriendshipPayload_CancelPayload) {
|
|
761
1018
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
762
1019
|
if (message.user !== undefined) {
|
|
763
1020
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
764
1021
|
}
|
|
765
1022
|
return writer;
|
|
766
1023
|
}
|
|
767
|
-
|
|
1024
|
+
UpsertFriendshipPayload_CancelPayload.encode = encode;
|
|
768
1025
|
function decode(input, length) {
|
|
769
1026
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
770
1027
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
771
|
-
const message =
|
|
1028
|
+
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
772
1029
|
while (reader.pos < end) {
|
|
773
1030
|
const tag = reader.uint32();
|
|
774
1031
|
switch (tag >>> 3) {
|
|
@@ -786,59 +1043,47 @@ var CancelPayload;
|
|
|
786
1043
|
}
|
|
787
1044
|
return message;
|
|
788
1045
|
}
|
|
789
|
-
|
|
1046
|
+
UpsertFriendshipPayload_CancelPayload.decode = decode;
|
|
790
1047
|
function fromJSON(object) {
|
|
791
1048
|
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
792
1049
|
}
|
|
793
|
-
|
|
1050
|
+
UpsertFriendshipPayload_CancelPayload.fromJSON = fromJSON;
|
|
794
1051
|
function toJSON(message) {
|
|
795
1052
|
const obj = {};
|
|
796
1053
|
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
797
1054
|
return obj;
|
|
798
1055
|
}
|
|
799
|
-
|
|
1056
|
+
UpsertFriendshipPayload_CancelPayload.toJSON = toJSON;
|
|
800
1057
|
function create(base) {
|
|
801
|
-
return
|
|
1058
|
+
return UpsertFriendshipPayload_CancelPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
802
1059
|
}
|
|
803
|
-
|
|
1060
|
+
UpsertFriendshipPayload_CancelPayload.create = create;
|
|
804
1061
|
function fromPartial(object) {
|
|
805
|
-
const message =
|
|
1062
|
+
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
806
1063
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
807
1064
|
return message;
|
|
808
1065
|
}
|
|
809
|
-
|
|
810
|
-
})(
|
|
811
|
-
function
|
|
812
|
-
return {
|
|
1066
|
+
UpsertFriendshipPayload_CancelPayload.fromPartial = fromPartial;
|
|
1067
|
+
})(UpsertFriendshipPayload_CancelPayload || (exports.UpsertFriendshipPayload_CancelPayload = UpsertFriendshipPayload_CancelPayload = {}));
|
|
1068
|
+
function createBaseGetMutualFriendsPayload() {
|
|
1069
|
+
return { user: undefined, pagination: undefined };
|
|
813
1070
|
}
|
|
814
|
-
var
|
|
815
|
-
(function (
|
|
1071
|
+
var GetMutualFriendsPayload;
|
|
1072
|
+
(function (GetMutualFriendsPayload) {
|
|
816
1073
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
case "accept":
|
|
823
|
-
AcceptPayload.encode(message.action.accept, writer.uint32(18).fork()).ldelim();
|
|
824
|
-
break;
|
|
825
|
-
case "reject":
|
|
826
|
-
RejectPayload.encode(message.action.reject, writer.uint32(34).fork()).ldelim();
|
|
827
|
-
break;
|
|
828
|
-
case "delete":
|
|
829
|
-
DeletePayload.encode(message.action.delete, writer.uint32(42).fork()).ldelim();
|
|
830
|
-
break;
|
|
831
|
-
case "cancel":
|
|
832
|
-
CancelPayload.encode(message.action.cancel, writer.uint32(50).fork()).ldelim();
|
|
833
|
-
break;
|
|
1074
|
+
if (message.user !== undefined) {
|
|
1075
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1076
|
+
}
|
|
1077
|
+
if (message.pagination !== undefined) {
|
|
1078
|
+
Pagination.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
834
1079
|
}
|
|
835
1080
|
return writer;
|
|
836
1081
|
}
|
|
837
|
-
|
|
1082
|
+
GetMutualFriendsPayload.encode = encode;
|
|
838
1083
|
function decode(input, length) {
|
|
839
1084
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
840
1085
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
841
|
-
const message =
|
|
1086
|
+
const message = createBaseGetMutualFriendsPayload();
|
|
842
1087
|
while (reader.pos < end) {
|
|
843
1088
|
const tag = reader.uint32();
|
|
844
1089
|
switch (tag >>> 3) {
|
|
@@ -846,31 +1091,13 @@ var UpsertFriendshipPayload;
|
|
|
846
1091
|
if (tag !== 10) {
|
|
847
1092
|
break;
|
|
848
1093
|
}
|
|
849
|
-
message.
|
|
1094
|
+
message.user = User.decode(reader, reader.uint32());
|
|
850
1095
|
continue;
|
|
851
1096
|
case 2:
|
|
852
1097
|
if (tag !== 18) {
|
|
853
1098
|
break;
|
|
854
1099
|
}
|
|
855
|
-
message.
|
|
856
|
-
continue;
|
|
857
|
-
case 4:
|
|
858
|
-
if (tag !== 34) {
|
|
859
|
-
break;
|
|
860
|
-
}
|
|
861
|
-
message.action = { $case: "reject", reject: RejectPayload.decode(reader, reader.uint32()) };
|
|
862
|
-
continue;
|
|
863
|
-
case 5:
|
|
864
|
-
if (tag !== 42) {
|
|
865
|
-
break;
|
|
866
|
-
}
|
|
867
|
-
message.action = { $case: "delete", delete: DeletePayload.decode(reader, reader.uint32()) };
|
|
868
|
-
continue;
|
|
869
|
-
case 6:
|
|
870
|
-
if (tag !== 50) {
|
|
871
|
-
break;
|
|
872
|
-
}
|
|
873
|
-
message.action = { $case: "cancel", cancel: CancelPayload.decode(reader, reader.uint32()) };
|
|
1100
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
874
1101
|
continue;
|
|
875
1102
|
}
|
|
876
1103
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -880,89 +1107,69 @@ var UpsertFriendshipPayload;
|
|
|
880
1107
|
}
|
|
881
1108
|
return message;
|
|
882
1109
|
}
|
|
883
|
-
|
|
1110
|
+
GetMutualFriendsPayload.decode = decode;
|
|
884
1111
|
function fromJSON(object) {
|
|
885
1112
|
return {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
: isSet(object.accept)
|
|
889
|
-
? { $case: "accept", accept: AcceptPayload.fromJSON(object.accept) }
|
|
890
|
-
: isSet(object.reject)
|
|
891
|
-
? { $case: "reject", reject: RejectPayload.fromJSON(object.reject) }
|
|
892
|
-
: isSet(object.delete)
|
|
893
|
-
? { $case: "delete", delete: DeletePayload.fromJSON(object.delete) }
|
|
894
|
-
: isSet(object.cancel)
|
|
895
|
-
? { $case: "cancel", cancel: CancelPayload.fromJSON(object.cancel) }
|
|
896
|
-
: undefined,
|
|
1113
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
1114
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
897
1115
|
};
|
|
898
1116
|
}
|
|
899
|
-
|
|
1117
|
+
GetMutualFriendsPayload.fromJSON = fromJSON;
|
|
900
1118
|
function toJSON(message) {
|
|
901
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
902
1119
|
const obj = {};
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
(obj.accept = ((_e = message.action) === null || _e === void 0 ? void 0 : _e.accept) ? AcceptPayload.toJSON((_f = message.action) === null || _f === void 0 ? void 0 : _f.accept) : undefined);
|
|
907
|
-
((_g = message.action) === null || _g === void 0 ? void 0 : _g.$case) === "reject" &&
|
|
908
|
-
(obj.reject = ((_h = message.action) === null || _h === void 0 ? void 0 : _h.reject) ? RejectPayload.toJSON((_j = message.action) === null || _j === void 0 ? void 0 : _j.reject) : undefined);
|
|
909
|
-
((_k = message.action) === null || _k === void 0 ? void 0 : _k.$case) === "delete" &&
|
|
910
|
-
(obj.delete = ((_l = message.action) === null || _l === void 0 ? void 0 : _l.delete) ? DeletePayload.toJSON((_m = message.action) === null || _m === void 0 ? void 0 : _m.delete) : undefined);
|
|
911
|
-
((_o = message.action) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" &&
|
|
912
|
-
(obj.cancel = ((_p = message.action) === null || _p === void 0 ? void 0 : _p.cancel) ? CancelPayload.toJSON((_q = message.action) === null || _q === void 0 ? void 0 : _q.cancel) : undefined);
|
|
1120
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1121
|
+
message.pagination !== undefined &&
|
|
1122
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
913
1123
|
return obj;
|
|
914
1124
|
}
|
|
915
|
-
|
|
1125
|
+
GetMutualFriendsPayload.toJSON = toJSON;
|
|
916
1126
|
function create(base) {
|
|
917
|
-
return
|
|
1127
|
+
return GetMutualFriendsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
918
1128
|
}
|
|
919
|
-
|
|
1129
|
+
GetMutualFriendsPayload.create = create;
|
|
920
1130
|
function fromPartial(object) {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
if (((_d = object.action) === null || _d === void 0 ? void 0 : _d.$case) === "accept" && ((_e = object.action) === null || _e === void 0 ? void 0 : _e.accept) !== undefined && ((_f = object.action) === null || _f === void 0 ? void 0 : _f.accept) !== null) {
|
|
927
|
-
message.action = { $case: "accept", accept: AcceptPayload.fromPartial(object.action.accept) };
|
|
928
|
-
}
|
|
929
|
-
if (((_g = object.action) === null || _g === void 0 ? void 0 : _g.$case) === "reject" && ((_h = object.action) === null || _h === void 0 ? void 0 : _h.reject) !== undefined && ((_j = object.action) === null || _j === void 0 ? void 0 : _j.reject) !== null) {
|
|
930
|
-
message.action = { $case: "reject", reject: RejectPayload.fromPartial(object.action.reject) };
|
|
931
|
-
}
|
|
932
|
-
if (((_k = object.action) === null || _k === void 0 ? void 0 : _k.$case) === "delete" && ((_l = object.action) === null || _l === void 0 ? void 0 : _l.delete) !== undefined && ((_m = object.action) === null || _m === void 0 ? void 0 : _m.delete) !== null) {
|
|
933
|
-
message.action = { $case: "delete", delete: DeletePayload.fromPartial(object.action.delete) };
|
|
934
|
-
}
|
|
935
|
-
if (((_o = object.action) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" && ((_p = object.action) === null || _p === void 0 ? void 0 : _p.cancel) !== undefined && ((_q = object.action) === null || _q === void 0 ? void 0 : _q.cancel) !== null) {
|
|
936
|
-
message.action = { $case: "cancel", cancel: CancelPayload.fromPartial(object.action.cancel) };
|
|
937
|
-
}
|
|
1131
|
+
const message = createBaseGetMutualFriendsPayload();
|
|
1132
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1133
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1134
|
+
? Pagination.fromPartial(object.pagination)
|
|
1135
|
+
: undefined;
|
|
938
1136
|
return message;
|
|
939
1137
|
}
|
|
940
|
-
|
|
941
|
-
})(
|
|
942
|
-
function
|
|
943
|
-
return {
|
|
1138
|
+
GetMutualFriendsPayload.fromPartial = fromPartial;
|
|
1139
|
+
})(GetMutualFriendsPayload || (exports.GetMutualFriendsPayload = GetMutualFriendsPayload = {}));
|
|
1140
|
+
function createBasePaginatedResponse() {
|
|
1141
|
+
return { total: 0, page: 0 };
|
|
944
1142
|
}
|
|
945
|
-
var
|
|
946
|
-
(function (
|
|
1143
|
+
var PaginatedResponse;
|
|
1144
|
+
(function (PaginatedResponse) {
|
|
947
1145
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
948
|
-
if (message.
|
|
949
|
-
|
|
1146
|
+
if (message.total !== 0) {
|
|
1147
|
+
writer.uint32(8).int32(message.total);
|
|
1148
|
+
}
|
|
1149
|
+
if (message.page !== 0) {
|
|
1150
|
+
writer.uint32(16).int32(message.page);
|
|
950
1151
|
}
|
|
951
1152
|
return writer;
|
|
952
1153
|
}
|
|
953
|
-
|
|
1154
|
+
PaginatedResponse.encode = encode;
|
|
954
1155
|
function decode(input, length) {
|
|
955
1156
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
956
1157
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
957
|
-
const message =
|
|
1158
|
+
const message = createBasePaginatedResponse();
|
|
958
1159
|
while (reader.pos < end) {
|
|
959
1160
|
const tag = reader.uint32();
|
|
960
1161
|
switch (tag >>> 3) {
|
|
961
1162
|
case 1:
|
|
962
|
-
if (tag !==
|
|
1163
|
+
if (tag !== 8) {
|
|
963
1164
|
break;
|
|
964
1165
|
}
|
|
965
|
-
message.
|
|
1166
|
+
message.total = reader.int32();
|
|
1167
|
+
continue;
|
|
1168
|
+
case 2:
|
|
1169
|
+
if (tag !== 16) {
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
message.page = reader.int32();
|
|
966
1173
|
continue;
|
|
967
1174
|
}
|
|
968
1175
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -972,44 +1179,53 @@ var MutualFriendsPayload;
|
|
|
972
1179
|
}
|
|
973
1180
|
return message;
|
|
974
1181
|
}
|
|
975
|
-
|
|
1182
|
+
PaginatedResponse.decode = decode;
|
|
976
1183
|
function fromJSON(object) {
|
|
977
|
-
return {
|
|
1184
|
+
return {
|
|
1185
|
+
total: isSet(object.total) ? Number(object.total) : 0,
|
|
1186
|
+
page: isSet(object.page) ? Number(object.page) : 0,
|
|
1187
|
+
};
|
|
978
1188
|
}
|
|
979
|
-
|
|
1189
|
+
PaginatedResponse.fromJSON = fromJSON;
|
|
980
1190
|
function toJSON(message) {
|
|
981
1191
|
const obj = {};
|
|
982
|
-
message.
|
|
1192
|
+
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
1193
|
+
message.page !== undefined && (obj.page = Math.round(message.page));
|
|
983
1194
|
return obj;
|
|
984
1195
|
}
|
|
985
|
-
|
|
1196
|
+
PaginatedResponse.toJSON = toJSON;
|
|
986
1197
|
function create(base) {
|
|
987
|
-
return
|
|
1198
|
+
return PaginatedResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
988
1199
|
}
|
|
989
|
-
|
|
1200
|
+
PaginatedResponse.create = create;
|
|
990
1201
|
function fromPartial(object) {
|
|
991
|
-
|
|
992
|
-
message
|
|
1202
|
+
var _a, _b;
|
|
1203
|
+
const message = createBasePaginatedResponse();
|
|
1204
|
+
message.total = (_a = object.total) !== null && _a !== void 0 ? _a : 0;
|
|
1205
|
+
message.page = (_b = object.page) !== null && _b !== void 0 ? _b : 0;
|
|
993
1206
|
return message;
|
|
994
1207
|
}
|
|
995
|
-
|
|
996
|
-
})(
|
|
997
|
-
function
|
|
998
|
-
return { users: [] };
|
|
1208
|
+
PaginatedResponse.fromPartial = fromPartial;
|
|
1209
|
+
})(PaginatedResponse || (exports.PaginatedResponse = PaginatedResponse = {}));
|
|
1210
|
+
function createBasePaginatedUsersResponse() {
|
|
1211
|
+
return { users: [], paginationData: undefined };
|
|
999
1212
|
}
|
|
1000
|
-
var
|
|
1001
|
-
(function (
|
|
1213
|
+
var PaginatedUsersResponse;
|
|
1214
|
+
(function (PaginatedUsersResponse) {
|
|
1002
1215
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1003
1216
|
for (const v of message.users) {
|
|
1004
1217
|
User.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1005
1218
|
}
|
|
1219
|
+
if (message.paginationData !== undefined) {
|
|
1220
|
+
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
1221
|
+
}
|
|
1006
1222
|
return writer;
|
|
1007
1223
|
}
|
|
1008
|
-
|
|
1224
|
+
PaginatedUsersResponse.encode = encode;
|
|
1009
1225
|
function decode(input, length) {
|
|
1010
1226
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1011
1227
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1012
|
-
const message =
|
|
1228
|
+
const message = createBasePaginatedUsersResponse();
|
|
1013
1229
|
while (reader.pos < end) {
|
|
1014
1230
|
const tag = reader.uint32();
|
|
1015
1231
|
switch (tag >>> 3) {
|
|
@@ -1019,6 +1235,12 @@ var UsersResponse;
|
|
|
1019
1235
|
}
|
|
1020
1236
|
message.users.push(User.decode(reader, reader.uint32()));
|
|
1021
1237
|
continue;
|
|
1238
|
+
case 2:
|
|
1239
|
+
if (tag !== 18) {
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1243
|
+
continue;
|
|
1022
1244
|
}
|
|
1023
1245
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1024
1246
|
break;
|
|
@@ -1027,11 +1249,14 @@ var UsersResponse;
|
|
|
1027
1249
|
}
|
|
1028
1250
|
return message;
|
|
1029
1251
|
}
|
|
1030
|
-
|
|
1252
|
+
PaginatedUsersResponse.decode = decode;
|
|
1031
1253
|
function fromJSON(object) {
|
|
1032
|
-
return {
|
|
1254
|
+
return {
|
|
1255
|
+
users: Array.isArray(object === null || object === void 0 ? void 0 : object.users) ? object.users.map((e) => User.fromJSON(e)) : [],
|
|
1256
|
+
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1257
|
+
};
|
|
1033
1258
|
}
|
|
1034
|
-
|
|
1259
|
+
PaginatedUsersResponse.fromJSON = fromJSON;
|
|
1035
1260
|
function toJSON(message) {
|
|
1036
1261
|
const obj = {};
|
|
1037
1262
|
if (message.users) {
|
|
@@ -1040,43 +1265,51 @@ var UsersResponse;
|
|
|
1040
1265
|
else {
|
|
1041
1266
|
obj.users = [];
|
|
1042
1267
|
}
|
|
1268
|
+
message.paginationData !== undefined &&
|
|
1269
|
+
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1043
1270
|
return obj;
|
|
1044
1271
|
}
|
|
1045
|
-
|
|
1272
|
+
PaginatedUsersResponse.toJSON = toJSON;
|
|
1046
1273
|
function create(base) {
|
|
1047
|
-
return
|
|
1274
|
+
return PaginatedUsersResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1048
1275
|
}
|
|
1049
|
-
|
|
1276
|
+
PaginatedUsersResponse.create = create;
|
|
1050
1277
|
function fromPartial(object) {
|
|
1051
1278
|
var _a;
|
|
1052
|
-
const message =
|
|
1279
|
+
const message = createBasePaginatedUsersResponse();
|
|
1053
1280
|
message.users = ((_a = object.users) === null || _a === void 0 ? void 0 : _a.map((e) => User.fromPartial(e))) || [];
|
|
1281
|
+
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1282
|
+
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1283
|
+
: undefined;
|
|
1054
1284
|
return message;
|
|
1055
1285
|
}
|
|
1056
|
-
|
|
1057
|
-
})(
|
|
1058
|
-
function
|
|
1059
|
-
return { response: undefined };
|
|
1286
|
+
PaginatedUsersResponse.fromPartial = fromPartial;
|
|
1287
|
+
})(PaginatedUsersResponse || (exports.PaginatedUsersResponse = PaginatedUsersResponse = {}));
|
|
1288
|
+
function createBasePaginatedFriendshipRequestsResponse() {
|
|
1289
|
+
return { response: undefined, paginationData: undefined };
|
|
1060
1290
|
}
|
|
1061
|
-
var
|
|
1062
|
-
(function (
|
|
1291
|
+
var PaginatedFriendshipRequestsResponse;
|
|
1292
|
+
(function (PaginatedFriendshipRequestsResponse) {
|
|
1063
1293
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1064
1294
|
var _a;
|
|
1065
1295
|
switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
1066
1296
|
case "requests":
|
|
1067
|
-
|
|
1297
|
+
FriendshipRequests.encode(message.response.requests, writer.uint32(10).fork()).ldelim();
|
|
1068
1298
|
break;
|
|
1069
1299
|
case "internalServerError":
|
|
1070
1300
|
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
1071
1301
|
break;
|
|
1072
1302
|
}
|
|
1303
|
+
if (message.paginationData !== undefined) {
|
|
1304
|
+
PaginatedResponse.encode(message.paginationData, writer.uint32(26).fork()).ldelim();
|
|
1305
|
+
}
|
|
1073
1306
|
return writer;
|
|
1074
1307
|
}
|
|
1075
|
-
|
|
1308
|
+
PaginatedFriendshipRequestsResponse.encode = encode;
|
|
1076
1309
|
function decode(input, length) {
|
|
1077
1310
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1078
1311
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1079
|
-
const message =
|
|
1312
|
+
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1080
1313
|
while (reader.pos < end) {
|
|
1081
1314
|
const tag = reader.uint32();
|
|
1082
1315
|
switch (tag >>> 3) {
|
|
@@ -1084,7 +1317,7 @@ var FriendshipRequestsResponse;
|
|
|
1084
1317
|
if (tag !== 10) {
|
|
1085
1318
|
break;
|
|
1086
1319
|
}
|
|
1087
|
-
message.response = { $case: "requests", requests:
|
|
1320
|
+
message.response = { $case: "requests", requests: FriendshipRequests.decode(reader, reader.uint32()) };
|
|
1088
1321
|
continue;
|
|
1089
1322
|
case 2:
|
|
1090
1323
|
if (tag !== 18) {
|
|
@@ -1095,6 +1328,12 @@ var FriendshipRequestsResponse;
|
|
|
1095
1328
|
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1096
1329
|
};
|
|
1097
1330
|
continue;
|
|
1331
|
+
case 3:
|
|
1332
|
+
if (tag !== 26) {
|
|
1333
|
+
break;
|
|
1334
|
+
}
|
|
1335
|
+
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1336
|
+
continue;
|
|
1098
1337
|
}
|
|
1099
1338
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1100
1339
|
break;
|
|
@@ -1103,43 +1342,46 @@ var FriendshipRequestsResponse;
|
|
|
1103
1342
|
}
|
|
1104
1343
|
return message;
|
|
1105
1344
|
}
|
|
1106
|
-
|
|
1345
|
+
PaginatedFriendshipRequestsResponse.decode = decode;
|
|
1107
1346
|
function fromJSON(object) {
|
|
1108
1347
|
return {
|
|
1109
1348
|
response: isSet(object.requests)
|
|
1110
|
-
? { $case: "requests", requests:
|
|
1349
|
+
? { $case: "requests", requests: FriendshipRequests.fromJSON(object.requests) }
|
|
1111
1350
|
: isSet(object.internalServerError)
|
|
1112
1351
|
? {
|
|
1113
1352
|
$case: "internalServerError",
|
|
1114
1353
|
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
1115
1354
|
}
|
|
1116
1355
|
: undefined,
|
|
1356
|
+
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1117
1357
|
};
|
|
1118
1358
|
}
|
|
1119
|
-
|
|
1359
|
+
PaginatedFriendshipRequestsResponse.fromJSON = fromJSON;
|
|
1120
1360
|
function toJSON(message) {
|
|
1121
1361
|
var _a, _b, _c, _d, _e, _f;
|
|
1122
1362
|
const obj = {};
|
|
1123
1363
|
((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "requests" &&
|
|
1124
|
-
(obj.requests = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.requests) ?
|
|
1364
|
+
(obj.requests = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.requests) ? FriendshipRequests.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.requests) : undefined);
|
|
1125
1365
|
((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
|
|
1126
1366
|
(obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
|
|
1127
1367
|
? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
|
|
1128
1368
|
: undefined);
|
|
1369
|
+
message.paginationData !== undefined &&
|
|
1370
|
+
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1129
1371
|
return obj;
|
|
1130
1372
|
}
|
|
1131
|
-
|
|
1373
|
+
PaginatedFriendshipRequestsResponse.toJSON = toJSON;
|
|
1132
1374
|
function create(base) {
|
|
1133
|
-
return
|
|
1375
|
+
return PaginatedFriendshipRequestsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1134
1376
|
}
|
|
1135
|
-
|
|
1377
|
+
PaginatedFriendshipRequestsResponse.create = create;
|
|
1136
1378
|
function fromPartial(object) {
|
|
1137
1379
|
var _a, _b, _c, _d, _e, _f;
|
|
1138
|
-
const message =
|
|
1380
|
+
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1139
1381
|
if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "requests" &&
|
|
1140
1382
|
((_b = object.response) === null || _b === void 0 ? void 0 : _b.requests) !== undefined &&
|
|
1141
1383
|
((_c = object.response) === null || _c === void 0 ? void 0 : _c.requests) !== null) {
|
|
1142
|
-
message.response = { $case: "requests", requests:
|
|
1384
|
+
message.response = { $case: "requests", requests: FriendshipRequests.fromPartial(object.response.requests) };
|
|
1143
1385
|
}
|
|
1144
1386
|
if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
|
|
1145
1387
|
((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
|
|
@@ -1149,10 +1391,13 @@ var FriendshipRequestsResponse;
|
|
|
1149
1391
|
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
1150
1392
|
};
|
|
1151
1393
|
}
|
|
1394
|
+
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1395
|
+
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1396
|
+
: undefined;
|
|
1152
1397
|
return message;
|
|
1153
1398
|
}
|
|
1154
|
-
|
|
1155
|
-
})(
|
|
1399
|
+
PaginatedFriendshipRequestsResponse.fromPartial = fromPartial;
|
|
1400
|
+
})(PaginatedFriendshipRequestsResponse || (exports.PaginatedFriendshipRequestsResponse = PaginatedFriendshipRequestsResponse = {}));
|
|
1156
1401
|
function createBaseUpsertFriendshipResponse() {
|
|
1157
1402
|
return { response: undefined };
|
|
1158
1403
|
}
|
|
@@ -1289,11 +1534,17 @@ var UpsertFriendshipResponse;
|
|
|
1289
1534
|
UpsertFriendshipResponse.fromPartial = fromPartial;
|
|
1290
1535
|
})(UpsertFriendshipResponse || (exports.UpsertFriendshipResponse = UpsertFriendshipResponse = {}));
|
|
1291
1536
|
function createBaseUpsertFriendshipResponse_Accepted() {
|
|
1292
|
-
return {};
|
|
1537
|
+
return { id: "", createdAt: 0 };
|
|
1293
1538
|
}
|
|
1294
1539
|
var UpsertFriendshipResponse_Accepted;
|
|
1295
1540
|
(function (UpsertFriendshipResponse_Accepted) {
|
|
1296
|
-
function encode(
|
|
1541
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1542
|
+
if (message.id !== "") {
|
|
1543
|
+
writer.uint32(10).string(message.id);
|
|
1544
|
+
}
|
|
1545
|
+
if (message.createdAt !== 0) {
|
|
1546
|
+
writer.uint32(16).int64(message.createdAt);
|
|
1547
|
+
}
|
|
1297
1548
|
return writer;
|
|
1298
1549
|
}
|
|
1299
1550
|
UpsertFriendshipResponse_Accepted.encode = encode;
|
|
@@ -1304,6 +1555,18 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1304
1555
|
while (reader.pos < end) {
|
|
1305
1556
|
const tag = reader.uint32();
|
|
1306
1557
|
switch (tag >>> 3) {
|
|
1558
|
+
case 1:
|
|
1559
|
+
if (tag !== 10) {
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
message.id = reader.string();
|
|
1563
|
+
continue;
|
|
1564
|
+
case 2:
|
|
1565
|
+
if (tag !== 16) {
|
|
1566
|
+
break;
|
|
1567
|
+
}
|
|
1568
|
+
message.createdAt = longToNumber(reader.int64());
|
|
1569
|
+
continue;
|
|
1307
1570
|
}
|
|
1308
1571
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1309
1572
|
break;
|
|
@@ -1313,12 +1576,17 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1313
1576
|
return message;
|
|
1314
1577
|
}
|
|
1315
1578
|
UpsertFriendshipResponse_Accepted.decode = decode;
|
|
1316
|
-
function fromJSON(
|
|
1317
|
-
return {
|
|
1579
|
+
function fromJSON(object) {
|
|
1580
|
+
return {
|
|
1581
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
1582
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
1583
|
+
};
|
|
1318
1584
|
}
|
|
1319
1585
|
UpsertFriendshipResponse_Accepted.fromJSON = fromJSON;
|
|
1320
|
-
function toJSON(
|
|
1586
|
+
function toJSON(message) {
|
|
1321
1587
|
const obj = {};
|
|
1588
|
+
message.id !== undefined && (obj.id = message.id);
|
|
1589
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
1322
1590
|
return obj;
|
|
1323
1591
|
}
|
|
1324
1592
|
UpsertFriendshipResponse_Accepted.toJSON = toJSON;
|
|
@@ -1326,8 +1594,11 @@ var UpsertFriendshipResponse_Accepted;
|
|
|
1326
1594
|
return UpsertFriendshipResponse_Accepted.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1327
1595
|
}
|
|
1328
1596
|
UpsertFriendshipResponse_Accepted.create = create;
|
|
1329
|
-
function fromPartial(
|
|
1597
|
+
function fromPartial(object) {
|
|
1598
|
+
var _a, _b;
|
|
1330
1599
|
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1600
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
1601
|
+
message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : 0;
|
|
1331
1602
|
return message;
|
|
1332
1603
|
}
|
|
1333
1604
|
UpsertFriendshipResponse_Accepted.fromPartial = fromPartial;
|
|
@@ -1341,19 +1612,19 @@ var FriendshipUpdate;
|
|
|
1341
1612
|
var _a;
|
|
1342
1613
|
switch ((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
1343
1614
|
case "request":
|
|
1344
|
-
|
|
1615
|
+
FriendshipRequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
1345
1616
|
break;
|
|
1346
1617
|
case "accept":
|
|
1347
|
-
|
|
1618
|
+
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
1348
1619
|
break;
|
|
1349
1620
|
case "reject":
|
|
1350
|
-
|
|
1621
|
+
FriendshipUpdate_RejectResponse.encode(message.update.reject, writer.uint32(26).fork()).ldelim();
|
|
1351
1622
|
break;
|
|
1352
1623
|
case "delete":
|
|
1353
|
-
|
|
1624
|
+
FriendshipUpdate_DeleteResponse.encode(message.update.delete, writer.uint32(34).fork()).ldelim();
|
|
1354
1625
|
break;
|
|
1355
1626
|
case "cancel":
|
|
1356
|
-
|
|
1627
|
+
FriendshipUpdate_CancelResponse.encode(message.update.cancel, writer.uint32(42).fork()).ldelim();
|
|
1357
1628
|
break;
|
|
1358
1629
|
}
|
|
1359
1630
|
return writer;
|
|
@@ -1370,31 +1641,31 @@ var FriendshipUpdate;
|
|
|
1370
1641
|
if (tag !== 10) {
|
|
1371
1642
|
break;
|
|
1372
1643
|
}
|
|
1373
|
-
message.update = { $case: "request", request:
|
|
1644
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.decode(reader, reader.uint32()) };
|
|
1374
1645
|
continue;
|
|
1375
1646
|
case 2:
|
|
1376
1647
|
if (tag !== 18) {
|
|
1377
1648
|
break;
|
|
1378
1649
|
}
|
|
1379
|
-
message.update = { $case: "accept", accept:
|
|
1650
|
+
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.decode(reader, reader.uint32()) };
|
|
1651
|
+
continue;
|
|
1652
|
+
case 3:
|
|
1653
|
+
if (tag !== 26) {
|
|
1654
|
+
break;
|
|
1655
|
+
}
|
|
1656
|
+
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.decode(reader, reader.uint32()) };
|
|
1380
1657
|
continue;
|
|
1381
1658
|
case 4:
|
|
1382
1659
|
if (tag !== 34) {
|
|
1383
1660
|
break;
|
|
1384
1661
|
}
|
|
1385
|
-
message.update = { $case: "
|
|
1662
|
+
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.decode(reader, reader.uint32()) };
|
|
1386
1663
|
continue;
|
|
1387
1664
|
case 5:
|
|
1388
1665
|
if (tag !== 42) {
|
|
1389
1666
|
break;
|
|
1390
1667
|
}
|
|
1391
|
-
message.update = { $case: "
|
|
1392
|
-
continue;
|
|
1393
|
-
case 6:
|
|
1394
|
-
if (tag !== 50) {
|
|
1395
|
-
break;
|
|
1396
|
-
}
|
|
1397
|
-
message.update = { $case: "cancel", cancel: CancelResponse.decode(reader, reader.uint32()) };
|
|
1668
|
+
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.decode(reader, reader.uint32()) };
|
|
1398
1669
|
continue;
|
|
1399
1670
|
}
|
|
1400
1671
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -1408,15 +1679,15 @@ var FriendshipUpdate;
|
|
|
1408
1679
|
function fromJSON(object) {
|
|
1409
1680
|
return {
|
|
1410
1681
|
update: isSet(object.request)
|
|
1411
|
-
? { $case: "request", request:
|
|
1682
|
+
? { $case: "request", request: FriendshipRequestResponse.fromJSON(object.request) }
|
|
1412
1683
|
: isSet(object.accept)
|
|
1413
|
-
? { $case: "accept", accept:
|
|
1684
|
+
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
1414
1685
|
: isSet(object.reject)
|
|
1415
|
-
? { $case: "reject", reject:
|
|
1686
|
+
? { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromJSON(object.reject) }
|
|
1416
1687
|
: isSet(object.delete)
|
|
1417
|
-
? { $case: "delete", delete:
|
|
1688
|
+
? { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromJSON(object.delete) }
|
|
1418
1689
|
: isSet(object.cancel)
|
|
1419
|
-
? { $case: "cancel", cancel:
|
|
1690
|
+
? { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromJSON(object.cancel) }
|
|
1420
1691
|
: undefined,
|
|
1421
1692
|
};
|
|
1422
1693
|
}
|
|
@@ -1425,15 +1696,23 @@ var FriendshipUpdate;
|
|
|
1425
1696
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1426
1697
|
const obj = {};
|
|
1427
1698
|
((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) === "request" &&
|
|
1428
|
-
(obj.request = ((_b = message.update) === null || _b === void 0 ? void 0 : _b.request) ?
|
|
1699
|
+
(obj.request = ((_b = message.update) === null || _b === void 0 ? void 0 : _b.request) ? FriendshipRequestResponse.toJSON((_c = message.update) === null || _c === void 0 ? void 0 : _c.request) : undefined);
|
|
1429
1700
|
((_d = message.update) === null || _d === void 0 ? void 0 : _d.$case) === "accept" &&
|
|
1430
|
-
(obj.accept = ((_e = message.update) === null || _e === void 0 ? void 0 : _e.accept)
|
|
1701
|
+
(obj.accept = ((_e = message.update) === null || _e === void 0 ? void 0 : _e.accept)
|
|
1702
|
+
? FriendshipUpdate_AcceptResponse.toJSON((_f = message.update) === null || _f === void 0 ? void 0 : _f.accept)
|
|
1703
|
+
: undefined);
|
|
1431
1704
|
((_g = message.update) === null || _g === void 0 ? void 0 : _g.$case) === "reject" &&
|
|
1432
|
-
(obj.reject = ((_h = message.update) === null || _h === void 0 ? void 0 : _h.reject)
|
|
1705
|
+
(obj.reject = ((_h = message.update) === null || _h === void 0 ? void 0 : _h.reject)
|
|
1706
|
+
? FriendshipUpdate_RejectResponse.toJSON((_j = message.update) === null || _j === void 0 ? void 0 : _j.reject)
|
|
1707
|
+
: undefined);
|
|
1433
1708
|
((_k = message.update) === null || _k === void 0 ? void 0 : _k.$case) === "delete" &&
|
|
1434
|
-
(obj.delete = ((_l = message.update) === null || _l === void 0 ? void 0 : _l.delete)
|
|
1709
|
+
(obj.delete = ((_l = message.update) === null || _l === void 0 ? void 0 : _l.delete)
|
|
1710
|
+
? FriendshipUpdate_DeleteResponse.toJSON((_m = message.update) === null || _m === void 0 ? void 0 : _m.delete)
|
|
1711
|
+
: undefined);
|
|
1435
1712
|
((_o = message.update) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" &&
|
|
1436
|
-
(obj.cancel = ((_p = message.update) === null || _p === void 0 ? void 0 : _p.cancel)
|
|
1713
|
+
(obj.cancel = ((_p = message.update) === null || _p === void 0 ? void 0 : _p.cancel)
|
|
1714
|
+
? FriendshipUpdate_CancelResponse.toJSON((_q = message.update) === null || _q === void 0 ? void 0 : _q.cancel)
|
|
1715
|
+
: undefined);
|
|
1437
1716
|
return obj;
|
|
1438
1717
|
}
|
|
1439
1718
|
FriendshipUpdate.toJSON = toJSON;
|
|
@@ -1445,61 +1724,512 @@ var FriendshipUpdate;
|
|
|
1445
1724
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1446
1725
|
const message = createBaseFriendshipUpdate();
|
|
1447
1726
|
if (((_a = object.update) === null || _a === void 0 ? void 0 : _a.$case) === "request" && ((_b = object.update) === null || _b === void 0 ? void 0 : _b.request) !== undefined && ((_c = object.update) === null || _c === void 0 ? void 0 : _c.request) !== null) {
|
|
1448
|
-
message.update = { $case: "request", request:
|
|
1727
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.fromPartial(object.update.request) };
|
|
1449
1728
|
}
|
|
1450
1729
|
if (((_d = object.update) === null || _d === void 0 ? void 0 : _d.$case) === "accept" && ((_e = object.update) === null || _e === void 0 ? void 0 : _e.accept) !== undefined && ((_f = object.update) === null || _f === void 0 ? void 0 : _f.accept) !== null) {
|
|
1451
|
-
message.update = { $case: "accept", accept:
|
|
1730
|
+
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
1452
1731
|
}
|
|
1453
1732
|
if (((_g = object.update) === null || _g === void 0 ? void 0 : _g.$case) === "reject" && ((_h = object.update) === null || _h === void 0 ? void 0 : _h.reject) !== undefined && ((_j = object.update) === null || _j === void 0 ? void 0 : _j.reject) !== null) {
|
|
1454
|
-
message.update = { $case: "reject", reject:
|
|
1733
|
+
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromPartial(object.update.reject) };
|
|
1455
1734
|
}
|
|
1456
1735
|
if (((_k = object.update) === null || _k === void 0 ? void 0 : _k.$case) === "delete" && ((_l = object.update) === null || _l === void 0 ? void 0 : _l.delete) !== undefined && ((_m = object.update) === null || _m === void 0 ? void 0 : _m.delete) !== null) {
|
|
1457
|
-
message.update = { $case: "delete", delete:
|
|
1736
|
+
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromPartial(object.update.delete) };
|
|
1458
1737
|
}
|
|
1459
1738
|
if (((_o = object.update) === null || _o === void 0 ? void 0 : _o.$case) === "cancel" && ((_p = object.update) === null || _p === void 0 ? void 0 : _p.cancel) !== undefined && ((_q = object.update) === null || _q === void 0 ? void 0 : _q.cancel) !== null) {
|
|
1460
|
-
message.update = { $case: "cancel", cancel:
|
|
1739
|
+
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromPartial(object.update.cancel) };
|
|
1461
1740
|
}
|
|
1462
1741
|
return message;
|
|
1463
1742
|
}
|
|
1464
1743
|
FriendshipUpdate.fromPartial = fromPartial;
|
|
1465
1744
|
})(FriendshipUpdate || (exports.FriendshipUpdate = FriendshipUpdate = {}));
|
|
1745
|
+
function createBaseFriendshipUpdate_AcceptResponse() {
|
|
1746
|
+
return { user: undefined };
|
|
1747
|
+
}
|
|
1748
|
+
var FriendshipUpdate_AcceptResponse;
|
|
1749
|
+
(function (FriendshipUpdate_AcceptResponse) {
|
|
1750
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1751
|
+
if (message.user !== undefined) {
|
|
1752
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1753
|
+
}
|
|
1754
|
+
return writer;
|
|
1755
|
+
}
|
|
1756
|
+
FriendshipUpdate_AcceptResponse.encode = encode;
|
|
1757
|
+
function decode(input, length) {
|
|
1758
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1759
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1760
|
+
const message = createBaseFriendshipUpdate_AcceptResponse();
|
|
1761
|
+
while (reader.pos < end) {
|
|
1762
|
+
const tag = reader.uint32();
|
|
1763
|
+
switch (tag >>> 3) {
|
|
1764
|
+
case 1:
|
|
1765
|
+
if (tag !== 10) {
|
|
1766
|
+
break;
|
|
1767
|
+
}
|
|
1768
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1769
|
+
continue;
|
|
1770
|
+
}
|
|
1771
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1772
|
+
break;
|
|
1773
|
+
}
|
|
1774
|
+
reader.skipType(tag & 7);
|
|
1775
|
+
}
|
|
1776
|
+
return message;
|
|
1777
|
+
}
|
|
1778
|
+
FriendshipUpdate_AcceptResponse.decode = decode;
|
|
1779
|
+
function fromJSON(object) {
|
|
1780
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1781
|
+
}
|
|
1782
|
+
FriendshipUpdate_AcceptResponse.fromJSON = fromJSON;
|
|
1783
|
+
function toJSON(message) {
|
|
1784
|
+
const obj = {};
|
|
1785
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1786
|
+
return obj;
|
|
1787
|
+
}
|
|
1788
|
+
FriendshipUpdate_AcceptResponse.toJSON = toJSON;
|
|
1789
|
+
function create(base) {
|
|
1790
|
+
return FriendshipUpdate_AcceptResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1791
|
+
}
|
|
1792
|
+
FriendshipUpdate_AcceptResponse.create = create;
|
|
1793
|
+
function fromPartial(object) {
|
|
1794
|
+
const message = createBaseFriendshipUpdate_AcceptResponse();
|
|
1795
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1796
|
+
return message;
|
|
1797
|
+
}
|
|
1798
|
+
FriendshipUpdate_AcceptResponse.fromPartial = fromPartial;
|
|
1799
|
+
})(FriendshipUpdate_AcceptResponse || (exports.FriendshipUpdate_AcceptResponse = FriendshipUpdate_AcceptResponse = {}));
|
|
1800
|
+
function createBaseFriendshipUpdate_RejectResponse() {
|
|
1801
|
+
return { user: undefined };
|
|
1802
|
+
}
|
|
1803
|
+
var FriendshipUpdate_RejectResponse;
|
|
1804
|
+
(function (FriendshipUpdate_RejectResponse) {
|
|
1805
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1806
|
+
if (message.user !== undefined) {
|
|
1807
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1808
|
+
}
|
|
1809
|
+
return writer;
|
|
1810
|
+
}
|
|
1811
|
+
FriendshipUpdate_RejectResponse.encode = encode;
|
|
1812
|
+
function decode(input, length) {
|
|
1813
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1814
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1815
|
+
const message = createBaseFriendshipUpdate_RejectResponse();
|
|
1816
|
+
while (reader.pos < end) {
|
|
1817
|
+
const tag = reader.uint32();
|
|
1818
|
+
switch (tag >>> 3) {
|
|
1819
|
+
case 1:
|
|
1820
|
+
if (tag !== 10) {
|
|
1821
|
+
break;
|
|
1822
|
+
}
|
|
1823
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1824
|
+
continue;
|
|
1825
|
+
}
|
|
1826
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1827
|
+
break;
|
|
1828
|
+
}
|
|
1829
|
+
reader.skipType(tag & 7);
|
|
1830
|
+
}
|
|
1831
|
+
return message;
|
|
1832
|
+
}
|
|
1833
|
+
FriendshipUpdate_RejectResponse.decode = decode;
|
|
1834
|
+
function fromJSON(object) {
|
|
1835
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1836
|
+
}
|
|
1837
|
+
FriendshipUpdate_RejectResponse.fromJSON = fromJSON;
|
|
1838
|
+
function toJSON(message) {
|
|
1839
|
+
const obj = {};
|
|
1840
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1841
|
+
return obj;
|
|
1842
|
+
}
|
|
1843
|
+
FriendshipUpdate_RejectResponse.toJSON = toJSON;
|
|
1844
|
+
function create(base) {
|
|
1845
|
+
return FriendshipUpdate_RejectResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1846
|
+
}
|
|
1847
|
+
FriendshipUpdate_RejectResponse.create = create;
|
|
1848
|
+
function fromPartial(object) {
|
|
1849
|
+
const message = createBaseFriendshipUpdate_RejectResponse();
|
|
1850
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1851
|
+
return message;
|
|
1852
|
+
}
|
|
1853
|
+
FriendshipUpdate_RejectResponse.fromPartial = fromPartial;
|
|
1854
|
+
})(FriendshipUpdate_RejectResponse || (exports.FriendshipUpdate_RejectResponse = FriendshipUpdate_RejectResponse = {}));
|
|
1855
|
+
function createBaseFriendshipUpdate_DeleteResponse() {
|
|
1856
|
+
return { user: undefined };
|
|
1857
|
+
}
|
|
1858
|
+
var FriendshipUpdate_DeleteResponse;
|
|
1859
|
+
(function (FriendshipUpdate_DeleteResponse) {
|
|
1860
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1861
|
+
if (message.user !== undefined) {
|
|
1862
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1863
|
+
}
|
|
1864
|
+
return writer;
|
|
1865
|
+
}
|
|
1866
|
+
FriendshipUpdate_DeleteResponse.encode = encode;
|
|
1867
|
+
function decode(input, length) {
|
|
1868
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1869
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1870
|
+
const message = createBaseFriendshipUpdate_DeleteResponse();
|
|
1871
|
+
while (reader.pos < end) {
|
|
1872
|
+
const tag = reader.uint32();
|
|
1873
|
+
switch (tag >>> 3) {
|
|
1874
|
+
case 1:
|
|
1875
|
+
if (tag !== 10) {
|
|
1876
|
+
break;
|
|
1877
|
+
}
|
|
1878
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1879
|
+
continue;
|
|
1880
|
+
}
|
|
1881
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1882
|
+
break;
|
|
1883
|
+
}
|
|
1884
|
+
reader.skipType(tag & 7);
|
|
1885
|
+
}
|
|
1886
|
+
return message;
|
|
1887
|
+
}
|
|
1888
|
+
FriendshipUpdate_DeleteResponse.decode = decode;
|
|
1889
|
+
function fromJSON(object) {
|
|
1890
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1891
|
+
}
|
|
1892
|
+
FriendshipUpdate_DeleteResponse.fromJSON = fromJSON;
|
|
1893
|
+
function toJSON(message) {
|
|
1894
|
+
const obj = {};
|
|
1895
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1896
|
+
return obj;
|
|
1897
|
+
}
|
|
1898
|
+
FriendshipUpdate_DeleteResponse.toJSON = toJSON;
|
|
1899
|
+
function create(base) {
|
|
1900
|
+
return FriendshipUpdate_DeleteResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1901
|
+
}
|
|
1902
|
+
FriendshipUpdate_DeleteResponse.create = create;
|
|
1903
|
+
function fromPartial(object) {
|
|
1904
|
+
const message = createBaseFriendshipUpdate_DeleteResponse();
|
|
1905
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1906
|
+
return message;
|
|
1907
|
+
}
|
|
1908
|
+
FriendshipUpdate_DeleteResponse.fromPartial = fromPartial;
|
|
1909
|
+
})(FriendshipUpdate_DeleteResponse || (exports.FriendshipUpdate_DeleteResponse = FriendshipUpdate_DeleteResponse = {}));
|
|
1910
|
+
function createBaseFriendshipUpdate_CancelResponse() {
|
|
1911
|
+
return { user: undefined };
|
|
1912
|
+
}
|
|
1913
|
+
var FriendshipUpdate_CancelResponse;
|
|
1914
|
+
(function (FriendshipUpdate_CancelResponse) {
|
|
1915
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1916
|
+
if (message.user !== undefined) {
|
|
1917
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1918
|
+
}
|
|
1919
|
+
return writer;
|
|
1920
|
+
}
|
|
1921
|
+
FriendshipUpdate_CancelResponse.encode = encode;
|
|
1922
|
+
function decode(input, length) {
|
|
1923
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1924
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1925
|
+
const message = createBaseFriendshipUpdate_CancelResponse();
|
|
1926
|
+
while (reader.pos < end) {
|
|
1927
|
+
const tag = reader.uint32();
|
|
1928
|
+
switch (tag >>> 3) {
|
|
1929
|
+
case 1:
|
|
1930
|
+
if (tag !== 10) {
|
|
1931
|
+
break;
|
|
1932
|
+
}
|
|
1933
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1934
|
+
continue;
|
|
1935
|
+
}
|
|
1936
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1937
|
+
break;
|
|
1938
|
+
}
|
|
1939
|
+
reader.skipType(tag & 7);
|
|
1940
|
+
}
|
|
1941
|
+
return message;
|
|
1942
|
+
}
|
|
1943
|
+
FriendshipUpdate_CancelResponse.decode = decode;
|
|
1944
|
+
function fromJSON(object) {
|
|
1945
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1946
|
+
}
|
|
1947
|
+
FriendshipUpdate_CancelResponse.fromJSON = fromJSON;
|
|
1948
|
+
function toJSON(message) {
|
|
1949
|
+
const obj = {};
|
|
1950
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1951
|
+
return obj;
|
|
1952
|
+
}
|
|
1953
|
+
FriendshipUpdate_CancelResponse.toJSON = toJSON;
|
|
1954
|
+
function create(base) {
|
|
1955
|
+
return FriendshipUpdate_CancelResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1956
|
+
}
|
|
1957
|
+
FriendshipUpdate_CancelResponse.create = create;
|
|
1958
|
+
function fromPartial(object) {
|
|
1959
|
+
const message = createBaseFriendshipUpdate_CancelResponse();
|
|
1960
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1961
|
+
return message;
|
|
1962
|
+
}
|
|
1963
|
+
FriendshipUpdate_CancelResponse.fromPartial = fromPartial;
|
|
1964
|
+
})(FriendshipUpdate_CancelResponse || (exports.FriendshipUpdate_CancelResponse = FriendshipUpdate_CancelResponse = {}));
|
|
1965
|
+
function createBaseGetFriendshipStatusPayload() {
|
|
1966
|
+
return { user: undefined };
|
|
1967
|
+
}
|
|
1968
|
+
var GetFriendshipStatusPayload;
|
|
1969
|
+
(function (GetFriendshipStatusPayload) {
|
|
1970
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1971
|
+
if (message.user !== undefined) {
|
|
1972
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1973
|
+
}
|
|
1974
|
+
return writer;
|
|
1975
|
+
}
|
|
1976
|
+
GetFriendshipStatusPayload.encode = encode;
|
|
1977
|
+
function decode(input, length) {
|
|
1978
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1979
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1980
|
+
const message = createBaseGetFriendshipStatusPayload();
|
|
1981
|
+
while (reader.pos < end) {
|
|
1982
|
+
const tag = reader.uint32();
|
|
1983
|
+
switch (tag >>> 3) {
|
|
1984
|
+
case 1:
|
|
1985
|
+
if (tag !== 10) {
|
|
1986
|
+
break;
|
|
1987
|
+
}
|
|
1988
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1989
|
+
continue;
|
|
1990
|
+
}
|
|
1991
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1992
|
+
break;
|
|
1993
|
+
}
|
|
1994
|
+
reader.skipType(tag & 7);
|
|
1995
|
+
}
|
|
1996
|
+
return message;
|
|
1997
|
+
}
|
|
1998
|
+
GetFriendshipStatusPayload.decode = decode;
|
|
1999
|
+
function fromJSON(object) {
|
|
2000
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2001
|
+
}
|
|
2002
|
+
GetFriendshipStatusPayload.fromJSON = fromJSON;
|
|
2003
|
+
function toJSON(message) {
|
|
2004
|
+
const obj = {};
|
|
2005
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2006
|
+
return obj;
|
|
2007
|
+
}
|
|
2008
|
+
GetFriendshipStatusPayload.toJSON = toJSON;
|
|
2009
|
+
function create(base) {
|
|
2010
|
+
return GetFriendshipStatusPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2011
|
+
}
|
|
2012
|
+
GetFriendshipStatusPayload.create = create;
|
|
2013
|
+
function fromPartial(object) {
|
|
2014
|
+
const message = createBaseGetFriendshipStatusPayload();
|
|
2015
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2016
|
+
return message;
|
|
2017
|
+
}
|
|
2018
|
+
GetFriendshipStatusPayload.fromPartial = fromPartial;
|
|
2019
|
+
})(GetFriendshipStatusPayload || (exports.GetFriendshipStatusPayload = GetFriendshipStatusPayload = {}));
|
|
2020
|
+
function createBaseGetFriendshipStatusResponse() {
|
|
2021
|
+
return { response: undefined };
|
|
2022
|
+
}
|
|
2023
|
+
var GetFriendshipStatusResponse;
|
|
2024
|
+
(function (GetFriendshipStatusResponse) {
|
|
2025
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2026
|
+
var _a;
|
|
2027
|
+
switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
2028
|
+
case "accepted":
|
|
2029
|
+
GetFriendshipStatusResponse_Ok.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
2030
|
+
break;
|
|
2031
|
+
case "internalServerError":
|
|
2032
|
+
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
2033
|
+
break;
|
|
2034
|
+
}
|
|
2035
|
+
return writer;
|
|
2036
|
+
}
|
|
2037
|
+
GetFriendshipStatusResponse.encode = encode;
|
|
2038
|
+
function decode(input, length) {
|
|
2039
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2040
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2041
|
+
const message = createBaseGetFriendshipStatusResponse();
|
|
2042
|
+
while (reader.pos < end) {
|
|
2043
|
+
const tag = reader.uint32();
|
|
2044
|
+
switch (tag >>> 3) {
|
|
2045
|
+
case 1:
|
|
2046
|
+
if (tag !== 10) {
|
|
2047
|
+
break;
|
|
2048
|
+
}
|
|
2049
|
+
message.response = {
|
|
2050
|
+
$case: "accepted",
|
|
2051
|
+
accepted: GetFriendshipStatusResponse_Ok.decode(reader, reader.uint32()),
|
|
2052
|
+
};
|
|
2053
|
+
continue;
|
|
2054
|
+
case 2:
|
|
2055
|
+
if (tag !== 18) {
|
|
2056
|
+
break;
|
|
2057
|
+
}
|
|
2058
|
+
message.response = {
|
|
2059
|
+
$case: "internalServerError",
|
|
2060
|
+
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
2061
|
+
};
|
|
2062
|
+
continue;
|
|
2063
|
+
}
|
|
2064
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2065
|
+
break;
|
|
2066
|
+
}
|
|
2067
|
+
reader.skipType(tag & 7);
|
|
2068
|
+
}
|
|
2069
|
+
return message;
|
|
2070
|
+
}
|
|
2071
|
+
GetFriendshipStatusResponse.decode = decode;
|
|
2072
|
+
function fromJSON(object) {
|
|
2073
|
+
return {
|
|
2074
|
+
response: isSet(object.accepted)
|
|
2075
|
+
? { $case: "accepted", accepted: GetFriendshipStatusResponse_Ok.fromJSON(object.accepted) }
|
|
2076
|
+
: isSet(object.internalServerError)
|
|
2077
|
+
? {
|
|
2078
|
+
$case: "internalServerError",
|
|
2079
|
+
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
2080
|
+
}
|
|
2081
|
+
: undefined,
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
GetFriendshipStatusResponse.fromJSON = fromJSON;
|
|
2085
|
+
function toJSON(message) {
|
|
2086
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2087
|
+
const obj = {};
|
|
2088
|
+
((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "accepted" &&
|
|
2089
|
+
(obj.accepted = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.accepted)
|
|
2090
|
+
? GetFriendshipStatusResponse_Ok.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.accepted)
|
|
2091
|
+
: undefined);
|
|
2092
|
+
((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
|
|
2093
|
+
(obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
|
|
2094
|
+
? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
|
|
2095
|
+
: undefined);
|
|
2096
|
+
return obj;
|
|
2097
|
+
}
|
|
2098
|
+
GetFriendshipStatusResponse.toJSON = toJSON;
|
|
2099
|
+
function create(base) {
|
|
2100
|
+
return GetFriendshipStatusResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2101
|
+
}
|
|
2102
|
+
GetFriendshipStatusResponse.create = create;
|
|
2103
|
+
function fromPartial(object) {
|
|
2104
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2105
|
+
const message = createBaseGetFriendshipStatusResponse();
|
|
2106
|
+
if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "accepted" &&
|
|
2107
|
+
((_b = object.response) === null || _b === void 0 ? void 0 : _b.accepted) !== undefined &&
|
|
2108
|
+
((_c = object.response) === null || _c === void 0 ? void 0 : _c.accepted) !== null) {
|
|
2109
|
+
message.response = {
|
|
2110
|
+
$case: "accepted",
|
|
2111
|
+
accepted: GetFriendshipStatusResponse_Ok.fromPartial(object.response.accepted),
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
|
|
2115
|
+
((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
|
|
2116
|
+
((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
|
|
2117
|
+
message.response = {
|
|
2118
|
+
$case: "internalServerError",
|
|
2119
|
+
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
2120
|
+
};
|
|
2121
|
+
}
|
|
2122
|
+
return message;
|
|
2123
|
+
}
|
|
2124
|
+
GetFriendshipStatusResponse.fromPartial = fromPartial;
|
|
2125
|
+
})(GetFriendshipStatusResponse || (exports.GetFriendshipStatusResponse = GetFriendshipStatusResponse = {}));
|
|
2126
|
+
function createBaseGetFriendshipStatusResponse_Ok() {
|
|
2127
|
+
return { status: 0, message: undefined };
|
|
2128
|
+
}
|
|
2129
|
+
var GetFriendshipStatusResponse_Ok;
|
|
2130
|
+
(function (GetFriendshipStatusResponse_Ok) {
|
|
2131
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2132
|
+
if (message.status !== 0) {
|
|
2133
|
+
writer.uint32(8).int32(message.status);
|
|
2134
|
+
}
|
|
2135
|
+
if (message.message !== undefined) {
|
|
2136
|
+
writer.uint32(18).string(message.message);
|
|
2137
|
+
}
|
|
2138
|
+
return writer;
|
|
2139
|
+
}
|
|
2140
|
+
GetFriendshipStatusResponse_Ok.encode = encode;
|
|
2141
|
+
function decode(input, length) {
|
|
2142
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2143
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2144
|
+
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
2145
|
+
while (reader.pos < end) {
|
|
2146
|
+
const tag = reader.uint32();
|
|
2147
|
+
switch (tag >>> 3) {
|
|
2148
|
+
case 1:
|
|
2149
|
+
if (tag !== 8) {
|
|
2150
|
+
break;
|
|
2151
|
+
}
|
|
2152
|
+
message.status = reader.int32();
|
|
2153
|
+
continue;
|
|
2154
|
+
case 2:
|
|
2155
|
+
if (tag !== 18) {
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
message.message = reader.string();
|
|
2159
|
+
continue;
|
|
2160
|
+
}
|
|
2161
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2162
|
+
break;
|
|
2163
|
+
}
|
|
2164
|
+
reader.skipType(tag & 7);
|
|
2165
|
+
}
|
|
2166
|
+
return message;
|
|
2167
|
+
}
|
|
2168
|
+
GetFriendshipStatusResponse_Ok.decode = decode;
|
|
2169
|
+
function fromJSON(object) {
|
|
2170
|
+
return {
|
|
2171
|
+
status: isSet(object.status) ? friendshipStatusFromJSON(object.status) : 0,
|
|
2172
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
GetFriendshipStatusResponse_Ok.fromJSON = fromJSON;
|
|
2176
|
+
function toJSON(message) {
|
|
2177
|
+
const obj = {};
|
|
2178
|
+
message.status !== undefined && (obj.status = friendshipStatusToJSON(message.status));
|
|
2179
|
+
message.message !== undefined && (obj.message = message.message);
|
|
2180
|
+
return obj;
|
|
2181
|
+
}
|
|
2182
|
+
GetFriendshipStatusResponse_Ok.toJSON = toJSON;
|
|
2183
|
+
function create(base) {
|
|
2184
|
+
return GetFriendshipStatusResponse_Ok.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2185
|
+
}
|
|
2186
|
+
GetFriendshipStatusResponse_Ok.create = create;
|
|
2187
|
+
function fromPartial(object) {
|
|
2188
|
+
var _a, _b;
|
|
2189
|
+
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
2190
|
+
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : 0;
|
|
2191
|
+
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
|
|
2192
|
+
return message;
|
|
2193
|
+
}
|
|
2194
|
+
GetFriendshipStatusResponse_Ok.fromPartial = fromPartial;
|
|
2195
|
+
})(GetFriendshipStatusResponse_Ok || (exports.GetFriendshipStatusResponse_Ok = GetFriendshipStatusResponse_Ok = {}));
|
|
1466
2196
|
exports.SocialServiceDefinition = {
|
|
1467
2197
|
name: "SocialService",
|
|
1468
|
-
fullName: "decentraland.
|
|
2198
|
+
fullName: "decentraland.social_service.v2.SocialService",
|
|
1469
2199
|
methods: {
|
|
1470
2200
|
/** Get the list of friends for the authenticated user */
|
|
1471
2201
|
getFriends: {
|
|
1472
2202
|
name: "GetFriends",
|
|
1473
|
-
requestType:
|
|
2203
|
+
requestType: GetFriendsPayload,
|
|
1474
2204
|
requestStream: false,
|
|
1475
|
-
responseType:
|
|
1476
|
-
responseStream:
|
|
2205
|
+
responseType: PaginatedUsersResponse,
|
|
2206
|
+
responseStream: false,
|
|
1477
2207
|
options: {},
|
|
1478
2208
|
},
|
|
1479
2209
|
/** Get the list of mutual friends between the authenticated user and the one in the parameter */
|
|
1480
2210
|
getMutualFriends: {
|
|
1481
2211
|
name: "GetMutualFriends",
|
|
1482
|
-
requestType:
|
|
2212
|
+
requestType: GetMutualFriendsPayload,
|
|
1483
2213
|
requestStream: false,
|
|
1484
|
-
responseType:
|
|
1485
|
-
responseStream:
|
|
2214
|
+
responseType: PaginatedUsersResponse,
|
|
2215
|
+
responseStream: false,
|
|
1486
2216
|
options: {},
|
|
1487
2217
|
},
|
|
1488
2218
|
/** Get the pending friendship requests for the authenticated user */
|
|
1489
2219
|
getPendingFriendshipRequests: {
|
|
1490
2220
|
name: "GetPendingFriendshipRequests",
|
|
1491
|
-
requestType:
|
|
2221
|
+
requestType: GetFriendshipRequestsPayload,
|
|
1492
2222
|
requestStream: false,
|
|
1493
|
-
responseType:
|
|
2223
|
+
responseType: PaginatedFriendshipRequestsResponse,
|
|
1494
2224
|
responseStream: false,
|
|
1495
2225
|
options: {},
|
|
1496
2226
|
},
|
|
1497
2227
|
/** Get the sent friendship requests for the authenticated user */
|
|
1498
2228
|
getSentFriendshipRequests: {
|
|
1499
2229
|
name: "GetSentFriendshipRequests",
|
|
1500
|
-
requestType:
|
|
2230
|
+
requestType: GetFriendshipRequestsPayload,
|
|
1501
2231
|
requestStream: false,
|
|
1502
|
-
responseType:
|
|
2232
|
+
responseType: PaginatedFriendshipRequestsResponse,
|
|
1503
2233
|
responseStream: false,
|
|
1504
2234
|
options: {},
|
|
1505
2235
|
},
|
|
@@ -1521,6 +2251,14 @@ exports.SocialServiceDefinition = {
|
|
|
1521
2251
|
responseStream: true,
|
|
1522
2252
|
options: {},
|
|
1523
2253
|
},
|
|
2254
|
+
getFriendshipStatus: {
|
|
2255
|
+
name: "GetFriendshipStatus",
|
|
2256
|
+
requestType: GetFriendshipStatusPayload,
|
|
2257
|
+
requestStream: false,
|
|
2258
|
+
responseType: GetFriendshipStatusResponse,
|
|
2259
|
+
responseStream: false,
|
|
2260
|
+
options: {},
|
|
2261
|
+
},
|
|
1524
2262
|
},
|
|
1525
2263
|
};
|
|
1526
2264
|
const tsProtoGlobalThis = (() => {
|
|
@@ -1551,4 +2289,4 @@ if (minimal_1.default.util.Long !== long_1.default) {
|
|
|
1551
2289
|
function isSet(value) {
|
|
1552
2290
|
return value !== null && value !== undefined;
|
|
1553
2291
|
}
|
|
1554
|
-
//# sourceMappingURL=
|
|
2292
|
+
//# sourceMappingURL=social_service_v2.gen.js.map
|