@dcl/protocol 1.0.0-12889323027.commit-cbbf46c → 1.0.0-12988319503.commit-ea9043b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out-js/decentraland/common/texture.gen.d.ts +18 -0
- package/out-js/decentraland/common/texture.gen.js +104 -4
- package/out-js/decentraland/common/texture.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +41 -0
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +241 -3
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +35 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +172 -3
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +3 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +18 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +19 -0
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +90 -3
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
- package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
- package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/material.gen.d.ts +20 -0
- package/out-js/decentraland/sdk/components/material.gen.js +86 -2
- package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +18 -0
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js +90 -4
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +19 -3
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +90 -4
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +4 -0
- package/out-js/decentraland/sdk/components/ui_text.gen.js +30 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +37 -0
- package/out-js/decentraland/sdk/components/ui_transform.gen.js +201 -2
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-js/decentraland/{social_service/v1/social_service_v1.gen.d.ts → social/friendships/friendships.gen.d.ts} +2 -3
- package/out-js/decentraland/{social_service/v1/social_service_v1.gen.js → social/friendships/friendships.gen.js} +3 -3
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -0
- package/out-js/decentraland/social_service_v2/social_service.gen.d.ts +357 -0
- package/out-js/decentraland/{social_service/v2/social_service_v2.gen.js → social_service_v2/social_service.gen.js} +402 -1140
- package/out-js/decentraland/social_service_v2/social_service.gen.js.map +1 -0
- package/out-js/social_service_v2.gen.d.ts +1 -0
- package/out-js/social_service_v2.gen.js +6 -0
- package/out-js/social_service_v2.gen.js.map +1 -0
- package/out-ts/decentraland/common/texture.gen.ts +119 -4
- package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +292 -1
- package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +218 -2
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +18 -0
- package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +108 -2
- package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
- package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
- package/out-ts/decentraland/sdk/components/material.gen.ts +102 -1
- package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +99 -0
- package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +100 -3
- package/out-ts/decentraland/sdk/components/ui_text.gen.ts +40 -1
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +230 -1
- package/out-ts/decentraland/{social_service/v1/social_service_v1.gen.ts → social/friendships/friendships.gen.ts} +2 -3
- package/out-ts/decentraland/social_service_v2/social_service.gen.ts +1709 -0
- package/out-ts/social_service_v2.gen.ts +3 -0
- package/package.json +2 -2
- package/proto/decentraland/common/texture.proto +8 -1
- package/proto/decentraland/sdk/components/avatar_modifier_area.proto +21 -0
- package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
- package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
- package/proto/decentraland/sdk/components/camera_mode_area.proto +22 -3
- package/proto/decentraland/sdk/components/common/input_action.proto +3 -0
- package/proto/decentraland/sdk/components/global_light.proto +22 -0
- package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +13 -0
- package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
- package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
- package/proto/decentraland/sdk/components/light.proto +42 -0
- package/proto/decentraland/sdk/components/material.proto +13 -1
- package/proto/decentraland/sdk/components/mesh_collider.proto +8 -1
- package/proto/decentraland/sdk/components/mesh_renderer.proto +8 -3
- package/proto/decentraland/sdk/components/primary_pointer_info.proto +25 -0
- package/proto/decentraland/sdk/components/spotlight.proto +21 -0
- package/proto/decentraland/sdk/components/texture_camera.proto +41 -0
- package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
- package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
- package/proto/decentraland/sdk/components/ui_text.proto +3 -0
- package/proto/decentraland/sdk/components/ui_transform.proto +23 -0
- package/proto/decentraland/{social_service/v1/social_service_v1.proto → social/friendships/friendships.proto} +1 -2
- package/proto/decentraland/social_service_v2/social_service.proto +111 -0
- package/public/sdk-components.proto +2 -0
- package/public/social.proto +1 -3
- package/public/social_service_v2.proto +4 -0
- package/out-js/decentraland/social_service/v1/social_service_v1.gen.js.map +0 -1
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +0 -479
- package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +0 -1
- package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +0 -2598
- package/proto/decentraland/social_service/v2/social_service_v2.proto +0 -159
|
@@ -1,2598 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import Long from "long";
|
|
3
|
-
import _m0 from "protobufjs/minimal";
|
|
4
|
-
import { Empty } from "../../../google/protobuf/empty.gen";
|
|
5
|
-
|
|
6
|
-
export const protobufPackage = "decentraland.social_service.v2";
|
|
7
|
-
|
|
8
|
-
export enum ConnectivityStatus {
|
|
9
|
-
ONLINE = 0,
|
|
10
|
-
OFFLINE = 1,
|
|
11
|
-
AWAY = 2,
|
|
12
|
-
UNRECOGNIZED = -1,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function connectivityStatusFromJSON(object: any): ConnectivityStatus {
|
|
16
|
-
switch (object) {
|
|
17
|
-
case 0:
|
|
18
|
-
case "ONLINE":
|
|
19
|
-
return ConnectivityStatus.ONLINE;
|
|
20
|
-
case 1:
|
|
21
|
-
case "OFFLINE":
|
|
22
|
-
return ConnectivityStatus.OFFLINE;
|
|
23
|
-
case 2:
|
|
24
|
-
case "AWAY":
|
|
25
|
-
return ConnectivityStatus.AWAY;
|
|
26
|
-
case -1:
|
|
27
|
-
case "UNRECOGNIZED":
|
|
28
|
-
default:
|
|
29
|
-
return ConnectivityStatus.UNRECOGNIZED;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function connectivityStatusToJSON(object: ConnectivityStatus): string {
|
|
34
|
-
switch (object) {
|
|
35
|
-
case ConnectivityStatus.ONLINE:
|
|
36
|
-
return "ONLINE";
|
|
37
|
-
case ConnectivityStatus.OFFLINE:
|
|
38
|
-
return "OFFLINE";
|
|
39
|
-
case ConnectivityStatus.AWAY:
|
|
40
|
-
return "AWAY";
|
|
41
|
-
case ConnectivityStatus.UNRECOGNIZED:
|
|
42
|
-
default:
|
|
43
|
-
return "UNRECOGNIZED";
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export enum FriendshipStatus {
|
|
48
|
-
REQUEST_SENT = 0,
|
|
49
|
-
REQUEST_RECEIVED = 1,
|
|
50
|
-
CANCELED = 2,
|
|
51
|
-
ACCEPTED = 3,
|
|
52
|
-
REJECTED = 4,
|
|
53
|
-
DELETED = 5,
|
|
54
|
-
BLOCKED = 6,
|
|
55
|
-
UNRECOGNIZED = -1,
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function friendshipStatusFromJSON(object: any): FriendshipStatus {
|
|
59
|
-
switch (object) {
|
|
60
|
-
case 0:
|
|
61
|
-
case "REQUEST_SENT":
|
|
62
|
-
return FriendshipStatus.REQUEST_SENT;
|
|
63
|
-
case 1:
|
|
64
|
-
case "REQUEST_RECEIVED":
|
|
65
|
-
return FriendshipStatus.REQUEST_RECEIVED;
|
|
66
|
-
case 2:
|
|
67
|
-
case "CANCELED":
|
|
68
|
-
return FriendshipStatus.CANCELED;
|
|
69
|
-
case 3:
|
|
70
|
-
case "ACCEPTED":
|
|
71
|
-
return FriendshipStatus.ACCEPTED;
|
|
72
|
-
case 4:
|
|
73
|
-
case "REJECTED":
|
|
74
|
-
return FriendshipStatus.REJECTED;
|
|
75
|
-
case 5:
|
|
76
|
-
case "DELETED":
|
|
77
|
-
return FriendshipStatus.DELETED;
|
|
78
|
-
case 6:
|
|
79
|
-
case "BLOCKED":
|
|
80
|
-
return FriendshipStatus.BLOCKED;
|
|
81
|
-
case -1:
|
|
82
|
-
case "UNRECOGNIZED":
|
|
83
|
-
default:
|
|
84
|
-
return FriendshipStatus.UNRECOGNIZED;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function friendshipStatusToJSON(object: FriendshipStatus): string {
|
|
89
|
-
switch (object) {
|
|
90
|
-
case FriendshipStatus.REQUEST_SENT:
|
|
91
|
-
return "REQUEST_SENT";
|
|
92
|
-
case FriendshipStatus.REQUEST_RECEIVED:
|
|
93
|
-
return "REQUEST_RECEIVED";
|
|
94
|
-
case FriendshipStatus.CANCELED:
|
|
95
|
-
return "CANCELED";
|
|
96
|
-
case FriendshipStatus.ACCEPTED:
|
|
97
|
-
return "ACCEPTED";
|
|
98
|
-
case FriendshipStatus.REJECTED:
|
|
99
|
-
return "REJECTED";
|
|
100
|
-
case FriendshipStatus.DELETED:
|
|
101
|
-
return "DELETED";
|
|
102
|
-
case FriendshipStatus.BLOCKED:
|
|
103
|
-
return "BLOCKED";
|
|
104
|
-
case FriendshipStatus.UNRECOGNIZED:
|
|
105
|
-
default:
|
|
106
|
-
return "UNRECOGNIZED";
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/** Errors */
|
|
111
|
-
export interface InvalidFriendshipAction {
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface InternalServerError {
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** Types */
|
|
118
|
-
export interface User {
|
|
119
|
-
address: string;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface Pagination {
|
|
123
|
-
limit: number;
|
|
124
|
-
offset: number;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface FriendshipRequestResponse {
|
|
128
|
-
user: User | undefined;
|
|
129
|
-
createdAt: number;
|
|
130
|
-
message?: string | undefined;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface FriendshipRequests {
|
|
134
|
-
requests: FriendshipRequestResponse[];
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface GetFriendsPayload {
|
|
138
|
-
pagination?: Pagination | undefined;
|
|
139
|
-
status?: ConnectivityStatus | undefined;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export interface GetFriendshipRequestsPayload {
|
|
143
|
-
pagination?: Pagination | undefined;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export interface UpsertFriendshipPayload {
|
|
147
|
-
action?:
|
|
148
|
-
| { $case: "request"; request: UpsertFriendshipPayload_RequestPayload }
|
|
149
|
-
| { $case: "accept"; accept: UpsertFriendshipPayload_AcceptPayload }
|
|
150
|
-
| { $case: "reject"; reject: UpsertFriendshipPayload_RejectPayload }
|
|
151
|
-
| { $case: "delete"; delete: UpsertFriendshipPayload_DeletePayload }
|
|
152
|
-
| { $case: "cancel"; cancel: UpsertFriendshipPayload_CancelPayload }
|
|
153
|
-
| undefined;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export interface UpsertFriendshipPayload_RequestPayload {
|
|
157
|
-
user: User | undefined;
|
|
158
|
-
message?: string | undefined;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface UpsertFriendshipPayload_AcceptPayload {
|
|
162
|
-
user: User | undefined;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface UpsertFriendshipPayload_RejectPayload {
|
|
166
|
-
user: User | undefined;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export interface UpsertFriendshipPayload_DeletePayload {
|
|
170
|
-
user: User | undefined;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface UpsertFriendshipPayload_CancelPayload {
|
|
174
|
-
user: User | undefined;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface GetMutualFriendsPayload {
|
|
178
|
-
user: User | undefined;
|
|
179
|
-
pagination?: Pagination | undefined;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export interface PaginatedResponse {
|
|
183
|
-
total: number;
|
|
184
|
-
page: number;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface PaginatedUsersResponse {
|
|
188
|
-
users: User[];
|
|
189
|
-
paginationData: PaginatedResponse | undefined;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface PaginatedFriendshipRequestsResponse {
|
|
193
|
-
response?: { $case: "requests"; requests: FriendshipRequests } | {
|
|
194
|
-
$case: "internalServerError";
|
|
195
|
-
internalServerError: InternalServerError;
|
|
196
|
-
} | undefined;
|
|
197
|
-
paginationData?: PaginatedResponse | undefined;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export interface UpsertFriendshipResponse {
|
|
201
|
-
response?:
|
|
202
|
-
| { $case: "accepted"; accepted: UpsertFriendshipResponse_Accepted }
|
|
203
|
-
| { $case: "invalidFriendshipAction"; invalidFriendshipAction: InvalidFriendshipAction }
|
|
204
|
-
| { $case: "internalServerError"; internalServerError: InternalServerError }
|
|
205
|
-
| undefined;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export interface UpsertFriendshipResponse_Accepted {
|
|
209
|
-
id: string;
|
|
210
|
-
createdAt: number;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export interface FriendshipUpdate {
|
|
214
|
-
update?:
|
|
215
|
-
| { $case: "request"; request: FriendshipRequestResponse }
|
|
216
|
-
| { $case: "accept"; accept: FriendshipUpdate_AcceptResponse }
|
|
217
|
-
| { $case: "reject"; reject: FriendshipUpdate_RejectResponse }
|
|
218
|
-
| { $case: "delete"; delete: FriendshipUpdate_DeleteResponse }
|
|
219
|
-
| { $case: "cancel"; cancel: FriendshipUpdate_CancelResponse }
|
|
220
|
-
| undefined;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export interface FriendshipUpdate_AcceptResponse {
|
|
224
|
-
user: User | undefined;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export interface FriendshipUpdate_RejectResponse {
|
|
228
|
-
user: User | undefined;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface FriendshipUpdate_DeleteResponse {
|
|
232
|
-
user: User | undefined;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface FriendshipUpdate_CancelResponse {
|
|
236
|
-
user: User | undefined;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export interface GetFriendshipStatusPayload {
|
|
240
|
-
user: User | undefined;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export interface GetFriendshipStatusResponse {
|
|
244
|
-
response?: { $case: "accepted"; accepted: GetFriendshipStatusResponse_Ok } | {
|
|
245
|
-
$case: "internalServerError";
|
|
246
|
-
internalServerError: InternalServerError;
|
|
247
|
-
} | undefined;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface GetFriendshipStatusResponse_Ok {
|
|
251
|
-
status: FriendshipStatus;
|
|
252
|
-
message?: string | undefined;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function createBaseInvalidFriendshipAction(): InvalidFriendshipAction {
|
|
256
|
-
return {};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export namespace InvalidFriendshipAction {
|
|
260
|
-
export function encode(_: InvalidFriendshipAction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
261
|
-
return writer;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): InvalidFriendshipAction {
|
|
265
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
266
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
267
|
-
const message = createBaseInvalidFriendshipAction();
|
|
268
|
-
while (reader.pos < end) {
|
|
269
|
-
const tag = reader.uint32();
|
|
270
|
-
switch (tag >>> 3) {
|
|
271
|
-
}
|
|
272
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
reader.skipType(tag & 7);
|
|
276
|
-
}
|
|
277
|
-
return message;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export function fromJSON(_: any): InvalidFriendshipAction {
|
|
281
|
-
return {};
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export function toJSON(_: InvalidFriendshipAction): unknown {
|
|
285
|
-
const obj: any = {};
|
|
286
|
-
return obj;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export function create<I extends Exact<DeepPartial<InvalidFriendshipAction>, I>>(base?: I): InvalidFriendshipAction {
|
|
290
|
-
return InvalidFriendshipAction.fromPartial(base ?? {});
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export function fromPartial<I extends Exact<DeepPartial<InvalidFriendshipAction>, I>>(_: I): InvalidFriendshipAction {
|
|
294
|
-
const message = createBaseInvalidFriendshipAction();
|
|
295
|
-
return message;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
function createBaseInternalServerError(): InternalServerError {
|
|
300
|
-
return {};
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export namespace InternalServerError {
|
|
304
|
-
export function encode(_: InternalServerError, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
305
|
-
return writer;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): InternalServerError {
|
|
309
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
310
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
311
|
-
const message = createBaseInternalServerError();
|
|
312
|
-
while (reader.pos < end) {
|
|
313
|
-
const tag = reader.uint32();
|
|
314
|
-
switch (tag >>> 3) {
|
|
315
|
-
}
|
|
316
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
317
|
-
break;
|
|
318
|
-
}
|
|
319
|
-
reader.skipType(tag & 7);
|
|
320
|
-
}
|
|
321
|
-
return message;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export function fromJSON(_: any): InternalServerError {
|
|
325
|
-
return {};
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export function toJSON(_: InternalServerError): unknown {
|
|
329
|
-
const obj: any = {};
|
|
330
|
-
return obj;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export function create<I extends Exact<DeepPartial<InternalServerError>, I>>(base?: I): InternalServerError {
|
|
334
|
-
return InternalServerError.fromPartial(base ?? {});
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
export function fromPartial<I extends Exact<DeepPartial<InternalServerError>, I>>(_: I): InternalServerError {
|
|
338
|
-
const message = createBaseInternalServerError();
|
|
339
|
-
return message;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
function createBaseUser(): User {
|
|
344
|
-
return { address: "" };
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export namespace User {
|
|
348
|
-
export function encode(message: User, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
349
|
-
if (message.address !== "") {
|
|
350
|
-
writer.uint32(10).string(message.address);
|
|
351
|
-
}
|
|
352
|
-
return writer;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): User {
|
|
356
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
357
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
358
|
-
const message = createBaseUser();
|
|
359
|
-
while (reader.pos < end) {
|
|
360
|
-
const tag = reader.uint32();
|
|
361
|
-
switch (tag >>> 3) {
|
|
362
|
-
case 1:
|
|
363
|
-
if (tag !== 10) {
|
|
364
|
-
break;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
message.address = reader.string();
|
|
368
|
-
continue;
|
|
369
|
-
}
|
|
370
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
371
|
-
break;
|
|
372
|
-
}
|
|
373
|
-
reader.skipType(tag & 7);
|
|
374
|
-
}
|
|
375
|
-
return message;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
export function fromJSON(object: any): User {
|
|
379
|
-
return { address: isSet(object.address) ? String(object.address) : "" };
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
export function toJSON(message: User): unknown {
|
|
383
|
-
const obj: any = {};
|
|
384
|
-
message.address !== undefined && (obj.address = message.address);
|
|
385
|
-
return obj;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export function create<I extends Exact<DeepPartial<User>, I>>(base?: I): User {
|
|
389
|
-
return User.fromPartial(base ?? {});
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export function fromPartial<I extends Exact<DeepPartial<User>, I>>(object: I): User {
|
|
393
|
-
const message = createBaseUser();
|
|
394
|
-
message.address = object.address ?? "";
|
|
395
|
-
return message;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
function createBasePagination(): Pagination {
|
|
400
|
-
return { limit: 0, offset: 0 };
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export namespace Pagination {
|
|
404
|
-
export function encode(message: Pagination, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
405
|
-
if (message.limit !== 0) {
|
|
406
|
-
writer.uint32(8).int32(message.limit);
|
|
407
|
-
}
|
|
408
|
-
if (message.offset !== 0) {
|
|
409
|
-
writer.uint32(16).int32(message.offset);
|
|
410
|
-
}
|
|
411
|
-
return writer;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): Pagination {
|
|
415
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
416
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
417
|
-
const message = createBasePagination();
|
|
418
|
-
while (reader.pos < end) {
|
|
419
|
-
const tag = reader.uint32();
|
|
420
|
-
switch (tag >>> 3) {
|
|
421
|
-
case 1:
|
|
422
|
-
if (tag !== 8) {
|
|
423
|
-
break;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
message.limit = reader.int32();
|
|
427
|
-
continue;
|
|
428
|
-
case 2:
|
|
429
|
-
if (tag !== 16) {
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
message.offset = reader.int32();
|
|
434
|
-
continue;
|
|
435
|
-
}
|
|
436
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
reader.skipType(tag & 7);
|
|
440
|
-
}
|
|
441
|
-
return message;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
export function fromJSON(object: any): Pagination {
|
|
445
|
-
return {
|
|
446
|
-
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
447
|
-
offset: isSet(object.offset) ? Number(object.offset) : 0,
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
export function toJSON(message: Pagination): unknown {
|
|
452
|
-
const obj: any = {};
|
|
453
|
-
message.limit !== undefined && (obj.limit = Math.round(message.limit));
|
|
454
|
-
message.offset !== undefined && (obj.offset = Math.round(message.offset));
|
|
455
|
-
return obj;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
export function create<I extends Exact<DeepPartial<Pagination>, I>>(base?: I): Pagination {
|
|
459
|
-
return Pagination.fromPartial(base ?? {});
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
export function fromPartial<I extends Exact<DeepPartial<Pagination>, I>>(object: I): Pagination {
|
|
463
|
-
const message = createBasePagination();
|
|
464
|
-
message.limit = object.limit ?? 0;
|
|
465
|
-
message.offset = object.offset ?? 0;
|
|
466
|
-
return message;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
function createBaseFriendshipRequestResponse(): FriendshipRequestResponse {
|
|
471
|
-
return { user: undefined, createdAt: 0, message: undefined };
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
export namespace FriendshipRequestResponse {
|
|
475
|
-
export function encode(message: FriendshipRequestResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
476
|
-
if (message.user !== undefined) {
|
|
477
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
478
|
-
}
|
|
479
|
-
if (message.createdAt !== 0) {
|
|
480
|
-
writer.uint32(16).int64(message.createdAt);
|
|
481
|
-
}
|
|
482
|
-
if (message.message !== undefined) {
|
|
483
|
-
writer.uint32(26).string(message.message);
|
|
484
|
-
}
|
|
485
|
-
return writer;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipRequestResponse {
|
|
489
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
490
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
491
|
-
const message = createBaseFriendshipRequestResponse();
|
|
492
|
-
while (reader.pos < end) {
|
|
493
|
-
const tag = reader.uint32();
|
|
494
|
-
switch (tag >>> 3) {
|
|
495
|
-
case 1:
|
|
496
|
-
if (tag !== 10) {
|
|
497
|
-
break;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
message.user = User.decode(reader, reader.uint32());
|
|
501
|
-
continue;
|
|
502
|
-
case 2:
|
|
503
|
-
if (tag !== 16) {
|
|
504
|
-
break;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
message.createdAt = longToNumber(reader.int64() as Long);
|
|
508
|
-
continue;
|
|
509
|
-
case 3:
|
|
510
|
-
if (tag !== 26) {
|
|
511
|
-
break;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
message.message = reader.string();
|
|
515
|
-
continue;
|
|
516
|
-
}
|
|
517
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
reader.skipType(tag & 7);
|
|
521
|
-
}
|
|
522
|
-
return message;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
export function fromJSON(object: any): FriendshipRequestResponse {
|
|
526
|
-
return {
|
|
527
|
-
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
528
|
-
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
529
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
export function toJSON(message: FriendshipRequestResponse): unknown {
|
|
534
|
-
const obj: any = {};
|
|
535
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
536
|
-
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
537
|
-
message.message !== undefined && (obj.message = message.message);
|
|
538
|
-
return obj;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
export function create<I extends Exact<DeepPartial<FriendshipRequestResponse>, I>>(
|
|
542
|
-
base?: I,
|
|
543
|
-
): FriendshipRequestResponse {
|
|
544
|
-
return FriendshipRequestResponse.fromPartial(base ?? {});
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipRequestResponse>, I>>(
|
|
548
|
-
object: I,
|
|
549
|
-
): FriendshipRequestResponse {
|
|
550
|
-
const message = createBaseFriendshipRequestResponse();
|
|
551
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
552
|
-
message.createdAt = object.createdAt ?? 0;
|
|
553
|
-
message.message = object.message ?? undefined;
|
|
554
|
-
return message;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function createBaseFriendshipRequests(): FriendshipRequests {
|
|
559
|
-
return { requests: [] };
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
export namespace FriendshipRequests {
|
|
563
|
-
export function encode(message: FriendshipRequests, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
564
|
-
for (const v of message.requests) {
|
|
565
|
-
FriendshipRequestResponse.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
566
|
-
}
|
|
567
|
-
return writer;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipRequests {
|
|
571
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
572
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
573
|
-
const message = createBaseFriendshipRequests();
|
|
574
|
-
while (reader.pos < end) {
|
|
575
|
-
const tag = reader.uint32();
|
|
576
|
-
switch (tag >>> 3) {
|
|
577
|
-
case 1:
|
|
578
|
-
if (tag !== 10) {
|
|
579
|
-
break;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
message.requests.push(FriendshipRequestResponse.decode(reader, reader.uint32()));
|
|
583
|
-
continue;
|
|
584
|
-
}
|
|
585
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
586
|
-
break;
|
|
587
|
-
}
|
|
588
|
-
reader.skipType(tag & 7);
|
|
589
|
-
}
|
|
590
|
-
return message;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
export function fromJSON(object: any): FriendshipRequests {
|
|
594
|
-
return {
|
|
595
|
-
requests: Array.isArray(object?.requests)
|
|
596
|
-
? object.requests.map((e: any) => FriendshipRequestResponse.fromJSON(e))
|
|
597
|
-
: [],
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
export function toJSON(message: FriendshipRequests): unknown {
|
|
602
|
-
const obj: any = {};
|
|
603
|
-
if (message.requests) {
|
|
604
|
-
obj.requests = message.requests.map((e) => e ? FriendshipRequestResponse.toJSON(e) : undefined);
|
|
605
|
-
} else {
|
|
606
|
-
obj.requests = [];
|
|
607
|
-
}
|
|
608
|
-
return obj;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
export function create<I extends Exact<DeepPartial<FriendshipRequests>, I>>(base?: I): FriendshipRequests {
|
|
612
|
-
return FriendshipRequests.fromPartial(base ?? {});
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipRequests>, I>>(object: I): FriendshipRequests {
|
|
616
|
-
const message = createBaseFriendshipRequests();
|
|
617
|
-
message.requests = object.requests?.map((e) => FriendshipRequestResponse.fromPartial(e)) || [];
|
|
618
|
-
return message;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
function createBaseGetFriendsPayload(): GetFriendsPayload {
|
|
623
|
-
return { pagination: undefined, status: undefined };
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
export namespace GetFriendsPayload {
|
|
627
|
-
export function encode(message: GetFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
628
|
-
if (message.pagination !== undefined) {
|
|
629
|
-
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
630
|
-
}
|
|
631
|
-
if (message.status !== undefined) {
|
|
632
|
-
writer.uint32(16).int32(message.status);
|
|
633
|
-
}
|
|
634
|
-
return writer;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendsPayload {
|
|
638
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
639
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
640
|
-
const message = createBaseGetFriendsPayload();
|
|
641
|
-
while (reader.pos < end) {
|
|
642
|
-
const tag = reader.uint32();
|
|
643
|
-
switch (tag >>> 3) {
|
|
644
|
-
case 1:
|
|
645
|
-
if (tag !== 10) {
|
|
646
|
-
break;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
650
|
-
continue;
|
|
651
|
-
case 2:
|
|
652
|
-
if (tag !== 16) {
|
|
653
|
-
break;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
message.status = reader.int32() as any;
|
|
657
|
-
continue;
|
|
658
|
-
}
|
|
659
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
660
|
-
break;
|
|
661
|
-
}
|
|
662
|
-
reader.skipType(tag & 7);
|
|
663
|
-
}
|
|
664
|
-
return message;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
export function fromJSON(object: any): GetFriendsPayload {
|
|
668
|
-
return {
|
|
669
|
-
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
670
|
-
status: isSet(object.status) ? connectivityStatusFromJSON(object.status) : undefined,
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
export function toJSON(message: GetFriendsPayload): unknown {
|
|
675
|
-
const obj: any = {};
|
|
676
|
-
message.pagination !== undefined &&
|
|
677
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
678
|
-
message.status !== undefined &&
|
|
679
|
-
(obj.status = message.status !== undefined ? connectivityStatusToJSON(message.status) : undefined);
|
|
680
|
-
return obj;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
export function create<I extends Exact<DeepPartial<GetFriendsPayload>, I>>(base?: I): GetFriendsPayload {
|
|
684
|
-
return GetFriendsPayload.fromPartial(base ?? {});
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendsPayload>, I>>(object: I): GetFriendsPayload {
|
|
688
|
-
const message = createBaseGetFriendsPayload();
|
|
689
|
-
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
690
|
-
? Pagination.fromPartial(object.pagination)
|
|
691
|
-
: undefined;
|
|
692
|
-
message.status = object.status ?? undefined;
|
|
693
|
-
return message;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
function createBaseGetFriendshipRequestsPayload(): GetFriendshipRequestsPayload {
|
|
698
|
-
return { pagination: undefined };
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
export namespace GetFriendshipRequestsPayload {
|
|
702
|
-
export function encode(message: GetFriendshipRequestsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
703
|
-
if (message.pagination !== undefined) {
|
|
704
|
-
Pagination.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
705
|
-
}
|
|
706
|
-
return writer;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipRequestsPayload {
|
|
710
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
711
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
712
|
-
const message = createBaseGetFriendshipRequestsPayload();
|
|
713
|
-
while (reader.pos < end) {
|
|
714
|
-
const tag = reader.uint32();
|
|
715
|
-
switch (tag >>> 3) {
|
|
716
|
-
case 1:
|
|
717
|
-
if (tag !== 10) {
|
|
718
|
-
break;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
722
|
-
continue;
|
|
723
|
-
}
|
|
724
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
725
|
-
break;
|
|
726
|
-
}
|
|
727
|
-
reader.skipType(tag & 7);
|
|
728
|
-
}
|
|
729
|
-
return message;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
export function fromJSON(object: any): GetFriendshipRequestsPayload {
|
|
733
|
-
return { pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined };
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
export function toJSON(message: GetFriendshipRequestsPayload): unknown {
|
|
737
|
-
const obj: any = {};
|
|
738
|
-
message.pagination !== undefined &&
|
|
739
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
740
|
-
return obj;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
export function create<I extends Exact<DeepPartial<GetFriendshipRequestsPayload>, I>>(
|
|
744
|
-
base?: I,
|
|
745
|
-
): GetFriendshipRequestsPayload {
|
|
746
|
-
return GetFriendshipRequestsPayload.fromPartial(base ?? {});
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipRequestsPayload>, I>>(
|
|
750
|
-
object: I,
|
|
751
|
-
): GetFriendshipRequestsPayload {
|
|
752
|
-
const message = createBaseGetFriendshipRequestsPayload();
|
|
753
|
-
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
754
|
-
? Pagination.fromPartial(object.pagination)
|
|
755
|
-
: undefined;
|
|
756
|
-
return message;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
function createBaseUpsertFriendshipPayload(): UpsertFriendshipPayload {
|
|
761
|
-
return { action: undefined };
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
export namespace UpsertFriendshipPayload {
|
|
765
|
-
export function encode(message: UpsertFriendshipPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
766
|
-
switch (message.action?.$case) {
|
|
767
|
-
case "request":
|
|
768
|
-
UpsertFriendshipPayload_RequestPayload.encode(message.action.request, writer.uint32(10).fork()).ldelim();
|
|
769
|
-
break;
|
|
770
|
-
case "accept":
|
|
771
|
-
UpsertFriendshipPayload_AcceptPayload.encode(message.action.accept, writer.uint32(18).fork()).ldelim();
|
|
772
|
-
break;
|
|
773
|
-
case "reject":
|
|
774
|
-
UpsertFriendshipPayload_RejectPayload.encode(message.action.reject, writer.uint32(34).fork()).ldelim();
|
|
775
|
-
break;
|
|
776
|
-
case "delete":
|
|
777
|
-
UpsertFriendshipPayload_DeletePayload.encode(message.action.delete, writer.uint32(42).fork()).ldelim();
|
|
778
|
-
break;
|
|
779
|
-
case "cancel":
|
|
780
|
-
UpsertFriendshipPayload_CancelPayload.encode(message.action.cancel, writer.uint32(50).fork()).ldelim();
|
|
781
|
-
break;
|
|
782
|
-
}
|
|
783
|
-
return writer;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload {
|
|
787
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
788
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
789
|
-
const message = createBaseUpsertFriendshipPayload();
|
|
790
|
-
while (reader.pos < end) {
|
|
791
|
-
const tag = reader.uint32();
|
|
792
|
-
switch (tag >>> 3) {
|
|
793
|
-
case 1:
|
|
794
|
-
if (tag !== 10) {
|
|
795
|
-
break;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
message.action = {
|
|
799
|
-
$case: "request",
|
|
800
|
-
request: UpsertFriendshipPayload_RequestPayload.decode(reader, reader.uint32()),
|
|
801
|
-
};
|
|
802
|
-
continue;
|
|
803
|
-
case 2:
|
|
804
|
-
if (tag !== 18) {
|
|
805
|
-
break;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
message.action = {
|
|
809
|
-
$case: "accept",
|
|
810
|
-
accept: UpsertFriendshipPayload_AcceptPayload.decode(reader, reader.uint32()),
|
|
811
|
-
};
|
|
812
|
-
continue;
|
|
813
|
-
case 4:
|
|
814
|
-
if (tag !== 34) {
|
|
815
|
-
break;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
message.action = {
|
|
819
|
-
$case: "reject",
|
|
820
|
-
reject: UpsertFriendshipPayload_RejectPayload.decode(reader, reader.uint32()),
|
|
821
|
-
};
|
|
822
|
-
continue;
|
|
823
|
-
case 5:
|
|
824
|
-
if (tag !== 42) {
|
|
825
|
-
break;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
message.action = {
|
|
829
|
-
$case: "delete",
|
|
830
|
-
delete: UpsertFriendshipPayload_DeletePayload.decode(reader, reader.uint32()),
|
|
831
|
-
};
|
|
832
|
-
continue;
|
|
833
|
-
case 6:
|
|
834
|
-
if (tag !== 50) {
|
|
835
|
-
break;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
message.action = {
|
|
839
|
-
$case: "cancel",
|
|
840
|
-
cancel: UpsertFriendshipPayload_CancelPayload.decode(reader, reader.uint32()),
|
|
841
|
-
};
|
|
842
|
-
continue;
|
|
843
|
-
}
|
|
844
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
845
|
-
break;
|
|
846
|
-
}
|
|
847
|
-
reader.skipType(tag & 7);
|
|
848
|
-
}
|
|
849
|
-
return message;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
export function fromJSON(object: any): UpsertFriendshipPayload {
|
|
853
|
-
return {
|
|
854
|
-
action: isSet(object.request)
|
|
855
|
-
? { $case: "request", request: UpsertFriendshipPayload_RequestPayload.fromJSON(object.request) }
|
|
856
|
-
: isSet(object.accept)
|
|
857
|
-
? { $case: "accept", accept: UpsertFriendshipPayload_AcceptPayload.fromJSON(object.accept) }
|
|
858
|
-
: isSet(object.reject)
|
|
859
|
-
? { $case: "reject", reject: UpsertFriendshipPayload_RejectPayload.fromJSON(object.reject) }
|
|
860
|
-
: isSet(object.delete)
|
|
861
|
-
? { $case: "delete", delete: UpsertFriendshipPayload_DeletePayload.fromJSON(object.delete) }
|
|
862
|
-
: isSet(object.cancel)
|
|
863
|
-
? { $case: "cancel", cancel: UpsertFriendshipPayload_CancelPayload.fromJSON(object.cancel) }
|
|
864
|
-
: undefined,
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
export function toJSON(message: UpsertFriendshipPayload): unknown {
|
|
869
|
-
const obj: any = {};
|
|
870
|
-
message.action?.$case === "request" &&
|
|
871
|
-
(obj.request = message.action?.request
|
|
872
|
-
? UpsertFriendshipPayload_RequestPayload.toJSON(message.action?.request)
|
|
873
|
-
: undefined);
|
|
874
|
-
message.action?.$case === "accept" &&
|
|
875
|
-
(obj.accept = message.action?.accept
|
|
876
|
-
? UpsertFriendshipPayload_AcceptPayload.toJSON(message.action?.accept)
|
|
877
|
-
: undefined);
|
|
878
|
-
message.action?.$case === "reject" &&
|
|
879
|
-
(obj.reject = message.action?.reject
|
|
880
|
-
? UpsertFriendshipPayload_RejectPayload.toJSON(message.action?.reject)
|
|
881
|
-
: undefined);
|
|
882
|
-
message.action?.$case === "delete" &&
|
|
883
|
-
(obj.delete = message.action?.delete
|
|
884
|
-
? UpsertFriendshipPayload_DeletePayload.toJSON(message.action?.delete)
|
|
885
|
-
: undefined);
|
|
886
|
-
message.action?.$case === "cancel" &&
|
|
887
|
-
(obj.cancel = message.action?.cancel
|
|
888
|
-
? UpsertFriendshipPayload_CancelPayload.toJSON(message.action?.cancel)
|
|
889
|
-
: undefined);
|
|
890
|
-
return obj;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload>, I>>(base?: I): UpsertFriendshipPayload {
|
|
894
|
-
return UpsertFriendshipPayload.fromPartial(base ?? {});
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload>, I>>(
|
|
898
|
-
object: I,
|
|
899
|
-
): UpsertFriendshipPayload {
|
|
900
|
-
const message = createBaseUpsertFriendshipPayload();
|
|
901
|
-
if (object.action?.$case === "request" && object.action?.request !== undefined && object.action?.request !== null) {
|
|
902
|
-
message.action = {
|
|
903
|
-
$case: "request",
|
|
904
|
-
request: UpsertFriendshipPayload_RequestPayload.fromPartial(object.action.request),
|
|
905
|
-
};
|
|
906
|
-
}
|
|
907
|
-
if (object.action?.$case === "accept" && object.action?.accept !== undefined && object.action?.accept !== null) {
|
|
908
|
-
message.action = {
|
|
909
|
-
$case: "accept",
|
|
910
|
-
accept: UpsertFriendshipPayload_AcceptPayload.fromPartial(object.action.accept),
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
if (object.action?.$case === "reject" && object.action?.reject !== undefined && object.action?.reject !== null) {
|
|
914
|
-
message.action = {
|
|
915
|
-
$case: "reject",
|
|
916
|
-
reject: UpsertFriendshipPayload_RejectPayload.fromPartial(object.action.reject),
|
|
917
|
-
};
|
|
918
|
-
}
|
|
919
|
-
if (object.action?.$case === "delete" && object.action?.delete !== undefined && object.action?.delete !== null) {
|
|
920
|
-
message.action = {
|
|
921
|
-
$case: "delete",
|
|
922
|
-
delete: UpsertFriendshipPayload_DeletePayload.fromPartial(object.action.delete),
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
if (object.action?.$case === "cancel" && object.action?.cancel !== undefined && object.action?.cancel !== null) {
|
|
926
|
-
message.action = {
|
|
927
|
-
$case: "cancel",
|
|
928
|
-
cancel: UpsertFriendshipPayload_CancelPayload.fromPartial(object.action.cancel),
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
return message;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
function createBaseUpsertFriendshipPayload_RequestPayload(): UpsertFriendshipPayload_RequestPayload {
|
|
936
|
-
return { user: undefined, message: undefined };
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
export namespace UpsertFriendshipPayload_RequestPayload {
|
|
940
|
-
export function encode(
|
|
941
|
-
message: UpsertFriendshipPayload_RequestPayload,
|
|
942
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
943
|
-
): _m0.Writer {
|
|
944
|
-
if (message.user !== undefined) {
|
|
945
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
946
|
-
}
|
|
947
|
-
if (message.message !== undefined) {
|
|
948
|
-
writer.uint32(26).string(message.message);
|
|
949
|
-
}
|
|
950
|
-
return writer;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_RequestPayload {
|
|
954
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
955
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
956
|
-
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
957
|
-
while (reader.pos < end) {
|
|
958
|
-
const tag = reader.uint32();
|
|
959
|
-
switch (tag >>> 3) {
|
|
960
|
-
case 1:
|
|
961
|
-
if (tag !== 10) {
|
|
962
|
-
break;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
message.user = User.decode(reader, reader.uint32());
|
|
966
|
-
continue;
|
|
967
|
-
case 3:
|
|
968
|
-
if (tag !== 26) {
|
|
969
|
-
break;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
message.message = reader.string();
|
|
973
|
-
continue;
|
|
974
|
-
}
|
|
975
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
976
|
-
break;
|
|
977
|
-
}
|
|
978
|
-
reader.skipType(tag & 7);
|
|
979
|
-
}
|
|
980
|
-
return message;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_RequestPayload {
|
|
984
|
-
return {
|
|
985
|
-
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
986
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
export function toJSON(message: UpsertFriendshipPayload_RequestPayload): unknown {
|
|
991
|
-
const obj: any = {};
|
|
992
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
993
|
-
message.message !== undefined && (obj.message = message.message);
|
|
994
|
-
return obj;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_RequestPayload>, I>>(
|
|
998
|
-
base?: I,
|
|
999
|
-
): UpsertFriendshipPayload_RequestPayload {
|
|
1000
|
-
return UpsertFriendshipPayload_RequestPayload.fromPartial(base ?? {});
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_RequestPayload>, I>>(
|
|
1004
|
-
object: I,
|
|
1005
|
-
): UpsertFriendshipPayload_RequestPayload {
|
|
1006
|
-
const message = createBaseUpsertFriendshipPayload_RequestPayload();
|
|
1007
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1008
|
-
message.message = object.message ?? undefined;
|
|
1009
|
-
return message;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
function createBaseUpsertFriendshipPayload_AcceptPayload(): UpsertFriendshipPayload_AcceptPayload {
|
|
1014
|
-
return { user: undefined };
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
export namespace UpsertFriendshipPayload_AcceptPayload {
|
|
1018
|
-
export function encode(
|
|
1019
|
-
message: UpsertFriendshipPayload_AcceptPayload,
|
|
1020
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1021
|
-
): _m0.Writer {
|
|
1022
|
-
if (message.user !== undefined) {
|
|
1023
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1024
|
-
}
|
|
1025
|
-
return writer;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_AcceptPayload {
|
|
1029
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1030
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1031
|
-
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
1032
|
-
while (reader.pos < end) {
|
|
1033
|
-
const tag = reader.uint32();
|
|
1034
|
-
switch (tag >>> 3) {
|
|
1035
|
-
case 1:
|
|
1036
|
-
if (tag !== 10) {
|
|
1037
|
-
break;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1041
|
-
continue;
|
|
1042
|
-
}
|
|
1043
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1044
|
-
break;
|
|
1045
|
-
}
|
|
1046
|
-
reader.skipType(tag & 7);
|
|
1047
|
-
}
|
|
1048
|
-
return message;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_AcceptPayload {
|
|
1052
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
export function toJSON(message: UpsertFriendshipPayload_AcceptPayload): unknown {
|
|
1056
|
-
const obj: any = {};
|
|
1057
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1058
|
-
return obj;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_AcceptPayload>, I>>(
|
|
1062
|
-
base?: I,
|
|
1063
|
-
): UpsertFriendshipPayload_AcceptPayload {
|
|
1064
|
-
return UpsertFriendshipPayload_AcceptPayload.fromPartial(base ?? {});
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_AcceptPayload>, I>>(
|
|
1068
|
-
object: I,
|
|
1069
|
-
): UpsertFriendshipPayload_AcceptPayload {
|
|
1070
|
-
const message = createBaseUpsertFriendshipPayload_AcceptPayload();
|
|
1071
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1072
|
-
return message;
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
function createBaseUpsertFriendshipPayload_RejectPayload(): UpsertFriendshipPayload_RejectPayload {
|
|
1077
|
-
return { user: undefined };
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
export namespace UpsertFriendshipPayload_RejectPayload {
|
|
1081
|
-
export function encode(
|
|
1082
|
-
message: UpsertFriendshipPayload_RejectPayload,
|
|
1083
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1084
|
-
): _m0.Writer {
|
|
1085
|
-
if (message.user !== undefined) {
|
|
1086
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1087
|
-
}
|
|
1088
|
-
return writer;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_RejectPayload {
|
|
1092
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1093
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1094
|
-
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
1095
|
-
while (reader.pos < end) {
|
|
1096
|
-
const tag = reader.uint32();
|
|
1097
|
-
switch (tag >>> 3) {
|
|
1098
|
-
case 1:
|
|
1099
|
-
if (tag !== 10) {
|
|
1100
|
-
break;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1104
|
-
continue;
|
|
1105
|
-
}
|
|
1106
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1107
|
-
break;
|
|
1108
|
-
}
|
|
1109
|
-
reader.skipType(tag & 7);
|
|
1110
|
-
}
|
|
1111
|
-
return message;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_RejectPayload {
|
|
1115
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
export function toJSON(message: UpsertFriendshipPayload_RejectPayload): unknown {
|
|
1119
|
-
const obj: any = {};
|
|
1120
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1121
|
-
return obj;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_RejectPayload>, I>>(
|
|
1125
|
-
base?: I,
|
|
1126
|
-
): UpsertFriendshipPayload_RejectPayload {
|
|
1127
|
-
return UpsertFriendshipPayload_RejectPayload.fromPartial(base ?? {});
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_RejectPayload>, I>>(
|
|
1131
|
-
object: I,
|
|
1132
|
-
): UpsertFriendshipPayload_RejectPayload {
|
|
1133
|
-
const message = createBaseUpsertFriendshipPayload_RejectPayload();
|
|
1134
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1135
|
-
return message;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
function createBaseUpsertFriendshipPayload_DeletePayload(): UpsertFriendshipPayload_DeletePayload {
|
|
1140
|
-
return { user: undefined };
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
export namespace UpsertFriendshipPayload_DeletePayload {
|
|
1144
|
-
export function encode(
|
|
1145
|
-
message: UpsertFriendshipPayload_DeletePayload,
|
|
1146
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1147
|
-
): _m0.Writer {
|
|
1148
|
-
if (message.user !== undefined) {
|
|
1149
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1150
|
-
}
|
|
1151
|
-
return writer;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_DeletePayload {
|
|
1155
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1156
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1157
|
-
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
1158
|
-
while (reader.pos < end) {
|
|
1159
|
-
const tag = reader.uint32();
|
|
1160
|
-
switch (tag >>> 3) {
|
|
1161
|
-
case 1:
|
|
1162
|
-
if (tag !== 10) {
|
|
1163
|
-
break;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1167
|
-
continue;
|
|
1168
|
-
}
|
|
1169
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1170
|
-
break;
|
|
1171
|
-
}
|
|
1172
|
-
reader.skipType(tag & 7);
|
|
1173
|
-
}
|
|
1174
|
-
return message;
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_DeletePayload {
|
|
1178
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
export function toJSON(message: UpsertFriendshipPayload_DeletePayload): unknown {
|
|
1182
|
-
const obj: any = {};
|
|
1183
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1184
|
-
return obj;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_DeletePayload>, I>>(
|
|
1188
|
-
base?: I,
|
|
1189
|
-
): UpsertFriendshipPayload_DeletePayload {
|
|
1190
|
-
return UpsertFriendshipPayload_DeletePayload.fromPartial(base ?? {});
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_DeletePayload>, I>>(
|
|
1194
|
-
object: I,
|
|
1195
|
-
): UpsertFriendshipPayload_DeletePayload {
|
|
1196
|
-
const message = createBaseUpsertFriendshipPayload_DeletePayload();
|
|
1197
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1198
|
-
return message;
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
function createBaseUpsertFriendshipPayload_CancelPayload(): UpsertFriendshipPayload_CancelPayload {
|
|
1203
|
-
return { user: undefined };
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
export namespace UpsertFriendshipPayload_CancelPayload {
|
|
1207
|
-
export function encode(
|
|
1208
|
-
message: UpsertFriendshipPayload_CancelPayload,
|
|
1209
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1210
|
-
): _m0.Writer {
|
|
1211
|
-
if (message.user !== undefined) {
|
|
1212
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1213
|
-
}
|
|
1214
|
-
return writer;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipPayload_CancelPayload {
|
|
1218
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1219
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1220
|
-
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
1221
|
-
while (reader.pos < end) {
|
|
1222
|
-
const tag = reader.uint32();
|
|
1223
|
-
switch (tag >>> 3) {
|
|
1224
|
-
case 1:
|
|
1225
|
-
if (tag !== 10) {
|
|
1226
|
-
break;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1230
|
-
continue;
|
|
1231
|
-
}
|
|
1232
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1233
|
-
break;
|
|
1234
|
-
}
|
|
1235
|
-
reader.skipType(tag & 7);
|
|
1236
|
-
}
|
|
1237
|
-
return message;
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
export function fromJSON(object: any): UpsertFriendshipPayload_CancelPayload {
|
|
1241
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
export function toJSON(message: UpsertFriendshipPayload_CancelPayload): unknown {
|
|
1245
|
-
const obj: any = {};
|
|
1246
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1247
|
-
return obj;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipPayload_CancelPayload>, I>>(
|
|
1251
|
-
base?: I,
|
|
1252
|
-
): UpsertFriendshipPayload_CancelPayload {
|
|
1253
|
-
return UpsertFriendshipPayload_CancelPayload.fromPartial(base ?? {});
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipPayload_CancelPayload>, I>>(
|
|
1257
|
-
object: I,
|
|
1258
|
-
): UpsertFriendshipPayload_CancelPayload {
|
|
1259
|
-
const message = createBaseUpsertFriendshipPayload_CancelPayload();
|
|
1260
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1261
|
-
return message;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
function createBaseGetMutualFriendsPayload(): GetMutualFriendsPayload {
|
|
1266
|
-
return { user: undefined, pagination: undefined };
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
export namespace GetMutualFriendsPayload {
|
|
1270
|
-
export function encode(message: GetMutualFriendsPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1271
|
-
if (message.user !== undefined) {
|
|
1272
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1273
|
-
}
|
|
1274
|
-
if (message.pagination !== undefined) {
|
|
1275
|
-
Pagination.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1276
|
-
}
|
|
1277
|
-
return writer;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetMutualFriendsPayload {
|
|
1281
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1282
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1283
|
-
const message = createBaseGetMutualFriendsPayload();
|
|
1284
|
-
while (reader.pos < end) {
|
|
1285
|
-
const tag = reader.uint32();
|
|
1286
|
-
switch (tag >>> 3) {
|
|
1287
|
-
case 1:
|
|
1288
|
-
if (tag !== 10) {
|
|
1289
|
-
break;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
message.user = User.decode(reader, reader.uint32());
|
|
1293
|
-
continue;
|
|
1294
|
-
case 2:
|
|
1295
|
-
if (tag !== 18) {
|
|
1296
|
-
break;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
message.pagination = Pagination.decode(reader, reader.uint32());
|
|
1300
|
-
continue;
|
|
1301
|
-
}
|
|
1302
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1303
|
-
break;
|
|
1304
|
-
}
|
|
1305
|
-
reader.skipType(tag & 7);
|
|
1306
|
-
}
|
|
1307
|
-
return message;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
export function fromJSON(object: any): GetMutualFriendsPayload {
|
|
1311
|
-
return {
|
|
1312
|
-
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
1313
|
-
pagination: isSet(object.pagination) ? Pagination.fromJSON(object.pagination) : undefined,
|
|
1314
|
-
};
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
export function toJSON(message: GetMutualFriendsPayload): unknown {
|
|
1318
|
-
const obj: any = {};
|
|
1319
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
1320
|
-
message.pagination !== undefined &&
|
|
1321
|
-
(obj.pagination = message.pagination ? Pagination.toJSON(message.pagination) : undefined);
|
|
1322
|
-
return obj;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
export function create<I extends Exact<DeepPartial<GetMutualFriendsPayload>, I>>(base?: I): GetMutualFriendsPayload {
|
|
1326
|
-
return GetMutualFriendsPayload.fromPartial(base ?? {});
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
export function fromPartial<I extends Exact<DeepPartial<GetMutualFriendsPayload>, I>>(
|
|
1330
|
-
object: I,
|
|
1331
|
-
): GetMutualFriendsPayload {
|
|
1332
|
-
const message = createBaseGetMutualFriendsPayload();
|
|
1333
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
1334
|
-
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1335
|
-
? Pagination.fromPartial(object.pagination)
|
|
1336
|
-
: undefined;
|
|
1337
|
-
return message;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
function createBasePaginatedResponse(): PaginatedResponse {
|
|
1342
|
-
return { total: 0, page: 0 };
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
export namespace PaginatedResponse {
|
|
1346
|
-
export function encode(message: PaginatedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1347
|
-
if (message.total !== 0) {
|
|
1348
|
-
writer.uint32(8).int32(message.total);
|
|
1349
|
-
}
|
|
1350
|
-
if (message.page !== 0) {
|
|
1351
|
-
writer.uint32(16).int32(message.page);
|
|
1352
|
-
}
|
|
1353
|
-
return writer;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedResponse {
|
|
1357
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1358
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1359
|
-
const message = createBasePaginatedResponse();
|
|
1360
|
-
while (reader.pos < end) {
|
|
1361
|
-
const tag = reader.uint32();
|
|
1362
|
-
switch (tag >>> 3) {
|
|
1363
|
-
case 1:
|
|
1364
|
-
if (tag !== 8) {
|
|
1365
|
-
break;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
message.total = reader.int32();
|
|
1369
|
-
continue;
|
|
1370
|
-
case 2:
|
|
1371
|
-
if (tag !== 16) {
|
|
1372
|
-
break;
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
message.page = reader.int32();
|
|
1376
|
-
continue;
|
|
1377
|
-
}
|
|
1378
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1379
|
-
break;
|
|
1380
|
-
}
|
|
1381
|
-
reader.skipType(tag & 7);
|
|
1382
|
-
}
|
|
1383
|
-
return message;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
export function fromJSON(object: any): PaginatedResponse {
|
|
1387
|
-
return {
|
|
1388
|
-
total: isSet(object.total) ? Number(object.total) : 0,
|
|
1389
|
-
page: isSet(object.page) ? Number(object.page) : 0,
|
|
1390
|
-
};
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
export function toJSON(message: PaginatedResponse): unknown {
|
|
1394
|
-
const obj: any = {};
|
|
1395
|
-
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
1396
|
-
message.page !== undefined && (obj.page = Math.round(message.page));
|
|
1397
|
-
return obj;
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
export function create<I extends Exact<DeepPartial<PaginatedResponse>, I>>(base?: I): PaginatedResponse {
|
|
1401
|
-
return PaginatedResponse.fromPartial(base ?? {});
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
export function fromPartial<I extends Exact<DeepPartial<PaginatedResponse>, I>>(object: I): PaginatedResponse {
|
|
1405
|
-
const message = createBasePaginatedResponse();
|
|
1406
|
-
message.total = object.total ?? 0;
|
|
1407
|
-
message.page = object.page ?? 0;
|
|
1408
|
-
return message;
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
function createBasePaginatedUsersResponse(): PaginatedUsersResponse {
|
|
1413
|
-
return { users: [], paginationData: undefined };
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
export namespace PaginatedUsersResponse {
|
|
1417
|
-
export function encode(message: PaginatedUsersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1418
|
-
for (const v of message.users) {
|
|
1419
|
-
User.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1420
|
-
}
|
|
1421
|
-
if (message.paginationData !== undefined) {
|
|
1422
|
-
PaginatedResponse.encode(message.paginationData, writer.uint32(18).fork()).ldelim();
|
|
1423
|
-
}
|
|
1424
|
-
return writer;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedUsersResponse {
|
|
1428
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1429
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1430
|
-
const message = createBasePaginatedUsersResponse();
|
|
1431
|
-
while (reader.pos < end) {
|
|
1432
|
-
const tag = reader.uint32();
|
|
1433
|
-
switch (tag >>> 3) {
|
|
1434
|
-
case 1:
|
|
1435
|
-
if (tag !== 10) {
|
|
1436
|
-
break;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
message.users.push(User.decode(reader, reader.uint32()));
|
|
1440
|
-
continue;
|
|
1441
|
-
case 2:
|
|
1442
|
-
if (tag !== 18) {
|
|
1443
|
-
break;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1447
|
-
continue;
|
|
1448
|
-
}
|
|
1449
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1450
|
-
break;
|
|
1451
|
-
}
|
|
1452
|
-
reader.skipType(tag & 7);
|
|
1453
|
-
}
|
|
1454
|
-
return message;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
export function fromJSON(object: any): PaginatedUsersResponse {
|
|
1458
|
-
return {
|
|
1459
|
-
users: Array.isArray(object?.users) ? object.users.map((e: any) => User.fromJSON(e)) : [],
|
|
1460
|
-
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1461
|
-
};
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
export function toJSON(message: PaginatedUsersResponse): unknown {
|
|
1465
|
-
const obj: any = {};
|
|
1466
|
-
if (message.users) {
|
|
1467
|
-
obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);
|
|
1468
|
-
} else {
|
|
1469
|
-
obj.users = [];
|
|
1470
|
-
}
|
|
1471
|
-
message.paginationData !== undefined &&
|
|
1472
|
-
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1473
|
-
return obj;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
export function create<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(base?: I): PaginatedUsersResponse {
|
|
1477
|
-
return PaginatedUsersResponse.fromPartial(base ?? {});
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
export function fromPartial<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(
|
|
1481
|
-
object: I,
|
|
1482
|
-
): PaginatedUsersResponse {
|
|
1483
|
-
const message = createBasePaginatedUsersResponse();
|
|
1484
|
-
message.users = object.users?.map((e) => User.fromPartial(e)) || [];
|
|
1485
|
-
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1486
|
-
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1487
|
-
: undefined;
|
|
1488
|
-
return message;
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
function createBasePaginatedFriendshipRequestsResponse(): PaginatedFriendshipRequestsResponse {
|
|
1493
|
-
return { response: undefined, paginationData: undefined };
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
export namespace PaginatedFriendshipRequestsResponse {
|
|
1497
|
-
export function encode(
|
|
1498
|
-
message: PaginatedFriendshipRequestsResponse,
|
|
1499
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1500
|
-
): _m0.Writer {
|
|
1501
|
-
switch (message.response?.$case) {
|
|
1502
|
-
case "requests":
|
|
1503
|
-
FriendshipRequests.encode(message.response.requests, writer.uint32(10).fork()).ldelim();
|
|
1504
|
-
break;
|
|
1505
|
-
case "internalServerError":
|
|
1506
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
1507
|
-
break;
|
|
1508
|
-
}
|
|
1509
|
-
if (message.paginationData !== undefined) {
|
|
1510
|
-
PaginatedResponse.encode(message.paginationData, writer.uint32(26).fork()).ldelim();
|
|
1511
|
-
}
|
|
1512
|
-
return writer;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedFriendshipRequestsResponse {
|
|
1516
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1517
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1518
|
-
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1519
|
-
while (reader.pos < end) {
|
|
1520
|
-
const tag = reader.uint32();
|
|
1521
|
-
switch (tag >>> 3) {
|
|
1522
|
-
case 1:
|
|
1523
|
-
if (tag !== 10) {
|
|
1524
|
-
break;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
message.response = { $case: "requests", requests: FriendshipRequests.decode(reader, reader.uint32()) };
|
|
1528
|
-
continue;
|
|
1529
|
-
case 2:
|
|
1530
|
-
if (tag !== 18) {
|
|
1531
|
-
break;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
message.response = {
|
|
1535
|
-
$case: "internalServerError",
|
|
1536
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1537
|
-
};
|
|
1538
|
-
continue;
|
|
1539
|
-
case 3:
|
|
1540
|
-
if (tag !== 26) {
|
|
1541
|
-
break;
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
message.paginationData = PaginatedResponse.decode(reader, reader.uint32());
|
|
1545
|
-
continue;
|
|
1546
|
-
}
|
|
1547
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1548
|
-
break;
|
|
1549
|
-
}
|
|
1550
|
-
reader.skipType(tag & 7);
|
|
1551
|
-
}
|
|
1552
|
-
return message;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
export function fromJSON(object: any): PaginatedFriendshipRequestsResponse {
|
|
1556
|
-
return {
|
|
1557
|
-
response: isSet(object.requests)
|
|
1558
|
-
? { $case: "requests", requests: FriendshipRequests.fromJSON(object.requests) }
|
|
1559
|
-
: isSet(object.internalServerError)
|
|
1560
|
-
? {
|
|
1561
|
-
$case: "internalServerError",
|
|
1562
|
-
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
1563
|
-
}
|
|
1564
|
-
: undefined,
|
|
1565
|
-
paginationData: isSet(object.paginationData) ? PaginatedResponse.fromJSON(object.paginationData) : undefined,
|
|
1566
|
-
};
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1569
|
-
export function toJSON(message: PaginatedFriendshipRequestsResponse): unknown {
|
|
1570
|
-
const obj: any = {};
|
|
1571
|
-
message.response?.$case === "requests" &&
|
|
1572
|
-
(obj.requests = message.response?.requests ? FriendshipRequests.toJSON(message.response?.requests) : undefined);
|
|
1573
|
-
message.response?.$case === "internalServerError" &&
|
|
1574
|
-
(obj.internalServerError = message.response?.internalServerError
|
|
1575
|
-
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
1576
|
-
: undefined);
|
|
1577
|
-
message.paginationData !== undefined &&
|
|
1578
|
-
(obj.paginationData = message.paginationData ? PaginatedResponse.toJSON(message.paginationData) : undefined);
|
|
1579
|
-
return obj;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
export function create<I extends Exact<DeepPartial<PaginatedFriendshipRequestsResponse>, I>>(
|
|
1583
|
-
base?: I,
|
|
1584
|
-
): PaginatedFriendshipRequestsResponse {
|
|
1585
|
-
return PaginatedFriendshipRequestsResponse.fromPartial(base ?? {});
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
export function fromPartial<I extends Exact<DeepPartial<PaginatedFriendshipRequestsResponse>, I>>(
|
|
1589
|
-
object: I,
|
|
1590
|
-
): PaginatedFriendshipRequestsResponse {
|
|
1591
|
-
const message = createBasePaginatedFriendshipRequestsResponse();
|
|
1592
|
-
if (
|
|
1593
|
-
object.response?.$case === "requests" &&
|
|
1594
|
-
object.response?.requests !== undefined &&
|
|
1595
|
-
object.response?.requests !== null
|
|
1596
|
-
) {
|
|
1597
|
-
message.response = { $case: "requests", requests: FriendshipRequests.fromPartial(object.response.requests) };
|
|
1598
|
-
}
|
|
1599
|
-
if (
|
|
1600
|
-
object.response?.$case === "internalServerError" &&
|
|
1601
|
-
object.response?.internalServerError !== undefined &&
|
|
1602
|
-
object.response?.internalServerError !== null
|
|
1603
|
-
) {
|
|
1604
|
-
message.response = {
|
|
1605
|
-
$case: "internalServerError",
|
|
1606
|
-
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
1607
|
-
};
|
|
1608
|
-
}
|
|
1609
|
-
message.paginationData = (object.paginationData !== undefined && object.paginationData !== null)
|
|
1610
|
-
? PaginatedResponse.fromPartial(object.paginationData)
|
|
1611
|
-
: undefined;
|
|
1612
|
-
return message;
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
function createBaseUpsertFriendshipResponse(): UpsertFriendshipResponse {
|
|
1617
|
-
return { response: undefined };
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
export namespace UpsertFriendshipResponse {
|
|
1621
|
-
export function encode(message: UpsertFriendshipResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1622
|
-
switch (message.response?.$case) {
|
|
1623
|
-
case "accepted":
|
|
1624
|
-
UpsertFriendshipResponse_Accepted.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
1625
|
-
break;
|
|
1626
|
-
case "invalidFriendshipAction":
|
|
1627
|
-
InvalidFriendshipAction.encode(message.response.invalidFriendshipAction, writer.uint32(18).fork()).ldelim();
|
|
1628
|
-
break;
|
|
1629
|
-
case "internalServerError":
|
|
1630
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(26).fork()).ldelim();
|
|
1631
|
-
break;
|
|
1632
|
-
}
|
|
1633
|
-
return writer;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipResponse {
|
|
1637
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1638
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1639
|
-
const message = createBaseUpsertFriendshipResponse();
|
|
1640
|
-
while (reader.pos < end) {
|
|
1641
|
-
const tag = reader.uint32();
|
|
1642
|
-
switch (tag >>> 3) {
|
|
1643
|
-
case 1:
|
|
1644
|
-
if (tag !== 10) {
|
|
1645
|
-
break;
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
message.response = {
|
|
1649
|
-
$case: "accepted",
|
|
1650
|
-
accepted: UpsertFriendshipResponse_Accepted.decode(reader, reader.uint32()),
|
|
1651
|
-
};
|
|
1652
|
-
continue;
|
|
1653
|
-
case 2:
|
|
1654
|
-
if (tag !== 18) {
|
|
1655
|
-
break;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
message.response = {
|
|
1659
|
-
$case: "invalidFriendshipAction",
|
|
1660
|
-
invalidFriendshipAction: InvalidFriendshipAction.decode(reader, reader.uint32()),
|
|
1661
|
-
};
|
|
1662
|
-
continue;
|
|
1663
|
-
case 3:
|
|
1664
|
-
if (tag !== 26) {
|
|
1665
|
-
break;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
message.response = {
|
|
1669
|
-
$case: "internalServerError",
|
|
1670
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
1671
|
-
};
|
|
1672
|
-
continue;
|
|
1673
|
-
}
|
|
1674
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1675
|
-
break;
|
|
1676
|
-
}
|
|
1677
|
-
reader.skipType(tag & 7);
|
|
1678
|
-
}
|
|
1679
|
-
return message;
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
export function fromJSON(object: any): UpsertFriendshipResponse {
|
|
1683
|
-
return {
|
|
1684
|
-
response: isSet(object.accepted)
|
|
1685
|
-
? { $case: "accepted", accepted: UpsertFriendshipResponse_Accepted.fromJSON(object.accepted) }
|
|
1686
|
-
: isSet(object.invalidFriendshipAction)
|
|
1687
|
-
? {
|
|
1688
|
-
$case: "invalidFriendshipAction",
|
|
1689
|
-
invalidFriendshipAction: InvalidFriendshipAction.fromJSON(object.invalidFriendshipAction),
|
|
1690
|
-
}
|
|
1691
|
-
: isSet(object.internalServerError)
|
|
1692
|
-
? {
|
|
1693
|
-
$case: "internalServerError",
|
|
1694
|
-
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
1695
|
-
}
|
|
1696
|
-
: undefined,
|
|
1697
|
-
};
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
export function toJSON(message: UpsertFriendshipResponse): unknown {
|
|
1701
|
-
const obj: any = {};
|
|
1702
|
-
message.response?.$case === "accepted" &&
|
|
1703
|
-
(obj.accepted = message.response?.accepted
|
|
1704
|
-
? UpsertFriendshipResponse_Accepted.toJSON(message.response?.accepted)
|
|
1705
|
-
: undefined);
|
|
1706
|
-
message.response?.$case === "invalidFriendshipAction" &&
|
|
1707
|
-
(obj.invalidFriendshipAction = message.response?.invalidFriendshipAction
|
|
1708
|
-
? InvalidFriendshipAction.toJSON(message.response?.invalidFriendshipAction)
|
|
1709
|
-
: undefined);
|
|
1710
|
-
message.response?.$case === "internalServerError" &&
|
|
1711
|
-
(obj.internalServerError = message.response?.internalServerError
|
|
1712
|
-
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
1713
|
-
: undefined);
|
|
1714
|
-
return obj;
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipResponse>, I>>(
|
|
1718
|
-
base?: I,
|
|
1719
|
-
): UpsertFriendshipResponse {
|
|
1720
|
-
return UpsertFriendshipResponse.fromPartial(base ?? {});
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipResponse>, I>>(
|
|
1724
|
-
object: I,
|
|
1725
|
-
): UpsertFriendshipResponse {
|
|
1726
|
-
const message = createBaseUpsertFriendshipResponse();
|
|
1727
|
-
if (
|
|
1728
|
-
object.response?.$case === "accepted" &&
|
|
1729
|
-
object.response?.accepted !== undefined &&
|
|
1730
|
-
object.response?.accepted !== null
|
|
1731
|
-
) {
|
|
1732
|
-
message.response = {
|
|
1733
|
-
$case: "accepted",
|
|
1734
|
-
accepted: UpsertFriendshipResponse_Accepted.fromPartial(object.response.accepted),
|
|
1735
|
-
};
|
|
1736
|
-
}
|
|
1737
|
-
if (
|
|
1738
|
-
object.response?.$case === "invalidFriendshipAction" &&
|
|
1739
|
-
object.response?.invalidFriendshipAction !== undefined &&
|
|
1740
|
-
object.response?.invalidFriendshipAction !== null
|
|
1741
|
-
) {
|
|
1742
|
-
message.response = {
|
|
1743
|
-
$case: "invalidFriendshipAction",
|
|
1744
|
-
invalidFriendshipAction: InvalidFriendshipAction.fromPartial(object.response.invalidFriendshipAction),
|
|
1745
|
-
};
|
|
1746
|
-
}
|
|
1747
|
-
if (
|
|
1748
|
-
object.response?.$case === "internalServerError" &&
|
|
1749
|
-
object.response?.internalServerError !== undefined &&
|
|
1750
|
-
object.response?.internalServerError !== null
|
|
1751
|
-
) {
|
|
1752
|
-
message.response = {
|
|
1753
|
-
$case: "internalServerError",
|
|
1754
|
-
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
1755
|
-
};
|
|
1756
|
-
}
|
|
1757
|
-
return message;
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
function createBaseUpsertFriendshipResponse_Accepted(): UpsertFriendshipResponse_Accepted {
|
|
1762
|
-
return { id: "", createdAt: 0 };
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
export namespace UpsertFriendshipResponse_Accepted {
|
|
1766
|
-
export function encode(
|
|
1767
|
-
message: UpsertFriendshipResponse_Accepted,
|
|
1768
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1769
|
-
): _m0.Writer {
|
|
1770
|
-
if (message.id !== "") {
|
|
1771
|
-
writer.uint32(10).string(message.id);
|
|
1772
|
-
}
|
|
1773
|
-
if (message.createdAt !== 0) {
|
|
1774
|
-
writer.uint32(16).int64(message.createdAt);
|
|
1775
|
-
}
|
|
1776
|
-
return writer;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): UpsertFriendshipResponse_Accepted {
|
|
1780
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1781
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1782
|
-
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1783
|
-
while (reader.pos < end) {
|
|
1784
|
-
const tag = reader.uint32();
|
|
1785
|
-
switch (tag >>> 3) {
|
|
1786
|
-
case 1:
|
|
1787
|
-
if (tag !== 10) {
|
|
1788
|
-
break;
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
message.id = reader.string();
|
|
1792
|
-
continue;
|
|
1793
|
-
case 2:
|
|
1794
|
-
if (tag !== 16) {
|
|
1795
|
-
break;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
message.createdAt = longToNumber(reader.int64() as Long);
|
|
1799
|
-
continue;
|
|
1800
|
-
}
|
|
1801
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1802
|
-
break;
|
|
1803
|
-
}
|
|
1804
|
-
reader.skipType(tag & 7);
|
|
1805
|
-
}
|
|
1806
|
-
return message;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
export function fromJSON(object: any): UpsertFriendshipResponse_Accepted {
|
|
1810
|
-
return {
|
|
1811
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
1812
|
-
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
1813
|
-
};
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
export function toJSON(message: UpsertFriendshipResponse_Accepted): unknown {
|
|
1817
|
-
const obj: any = {};
|
|
1818
|
-
message.id !== undefined && (obj.id = message.id);
|
|
1819
|
-
message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
|
|
1820
|
-
return obj;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
export function create<I extends Exact<DeepPartial<UpsertFriendshipResponse_Accepted>, I>>(
|
|
1824
|
-
base?: I,
|
|
1825
|
-
): UpsertFriendshipResponse_Accepted {
|
|
1826
|
-
return UpsertFriendshipResponse_Accepted.fromPartial(base ?? {});
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
export function fromPartial<I extends Exact<DeepPartial<UpsertFriendshipResponse_Accepted>, I>>(
|
|
1830
|
-
object: I,
|
|
1831
|
-
): UpsertFriendshipResponse_Accepted {
|
|
1832
|
-
const message = createBaseUpsertFriendshipResponse_Accepted();
|
|
1833
|
-
message.id = object.id ?? "";
|
|
1834
|
-
message.createdAt = object.createdAt ?? 0;
|
|
1835
|
-
return message;
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
function createBaseFriendshipUpdate(): FriendshipUpdate {
|
|
1840
|
-
return { update: undefined };
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
export namespace FriendshipUpdate {
|
|
1844
|
-
export function encode(message: FriendshipUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1845
|
-
switch (message.update?.$case) {
|
|
1846
|
-
case "request":
|
|
1847
|
-
FriendshipRequestResponse.encode(message.update.request, writer.uint32(10).fork()).ldelim();
|
|
1848
|
-
break;
|
|
1849
|
-
case "accept":
|
|
1850
|
-
FriendshipUpdate_AcceptResponse.encode(message.update.accept, writer.uint32(18).fork()).ldelim();
|
|
1851
|
-
break;
|
|
1852
|
-
case "reject":
|
|
1853
|
-
FriendshipUpdate_RejectResponse.encode(message.update.reject, writer.uint32(26).fork()).ldelim();
|
|
1854
|
-
break;
|
|
1855
|
-
case "delete":
|
|
1856
|
-
FriendshipUpdate_DeleteResponse.encode(message.update.delete, writer.uint32(34).fork()).ldelim();
|
|
1857
|
-
break;
|
|
1858
|
-
case "cancel":
|
|
1859
|
-
FriendshipUpdate_CancelResponse.encode(message.update.cancel, writer.uint32(42).fork()).ldelim();
|
|
1860
|
-
break;
|
|
1861
|
-
}
|
|
1862
|
-
return writer;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate {
|
|
1866
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1867
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1868
|
-
const message = createBaseFriendshipUpdate();
|
|
1869
|
-
while (reader.pos < end) {
|
|
1870
|
-
const tag = reader.uint32();
|
|
1871
|
-
switch (tag >>> 3) {
|
|
1872
|
-
case 1:
|
|
1873
|
-
if (tag !== 10) {
|
|
1874
|
-
break;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
message.update = { $case: "request", request: FriendshipRequestResponse.decode(reader, reader.uint32()) };
|
|
1878
|
-
continue;
|
|
1879
|
-
case 2:
|
|
1880
|
-
if (tag !== 18) {
|
|
1881
|
-
break;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.decode(reader, reader.uint32()) };
|
|
1885
|
-
continue;
|
|
1886
|
-
case 3:
|
|
1887
|
-
if (tag !== 26) {
|
|
1888
|
-
break;
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.decode(reader, reader.uint32()) };
|
|
1892
|
-
continue;
|
|
1893
|
-
case 4:
|
|
1894
|
-
if (tag !== 34) {
|
|
1895
|
-
break;
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.decode(reader, reader.uint32()) };
|
|
1899
|
-
continue;
|
|
1900
|
-
case 5:
|
|
1901
|
-
if (tag !== 42) {
|
|
1902
|
-
break;
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.decode(reader, reader.uint32()) };
|
|
1906
|
-
continue;
|
|
1907
|
-
}
|
|
1908
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1909
|
-
break;
|
|
1910
|
-
}
|
|
1911
|
-
reader.skipType(tag & 7);
|
|
1912
|
-
}
|
|
1913
|
-
return message;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
export function fromJSON(object: any): FriendshipUpdate {
|
|
1917
|
-
return {
|
|
1918
|
-
update: isSet(object.request)
|
|
1919
|
-
? { $case: "request", request: FriendshipRequestResponse.fromJSON(object.request) }
|
|
1920
|
-
: isSet(object.accept)
|
|
1921
|
-
? { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromJSON(object.accept) }
|
|
1922
|
-
: isSet(object.reject)
|
|
1923
|
-
? { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromJSON(object.reject) }
|
|
1924
|
-
: isSet(object.delete)
|
|
1925
|
-
? { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromJSON(object.delete) }
|
|
1926
|
-
: isSet(object.cancel)
|
|
1927
|
-
? { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromJSON(object.cancel) }
|
|
1928
|
-
: undefined,
|
|
1929
|
-
};
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
export function toJSON(message: FriendshipUpdate): unknown {
|
|
1933
|
-
const obj: any = {};
|
|
1934
|
-
message.update?.$case === "request" &&
|
|
1935
|
-
(obj.request = message.update?.request ? FriendshipRequestResponse.toJSON(message.update?.request) : undefined);
|
|
1936
|
-
message.update?.$case === "accept" &&
|
|
1937
|
-
(obj.accept = message.update?.accept
|
|
1938
|
-
? FriendshipUpdate_AcceptResponse.toJSON(message.update?.accept)
|
|
1939
|
-
: undefined);
|
|
1940
|
-
message.update?.$case === "reject" &&
|
|
1941
|
-
(obj.reject = message.update?.reject
|
|
1942
|
-
? FriendshipUpdate_RejectResponse.toJSON(message.update?.reject)
|
|
1943
|
-
: undefined);
|
|
1944
|
-
message.update?.$case === "delete" &&
|
|
1945
|
-
(obj.delete = message.update?.delete
|
|
1946
|
-
? FriendshipUpdate_DeleteResponse.toJSON(message.update?.delete)
|
|
1947
|
-
: undefined);
|
|
1948
|
-
message.update?.$case === "cancel" &&
|
|
1949
|
-
(obj.cancel = message.update?.cancel
|
|
1950
|
-
? FriendshipUpdate_CancelResponse.toJSON(message.update?.cancel)
|
|
1951
|
-
: undefined);
|
|
1952
|
-
return obj;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(base?: I): FriendshipUpdate {
|
|
1956
|
-
return FriendshipUpdate.fromPartial(base ?? {});
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(object: I): FriendshipUpdate {
|
|
1960
|
-
const message = createBaseFriendshipUpdate();
|
|
1961
|
-
if (object.update?.$case === "request" && object.update?.request !== undefined && object.update?.request !== null) {
|
|
1962
|
-
message.update = { $case: "request", request: FriendshipRequestResponse.fromPartial(object.update.request) };
|
|
1963
|
-
}
|
|
1964
|
-
if (object.update?.$case === "accept" && object.update?.accept !== undefined && object.update?.accept !== null) {
|
|
1965
|
-
message.update = { $case: "accept", accept: FriendshipUpdate_AcceptResponse.fromPartial(object.update.accept) };
|
|
1966
|
-
}
|
|
1967
|
-
if (object.update?.$case === "reject" && object.update?.reject !== undefined && object.update?.reject !== null) {
|
|
1968
|
-
message.update = { $case: "reject", reject: FriendshipUpdate_RejectResponse.fromPartial(object.update.reject) };
|
|
1969
|
-
}
|
|
1970
|
-
if (object.update?.$case === "delete" && object.update?.delete !== undefined && object.update?.delete !== null) {
|
|
1971
|
-
message.update = { $case: "delete", delete: FriendshipUpdate_DeleteResponse.fromPartial(object.update.delete) };
|
|
1972
|
-
}
|
|
1973
|
-
if (object.update?.$case === "cancel" && object.update?.cancel !== undefined && object.update?.cancel !== null) {
|
|
1974
|
-
message.update = { $case: "cancel", cancel: FriendshipUpdate_CancelResponse.fromPartial(object.update.cancel) };
|
|
1975
|
-
}
|
|
1976
|
-
return message;
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
function createBaseFriendshipUpdate_AcceptResponse(): FriendshipUpdate_AcceptResponse {
|
|
1981
|
-
return { user: undefined };
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
export namespace FriendshipUpdate_AcceptResponse {
|
|
1985
|
-
export function encode(
|
|
1986
|
-
message: FriendshipUpdate_AcceptResponse,
|
|
1987
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
1988
|
-
): _m0.Writer {
|
|
1989
|
-
if (message.user !== undefined) {
|
|
1990
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
1991
|
-
}
|
|
1992
|
-
return writer;
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_AcceptResponse {
|
|
1996
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1997
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1998
|
-
const message = createBaseFriendshipUpdate_AcceptResponse();
|
|
1999
|
-
while (reader.pos < end) {
|
|
2000
|
-
const tag = reader.uint32();
|
|
2001
|
-
switch (tag >>> 3) {
|
|
2002
|
-
case 1:
|
|
2003
|
-
if (tag !== 10) {
|
|
2004
|
-
break;
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
message.user = User.decode(reader, reader.uint32());
|
|
2008
|
-
continue;
|
|
2009
|
-
}
|
|
2010
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2011
|
-
break;
|
|
2012
|
-
}
|
|
2013
|
-
reader.skipType(tag & 7);
|
|
2014
|
-
}
|
|
2015
|
-
return message;
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
export function fromJSON(object: any): FriendshipUpdate_AcceptResponse {
|
|
2019
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
export function toJSON(message: FriendshipUpdate_AcceptResponse): unknown {
|
|
2023
|
-
const obj: any = {};
|
|
2024
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2025
|
-
return obj;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate_AcceptResponse>, I>>(
|
|
2029
|
-
base?: I,
|
|
2030
|
-
): FriendshipUpdate_AcceptResponse {
|
|
2031
|
-
return FriendshipUpdate_AcceptResponse.fromPartial(base ?? {});
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_AcceptResponse>, I>>(
|
|
2035
|
-
object: I,
|
|
2036
|
-
): FriendshipUpdate_AcceptResponse {
|
|
2037
|
-
const message = createBaseFriendshipUpdate_AcceptResponse();
|
|
2038
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2039
|
-
return message;
|
|
2040
|
-
}
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
function createBaseFriendshipUpdate_RejectResponse(): FriendshipUpdate_RejectResponse {
|
|
2044
|
-
return { user: undefined };
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
export namespace FriendshipUpdate_RejectResponse {
|
|
2048
|
-
export function encode(
|
|
2049
|
-
message: FriendshipUpdate_RejectResponse,
|
|
2050
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
2051
|
-
): _m0.Writer {
|
|
2052
|
-
if (message.user !== undefined) {
|
|
2053
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2054
|
-
}
|
|
2055
|
-
return writer;
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_RejectResponse {
|
|
2059
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2060
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2061
|
-
const message = createBaseFriendshipUpdate_RejectResponse();
|
|
2062
|
-
while (reader.pos < end) {
|
|
2063
|
-
const tag = reader.uint32();
|
|
2064
|
-
switch (tag >>> 3) {
|
|
2065
|
-
case 1:
|
|
2066
|
-
if (tag !== 10) {
|
|
2067
|
-
break;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
message.user = User.decode(reader, reader.uint32());
|
|
2071
|
-
continue;
|
|
2072
|
-
}
|
|
2073
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2074
|
-
break;
|
|
2075
|
-
}
|
|
2076
|
-
reader.skipType(tag & 7);
|
|
2077
|
-
}
|
|
2078
|
-
return message;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
export function fromJSON(object: any): FriendshipUpdate_RejectResponse {
|
|
2082
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
export function toJSON(message: FriendshipUpdate_RejectResponse): unknown {
|
|
2086
|
-
const obj: any = {};
|
|
2087
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2088
|
-
return obj;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate_RejectResponse>, I>>(
|
|
2092
|
-
base?: I,
|
|
2093
|
-
): FriendshipUpdate_RejectResponse {
|
|
2094
|
-
return FriendshipUpdate_RejectResponse.fromPartial(base ?? {});
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_RejectResponse>, I>>(
|
|
2098
|
-
object: I,
|
|
2099
|
-
): FriendshipUpdate_RejectResponse {
|
|
2100
|
-
const message = createBaseFriendshipUpdate_RejectResponse();
|
|
2101
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2102
|
-
return message;
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
function createBaseFriendshipUpdate_DeleteResponse(): FriendshipUpdate_DeleteResponse {
|
|
2107
|
-
return { user: undefined };
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
export namespace FriendshipUpdate_DeleteResponse {
|
|
2111
|
-
export function encode(
|
|
2112
|
-
message: FriendshipUpdate_DeleteResponse,
|
|
2113
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
2114
|
-
): _m0.Writer {
|
|
2115
|
-
if (message.user !== undefined) {
|
|
2116
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2117
|
-
}
|
|
2118
|
-
return writer;
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_DeleteResponse {
|
|
2122
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2123
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2124
|
-
const message = createBaseFriendshipUpdate_DeleteResponse();
|
|
2125
|
-
while (reader.pos < end) {
|
|
2126
|
-
const tag = reader.uint32();
|
|
2127
|
-
switch (tag >>> 3) {
|
|
2128
|
-
case 1:
|
|
2129
|
-
if (tag !== 10) {
|
|
2130
|
-
break;
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
message.user = User.decode(reader, reader.uint32());
|
|
2134
|
-
continue;
|
|
2135
|
-
}
|
|
2136
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2137
|
-
break;
|
|
2138
|
-
}
|
|
2139
|
-
reader.skipType(tag & 7);
|
|
2140
|
-
}
|
|
2141
|
-
return message;
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
export function fromJSON(object: any): FriendshipUpdate_DeleteResponse {
|
|
2145
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
export function toJSON(message: FriendshipUpdate_DeleteResponse): unknown {
|
|
2149
|
-
const obj: any = {};
|
|
2150
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2151
|
-
return obj;
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate_DeleteResponse>, I>>(
|
|
2155
|
-
base?: I,
|
|
2156
|
-
): FriendshipUpdate_DeleteResponse {
|
|
2157
|
-
return FriendshipUpdate_DeleteResponse.fromPartial(base ?? {});
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_DeleteResponse>, I>>(
|
|
2161
|
-
object: I,
|
|
2162
|
-
): FriendshipUpdate_DeleteResponse {
|
|
2163
|
-
const message = createBaseFriendshipUpdate_DeleteResponse();
|
|
2164
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2165
|
-
return message;
|
|
2166
|
-
}
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
function createBaseFriendshipUpdate_CancelResponse(): FriendshipUpdate_CancelResponse {
|
|
2170
|
-
return { user: undefined };
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
export namespace FriendshipUpdate_CancelResponse {
|
|
2174
|
-
export function encode(
|
|
2175
|
-
message: FriendshipUpdate_CancelResponse,
|
|
2176
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
2177
|
-
): _m0.Writer {
|
|
2178
|
-
if (message.user !== undefined) {
|
|
2179
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2180
|
-
}
|
|
2181
|
-
return writer;
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_CancelResponse {
|
|
2185
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2186
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2187
|
-
const message = createBaseFriendshipUpdate_CancelResponse();
|
|
2188
|
-
while (reader.pos < end) {
|
|
2189
|
-
const tag = reader.uint32();
|
|
2190
|
-
switch (tag >>> 3) {
|
|
2191
|
-
case 1:
|
|
2192
|
-
if (tag !== 10) {
|
|
2193
|
-
break;
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
|
-
message.user = User.decode(reader, reader.uint32());
|
|
2197
|
-
continue;
|
|
2198
|
-
}
|
|
2199
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2200
|
-
break;
|
|
2201
|
-
}
|
|
2202
|
-
reader.skipType(tag & 7);
|
|
2203
|
-
}
|
|
2204
|
-
return message;
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
export function fromJSON(object: any): FriendshipUpdate_CancelResponse {
|
|
2208
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
export function toJSON(message: FriendshipUpdate_CancelResponse): unknown {
|
|
2212
|
-
const obj: any = {};
|
|
2213
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2214
|
-
return obj;
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
export function create<I extends Exact<DeepPartial<FriendshipUpdate_CancelResponse>, I>>(
|
|
2218
|
-
base?: I,
|
|
2219
|
-
): FriendshipUpdate_CancelResponse {
|
|
2220
|
-
return FriendshipUpdate_CancelResponse.fromPartial(base ?? {});
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
export function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_CancelResponse>, I>>(
|
|
2224
|
-
object: I,
|
|
2225
|
-
): FriendshipUpdate_CancelResponse {
|
|
2226
|
-
const message = createBaseFriendshipUpdate_CancelResponse();
|
|
2227
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2228
|
-
return message;
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
function createBaseGetFriendshipStatusPayload(): GetFriendshipStatusPayload {
|
|
2233
|
-
return { user: undefined };
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
export namespace GetFriendshipStatusPayload {
|
|
2237
|
-
export function encode(message: GetFriendshipStatusPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2238
|
-
if (message.user !== undefined) {
|
|
2239
|
-
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
2240
|
-
}
|
|
2241
|
-
return writer;
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusPayload {
|
|
2245
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2246
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2247
|
-
const message = createBaseGetFriendshipStatusPayload();
|
|
2248
|
-
while (reader.pos < end) {
|
|
2249
|
-
const tag = reader.uint32();
|
|
2250
|
-
switch (tag >>> 3) {
|
|
2251
|
-
case 1:
|
|
2252
|
-
if (tag !== 10) {
|
|
2253
|
-
break;
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
message.user = User.decode(reader, reader.uint32());
|
|
2257
|
-
continue;
|
|
2258
|
-
}
|
|
2259
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2260
|
-
break;
|
|
2261
|
-
}
|
|
2262
|
-
reader.skipType(tag & 7);
|
|
2263
|
-
}
|
|
2264
|
-
return message;
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
export function fromJSON(object: any): GetFriendshipStatusPayload {
|
|
2268
|
-
return { user: isSet(object.user) ? User.fromJSON(object.user) : undefined };
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
export function toJSON(message: GetFriendshipStatusPayload): unknown {
|
|
2272
|
-
const obj: any = {};
|
|
2273
|
-
message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
|
|
2274
|
-
return obj;
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
export function create<I extends Exact<DeepPartial<GetFriendshipStatusPayload>, I>>(
|
|
2278
|
-
base?: I,
|
|
2279
|
-
): GetFriendshipStatusPayload {
|
|
2280
|
-
return GetFriendshipStatusPayload.fromPartial(base ?? {});
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusPayload>, I>>(
|
|
2284
|
-
object: I,
|
|
2285
|
-
): GetFriendshipStatusPayload {
|
|
2286
|
-
const message = createBaseGetFriendshipStatusPayload();
|
|
2287
|
-
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
2288
|
-
return message;
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
|
|
2292
|
-
function createBaseGetFriendshipStatusResponse(): GetFriendshipStatusResponse {
|
|
2293
|
-
return { response: undefined };
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
export namespace GetFriendshipStatusResponse {
|
|
2297
|
-
export function encode(message: GetFriendshipStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2298
|
-
switch (message.response?.$case) {
|
|
2299
|
-
case "accepted":
|
|
2300
|
-
GetFriendshipStatusResponse_Ok.encode(message.response.accepted, writer.uint32(10).fork()).ldelim();
|
|
2301
|
-
break;
|
|
2302
|
-
case "internalServerError":
|
|
2303
|
-
InternalServerError.encode(message.response.internalServerError, writer.uint32(18).fork()).ldelim();
|
|
2304
|
-
break;
|
|
2305
|
-
}
|
|
2306
|
-
return writer;
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusResponse {
|
|
2310
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2311
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2312
|
-
const message = createBaseGetFriendshipStatusResponse();
|
|
2313
|
-
while (reader.pos < end) {
|
|
2314
|
-
const tag = reader.uint32();
|
|
2315
|
-
switch (tag >>> 3) {
|
|
2316
|
-
case 1:
|
|
2317
|
-
if (tag !== 10) {
|
|
2318
|
-
break;
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
message.response = {
|
|
2322
|
-
$case: "accepted",
|
|
2323
|
-
accepted: GetFriendshipStatusResponse_Ok.decode(reader, reader.uint32()),
|
|
2324
|
-
};
|
|
2325
|
-
continue;
|
|
2326
|
-
case 2:
|
|
2327
|
-
if (tag !== 18) {
|
|
2328
|
-
break;
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
message.response = {
|
|
2332
|
-
$case: "internalServerError",
|
|
2333
|
-
internalServerError: InternalServerError.decode(reader, reader.uint32()),
|
|
2334
|
-
};
|
|
2335
|
-
continue;
|
|
2336
|
-
}
|
|
2337
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2338
|
-
break;
|
|
2339
|
-
}
|
|
2340
|
-
reader.skipType(tag & 7);
|
|
2341
|
-
}
|
|
2342
|
-
return message;
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
export function fromJSON(object: any): GetFriendshipStatusResponse {
|
|
2346
|
-
return {
|
|
2347
|
-
response: isSet(object.accepted)
|
|
2348
|
-
? { $case: "accepted", accepted: GetFriendshipStatusResponse_Ok.fromJSON(object.accepted) }
|
|
2349
|
-
: isSet(object.internalServerError)
|
|
2350
|
-
? {
|
|
2351
|
-
$case: "internalServerError",
|
|
2352
|
-
internalServerError: InternalServerError.fromJSON(object.internalServerError),
|
|
2353
|
-
}
|
|
2354
|
-
: undefined,
|
|
2355
|
-
};
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
export function toJSON(message: GetFriendshipStatusResponse): unknown {
|
|
2359
|
-
const obj: any = {};
|
|
2360
|
-
message.response?.$case === "accepted" &&
|
|
2361
|
-
(obj.accepted = message.response?.accepted
|
|
2362
|
-
? GetFriendshipStatusResponse_Ok.toJSON(message.response?.accepted)
|
|
2363
|
-
: undefined);
|
|
2364
|
-
message.response?.$case === "internalServerError" &&
|
|
2365
|
-
(obj.internalServerError = message.response?.internalServerError
|
|
2366
|
-
? InternalServerError.toJSON(message.response?.internalServerError)
|
|
2367
|
-
: undefined);
|
|
2368
|
-
return obj;
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
export function create<I extends Exact<DeepPartial<GetFriendshipStatusResponse>, I>>(
|
|
2372
|
-
base?: I,
|
|
2373
|
-
): GetFriendshipStatusResponse {
|
|
2374
|
-
return GetFriendshipStatusResponse.fromPartial(base ?? {});
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusResponse>, I>>(
|
|
2378
|
-
object: I,
|
|
2379
|
-
): GetFriendshipStatusResponse {
|
|
2380
|
-
const message = createBaseGetFriendshipStatusResponse();
|
|
2381
|
-
if (
|
|
2382
|
-
object.response?.$case === "accepted" &&
|
|
2383
|
-
object.response?.accepted !== undefined &&
|
|
2384
|
-
object.response?.accepted !== null
|
|
2385
|
-
) {
|
|
2386
|
-
message.response = {
|
|
2387
|
-
$case: "accepted",
|
|
2388
|
-
accepted: GetFriendshipStatusResponse_Ok.fromPartial(object.response.accepted),
|
|
2389
|
-
};
|
|
2390
|
-
}
|
|
2391
|
-
if (
|
|
2392
|
-
object.response?.$case === "internalServerError" &&
|
|
2393
|
-
object.response?.internalServerError !== undefined &&
|
|
2394
|
-
object.response?.internalServerError !== null
|
|
2395
|
-
) {
|
|
2396
|
-
message.response = {
|
|
2397
|
-
$case: "internalServerError",
|
|
2398
|
-
internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
|
|
2399
|
-
};
|
|
2400
|
-
}
|
|
2401
|
-
return message;
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
function createBaseGetFriendshipStatusResponse_Ok(): GetFriendshipStatusResponse_Ok {
|
|
2406
|
-
return { status: 0, message: undefined };
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
export namespace GetFriendshipStatusResponse_Ok {
|
|
2410
|
-
export function encode(
|
|
2411
|
-
message: GetFriendshipStatusResponse_Ok,
|
|
2412
|
-
writer: _m0.Writer = _m0.Writer.create(),
|
|
2413
|
-
): _m0.Writer {
|
|
2414
|
-
if (message.status !== 0) {
|
|
2415
|
-
writer.uint32(8).int32(message.status);
|
|
2416
|
-
}
|
|
2417
|
-
if (message.message !== undefined) {
|
|
2418
|
-
writer.uint32(18).string(message.message);
|
|
2419
|
-
}
|
|
2420
|
-
return writer;
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusResponse_Ok {
|
|
2424
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
2425
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2426
|
-
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
2427
|
-
while (reader.pos < end) {
|
|
2428
|
-
const tag = reader.uint32();
|
|
2429
|
-
switch (tag >>> 3) {
|
|
2430
|
-
case 1:
|
|
2431
|
-
if (tag !== 8) {
|
|
2432
|
-
break;
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
message.status = reader.int32() as any;
|
|
2436
|
-
continue;
|
|
2437
|
-
case 2:
|
|
2438
|
-
if (tag !== 18) {
|
|
2439
|
-
break;
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
message.message = reader.string();
|
|
2443
|
-
continue;
|
|
2444
|
-
}
|
|
2445
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2446
|
-
break;
|
|
2447
|
-
}
|
|
2448
|
-
reader.skipType(tag & 7);
|
|
2449
|
-
}
|
|
2450
|
-
return message;
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
export function fromJSON(object: any): GetFriendshipStatusResponse_Ok {
|
|
2454
|
-
return {
|
|
2455
|
-
status: isSet(object.status) ? friendshipStatusFromJSON(object.status) : 0,
|
|
2456
|
-
message: isSet(object.message) ? String(object.message) : undefined,
|
|
2457
|
-
};
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
export function toJSON(message: GetFriendshipStatusResponse_Ok): unknown {
|
|
2461
|
-
const obj: any = {};
|
|
2462
|
-
message.status !== undefined && (obj.status = friendshipStatusToJSON(message.status));
|
|
2463
|
-
message.message !== undefined && (obj.message = message.message);
|
|
2464
|
-
return obj;
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
|
-
export function create<I extends Exact<DeepPartial<GetFriendshipStatusResponse_Ok>, I>>(
|
|
2468
|
-
base?: I,
|
|
2469
|
-
): GetFriendshipStatusResponse_Ok {
|
|
2470
|
-
return GetFriendshipStatusResponse_Ok.fromPartial(base ?? {});
|
|
2471
|
-
}
|
|
2472
|
-
|
|
2473
|
-
export function fromPartial<I extends Exact<DeepPartial<GetFriendshipStatusResponse_Ok>, I>>(
|
|
2474
|
-
object: I,
|
|
2475
|
-
): GetFriendshipStatusResponse_Ok {
|
|
2476
|
-
const message = createBaseGetFriendshipStatusResponse_Ok();
|
|
2477
|
-
message.status = object.status ?? 0;
|
|
2478
|
-
message.message = object.message ?? undefined;
|
|
2479
|
-
return message;
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
export type SocialServiceDefinition = typeof SocialServiceDefinition;
|
|
2484
|
-
export const SocialServiceDefinition = {
|
|
2485
|
-
name: "SocialService",
|
|
2486
|
-
fullName: "decentraland.social_service.v2.SocialService",
|
|
2487
|
-
methods: {
|
|
2488
|
-
/** Get the list of friends for the authenticated user */
|
|
2489
|
-
getFriends: {
|
|
2490
|
-
name: "GetFriends",
|
|
2491
|
-
requestType: GetFriendsPayload,
|
|
2492
|
-
requestStream: false,
|
|
2493
|
-
responseType: PaginatedUsersResponse,
|
|
2494
|
-
responseStream: false,
|
|
2495
|
-
options: {},
|
|
2496
|
-
},
|
|
2497
|
-
/** Get the list of mutual friends between the authenticated user and the one in the parameter */
|
|
2498
|
-
getMutualFriends: {
|
|
2499
|
-
name: "GetMutualFriends",
|
|
2500
|
-
requestType: GetMutualFriendsPayload,
|
|
2501
|
-
requestStream: false,
|
|
2502
|
-
responseType: PaginatedUsersResponse,
|
|
2503
|
-
responseStream: false,
|
|
2504
|
-
options: {},
|
|
2505
|
-
},
|
|
2506
|
-
/** Get the pending friendship requests for the authenticated user */
|
|
2507
|
-
getPendingFriendshipRequests: {
|
|
2508
|
-
name: "GetPendingFriendshipRequests",
|
|
2509
|
-
requestType: GetFriendshipRequestsPayload,
|
|
2510
|
-
requestStream: false,
|
|
2511
|
-
responseType: PaginatedFriendshipRequestsResponse,
|
|
2512
|
-
responseStream: false,
|
|
2513
|
-
options: {},
|
|
2514
|
-
},
|
|
2515
|
-
/** Get the sent friendship requests for the authenticated user */
|
|
2516
|
-
getSentFriendshipRequests: {
|
|
2517
|
-
name: "GetSentFriendshipRequests",
|
|
2518
|
-
requestType: GetFriendshipRequestsPayload,
|
|
2519
|
-
requestStream: false,
|
|
2520
|
-
responseType: PaginatedFriendshipRequestsResponse,
|
|
2521
|
-
responseStream: false,
|
|
2522
|
-
options: {},
|
|
2523
|
-
},
|
|
2524
|
-
/** Create or update friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
|
|
2525
|
-
upsertFriendship: {
|
|
2526
|
-
name: "UpsertFriendship",
|
|
2527
|
-
requestType: UpsertFriendshipPayload,
|
|
2528
|
-
requestStream: false,
|
|
2529
|
-
responseType: UpsertFriendshipResponse,
|
|
2530
|
-
responseStream: false,
|
|
2531
|
-
options: {},
|
|
2532
|
-
},
|
|
2533
|
-
/** Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL, DELETE */
|
|
2534
|
-
subscribeToFriendshipUpdates: {
|
|
2535
|
-
name: "SubscribeToFriendshipUpdates",
|
|
2536
|
-
requestType: Empty,
|
|
2537
|
-
requestStream: false,
|
|
2538
|
-
responseType: FriendshipUpdate,
|
|
2539
|
-
responseStream: true,
|
|
2540
|
-
options: {},
|
|
2541
|
-
},
|
|
2542
|
-
getFriendshipStatus: {
|
|
2543
|
-
name: "GetFriendshipStatus",
|
|
2544
|
-
requestType: GetFriendshipStatusPayload,
|
|
2545
|
-
requestStream: false,
|
|
2546
|
-
responseType: GetFriendshipStatusResponse,
|
|
2547
|
-
responseStream: false,
|
|
2548
|
-
options: {},
|
|
2549
|
-
},
|
|
2550
|
-
},
|
|
2551
|
-
} as const;
|
|
2552
|
-
|
|
2553
|
-
declare const self: any | undefined;
|
|
2554
|
-
declare const window: any | undefined;
|
|
2555
|
-
declare const global: any | undefined;
|
|
2556
|
-
const tsProtoGlobalThis: any = (() => {
|
|
2557
|
-
if (typeof globalThis !== "undefined") {
|
|
2558
|
-
return globalThis;
|
|
2559
|
-
}
|
|
2560
|
-
if (typeof self !== "undefined") {
|
|
2561
|
-
return self;
|
|
2562
|
-
}
|
|
2563
|
-
if (typeof window !== "undefined") {
|
|
2564
|
-
return window;
|
|
2565
|
-
}
|
|
2566
|
-
if (typeof global !== "undefined") {
|
|
2567
|
-
return global;
|
|
2568
|
-
}
|
|
2569
|
-
throw "Unable to locate global object";
|
|
2570
|
-
})();
|
|
2571
|
-
|
|
2572
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2573
|
-
|
|
2574
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
2575
|
-
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2576
|
-
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
2577
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2578
|
-
: Partial<T>;
|
|
2579
|
-
|
|
2580
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2581
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2582
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
2583
|
-
|
|
2584
|
-
function longToNumber(long: Long): number {
|
|
2585
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
2586
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2587
|
-
}
|
|
2588
|
-
return long.toNumber();
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
if (_m0.util.Long !== Long) {
|
|
2592
|
-
_m0.util.Long = Long as any;
|
|
2593
|
-
_m0.configure();
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
function isSet(value: any): boolean {
|
|
2597
|
-
return value !== null && value !== undefined;
|
|
2598
|
-
}
|