@dcl/protocol 1.0.0-12598859345.commit-1ba2979 → 1.0.0-12814322890.commit-5fa9a47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out-js/decentraland/social_service/v3/social_service.gen.d.ts +479 -0
- package/out-js/decentraland/social_service/v3/social_service.gen.js +2292 -0
- package/out-js/decentraland/social_service/v3/social_service.gen.js.map +1 -0
- package/out-js/decentraland/social_service_v2/social_service.gen.d.ts +1 -0
- package/out-js/decentraland/social_service_v2/social_service.gen.js.map +1 -1
- package/out-js/social_service.gen.d.ts +1 -0
- package/out-js/social_service.gen.js +6 -0
- package/out-js/social_service.gen.js.map +1 -0
- package/out-ts/decentraland/social_service/v3/social_service.gen.ts +2598 -0
- package/out-ts/decentraland/social_service_v2/social_service.gen.ts +1 -0
- package/out-ts/social_service.gen.ts +3 -0
- package/package.json +2 -2
- package/proto/decentraland/social_service/v1/social_service.proto +163 -0
- package/proto/decentraland/social_service/v2/social_service.proto +112 -0
- package/proto/decentraland/social_service/v3/social_service.proto +159 -0
- package/proto/decentraland/social_service_v2/social_service.proto +1 -0
- package/public/social_service.proto +4 -0
|
@@ -0,0 +1,2292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SocialServiceDefinition = exports.GetFriendshipStatusResponse_Ok = exports.GetFriendshipStatusResponse = exports.GetFriendshipStatusPayload = exports.FriendshipUpdate_CancelResponse = exports.FriendshipUpdate_DeleteResponse = exports.FriendshipUpdate_RejectResponse = exports.FriendshipUpdate_AcceptResponse = exports.FriendshipUpdate = exports.UpsertFriendshipResponse_Accepted = exports.UpsertFriendshipResponse = exports.PaginatedFriendshipRequestsResponse = exports.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;
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
const long_1 = __importDefault(require("long"));
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
const empty_gen_1 = require("../../../google/protobuf/empty.gen");
|
|
15
|
+
exports.protobufPackage = "decentraland.social_service.v3";
|
|
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
|
+
}
|
|
114
|
+
function createBaseInvalidFriendshipAction() {
|
|
115
|
+
return {};
|
|
116
|
+
}
|
|
117
|
+
var InvalidFriendshipAction;
|
|
118
|
+
(function (InvalidFriendshipAction) {
|
|
119
|
+
function encode(_, writer = minimal_1.default.Writer.create()) {
|
|
120
|
+
return writer;
|
|
121
|
+
}
|
|
122
|
+
InvalidFriendshipAction.encode = encode;
|
|
123
|
+
function decode(input, length) {
|
|
124
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
125
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
126
|
+
const message = createBaseInvalidFriendshipAction();
|
|
127
|
+
while (reader.pos < end) {
|
|
128
|
+
const tag = reader.uint32();
|
|
129
|
+
switch (tag >>> 3) {
|
|
130
|
+
}
|
|
131
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
reader.skipType(tag & 7);
|
|
135
|
+
}
|
|
136
|
+
return message;
|
|
137
|
+
}
|
|
138
|
+
InvalidFriendshipAction.decode = decode;
|
|
139
|
+
function fromJSON(_) {
|
|
140
|
+
return {};
|
|
141
|
+
}
|
|
142
|
+
InvalidFriendshipAction.fromJSON = fromJSON;
|
|
143
|
+
function toJSON(_) {
|
|
144
|
+
const obj = {};
|
|
145
|
+
return obj;
|
|
146
|
+
}
|
|
147
|
+
InvalidFriendshipAction.toJSON = toJSON;
|
|
148
|
+
function create(base) {
|
|
149
|
+
return InvalidFriendshipAction.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
150
|
+
}
|
|
151
|
+
InvalidFriendshipAction.create = create;
|
|
152
|
+
function fromPartial(_) {
|
|
153
|
+
const message = createBaseInvalidFriendshipAction();
|
|
154
|
+
return message;
|
|
155
|
+
}
|
|
156
|
+
InvalidFriendshipAction.fromPartial = fromPartial;
|
|
157
|
+
})(InvalidFriendshipAction || (exports.InvalidFriendshipAction = InvalidFriendshipAction = {}));
|
|
158
|
+
function createBaseInternalServerError() {
|
|
159
|
+
return {};
|
|
160
|
+
}
|
|
161
|
+
var InternalServerError;
|
|
162
|
+
(function (InternalServerError) {
|
|
163
|
+
function encode(_, writer = minimal_1.default.Writer.create()) {
|
|
164
|
+
return writer;
|
|
165
|
+
}
|
|
166
|
+
InternalServerError.encode = encode;
|
|
167
|
+
function decode(input, length) {
|
|
168
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
169
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
170
|
+
const message = createBaseInternalServerError();
|
|
171
|
+
while (reader.pos < end) {
|
|
172
|
+
const tag = reader.uint32();
|
|
173
|
+
switch (tag >>> 3) {
|
|
174
|
+
}
|
|
175
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
reader.skipType(tag & 7);
|
|
179
|
+
}
|
|
180
|
+
return message;
|
|
181
|
+
}
|
|
182
|
+
InternalServerError.decode = decode;
|
|
183
|
+
function fromJSON(_) {
|
|
184
|
+
return {};
|
|
185
|
+
}
|
|
186
|
+
InternalServerError.fromJSON = fromJSON;
|
|
187
|
+
function toJSON(_) {
|
|
188
|
+
const obj = {};
|
|
189
|
+
return obj;
|
|
190
|
+
}
|
|
191
|
+
InternalServerError.toJSON = toJSON;
|
|
192
|
+
function create(base) {
|
|
193
|
+
return InternalServerError.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
194
|
+
}
|
|
195
|
+
InternalServerError.create = create;
|
|
196
|
+
function fromPartial(_) {
|
|
197
|
+
const message = createBaseInternalServerError();
|
|
198
|
+
return message;
|
|
199
|
+
}
|
|
200
|
+
InternalServerError.fromPartial = fromPartial;
|
|
201
|
+
})(InternalServerError || (exports.InternalServerError = InternalServerError = {}));
|
|
202
|
+
function createBaseUser() {
|
|
203
|
+
return { address: "" };
|
|
204
|
+
}
|
|
205
|
+
var User;
|
|
206
|
+
(function (User) {
|
|
207
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
208
|
+
if (message.address !== "") {
|
|
209
|
+
writer.uint32(10).string(message.address);
|
|
210
|
+
}
|
|
211
|
+
return writer;
|
|
212
|
+
}
|
|
213
|
+
User.encode = encode;
|
|
214
|
+
function decode(input, length) {
|
|
215
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
216
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
217
|
+
const message = createBaseUser();
|
|
218
|
+
while (reader.pos < end) {
|
|
219
|
+
const tag = reader.uint32();
|
|
220
|
+
switch (tag >>> 3) {
|
|
221
|
+
case 1:
|
|
222
|
+
if (tag !== 10) {
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
message.address = reader.string();
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
reader.skipType(tag & 7);
|
|
232
|
+
}
|
|
233
|
+
return message;
|
|
234
|
+
}
|
|
235
|
+
User.decode = decode;
|
|
236
|
+
function fromJSON(object) {
|
|
237
|
+
return { address: isSet(object.address) ? String(object.address) : "" };
|
|
238
|
+
}
|
|
239
|
+
User.fromJSON = fromJSON;
|
|
240
|
+
function toJSON(message) {
|
|
241
|
+
const obj = {};
|
|
242
|
+
message.address !== undefined && (obj.address = message.address);
|
|
243
|
+
return obj;
|
|
244
|
+
}
|
|
245
|
+
User.toJSON = toJSON;
|
|
246
|
+
function create(base) {
|
|
247
|
+
return User.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
248
|
+
}
|
|
249
|
+
User.create = create;
|
|
250
|
+
function fromPartial(object) {
|
|
251
|
+
var _a;
|
|
252
|
+
const message = createBaseUser();
|
|
253
|
+
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
|
|
254
|
+
return message;
|
|
255
|
+
}
|
|
256
|
+
User.fromPartial = fromPartial;
|
|
257
|
+
})(User || (exports.User = User = {}));
|
|
258
|
+
function createBasePagination() {
|
|
259
|
+
return { limit: 0, offset: 0 };
|
|
260
|
+
}
|
|
261
|
+
var Pagination;
|
|
262
|
+
(function (Pagination) {
|
|
263
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
264
|
+
if (message.limit !== 0) {
|
|
265
|
+
writer.uint32(8).int32(message.limit);
|
|
266
|
+
}
|
|
267
|
+
if (message.offset !== 0) {
|
|
268
|
+
writer.uint32(16).int32(message.offset);
|
|
269
|
+
}
|
|
270
|
+
return writer;
|
|
271
|
+
}
|
|
272
|
+
Pagination.encode = encode;
|
|
273
|
+
function decode(input, length) {
|
|
274
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
275
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
276
|
+
const message = createBasePagination();
|
|
277
|
+
while (reader.pos < end) {
|
|
278
|
+
const tag = reader.uint32();
|
|
279
|
+
switch (tag >>> 3) {
|
|
280
|
+
case 1:
|
|
281
|
+
if (tag !== 8) {
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
message.limit = reader.int32();
|
|
285
|
+
continue;
|
|
286
|
+
case 2:
|
|
287
|
+
if (tag !== 16) {
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
message.offset = reader.int32();
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
reader.skipType(tag & 7);
|
|
297
|
+
}
|
|
298
|
+
return message;
|
|
299
|
+
}
|
|
300
|
+
Pagination.decode = decode;
|
|
301
|
+
function fromJSON(object) {
|
|
302
|
+
return {
|
|
303
|
+
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
304
|
+
offset: isSet(object.offset) ? Number(object.offset) : 0,
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
Pagination.fromJSON = fromJSON;
|
|
308
|
+
function toJSON(message) {
|
|
309
|
+
const obj = {};
|
|
310
|
+
message.limit !== undefined && (obj.limit = Math.round(message.limit));
|
|
311
|
+
message.offset !== undefined && (obj.offset = Math.round(message.offset));
|
|
312
|
+
return obj;
|
|
313
|
+
}
|
|
314
|
+
Pagination.toJSON = toJSON;
|
|
315
|
+
function create(base) {
|
|
316
|
+
return Pagination.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
317
|
+
}
|
|
318
|
+
Pagination.create = create;
|
|
319
|
+
function fromPartial(object) {
|
|
320
|
+
var _a, _b;
|
|
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;
|
|
324
|
+
return message;
|
|
325
|
+
}
|
|
326
|
+
Pagination.fromPartial = fromPartial;
|
|
327
|
+
})(Pagination || (exports.Pagination = Pagination = {}));
|
|
328
|
+
function createBaseFriendshipRequestResponse() {
|
|
329
|
+
return { user: undefined, createdAt: 0, message: undefined };
|
|
330
|
+
}
|
|
331
|
+
var FriendshipRequestResponse;
|
|
332
|
+
(function (FriendshipRequestResponse) {
|
|
333
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
334
|
+
if (message.user !== undefined) {
|
|
335
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
336
|
+
}
|
|
337
|
+
if (message.createdAt !== 0) {
|
|
338
|
+
writer.uint32(16).int64(message.createdAt);
|
|
339
|
+
}
|
|
340
|
+
if (message.message !== undefined) {
|
|
341
|
+
writer.uint32(26).string(message.message);
|
|
342
|
+
}
|
|
343
|
+
return writer;
|
|
344
|
+
}
|
|
345
|
+
FriendshipRequestResponse.encode = encode;
|
|
346
|
+
function decode(input, length) {
|
|
347
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
348
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
349
|
+
const message = createBaseFriendshipRequestResponse();
|
|
350
|
+
while (reader.pos < end) {
|
|
351
|
+
const tag = reader.uint32();
|
|
352
|
+
switch (tag >>> 3) {
|
|
353
|
+
case 1:
|
|
354
|
+
if (tag !== 10) {
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
message.user = User.decode(reader, reader.uint32());
|
|
358
|
+
continue;
|
|
359
|
+
case 2:
|
|
360
|
+
if (tag !== 16) {
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
message.createdAt = longToNumber(reader.int64());
|
|
364
|
+
continue;
|
|
365
|
+
case 3:
|
|
366
|
+
if (tag !== 26) {
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
message.message = reader.string();
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
reader.skipType(tag & 7);
|
|
376
|
+
}
|
|
377
|
+
return message;
|
|
378
|
+
}
|
|
379
|
+
FriendshipRequestResponse.decode = decode;
|
|
380
|
+
function fromJSON(object) {
|
|
381
|
+
return {
|
|
382
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
383
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
384
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
FriendshipRequestResponse.fromJSON = fromJSON;
|
|
388
|
+
function toJSON(message) {
|
|
389
|
+
const obj = {};
|
|
390
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
391
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
392
|
+
message.message !== undefined && (obj.message = message.message);
|
|
393
|
+
return obj;
|
|
394
|
+
}
|
|
395
|
+
FriendshipRequestResponse.toJSON = toJSON;
|
|
396
|
+
function create(base) {
|
|
397
|
+
return FriendshipRequestResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
398
|
+
}
|
|
399
|
+
FriendshipRequestResponse.create = create;
|
|
400
|
+
function fromPartial(object) {
|
|
401
|
+
var _a, _b;
|
|
402
|
+
const message = createBaseFriendshipRequestResponse();
|
|
403
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
404
|
+
message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : 0;
|
|
405
|
+
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : undefined;
|
|
406
|
+
return message;
|
|
407
|
+
}
|
|
408
|
+
FriendshipRequestResponse.fromPartial = fromPartial;
|
|
409
|
+
})(FriendshipRequestResponse || (exports.FriendshipRequestResponse = FriendshipRequestResponse = {}));
|
|
410
|
+
function createBaseFriendshipRequests() {
|
|
411
|
+
return { requests: [] };
|
|
412
|
+
}
|
|
413
|
+
var FriendshipRequests;
|
|
414
|
+
(function (FriendshipRequests) {
|
|
415
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
416
|
+
for (const v of message.requests) {
|
|
417
|
+
FriendshipRequestResponse.encode(v, writer.uint32(10).fork()).ldelim();
|
|
418
|
+
}
|
|
419
|
+
return writer;
|
|
420
|
+
}
|
|
421
|
+
FriendshipRequests.encode = encode;
|
|
422
|
+
function decode(input, length) {
|
|
423
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
424
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
425
|
+
const message = createBaseFriendshipRequests();
|
|
426
|
+
while (reader.pos < end) {
|
|
427
|
+
const tag = reader.uint32();
|
|
428
|
+
switch (tag >>> 3) {
|
|
429
|
+
case 1:
|
|
430
|
+
if (tag !== 10) {
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
message.requests.push(FriendshipRequestResponse.decode(reader, reader.uint32()));
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
reader.skipType(tag & 7);
|
|
440
|
+
}
|
|
441
|
+
return message;
|
|
442
|
+
}
|
|
443
|
+
FriendshipRequests.decode = decode;
|
|
444
|
+
function fromJSON(object) {
|
|
445
|
+
return {
|
|
446
|
+
requests: Array.isArray(object === null || object === void 0 ? void 0 : object.requests)
|
|
447
|
+
? object.requests.map((e) => FriendshipRequestResponse.fromJSON(e))
|
|
448
|
+
: [],
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
FriendshipRequests.fromJSON = fromJSON;
|
|
452
|
+
function toJSON(message) {
|
|
453
|
+
const obj = {};
|
|
454
|
+
if (message.requests) {
|
|
455
|
+
obj.requests = message.requests.map((e) => e ? FriendshipRequestResponse.toJSON(e) : undefined);
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
obj.requests = [];
|
|
459
|
+
}
|
|
460
|
+
return obj;
|
|
461
|
+
}
|
|
462
|
+
FriendshipRequests.toJSON = toJSON;
|
|
463
|
+
function create(base) {
|
|
464
|
+
return FriendshipRequests.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
465
|
+
}
|
|
466
|
+
FriendshipRequests.create = create;
|
|
467
|
+
function fromPartial(object) {
|
|
468
|
+
var _a;
|
|
469
|
+
const message = createBaseFriendshipRequests();
|
|
470
|
+
message.requests = ((_a = object.requests) === null || _a === void 0 ? void 0 : _a.map((e) => FriendshipRequestResponse.fromPartial(e))) || [];
|
|
471
|
+
return message;
|
|
472
|
+
}
|
|
473
|
+
FriendshipRequests.fromPartial = fromPartial;
|
|
474
|
+
})(FriendshipRequests || (exports.FriendshipRequests = FriendshipRequests = {}));
|
|
475
|
+
function createBaseGetFriendsPayload() {
|
|
476
|
+
return { pagination: undefined, status: undefined };
|
|
477
|
+
}
|
|
478
|
+
var GetFriendsPayload;
|
|
479
|
+
(function (GetFriendsPayload) {
|
|
480
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
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);
|
|
486
|
+
}
|
|
487
|
+
return writer;
|
|
488
|
+
}
|
|
489
|
+
GetFriendsPayload.encode = encode;
|
|
490
|
+
function decode(input, length) {
|
|
491
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
492
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
493
|
+
const message = createBaseGetFriendsPayload();
|
|
494
|
+
while (reader.pos < end) {
|
|
495
|
+
const tag = reader.uint32();
|
|
496
|
+
switch (tag >>> 3) {
|
|
497
|
+
case 1:
|
|
498
|
+
if (tag !== 10) {
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
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();
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
reader.skipType(tag & 7);
|
|
514
|
+
}
|
|
515
|
+
return message;
|
|
516
|
+
}
|
|
517
|
+
GetFriendsPayload.decode = decode;
|
|
518
|
+
function fromJSON(object) {
|
|
519
|
+
return {
|
|
520
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
521
|
+
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : undefined,
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
GetFriendsPayload.fromJSON = fromJSON;
|
|
525
|
+
function toJSON(message) {
|
|
526
|
+
const obj = {};
|
|
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);
|
|
531
|
+
return obj;
|
|
532
|
+
}
|
|
533
|
+
GetFriendsPayload.toJSON = toJSON;
|
|
534
|
+
function create(base) {
|
|
535
|
+
return GetFriendsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
536
|
+
}
|
|
537
|
+
GetFriendsPayload.create = create;
|
|
538
|
+
function fromPartial(object) {
|
|
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;
|
|
545
|
+
return message;
|
|
546
|
+
}
|
|
547
|
+
GetFriendsPayload.fromPartial = fromPartial;
|
|
548
|
+
})(GetFriendsPayload || (exports.GetFriendsPayload = GetFriendsPayload = {}));
|
|
549
|
+
function createBaseGetFriendshipRequestsPayload() {
|
|
550
|
+
return { pagination: undefined };
|
|
551
|
+
}
|
|
552
|
+
var GetFriendshipRequestsPayload;
|
|
553
|
+
(function (GetFriendshipRequestsPayload) {
|
|
554
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
555
|
+
if (message.pagination !== undefined) {
|
|
556
|
+
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
557
|
+
}
|
|
558
|
+
return writer;
|
|
559
|
+
}
|
|
560
|
+
GetFriendshipRequestsPayload.encode = encode;
|
|
561
|
+
function decode(input, length) {
|
|
562
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
563
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
564
|
+
const message = createBaseGetFriendshipRequestsPayload();
|
|
565
|
+
while (reader.pos < end) {
|
|
566
|
+
const tag = reader.uint32();
|
|
567
|
+
switch (tag >>> 3) {
|
|
568
|
+
case 1:
|
|
569
|
+
if (tag !== 10) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
reader.skipType(tag & 7);
|
|
579
|
+
}
|
|
580
|
+
return message;
|
|
581
|
+
}
|
|
582
|
+
GetFriendshipRequestsPayload.decode = decode;
|
|
583
|
+
function fromJSON(object) {
|
|
584
|
+
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
585
|
+
}
|
|
586
|
+
GetFriendshipRequestsPayload.fromJSON = fromJSON;
|
|
587
|
+
function toJSON(message) {
|
|
588
|
+
const obj = {};
|
|
589
|
+
message.pagination !== undefined &&
|
|
590
|
+
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
591
|
+
return obj;
|
|
592
|
+
}
|
|
593
|
+
GetFriendshipRequestsPayload.toJSON = toJSON;
|
|
594
|
+
function create(base) {
|
|
595
|
+
return GetFriendshipRequestsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
596
|
+
}
|
|
597
|
+
GetFriendshipRequestsPayload.create = create;
|
|
598
|
+
function fromPartial(object) {
|
|
599
|
+
const message = createBaseGetFriendshipRequestsPayload();
|
|
600
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
601
|
+
? Pagination.fromPartial(object.pagination)
|
|
602
|
+
: undefined;
|
|
603
|
+
return message;
|
|
604
|
+
}
|
|
605
|
+
GetFriendshipRequestsPayload.fromPartial = fromPartial;
|
|
606
|
+
})(GetFriendshipRequestsPayload || (exports.GetFriendshipRequestsPayload = GetFriendshipRequestsPayload = {}));
|
|
607
|
+
function createBaseUpsertFriendshipPayload() {
|
|
608
|
+
return { action: undefined };
|
|
609
|
+
}
|
|
610
|
+
var UpsertFriendshipPayload;
|
|
611
|
+
(function (UpsertFriendshipPayload) {
|
|
612
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
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;
|
|
630
|
+
}
|
|
631
|
+
return writer;
|
|
632
|
+
}
|
|
633
|
+
UpsertFriendshipPayload.encode = encode;
|
|
634
|
+
function decode(input, length) {
|
|
635
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
636
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
637
|
+
const message = createBaseUpsertFriendshipPayload();
|
|
638
|
+
while (reader.pos < end) {
|
|
639
|
+
const tag = reader.uint32();
|
|
640
|
+
switch (tag >>> 3) {
|
|
641
|
+
case 1:
|
|
642
|
+
if (tag !== 10) {
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
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
|
+
};
|
|
685
|
+
continue;
|
|
686
|
+
}
|
|
687
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
688
|
+
break;
|
|
689
|
+
}
|
|
690
|
+
reader.skipType(tag & 7);
|
|
691
|
+
}
|
|
692
|
+
return message;
|
|
693
|
+
}
|
|
694
|
+
UpsertFriendshipPayload.decode = decode;
|
|
695
|
+
function fromJSON(object) {
|
|
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
|
+
};
|
|
709
|
+
}
|
|
710
|
+
UpsertFriendshipPayload.fromJSON = fromJSON;
|
|
711
|
+
function toJSON(message) {
|
|
712
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
713
|
+
const obj = {};
|
|
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);
|
|
734
|
+
return obj;
|
|
735
|
+
}
|
|
736
|
+
UpsertFriendshipPayload.toJSON = toJSON;
|
|
737
|
+
function create(base) {
|
|
738
|
+
return UpsertFriendshipPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
739
|
+
}
|
|
740
|
+
UpsertFriendshipPayload.create = create;
|
|
741
|
+
function fromPartial(object) {
|
|
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
|
+
}
|
|
774
|
+
return message;
|
|
775
|
+
}
|
|
776
|
+
UpsertFriendshipPayload.fromPartial = fromPartial;
|
|
777
|
+
})(UpsertFriendshipPayload || (exports.UpsertFriendshipPayload = UpsertFriendshipPayload = {}));
|
|
778
|
+
function createBaseUpsertFriendshipPayload_RequestPayload() {
|
|
779
|
+
return { user: undefined, message: undefined };
|
|
780
|
+
}
|
|
781
|
+
var UpsertFriendshipPayload_RequestPayload;
|
|
782
|
+
(function (UpsertFriendshipPayload_RequestPayload) {
|
|
783
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
784
|
+
if (message.user !== undefined) {
|
|
785
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
786
|
+
}
|
|
787
|
+
if (message.message !== undefined) {
|
|
788
|
+
writer.uint32(26).string(message.message);
|
|
789
|
+
}
|
|
790
|
+
return writer;
|
|
791
|
+
}
|
|
792
|
+
UpsertFriendshipPayload_RequestPayload.encode = encode;
|
|
793
|
+
function decode(input, length) {
|
|
794
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
795
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
796
|
+
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
797
|
+
while (reader.pos < end) {
|
|
798
|
+
const tag = reader.uint32();
|
|
799
|
+
switch (tag >>> 3) {
|
|
800
|
+
case 1:
|
|
801
|
+
if (tag !== 10) {
|
|
802
|
+
break;
|
|
803
|
+
}
|
|
804
|
+
message.user = User.decode(reader, reader.uint32());
|
|
805
|
+
continue;
|
|
806
|
+
case 3:
|
|
807
|
+
if (tag !== 26) {
|
|
808
|
+
break;
|
|
809
|
+
}
|
|
810
|
+
message.message = reader.string();
|
|
811
|
+
continue;
|
|
812
|
+
}
|
|
813
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
814
|
+
break;
|
|
815
|
+
}
|
|
816
|
+
reader.skipType(tag & 7);
|
|
817
|
+
}
|
|
818
|
+
return message;
|
|
819
|
+
}
|
|
820
|
+
UpsertFriendshipPayload_RequestPayload.decode = decode;
|
|
821
|
+
function fromJSON(object) {
|
|
822
|
+
return {
|
|
823
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
824
|
+
message: isSet(object.message) ? String(object.message) : undefined,
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
UpsertFriendshipPayload_RequestPayload.fromJSON = fromJSON;
|
|
828
|
+
function toJSON(message) {
|
|
829
|
+
const obj = {};
|
|
830
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
831
|
+
message.message !== undefined && (obj.message = message.message);
|
|
832
|
+
return obj;
|
|
833
|
+
}
|
|
834
|
+
UpsertFriendshipPayload_RequestPayload.toJSON = toJSON;
|
|
835
|
+
function create(base) {
|
|
836
|
+
return UpsertFriendshipPayload_RequestPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
837
|
+
}
|
|
838
|
+
UpsertFriendshipPayload_RequestPayload.create = create;
|
|
839
|
+
function fromPartial(object) {
|
|
840
|
+
var _a;
|
|
841
|
+
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
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;
|
|
844
|
+
return message;
|
|
845
|
+
}
|
|
846
|
+
UpsertFriendshipPayload_RequestPayload.fromPartial = fromPartial;
|
|
847
|
+
})(UpsertFriendshipPayload_RequestPayload || (exports.UpsertFriendshipPayload_RequestPayload = UpsertFriendshipPayload_RequestPayload = {}));
|
|
848
|
+
function createBaseUpsertFriendshipPayload_AcceptPayload() {
|
|
849
|
+
return { user: undefined };
|
|
850
|
+
}
|
|
851
|
+
var UpsertFriendshipPayload_AcceptPayload;
|
|
852
|
+
(function (UpsertFriendshipPayload_AcceptPayload) {
|
|
853
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
854
|
+
if (message.user !== undefined) {
|
|
855
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
856
|
+
}
|
|
857
|
+
return writer;
|
|
858
|
+
}
|
|
859
|
+
UpsertFriendshipPayload_AcceptPayload.encode = encode;
|
|
860
|
+
function decode(input, length) {
|
|
861
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
862
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
863
|
+
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
864
|
+
while (reader.pos < end) {
|
|
865
|
+
const tag = reader.uint32();
|
|
866
|
+
switch (tag >>> 3) {
|
|
867
|
+
case 1:
|
|
868
|
+
if (tag !== 10) {
|
|
869
|
+
break;
|
|
870
|
+
}
|
|
871
|
+
message.user = User.decode(reader, reader.uint32());
|
|
872
|
+
continue;
|
|
873
|
+
}
|
|
874
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
875
|
+
break;
|
|
876
|
+
}
|
|
877
|
+
reader.skipType(tag & 7);
|
|
878
|
+
}
|
|
879
|
+
return message;
|
|
880
|
+
}
|
|
881
|
+
UpsertFriendshipPayload_AcceptPayload.decode = decode;
|
|
882
|
+
function fromJSON(object) {
|
|
883
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
884
|
+
}
|
|
885
|
+
UpsertFriendshipPayload_AcceptPayload.fromJSON = fromJSON;
|
|
886
|
+
function toJSON(message) {
|
|
887
|
+
const obj = {};
|
|
888
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
889
|
+
return obj;
|
|
890
|
+
}
|
|
891
|
+
UpsertFriendshipPayload_AcceptPayload.toJSON = toJSON;
|
|
892
|
+
function create(base) {
|
|
893
|
+
return UpsertFriendshipPayload_AcceptPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
894
|
+
}
|
|
895
|
+
UpsertFriendshipPayload_AcceptPayload.create = create;
|
|
896
|
+
function fromPartial(object) {
|
|
897
|
+
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
898
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
899
|
+
return message;
|
|
900
|
+
}
|
|
901
|
+
UpsertFriendshipPayload_AcceptPayload.fromPartial = fromPartial;
|
|
902
|
+
})(UpsertFriendshipPayload_AcceptPayload || (exports.UpsertFriendshipPayload_AcceptPayload = UpsertFriendshipPayload_AcceptPayload = {}));
|
|
903
|
+
function createBaseUpsertFriendshipPayload_RejectPayload() {
|
|
904
|
+
return { user: undefined };
|
|
905
|
+
}
|
|
906
|
+
var UpsertFriendshipPayload_RejectPayload;
|
|
907
|
+
(function (UpsertFriendshipPayload_RejectPayload) {
|
|
908
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
909
|
+
if (message.user !== undefined) {
|
|
910
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
911
|
+
}
|
|
912
|
+
return writer;
|
|
913
|
+
}
|
|
914
|
+
UpsertFriendshipPayload_RejectPayload.encode = encode;
|
|
915
|
+
function decode(input, length) {
|
|
916
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
917
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
918
|
+
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
919
|
+
while (reader.pos < end) {
|
|
920
|
+
const tag = reader.uint32();
|
|
921
|
+
switch (tag >>> 3) {
|
|
922
|
+
case 1:
|
|
923
|
+
if (tag !== 10) {
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
message.user = User.decode(reader, reader.uint32());
|
|
927
|
+
continue;
|
|
928
|
+
}
|
|
929
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
reader.skipType(tag & 7);
|
|
933
|
+
}
|
|
934
|
+
return message;
|
|
935
|
+
}
|
|
936
|
+
UpsertFriendshipPayload_RejectPayload.decode = decode;
|
|
937
|
+
function fromJSON(object) {
|
|
938
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
939
|
+
}
|
|
940
|
+
UpsertFriendshipPayload_RejectPayload.fromJSON = fromJSON;
|
|
941
|
+
function toJSON(message) {
|
|
942
|
+
const obj = {};
|
|
943
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
944
|
+
return obj;
|
|
945
|
+
}
|
|
946
|
+
UpsertFriendshipPayload_RejectPayload.toJSON = toJSON;
|
|
947
|
+
function create(base) {
|
|
948
|
+
return UpsertFriendshipPayload_RejectPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
949
|
+
}
|
|
950
|
+
UpsertFriendshipPayload_RejectPayload.create = create;
|
|
951
|
+
function fromPartial(object) {
|
|
952
|
+
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
953
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
954
|
+
return message;
|
|
955
|
+
}
|
|
956
|
+
UpsertFriendshipPayload_RejectPayload.fromPartial = fromPartial;
|
|
957
|
+
})(UpsertFriendshipPayload_RejectPayload || (exports.UpsertFriendshipPayload_RejectPayload = UpsertFriendshipPayload_RejectPayload = {}));
|
|
958
|
+
function createBaseUpsertFriendshipPayload_DeletePayload() {
|
|
959
|
+
return { user: undefined };
|
|
960
|
+
}
|
|
961
|
+
var UpsertFriendshipPayload_DeletePayload;
|
|
962
|
+
(function (UpsertFriendshipPayload_DeletePayload) {
|
|
963
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
964
|
+
if (message.user !== undefined) {
|
|
965
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
966
|
+
}
|
|
967
|
+
return writer;
|
|
968
|
+
}
|
|
969
|
+
UpsertFriendshipPayload_DeletePayload.encode = encode;
|
|
970
|
+
function decode(input, length) {
|
|
971
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
972
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
973
|
+
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
974
|
+
while (reader.pos < end) {
|
|
975
|
+
const tag = reader.uint32();
|
|
976
|
+
switch (tag >>> 3) {
|
|
977
|
+
case 1:
|
|
978
|
+
if (tag !== 10) {
|
|
979
|
+
break;
|
|
980
|
+
}
|
|
981
|
+
message.user = User.decode(reader, reader.uint32());
|
|
982
|
+
continue;
|
|
983
|
+
}
|
|
984
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
985
|
+
break;
|
|
986
|
+
}
|
|
987
|
+
reader.skipType(tag & 7);
|
|
988
|
+
}
|
|
989
|
+
return message;
|
|
990
|
+
}
|
|
991
|
+
UpsertFriendshipPayload_DeletePayload.decode = decode;
|
|
992
|
+
function fromJSON(object) {
|
|
993
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
994
|
+
}
|
|
995
|
+
UpsertFriendshipPayload_DeletePayload.fromJSON = fromJSON;
|
|
996
|
+
function toJSON(message) {
|
|
997
|
+
const obj = {};
|
|
998
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
999
|
+
return obj;
|
|
1000
|
+
}
|
|
1001
|
+
UpsertFriendshipPayload_DeletePayload.toJSON = toJSON;
|
|
1002
|
+
function create(base) {
|
|
1003
|
+
return UpsertFriendshipPayload_DeletePayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1004
|
+
}
|
|
1005
|
+
UpsertFriendshipPayload_DeletePayload.create = create;
|
|
1006
|
+
function fromPartial(object) {
|
|
1007
|
+
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
1008
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1009
|
+
return message;
|
|
1010
|
+
}
|
|
1011
|
+
UpsertFriendshipPayload_DeletePayload.fromPartial = fromPartial;
|
|
1012
|
+
})(UpsertFriendshipPayload_DeletePayload || (exports.UpsertFriendshipPayload_DeletePayload = UpsertFriendshipPayload_DeletePayload = {}));
|
|
1013
|
+
function createBaseUpsertFriendshipPayload_CancelPayload() {
|
|
1014
|
+
return { user: undefined };
|
|
1015
|
+
}
|
|
1016
|
+
var UpsertFriendshipPayload_CancelPayload;
|
|
1017
|
+
(function (UpsertFriendshipPayload_CancelPayload) {
|
|
1018
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1019
|
+
if (message.user !== undefined) {
|
|
1020
|
+
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1021
|
+
}
|
|
1022
|
+
return writer;
|
|
1023
|
+
}
|
|
1024
|
+
UpsertFriendshipPayload_CancelPayload.encode = encode;
|
|
1025
|
+
function decode(input, length) {
|
|
1026
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1027
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1028
|
+
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
1029
|
+
while (reader.pos < end) {
|
|
1030
|
+
const tag = reader.uint32();
|
|
1031
|
+
switch (tag >>> 3) {
|
|
1032
|
+
case 1:
|
|
1033
|
+
if (tag !== 10) {
|
|
1034
|
+
break;
|
|
1035
|
+
}
|
|
1036
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1037
|
+
continue;
|
|
1038
|
+
}
|
|
1039
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
reader.skipType(tag & 7);
|
|
1043
|
+
}
|
|
1044
|
+
return message;
|
|
1045
|
+
}
|
|
1046
|
+
UpsertFriendshipPayload_CancelPayload.decode = decode;
|
|
1047
|
+
function fromJSON(object) {
|
|
1048
|
+
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1049
|
+
}
|
|
1050
|
+
UpsertFriendshipPayload_CancelPayload.fromJSON = fromJSON;
|
|
1051
|
+
function toJSON(message) {
|
|
1052
|
+
const obj = {};
|
|
1053
|
+
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1054
|
+
return obj;
|
|
1055
|
+
}
|
|
1056
|
+
UpsertFriendshipPayload_CancelPayload.toJSON = toJSON;
|
|
1057
|
+
function create(base) {
|
|
1058
|
+
return UpsertFriendshipPayload_CancelPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1059
|
+
}
|
|
1060
|
+
UpsertFriendshipPayload_CancelPayload.create = create;
|
|
1061
|
+
function fromPartial(object) {
|
|
1062
|
+
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
1063
|
+
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1064
|
+
return message;
|
|
1065
|
+
}
|
|
1066
|
+
UpsertFriendshipPayload_CancelPayload.fromPartial = fromPartial;
|
|
1067
|
+
})(UpsertFriendshipPayload_CancelPayload || (exports.UpsertFriendshipPayload_CancelPayload = UpsertFriendshipPayload_CancelPayload = {}));
|
|
1068
|
+
function createBaseGetMutualFriendsPayload() {
|
|
1069
|
+
return { user: undefined, pagination: undefined };
|
|
1070
|
+
}
|
|
1071
|
+
var GetMutualFriendsPayload;
|
|
1072
|
+
(function (GetMutualFriendsPayload) {
|
|
1073
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
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();
|
|
1079
|
+
}
|
|
1080
|
+
return writer;
|
|
1081
|
+
}
|
|
1082
|
+
GetMutualFriendsPayload.encode = encode;
|
|
1083
|
+
function decode(input, length) {
|
|
1084
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1085
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1086
|
+
const message = createBaseGetMutualFriendsPayload();
|
|
1087
|
+
while (reader.pos < end) {
|
|
1088
|
+
const tag = reader.uint32();
|
|
1089
|
+
switch (tag >>> 3) {
|
|
1090
|
+
case 1:
|
|
1091
|
+
if (tag !== 10) {
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
message.user = User.decode(reader, reader.uint32());
|
|
1095
|
+
continue;
|
|
1096
|
+
case 2:
|
|
1097
|
+
if (tag !== 18) {
|
|
1098
|
+
break;
|
|
1099
|
+
}
|
|
1100
|
+
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
1101
|
+
continue;
|
|
1102
|
+
}
|
|
1103
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1104
|
+
break;
|
|
1105
|
+
}
|
|
1106
|
+
reader.skipType(tag & 7);
|
|
1107
|
+
}
|
|
1108
|
+
return message;
|
|
1109
|
+
}
|
|
1110
|
+
GetMutualFriendsPayload.decode = decode;
|
|
1111
|
+
function fromJSON(object) {
|
|
1112
|
+
return {
|
|
1113
|
+
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
1114
|
+
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
GetMutualFriendsPayload.fromJSON = fromJSON;
|
|
1118
|
+
function toJSON(message) {
|
|
1119
|
+
const obj = {};
|
|
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);
|
|
1123
|
+
return obj;
|
|
1124
|
+
}
|
|
1125
|
+
GetMutualFriendsPayload.toJSON = toJSON;
|
|
1126
|
+
function create(base) {
|
|
1127
|
+
return GetMutualFriendsPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1128
|
+
}
|
|
1129
|
+
GetMutualFriendsPayload.create = create;
|
|
1130
|
+
function fromPartial(object) {
|
|
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;
|
|
1136
|
+
return message;
|
|
1137
|
+
}
|
|
1138
|
+
GetMutualFriendsPayload.fromPartial = fromPartial;
|
|
1139
|
+
})(GetMutualFriendsPayload || (exports.GetMutualFriendsPayload = GetMutualFriendsPayload = {}));
|
|
1140
|
+
function createBasePaginatedResponse() {
|
|
1141
|
+
return { total: 0, page: 0 };
|
|
1142
|
+
}
|
|
1143
|
+
var PaginatedResponse;
|
|
1144
|
+
(function (PaginatedResponse) {
|
|
1145
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
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);
|
|
1151
|
+
}
|
|
1152
|
+
return writer;
|
|
1153
|
+
}
|
|
1154
|
+
PaginatedResponse.encode = encode;
|
|
1155
|
+
function decode(input, length) {
|
|
1156
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1157
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1158
|
+
const message = createBasePaginatedResponse();
|
|
1159
|
+
while (reader.pos < end) {
|
|
1160
|
+
const tag = reader.uint32();
|
|
1161
|
+
switch (tag >>> 3) {
|
|
1162
|
+
case 1:
|
|
1163
|
+
if (tag !== 8) {
|
|
1164
|
+
break;
|
|
1165
|
+
}
|
|
1166
|
+
message.total = reader.int32();
|
|
1167
|
+
continue;
|
|
1168
|
+
case 2:
|
|
1169
|
+
if (tag !== 16) {
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
message.page = reader.int32();
|
|
1173
|
+
continue;
|
|
1174
|
+
}
|
|
1175
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
reader.skipType(tag & 7);
|
|
1179
|
+
}
|
|
1180
|
+
return message;
|
|
1181
|
+
}
|
|
1182
|
+
PaginatedResponse.decode = decode;
|
|
1183
|
+
function fromJSON(object) {
|
|
1184
|
+
return {
|
|
1185
|
+
total: isSet(object.total) ? Number(object.total) : 0,
|
|
1186
|
+
page: isSet(object.page) ? Number(object.page) : 0,
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
PaginatedResponse.fromJSON = fromJSON;
|
|
1190
|
+
function toJSON(message) {
|
|
1191
|
+
const obj = {};
|
|
1192
|
+
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
1193
|
+
message.page !== undefined && (obj.page = Math.round(message.page));
|
|
1194
|
+
return obj;
|
|
1195
|
+
}
|
|
1196
|
+
PaginatedResponse.toJSON = toJSON;
|
|
1197
|
+
function create(base) {
|
|
1198
|
+
return PaginatedResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1199
|
+
}
|
|
1200
|
+
PaginatedResponse.create = create;
|
|
1201
|
+
function fromPartial(object) {
|
|
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;
|
|
1206
|
+
return message;
|
|
1207
|
+
}
|
|
1208
|
+
PaginatedResponse.fromPartial = fromPartial;
|
|
1209
|
+
})(PaginatedResponse || (exports.PaginatedResponse = PaginatedResponse = {}));
|
|
1210
|
+
function createBasePaginatedUsersResponse() {
|
|
1211
|
+
return { users: [], paginationData: undefined };
|
|
1212
|
+
}
|
|
1213
|
+
var PaginatedUsersResponse;
|
|
1214
|
+
(function (PaginatedUsersResponse) {
|
|
1215
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1216
|
+
for (const v of message.users) {
|
|
1217
|
+
User.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1218
|
+
}
|
|
1219
|
+
if (message.paginationData !== undefined) {
|
|
1220
|
+
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
1221
|
+
}
|
|
1222
|
+
return writer;
|
|
1223
|
+
}
|
|
1224
|
+
PaginatedUsersResponse.encode = encode;
|
|
1225
|
+
function decode(input, length) {
|
|
1226
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1227
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1228
|
+
const message = createBasePaginatedUsersResponse();
|
|
1229
|
+
while (reader.pos < end) {
|
|
1230
|
+
const tag = reader.uint32();
|
|
1231
|
+
switch (tag >>> 3) {
|
|
1232
|
+
case 1:
|
|
1233
|
+
if (tag !== 10) {
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
message.users.push(User.decode(reader, reader.uint32()));
|
|
1237
|
+
continue;
|
|
1238
|
+
case 2:
|
|
1239
|
+
if (tag !== 18) {
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1243
|
+
continue;
|
|
1244
|
+
}
|
|
1245
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
1248
|
+
reader.skipType(tag & 7);
|
|
1249
|
+
}
|
|
1250
|
+
return message;
|
|
1251
|
+
}
|
|
1252
|
+
PaginatedUsersResponse.decode = decode;
|
|
1253
|
+
function fromJSON(object) {
|
|
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
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
PaginatedUsersResponse.fromJSON = fromJSON;
|
|
1260
|
+
function toJSON(message) {
|
|
1261
|
+
const obj = {};
|
|
1262
|
+
if (message.users) {
|
|
1263
|
+
obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);
|
|
1264
|
+
}
|
|
1265
|
+
else {
|
|
1266
|
+
obj.users = [];
|
|
1267
|
+
}
|
|
1268
|
+
message.paginationData !== undefined &&
|
|
1269
|
+
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1270
|
+
return obj;
|
|
1271
|
+
}
|
|
1272
|
+
PaginatedUsersResponse.toJSON = toJSON;
|
|
1273
|
+
function create(base) {
|
|
1274
|
+
return PaginatedUsersResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1275
|
+
}
|
|
1276
|
+
PaginatedUsersResponse.create = create;
|
|
1277
|
+
function fromPartial(object) {
|
|
1278
|
+
var _a;
|
|
1279
|
+
const message = createBasePaginatedUsersResponse();
|
|
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;
|
|
1284
|
+
return message;
|
|
1285
|
+
}
|
|
1286
|
+
PaginatedUsersResponse.fromPartial = fromPartial;
|
|
1287
|
+
})(PaginatedUsersResponse || (exports.PaginatedUsersResponse = PaginatedUsersResponse = {}));
|
|
1288
|
+
function createBasePaginatedFriendshipRequestsResponse() {
|
|
1289
|
+
return { response: undefined, paginationData: undefined };
|
|
1290
|
+
}
|
|
1291
|
+
var PaginatedFriendshipRequestsResponse;
|
|
1292
|
+
(function (PaginatedFriendshipRequestsResponse) {
|
|
1293
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1294
|
+
var _a;
|
|
1295
|
+
switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
1296
|
+
case "requests":
|
|
1297
|
+
FriendshipRequests.encode(message.response.requests, writer.uint32(10).fork()).ldelim();
|
|
1298
|
+
break;
|
|
1299
|
+
case "internalServerError":
|
|
1300
|
+
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
1301
|
+
break;
|
|
1302
|
+
}
|
|
1303
|
+
if (message.paginationData !== undefined) {
|
|
1304
|
+
PaginatedResponse.encode(message.paginationData, writer.uint32(26).fork()).ldelim();
|
|
1305
|
+
}
|
|
1306
|
+
return writer;
|
|
1307
|
+
}
|
|
1308
|
+
PaginatedFriendshipRequestsResponse.encode = encode;
|
|
1309
|
+
function decode(input, length) {
|
|
1310
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1311
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1312
|
+
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1313
|
+
while (reader.pos < end) {
|
|
1314
|
+
const tag = reader.uint32();
|
|
1315
|
+
switch (tag >>> 3) {
|
|
1316
|
+
case 1:
|
|
1317
|
+
if (tag !== 10) {
|
|
1318
|
+
break;
|
|
1319
|
+
}
|
|
1320
|
+
message.response = { $case: "requests", requests: FriendshipRequests.decode(reader, reader.uint32()) };
|
|
1321
|
+
continue;
|
|
1322
|
+
case 2:
|
|
1323
|
+
if (tag !== 18) {
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
message.response = {
|
|
1327
|
+
$case: "internalServerError",
|
|
1328
|
+
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1329
|
+
};
|
|
1330
|
+
continue;
|
|
1331
|
+
case 3:
|
|
1332
|
+
if (tag !== 26) {
|
|
1333
|
+
break;
|
|
1334
|
+
}
|
|
1335
|
+
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1336
|
+
continue;
|
|
1337
|
+
}
|
|
1338
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1339
|
+
break;
|
|
1340
|
+
}
|
|
1341
|
+
reader.skipType(tag & 7);
|
|
1342
|
+
}
|
|
1343
|
+
return message;
|
|
1344
|
+
}
|
|
1345
|
+
PaginatedFriendshipRequestsResponse.decode = decode;
|
|
1346
|
+
function fromJSON(object) {
|
|
1347
|
+
return {
|
|
1348
|
+
response: isSet(object.requests)
|
|
1349
|
+
? { $case: "requests", requests: FriendshipRequests.fromJSON(object.requests) }
|
|
1350
|
+
: isSet(object.internalServerError)
|
|
1351
|
+
? {
|
|
1352
|
+
$case: "internalServerError",
|
|
1353
|
+
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
1354
|
+
}
|
|
1355
|
+
: undefined,
|
|
1356
|
+
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
PaginatedFriendshipRequestsResponse.fromJSON = fromJSON;
|
|
1360
|
+
function toJSON(message) {
|
|
1361
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1362
|
+
const obj = {};
|
|
1363
|
+
((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "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);
|
|
1365
|
+
((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
|
|
1366
|
+
(obj.internalServerError = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.internalServerError)
|
|
1367
|
+
? InternalServerError.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.internalServerError)
|
|
1368
|
+
: undefined);
|
|
1369
|
+
message.paginationData !== undefined &&
|
|
1370
|
+
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1371
|
+
return obj;
|
|
1372
|
+
}
|
|
1373
|
+
PaginatedFriendshipRequestsResponse.toJSON = toJSON;
|
|
1374
|
+
function create(base) {
|
|
1375
|
+
return PaginatedFriendshipRequestsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1376
|
+
}
|
|
1377
|
+
PaginatedFriendshipRequestsResponse.create = create;
|
|
1378
|
+
function fromPartial(object) {
|
|
1379
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1380
|
+
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1381
|
+
if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "requests" &&
|
|
1382
|
+
((_b = object.response) === null || _b === void 0 ? void 0 : _b.requests) !== undefined &&
|
|
1383
|
+
((_c = object.response) === null || _c === void 0 ? void 0 : _c.requests) !== null) {
|
|
1384
|
+
message.response = { $case: "requests", requests: FriendshipRequests.fromPartial(object.response.requests) };
|
|
1385
|
+
}
|
|
1386
|
+
if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "internalServerError" &&
|
|
1387
|
+
((_e = object.response) === null || _e === void 0 ? void 0 : _e.internalServerError) !== undefined &&
|
|
1388
|
+
((_f = object.response) === null || _f === void 0 ? void 0 : _f.internalServerError) !== null) {
|
|
1389
|
+
message.response = {
|
|
1390
|
+
$case: "internalServerError",
|
|
1391
|
+
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1395
|
+
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1396
|
+
: undefined;
|
|
1397
|
+
return message;
|
|
1398
|
+
}
|
|
1399
|
+
PaginatedFriendshipRequestsResponse.fromPartial = fromPartial;
|
|
1400
|
+
})(PaginatedFriendshipRequestsResponse || (exports.PaginatedFriendshipRequestsResponse = PaginatedFriendshipRequestsResponse = {}));
|
|
1401
|
+
function createBaseUpsertFriendshipResponse() {
|
|
1402
|
+
return { response: undefined };
|
|
1403
|
+
}
|
|
1404
|
+
var UpsertFriendshipResponse;
|
|
1405
|
+
(function (UpsertFriendshipResponse) {
|
|
1406
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1407
|
+
var _a;
|
|
1408
|
+
switch ((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
1409
|
+
case "accepted":
|
|
1410
|
+
UpsertFriendshipResponse_Accepted.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
1411
|
+
break;
|
|
1412
|
+
case "invalidFriendshipAction":
|
|
1413
|
+
InvalidFriendshipAction.encode(message.response.invalidFriendshipAction, writer.uint32(18).fork()).ldelim();
|
|
1414
|
+
break;
|
|
1415
|
+
case "internalServerError":
|
|
1416
|
+
InternalServerError.encode(message.response.internalServerError, writer.uint32(26).fork()).ldelim();
|
|
1417
|
+
break;
|
|
1418
|
+
}
|
|
1419
|
+
return writer;
|
|
1420
|
+
}
|
|
1421
|
+
UpsertFriendshipResponse.encode = encode;
|
|
1422
|
+
function decode(input, length) {
|
|
1423
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1424
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1425
|
+
const message = createBaseUpsertFriendshipResponse();
|
|
1426
|
+
while (reader.pos < end) {
|
|
1427
|
+
const tag = reader.uint32();
|
|
1428
|
+
switch (tag >>> 3) {
|
|
1429
|
+
case 1:
|
|
1430
|
+
if (tag !== 10) {
|
|
1431
|
+
break;
|
|
1432
|
+
}
|
|
1433
|
+
message.response = {
|
|
1434
|
+
$case: "accepted",
|
|
1435
|
+
accepted: UpsertFriendshipResponse_Accepted.decode(reader, reader.uint32()),
|
|
1436
|
+
};
|
|
1437
|
+
continue;
|
|
1438
|
+
case 2:
|
|
1439
|
+
if (tag !== 18) {
|
|
1440
|
+
break;
|
|
1441
|
+
}
|
|
1442
|
+
message.response = {
|
|
1443
|
+
$case: "invalidFriendshipAction",
|
|
1444
|
+
invalidFriendshipAction: InvalidFriendshipAction.decode(reader, reader.uint32()),
|
|
1445
|
+
};
|
|
1446
|
+
continue;
|
|
1447
|
+
case 3:
|
|
1448
|
+
if (tag !== 26) {
|
|
1449
|
+
break;
|
|
1450
|
+
}
|
|
1451
|
+
message.response = {
|
|
1452
|
+
$case: "internalServerError",
|
|
1453
|
+
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1454
|
+
};
|
|
1455
|
+
continue;
|
|
1456
|
+
}
|
|
1457
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1458
|
+
break;
|
|
1459
|
+
}
|
|
1460
|
+
reader.skipType(tag & 7);
|
|
1461
|
+
}
|
|
1462
|
+
return message;
|
|
1463
|
+
}
|
|
1464
|
+
UpsertFriendshipResponse.decode = decode;
|
|
1465
|
+
function fromJSON(object) {
|
|
1466
|
+
return {
|
|
1467
|
+
response: isSet(object.accepted)
|
|
1468
|
+
? { $case: "accepted", accepted: UpsertFriendshipResponse_Accepted.fromJSON(object.accepted) }
|
|
1469
|
+
: isSet(object.invalidFriendshipAction)
|
|
1470
|
+
? {
|
|
1471
|
+
$case: "invalidFriendshipAction",
|
|
1472
|
+
invalidFriendshipAction: InvalidFriendshipAction.fromJSON(object.invalidFriendshipAction),
|
|
1473
|
+
}
|
|
1474
|
+
: isSet(object.internalServerError)
|
|
1475
|
+
? {
|
|
1476
|
+
$case: "internalServerError",
|
|
1477
|
+
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
1478
|
+
}
|
|
1479
|
+
: undefined,
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
UpsertFriendshipResponse.fromJSON = fromJSON;
|
|
1483
|
+
function toJSON(message) {
|
|
1484
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1485
|
+
const obj = {};
|
|
1486
|
+
((_a = message.response) === null || _a === void 0 ? void 0 : _a.$case) === "accepted" &&
|
|
1487
|
+
(obj.accepted = ((_b = message.response) === null || _b === void 0 ? void 0 : _b.accepted)
|
|
1488
|
+
? UpsertFriendshipResponse_Accepted.toJSON((_c = message.response) === null || _c === void 0 ? void 0 : _c.accepted)
|
|
1489
|
+
: undefined);
|
|
1490
|
+
((_d = message.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidFriendshipAction" &&
|
|
1491
|
+
(obj.invalidFriendshipAction = ((_e = message.response) === null || _e === void 0 ? void 0 : _e.invalidFriendshipAction)
|
|
1492
|
+
? InvalidFriendshipAction.toJSON((_f = message.response) === null || _f === void 0 ? void 0 : _f.invalidFriendshipAction)
|
|
1493
|
+
: undefined);
|
|
1494
|
+
((_g = message.response) === null || _g === void 0 ? void 0 : _g.$case) === "internalServerError" &&
|
|
1495
|
+
(obj.internalServerError = ((_h = message.response) === null || _h === void 0 ? void 0 : _h.internalServerError)
|
|
1496
|
+
? InternalServerError.toJSON((_j = message.response) === null || _j === void 0 ? void 0 : _j.internalServerError)
|
|
1497
|
+
: undefined);
|
|
1498
|
+
return obj;
|
|
1499
|
+
}
|
|
1500
|
+
UpsertFriendshipResponse.toJSON = toJSON;
|
|
1501
|
+
function create(base) {
|
|
1502
|
+
return UpsertFriendshipResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1503
|
+
}
|
|
1504
|
+
UpsertFriendshipResponse.create = create;
|
|
1505
|
+
function fromPartial(object) {
|
|
1506
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1507
|
+
const message = createBaseUpsertFriendshipResponse();
|
|
1508
|
+
if (((_a = object.response) === null || _a === void 0 ? void 0 : _a.$case) === "accepted" &&
|
|
1509
|
+
((_b = object.response) === null || _b === void 0 ? void 0 : _b.accepted) !== undefined &&
|
|
1510
|
+
((_c = object.response) === null || _c === void 0 ? void 0 : _c.accepted) !== null) {
|
|
1511
|
+
message.response = {
|
|
1512
|
+
$case: "accepted",
|
|
1513
|
+
accepted: UpsertFriendshipResponse_Accepted.fromPartial(object.response.accepted),
|
|
1514
|
+
};
|
|
1515
|
+
}
|
|
1516
|
+
if (((_d = object.response) === null || _d === void 0 ? void 0 : _d.$case) === "invalidFriendshipAction" &&
|
|
1517
|
+
((_e = object.response) === null || _e === void 0 ? void 0 : _e.invalidFriendshipAction) !== undefined &&
|
|
1518
|
+
((_f = object.response) === null || _f === void 0 ? void 0 : _f.invalidFriendshipAction) !== null) {
|
|
1519
|
+
message.response = {
|
|
1520
|
+
$case: "invalidFriendshipAction",
|
|
1521
|
+
invalidFriendshipAction: InvalidFriendshipAction.fromPartial(object.response.invalidFriendshipAction),
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
if (((_g = object.response) === null || _g === void 0 ? void 0 : _g.$case) === "internalServerError" &&
|
|
1525
|
+
((_h = object.response) === null || _h === void 0 ? void 0 : _h.internalServerError) !== undefined &&
|
|
1526
|
+
((_j = object.response) === null || _j === void 0 ? void 0 : _j.internalServerError) !== null) {
|
|
1527
|
+
message.response = {
|
|
1528
|
+
$case: "internalServerError",
|
|
1529
|
+
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
return message;
|
|
1533
|
+
}
|
|
1534
|
+
UpsertFriendshipResponse.fromPartial = fromPartial;
|
|
1535
|
+
})(UpsertFriendshipResponse || (exports.UpsertFriendshipResponse = UpsertFriendshipResponse = {}));
|
|
1536
|
+
function createBaseUpsertFriendshipResponse_Accepted() {
|
|
1537
|
+
return { id: "", createdAt: 0 };
|
|
1538
|
+
}
|
|
1539
|
+
var UpsertFriendshipResponse_Accepted;
|
|
1540
|
+
(function (UpsertFriendshipResponse_Accepted) {
|
|
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
|
+
}
|
|
1548
|
+
return writer;
|
|
1549
|
+
}
|
|
1550
|
+
UpsertFriendshipResponse_Accepted.encode = encode;
|
|
1551
|
+
function decode(input, length) {
|
|
1552
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1553
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1554
|
+
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1555
|
+
while (reader.pos < end) {
|
|
1556
|
+
const tag = reader.uint32();
|
|
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;
|
|
1570
|
+
}
|
|
1571
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
reader.skipType(tag & 7);
|
|
1575
|
+
}
|
|
1576
|
+
return message;
|
|
1577
|
+
}
|
|
1578
|
+
UpsertFriendshipResponse_Accepted.decode = decode;
|
|
1579
|
+
function fromJSON(object) {
|
|
1580
|
+
return {
|
|
1581
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
1582
|
+
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
UpsertFriendshipResponse_Accepted.fromJSON = fromJSON;
|
|
1586
|
+
function toJSON(message) {
|
|
1587
|
+
const obj = {};
|
|
1588
|
+
message.id !== undefined && (obj.id = message.id);
|
|
1589
|
+
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
1590
|
+
return obj;
|
|
1591
|
+
}
|
|
1592
|
+
UpsertFriendshipResponse_Accepted.toJSON = toJSON;
|
|
1593
|
+
function create(base) {
|
|
1594
|
+
return UpsertFriendshipResponse_Accepted.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1595
|
+
}
|
|
1596
|
+
UpsertFriendshipResponse_Accepted.create = create;
|
|
1597
|
+
function fromPartial(object) {
|
|
1598
|
+
var _a, _b;
|
|
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;
|
|
1602
|
+
return message;
|
|
1603
|
+
}
|
|
1604
|
+
UpsertFriendshipResponse_Accepted.fromPartial = fromPartial;
|
|
1605
|
+
})(UpsertFriendshipResponse_Accepted || (exports.UpsertFriendshipResponse_Accepted = UpsertFriendshipResponse_Accepted = {}));
|
|
1606
|
+
function createBaseFriendshipUpdate() {
|
|
1607
|
+
return { update: undefined };
|
|
1608
|
+
}
|
|
1609
|
+
var FriendshipUpdate;
|
|
1610
|
+
(function (FriendshipUpdate) {
|
|
1611
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1612
|
+
var _a;
|
|
1613
|
+
switch ((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
1614
|
+
case "request":
|
|
1615
|
+
FriendshipRequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
1616
|
+
break;
|
|
1617
|
+
case "accept":
|
|
1618
|
+
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
1619
|
+
break;
|
|
1620
|
+
case "reject":
|
|
1621
|
+
FriendshipUpdate_RejectResponse.encode(message.update.reject, writer.uint32(26).fork()).ldelim();
|
|
1622
|
+
break;
|
|
1623
|
+
case "delete":
|
|
1624
|
+
FriendshipUpdate_DeleteResponse.encode(message.update.delete, writer.uint32(34).fork()).ldelim();
|
|
1625
|
+
break;
|
|
1626
|
+
case "cancel":
|
|
1627
|
+
FriendshipUpdate_CancelResponse.encode(message.update.cancel, writer.uint32(42).fork()).ldelim();
|
|
1628
|
+
break;
|
|
1629
|
+
}
|
|
1630
|
+
return writer;
|
|
1631
|
+
}
|
|
1632
|
+
FriendshipUpdate.encode = encode;
|
|
1633
|
+
function decode(input, length) {
|
|
1634
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1635
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1636
|
+
const message = createBaseFriendshipUpdate();
|
|
1637
|
+
while (reader.pos < end) {
|
|
1638
|
+
const tag = reader.uint32();
|
|
1639
|
+
switch (tag >>> 3) {
|
|
1640
|
+
case 1:
|
|
1641
|
+
if (tag !== 10) {
|
|
1642
|
+
break;
|
|
1643
|
+
}
|
|
1644
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.decode(reader, reader.uint32()) };
|
|
1645
|
+
continue;
|
|
1646
|
+
case 2:
|
|
1647
|
+
if (tag !== 18) {
|
|
1648
|
+
break;
|
|
1649
|
+
}
|
|
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()) };
|
|
1657
|
+
continue;
|
|
1658
|
+
case 4:
|
|
1659
|
+
if (tag !== 34) {
|
|
1660
|
+
break;
|
|
1661
|
+
}
|
|
1662
|
+
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.decode(reader, reader.uint32()) };
|
|
1663
|
+
continue;
|
|
1664
|
+
case 5:
|
|
1665
|
+
if (tag !== 42) {
|
|
1666
|
+
break;
|
|
1667
|
+
}
|
|
1668
|
+
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.decode(reader, reader.uint32()) };
|
|
1669
|
+
continue;
|
|
1670
|
+
}
|
|
1671
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1672
|
+
break;
|
|
1673
|
+
}
|
|
1674
|
+
reader.skipType(tag & 7);
|
|
1675
|
+
}
|
|
1676
|
+
return message;
|
|
1677
|
+
}
|
|
1678
|
+
FriendshipUpdate.decode = decode;
|
|
1679
|
+
function fromJSON(object) {
|
|
1680
|
+
return {
|
|
1681
|
+
update: isSet(object.request)
|
|
1682
|
+
? { $case: "request", request: FriendshipRequestResponse.fromJSON(object.request) }
|
|
1683
|
+
: isSet(object.accept)
|
|
1684
|
+
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
1685
|
+
: isSet(object.reject)
|
|
1686
|
+
? { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromJSON(object.reject) }
|
|
1687
|
+
: isSet(object.delete)
|
|
1688
|
+
? { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromJSON(object.delete) }
|
|
1689
|
+
: isSet(object.cancel)
|
|
1690
|
+
? { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromJSON(object.cancel) }
|
|
1691
|
+
: undefined,
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
FriendshipUpdate.fromJSON = fromJSON;
|
|
1695
|
+
function toJSON(message) {
|
|
1696
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1697
|
+
const obj = {};
|
|
1698
|
+
((_a = message.update) === null || _a === void 0 ? void 0 : _a.$case) === "request" &&
|
|
1699
|
+
(obj.request = ((_b = message.update) === null || _b === void 0 ? void 0 : _b.request) ? FriendshipRequestResponse.toJSON((_c = message.update) === null || _c === void 0 ? void 0 : _c.request) : undefined);
|
|
1700
|
+
((_d = message.update) === null || _d === void 0 ? void 0 : _d.$case) === "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);
|
|
1704
|
+
((_g = message.update) === null || _g === void 0 ? void 0 : _g.$case) === "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);
|
|
1708
|
+
((_k = message.update) === null || _k === void 0 ? void 0 : _k.$case) === "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);
|
|
1712
|
+
((_o = message.update) === null || _o === void 0 ? void 0 : _o.$case) === "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);
|
|
1716
|
+
return obj;
|
|
1717
|
+
}
|
|
1718
|
+
FriendshipUpdate.toJSON = toJSON;
|
|
1719
|
+
function create(base) {
|
|
1720
|
+
return FriendshipUpdate.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1721
|
+
}
|
|
1722
|
+
FriendshipUpdate.create = create;
|
|
1723
|
+
function fromPartial(object) {
|
|
1724
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1725
|
+
const message = createBaseFriendshipUpdate();
|
|
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) {
|
|
1727
|
+
message.update = { $case: "request", request: FriendshipRequestResponse.fromPartial(object.update.request) };
|
|
1728
|
+
}
|
|
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) {
|
|
1730
|
+
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
1731
|
+
}
|
|
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) {
|
|
1733
|
+
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromPartial(object.update.reject) };
|
|
1734
|
+
}
|
|
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) {
|
|
1736
|
+
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromPartial(object.update.delete) };
|
|
1737
|
+
}
|
|
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) {
|
|
1739
|
+
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromPartial(object.update.cancel) };
|
|
1740
|
+
}
|
|
1741
|
+
return message;
|
|
1742
|
+
}
|
|
1743
|
+
FriendshipUpdate.fromPartial = fromPartial;
|
|
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 = {}));
|
|
2196
|
+
exports.SocialServiceDefinition = {
|
|
2197
|
+
name: "SocialService",
|
|
2198
|
+
fullName: "decentraland.social_service.v3.SocialService",
|
|
2199
|
+
methods: {
|
|
2200
|
+
/** Get the list of friends for the authenticated user */
|
|
2201
|
+
getFriends: {
|
|
2202
|
+
name: "GetFriends",
|
|
2203
|
+
requestType: GetFriendsPayload,
|
|
2204
|
+
requestStream: false,
|
|
2205
|
+
responseType: PaginatedUsersResponse,
|
|
2206
|
+
responseStream: false,
|
|
2207
|
+
options: {},
|
|
2208
|
+
},
|
|
2209
|
+
/** Get the list of mutual friends between the authenticated user and the one in the parameter */
|
|
2210
|
+
getMutualFriends: {
|
|
2211
|
+
name: "GetMutualFriends",
|
|
2212
|
+
requestType: GetMutualFriendsPayload,
|
|
2213
|
+
requestStream: false,
|
|
2214
|
+
responseType: PaginatedUsersResponse,
|
|
2215
|
+
responseStream: false,
|
|
2216
|
+
options: {},
|
|
2217
|
+
},
|
|
2218
|
+
/** Get the pending friendship requests for the authenticated user */
|
|
2219
|
+
getPendingFriendshipRequests: {
|
|
2220
|
+
name: "GetPendingFriendshipRequests",
|
|
2221
|
+
requestType: GetFriendshipRequestsPayload,
|
|
2222
|
+
requestStream: false,
|
|
2223
|
+
responseType: PaginatedFriendshipRequestsResponse,
|
|
2224
|
+
responseStream: false,
|
|
2225
|
+
options: {},
|
|
2226
|
+
},
|
|
2227
|
+
/** Get the sent friendship requests for the authenticated user */
|
|
2228
|
+
getSentFriendshipRequests: {
|
|
2229
|
+
name: "GetSentFriendshipRequests",
|
|
2230
|
+
requestType: GetFriendshipRequestsPayload,
|
|
2231
|
+
requestStream: false,
|
|
2232
|
+
responseType: PaginatedFriendshipRequestsResponse,
|
|
2233
|
+
responseStream: false,
|
|
2234
|
+
options: {},
|
|
2235
|
+
},
|
|
2236
|
+
/** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
|
|
2237
|
+
upsertFriendship: {
|
|
2238
|
+
name: "UpsertFriendship",
|
|
2239
|
+
requestType: UpsertFriendshipPayload,
|
|
2240
|
+
requestStream: false,
|
|
2241
|
+
responseType: UpsertFriendshipResponse,
|
|
2242
|
+
responseStream: false,
|
|
2243
|
+
options: {},
|
|
2244
|
+
},
|
|
2245
|
+
/** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
|
|
2246
|
+
subscribeToFriendshipUpdates: {
|
|
2247
|
+
name: "SubscribeToFriendshipUpdates",
|
|
2248
|
+
requestType: empty_gen_1.Empty,
|
|
2249
|
+
requestStream: false,
|
|
2250
|
+
responseType: FriendshipUpdate,
|
|
2251
|
+
responseStream: true,
|
|
2252
|
+
options: {},
|
|
2253
|
+
},
|
|
2254
|
+
getFriendshipStatus: {
|
|
2255
|
+
name: "GetFriendshipStatus",
|
|
2256
|
+
requestType: GetFriendshipStatusPayload,
|
|
2257
|
+
requestStream: false,
|
|
2258
|
+
responseType: GetFriendshipStatusResponse,
|
|
2259
|
+
responseStream: false,
|
|
2260
|
+
options: {},
|
|
2261
|
+
},
|
|
2262
|
+
},
|
|
2263
|
+
};
|
|
2264
|
+
const tsProtoGlobalThis = (() => {
|
|
2265
|
+
if (typeof globalThis !== "undefined") {
|
|
2266
|
+
return globalThis;
|
|
2267
|
+
}
|
|
2268
|
+
if (typeof self !== "undefined") {
|
|
2269
|
+
return self;
|
|
2270
|
+
}
|
|
2271
|
+
if (typeof window !== "undefined") {
|
|
2272
|
+
return window;
|
|
2273
|
+
}
|
|
2274
|
+
if (typeof global !== "undefined") {
|
|
2275
|
+
return global;
|
|
2276
|
+
}
|
|
2277
|
+
throw "Unable to locate global object";
|
|
2278
|
+
})();
|
|
2279
|
+
function longToNumber(long) {
|
|
2280
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
2281
|
+
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2282
|
+
}
|
|
2283
|
+
return long.toNumber();
|
|
2284
|
+
}
|
|
2285
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
2286
|
+
minimal_1.default.util.Long = long_1.default;
|
|
2287
|
+
minimal_1.default.configure();
|
|
2288
|
+
}
|
|
2289
|
+
function isSet(value) {
|
|
2290
|
+
return value !== null && value !== undefined;
|
|
2291
|
+
}
|
|
2292
|
+
//# sourceMappingURL=social_service.gen.js.map
|