mezon-js-protobuf 1.8.75 → 1.8.77
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/api/api.ts +806 -137
- package/dist/mezon-js/utils.d.ts +2 -0
- package/dist/mezon-js-protobuf/api/api.d.ts +2203 -1177
- package/dist/mezon-js-protobuf/index.d.ts +1 -0
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +2289 -2225
- package/dist/mezon-js-protobuf/utils.d.ts +4 -1
- package/dist/mezon-js-protobuf.cjs.js +705 -127
- package/dist/mezon-js-protobuf.esm.mjs +705 -127
- package/index.ts +1 -0
- package/package.json +1 -1
- package/rtapi/realtime.ts +97 -27
- package/utils.ts +33 -0
- package/web_socket_adapter_pb.ts +123 -137
package/api/api.ts
CHANGED
|
@@ -323,15 +323,15 @@ export interface ChannelMessage {
|
|
|
323
323
|
/** The clan avatar */
|
|
324
324
|
clan_avatar: string;
|
|
325
325
|
/** Emoji reaction */
|
|
326
|
-
reactions:
|
|
326
|
+
reactions: Uint8Array;
|
|
327
327
|
/** Message mention */
|
|
328
|
-
mentions:
|
|
328
|
+
mentions: Uint8Array;
|
|
329
329
|
/** Message attachment */
|
|
330
|
-
attachments:
|
|
330
|
+
attachments: Uint8Array;
|
|
331
331
|
/** Message reference */
|
|
332
|
-
references:
|
|
332
|
+
references: Uint8Array;
|
|
333
333
|
/** referenced message */
|
|
334
|
-
referenced_message:
|
|
334
|
+
referenced_message: Uint8Array;
|
|
335
335
|
/** create time in ms */
|
|
336
336
|
create_time_seconds: number;
|
|
337
337
|
/** update time in ms */
|
|
@@ -922,7 +922,7 @@ export interface Notification {
|
|
|
922
922
|
/** Subject of the notification. */
|
|
923
923
|
subject: string;
|
|
924
924
|
/** Content of the notification in JSON. */
|
|
925
|
-
content:
|
|
925
|
+
content: Uint8Array;
|
|
926
926
|
/** Category code for this notification. */
|
|
927
927
|
code: number;
|
|
928
928
|
/** ID of the sender, if a user. Otherwise 'null'. */
|
|
@@ -1022,6 +1022,7 @@ export interface Session {
|
|
|
1022
1022
|
/** Update username */
|
|
1023
1023
|
export interface UpdateUsernameRequest {
|
|
1024
1024
|
username: string;
|
|
1025
|
+
display_name: string;
|
|
1025
1026
|
}
|
|
1026
1027
|
|
|
1027
1028
|
/** Update a user's account details. */
|
|
@@ -1506,13 +1507,13 @@ export interface ChannelMessageHeader {
|
|
|
1506
1507
|
/** the content */
|
|
1507
1508
|
content: string;
|
|
1508
1509
|
/** the attachment */
|
|
1509
|
-
attachment:
|
|
1510
|
+
attachment: Uint8Array;
|
|
1510
1511
|
/** the reference */
|
|
1511
|
-
reference:
|
|
1512
|
+
reference: Uint8Array;
|
|
1512
1513
|
/** the mention */
|
|
1513
|
-
mention:
|
|
1514
|
+
mention: Uint8Array;
|
|
1514
1515
|
/** the reactions */
|
|
1515
|
-
reaction:
|
|
1516
|
+
reaction: Uint8Array;
|
|
1516
1517
|
}
|
|
1517
1518
|
|
|
1518
1519
|
/** Channel description record */
|
|
@@ -1589,6 +1590,12 @@ export interface ChannelDescription {
|
|
|
1589
1590
|
export interface ChannelDescList {
|
|
1590
1591
|
/** A list of channel. */
|
|
1591
1592
|
channeldesc: ChannelDescription[];
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/** A list of channel description, usually a result of a list operation. */
|
|
1596
|
+
export interface ChannelDescListNoPool {
|
|
1597
|
+
/** A list of channel. */
|
|
1598
|
+
channeldesc: ChannelDescription[];
|
|
1592
1599
|
/** Page thread */
|
|
1593
1600
|
page: number;
|
|
1594
1601
|
}
|
|
@@ -3672,10 +3679,10 @@ export interface Message2InboxRequest {
|
|
|
3672
3679
|
clan_id: string;
|
|
3673
3680
|
avatar: string;
|
|
3674
3681
|
content: string;
|
|
3675
|
-
mentions:
|
|
3676
|
-
attachments:
|
|
3677
|
-
reactions:
|
|
3678
|
-
references:
|
|
3682
|
+
mentions: Uint8Array;
|
|
3683
|
+
attachments: Uint8Array;
|
|
3684
|
+
reactions: Uint8Array;
|
|
3685
|
+
references: Uint8Array;
|
|
3679
3686
|
}
|
|
3680
3687
|
|
|
3681
3688
|
/** Send an email with password to the server. Used with authenticate/link/unlink. */
|
|
@@ -3790,6 +3797,42 @@ export interface LogedDevice {
|
|
|
3790
3797
|
is_current: boolean;
|
|
3791
3798
|
}
|
|
3792
3799
|
|
|
3800
|
+
export interface DirectFcmProto {
|
|
3801
|
+
title: string;
|
|
3802
|
+
link: string;
|
|
3803
|
+
content: string;
|
|
3804
|
+
channel_id: string;
|
|
3805
|
+
sender_id: string;
|
|
3806
|
+
avatar: string;
|
|
3807
|
+
clan_id: string;
|
|
3808
|
+
attachments: Uint8Array;
|
|
3809
|
+
display_name: string;
|
|
3810
|
+
create_time_seconds: number;
|
|
3811
|
+
update_time_seconds: number;
|
|
3812
|
+
username: string;
|
|
3813
|
+
mentions: Uint8Array;
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
export interface MessageMentionList {
|
|
3817
|
+
mentions: MessageMention[];
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
export interface MessageAttachmentList {
|
|
3821
|
+
attachments: MessageAttachment[];
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
export interface MessageRefList {
|
|
3825
|
+
refs: MessageRef[];
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
export interface ListClanBadgeCountRequest {
|
|
3829
|
+
clan_id: string;
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
export interface ListClanBadgeCountResponse {
|
|
3833
|
+
badge_count: number;
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3793
3836
|
function createBaseAccount(): Account {
|
|
3794
3837
|
return {
|
|
3795
3838
|
user: undefined,
|
|
@@ -4974,11 +5017,11 @@ function createBaseChannelMessage(): ChannelMessage {
|
|
|
4974
5017
|
display_name: "",
|
|
4975
5018
|
clan_nick: "",
|
|
4976
5019
|
clan_avatar: "",
|
|
4977
|
-
reactions:
|
|
4978
|
-
mentions:
|
|
4979
|
-
attachments:
|
|
4980
|
-
references:
|
|
4981
|
-
referenced_message:
|
|
5020
|
+
reactions: new Uint8Array(0),
|
|
5021
|
+
mentions: new Uint8Array(0),
|
|
5022
|
+
attachments: new Uint8Array(0),
|
|
5023
|
+
references: new Uint8Array(0),
|
|
5024
|
+
referenced_message: new Uint8Array(0),
|
|
4982
5025
|
create_time_seconds: 0,
|
|
4983
5026
|
update_time_seconds: 0,
|
|
4984
5027
|
mode: 0,
|
|
@@ -5038,20 +5081,20 @@ export const ChannelMessage = {
|
|
|
5038
5081
|
if (message.clan_avatar !== "") {
|
|
5039
5082
|
writer.uint32(130).string(message.clan_avatar);
|
|
5040
5083
|
}
|
|
5041
|
-
if (message.reactions !==
|
|
5042
|
-
writer.uint32(138).
|
|
5084
|
+
if (message.reactions.length !== 0) {
|
|
5085
|
+
writer.uint32(138).bytes(message.reactions);
|
|
5043
5086
|
}
|
|
5044
|
-
if (message.mentions !==
|
|
5045
|
-
writer.uint32(146).
|
|
5087
|
+
if (message.mentions.length !== 0) {
|
|
5088
|
+
writer.uint32(146).bytes(message.mentions);
|
|
5046
5089
|
}
|
|
5047
|
-
if (message.attachments !==
|
|
5048
|
-
writer.uint32(154).
|
|
5090
|
+
if (message.attachments.length !== 0) {
|
|
5091
|
+
writer.uint32(154).bytes(message.attachments);
|
|
5049
5092
|
}
|
|
5050
|
-
if (message.references !==
|
|
5051
|
-
writer.uint32(162).
|
|
5093
|
+
if (message.references.length !== 0) {
|
|
5094
|
+
writer.uint32(162).bytes(message.references);
|
|
5052
5095
|
}
|
|
5053
|
-
if (message.referenced_message !==
|
|
5054
|
-
writer.uint32(170).
|
|
5096
|
+
if (message.referenced_message.length !== 0) {
|
|
5097
|
+
writer.uint32(170).bytes(message.referenced_message);
|
|
5055
5098
|
}
|
|
5056
5099
|
if (message.create_time_seconds !== 0) {
|
|
5057
5100
|
writer.uint32(176).uint32(message.create_time_seconds);
|
|
@@ -5198,35 +5241,35 @@ export const ChannelMessage = {
|
|
|
5198
5241
|
break;
|
|
5199
5242
|
}
|
|
5200
5243
|
|
|
5201
|
-
message.reactions = reader.
|
|
5244
|
+
message.reactions = reader.bytes();
|
|
5202
5245
|
continue;
|
|
5203
5246
|
case 18:
|
|
5204
5247
|
if (tag !== 146) {
|
|
5205
5248
|
break;
|
|
5206
5249
|
}
|
|
5207
5250
|
|
|
5208
|
-
message.mentions = reader.
|
|
5251
|
+
message.mentions = reader.bytes();
|
|
5209
5252
|
continue;
|
|
5210
5253
|
case 19:
|
|
5211
5254
|
if (tag !== 154) {
|
|
5212
5255
|
break;
|
|
5213
5256
|
}
|
|
5214
5257
|
|
|
5215
|
-
message.attachments = reader.
|
|
5258
|
+
message.attachments = reader.bytes();
|
|
5216
5259
|
continue;
|
|
5217
5260
|
case 20:
|
|
5218
5261
|
if (tag !== 162) {
|
|
5219
5262
|
break;
|
|
5220
5263
|
}
|
|
5221
5264
|
|
|
5222
|
-
message.references = reader.
|
|
5265
|
+
message.references = reader.bytes();
|
|
5223
5266
|
continue;
|
|
5224
5267
|
case 21:
|
|
5225
5268
|
if (tag !== 170) {
|
|
5226
5269
|
break;
|
|
5227
5270
|
}
|
|
5228
5271
|
|
|
5229
|
-
message.referenced_message = reader.
|
|
5272
|
+
message.referenced_message = reader.bytes();
|
|
5230
5273
|
continue;
|
|
5231
5274
|
case 22:
|
|
5232
5275
|
if (tag !== 176) {
|
|
@@ -5297,11 +5340,13 @@ export const ChannelMessage = {
|
|
|
5297
5340
|
display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
5298
5341
|
clan_nick: isSet(object.clan_nick) ? globalThis.String(object.clan_nick) : "",
|
|
5299
5342
|
clan_avatar: isSet(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
|
|
5300
|
-
reactions: isSet(object.reactions) ?
|
|
5301
|
-
mentions: isSet(object.mentions) ?
|
|
5302
|
-
attachments: isSet(object.attachments) ?
|
|
5303
|
-
references: isSet(object.references) ?
|
|
5304
|
-
referenced_message: isSet(object.referenced_message)
|
|
5343
|
+
reactions: isSet(object.reactions) ? bytesFromBase64(object.reactions) : new Uint8Array(0),
|
|
5344
|
+
mentions: isSet(object.mentions) ? bytesFromBase64(object.mentions) : new Uint8Array(0),
|
|
5345
|
+
attachments: isSet(object.attachments) ? bytesFromBase64(object.attachments) : new Uint8Array(0),
|
|
5346
|
+
references: isSet(object.references) ? bytesFromBase64(object.references) : new Uint8Array(0),
|
|
5347
|
+
referenced_message: isSet(object.referenced_message)
|
|
5348
|
+
? bytesFromBase64(object.referenced_message)
|
|
5349
|
+
: new Uint8Array(0),
|
|
5305
5350
|
create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
5306
5351
|
update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
5307
5352
|
mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
@@ -5361,20 +5406,20 @@ export const ChannelMessage = {
|
|
|
5361
5406
|
if (message.clan_avatar !== "") {
|
|
5362
5407
|
obj.clan_avatar = message.clan_avatar;
|
|
5363
5408
|
}
|
|
5364
|
-
if (message.reactions !==
|
|
5365
|
-
obj.reactions = message.reactions;
|
|
5409
|
+
if (message.reactions.length !== 0) {
|
|
5410
|
+
obj.reactions = base64FromBytes(message.reactions);
|
|
5366
5411
|
}
|
|
5367
|
-
if (message.mentions !==
|
|
5368
|
-
obj.mentions = message.mentions;
|
|
5412
|
+
if (message.mentions.length !== 0) {
|
|
5413
|
+
obj.mentions = base64FromBytes(message.mentions);
|
|
5369
5414
|
}
|
|
5370
|
-
if (message.attachments !==
|
|
5371
|
-
obj.attachments = message.attachments;
|
|
5415
|
+
if (message.attachments.length !== 0) {
|
|
5416
|
+
obj.attachments = base64FromBytes(message.attachments);
|
|
5372
5417
|
}
|
|
5373
|
-
if (message.references !==
|
|
5374
|
-
obj.references = message.references;
|
|
5418
|
+
if (message.references.length !== 0) {
|
|
5419
|
+
obj.references = base64FromBytes(message.references);
|
|
5375
5420
|
}
|
|
5376
|
-
if (message.referenced_message !==
|
|
5377
|
-
obj.referenced_message = message.referenced_message;
|
|
5421
|
+
if (message.referenced_message.length !== 0) {
|
|
5422
|
+
obj.referenced_message = base64FromBytes(message.referenced_message);
|
|
5378
5423
|
}
|
|
5379
5424
|
if (message.create_time_seconds !== 0) {
|
|
5380
5425
|
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
@@ -5418,11 +5463,11 @@ export const ChannelMessage = {
|
|
|
5418
5463
|
message.display_name = object.display_name ?? "";
|
|
5419
5464
|
message.clan_nick = object.clan_nick ?? "";
|
|
5420
5465
|
message.clan_avatar = object.clan_avatar ?? "";
|
|
5421
|
-
message.reactions = object.reactions ??
|
|
5422
|
-
message.mentions = object.mentions ??
|
|
5423
|
-
message.attachments = object.attachments ??
|
|
5424
|
-
message.references = object.references ??
|
|
5425
|
-
message.referenced_message = object.referenced_message ??
|
|
5466
|
+
message.reactions = object.reactions ?? new Uint8Array(0);
|
|
5467
|
+
message.mentions = object.mentions ?? new Uint8Array(0);
|
|
5468
|
+
message.attachments = object.attachments ?? new Uint8Array(0);
|
|
5469
|
+
message.references = object.references ?? new Uint8Array(0);
|
|
5470
|
+
message.referenced_message = object.referenced_message ?? new Uint8Array(0);
|
|
5426
5471
|
message.create_time_seconds = object.create_time_seconds ?? 0;
|
|
5427
5472
|
message.update_time_seconds = object.update_time_seconds ?? 0;
|
|
5428
5473
|
message.mode = object.mode ?? 0;
|
|
@@ -9644,7 +9689,7 @@ function createBaseNotification(): Notification {
|
|
|
9644
9689
|
return {
|
|
9645
9690
|
id: "",
|
|
9646
9691
|
subject: "",
|
|
9647
|
-
content:
|
|
9692
|
+
content: new Uint8Array(0),
|
|
9648
9693
|
code: 0,
|
|
9649
9694
|
sender_id: "",
|
|
9650
9695
|
create_time: undefined,
|
|
@@ -9667,8 +9712,8 @@ export const Notification = {
|
|
|
9667
9712
|
if (message.subject !== "") {
|
|
9668
9713
|
writer.uint32(18).string(message.subject);
|
|
9669
9714
|
}
|
|
9670
|
-
if (message.content !==
|
|
9671
|
-
writer.uint32(26).
|
|
9715
|
+
if (message.content.length !== 0) {
|
|
9716
|
+
writer.uint32(26).bytes(message.content);
|
|
9672
9717
|
}
|
|
9673
9718
|
if (message.code !== 0) {
|
|
9674
9719
|
writer.uint32(32).int32(message.code);
|
|
@@ -9732,7 +9777,7 @@ export const Notification = {
|
|
|
9732
9777
|
break;
|
|
9733
9778
|
}
|
|
9734
9779
|
|
|
9735
|
-
message.content = reader.
|
|
9780
|
+
message.content = reader.bytes();
|
|
9736
9781
|
continue;
|
|
9737
9782
|
case 4:
|
|
9738
9783
|
if (tag !== 32) {
|
|
@@ -9824,7 +9869,7 @@ export const Notification = {
|
|
|
9824
9869
|
return {
|
|
9825
9870
|
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
9826
9871
|
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
9827
|
-
content: isSet(object.content) ?
|
|
9872
|
+
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0),
|
|
9828
9873
|
code: isSet(object.code) ? globalThis.Number(object.code) : 0,
|
|
9829
9874
|
sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
9830
9875
|
create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
|
|
@@ -9847,8 +9892,8 @@ export const Notification = {
|
|
|
9847
9892
|
if (message.subject !== "") {
|
|
9848
9893
|
obj.subject = message.subject;
|
|
9849
9894
|
}
|
|
9850
|
-
if (message.content !==
|
|
9851
|
-
obj.content = message.content;
|
|
9895
|
+
if (message.content.length !== 0) {
|
|
9896
|
+
obj.content = base64FromBytes(message.content);
|
|
9852
9897
|
}
|
|
9853
9898
|
if (message.code !== 0) {
|
|
9854
9899
|
obj.code = Math.round(message.code);
|
|
@@ -9893,7 +9938,7 @@ export const Notification = {
|
|
|
9893
9938
|
const message = createBaseNotification();
|
|
9894
9939
|
message.id = object.id ?? "";
|
|
9895
9940
|
message.subject = object.subject ?? "";
|
|
9896
|
-
message.content = object.content ??
|
|
9941
|
+
message.content = object.content ?? new Uint8Array(0);
|
|
9897
9942
|
message.code = object.code ?? 0;
|
|
9898
9943
|
message.sender_id = object.sender_id ?? "";
|
|
9899
9944
|
message.create_time = object.create_time ?? undefined;
|
|
@@ -10524,7 +10569,7 @@ export const Session = {
|
|
|
10524
10569
|
};
|
|
10525
10570
|
|
|
10526
10571
|
function createBaseUpdateUsernameRequest(): UpdateUsernameRequest {
|
|
10527
|
-
return { username: "" };
|
|
10572
|
+
return { username: "", display_name: "" };
|
|
10528
10573
|
}
|
|
10529
10574
|
|
|
10530
10575
|
export const UpdateUsernameRequest = {
|
|
@@ -10532,6 +10577,9 @@ export const UpdateUsernameRequest = {
|
|
|
10532
10577
|
if (message.username !== "") {
|
|
10533
10578
|
writer.uint32(10).string(message.username);
|
|
10534
10579
|
}
|
|
10580
|
+
if (message.display_name !== "") {
|
|
10581
|
+
writer.uint32(18).string(message.display_name);
|
|
10582
|
+
}
|
|
10535
10583
|
return writer;
|
|
10536
10584
|
},
|
|
10537
10585
|
|
|
@@ -10549,6 +10597,13 @@ export const UpdateUsernameRequest = {
|
|
|
10549
10597
|
|
|
10550
10598
|
message.username = reader.string();
|
|
10551
10599
|
continue;
|
|
10600
|
+
case 2:
|
|
10601
|
+
if (tag !== 18) {
|
|
10602
|
+
break;
|
|
10603
|
+
}
|
|
10604
|
+
|
|
10605
|
+
message.display_name = reader.string();
|
|
10606
|
+
continue;
|
|
10552
10607
|
}
|
|
10553
10608
|
if ((tag & 7) === 4 || tag === 0) {
|
|
10554
10609
|
break;
|
|
@@ -10559,7 +10614,10 @@ export const UpdateUsernameRequest = {
|
|
|
10559
10614
|
},
|
|
10560
10615
|
|
|
10561
10616
|
fromJSON(object: any): UpdateUsernameRequest {
|
|
10562
|
-
return {
|
|
10617
|
+
return {
|
|
10618
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
10619
|
+
display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
10620
|
+
};
|
|
10563
10621
|
},
|
|
10564
10622
|
|
|
10565
10623
|
toJSON(message: UpdateUsernameRequest): unknown {
|
|
@@ -10567,6 +10625,9 @@ export const UpdateUsernameRequest = {
|
|
|
10567
10625
|
if (message.username !== "") {
|
|
10568
10626
|
obj.username = message.username;
|
|
10569
10627
|
}
|
|
10628
|
+
if (message.display_name !== "") {
|
|
10629
|
+
obj.display_name = message.display_name;
|
|
10630
|
+
}
|
|
10570
10631
|
return obj;
|
|
10571
10632
|
},
|
|
10572
10633
|
|
|
@@ -10576,6 +10637,7 @@ export const UpdateUsernameRequest = {
|
|
|
10576
10637
|
fromPartial<I extends Exact<DeepPartial<UpdateUsernameRequest>, I>>(object: I): UpdateUsernameRequest {
|
|
10577
10638
|
const message = createBaseUpdateUsernameRequest();
|
|
10578
10639
|
message.username = object.username ?? "";
|
|
10640
|
+
message.display_name = object.display_name ?? "";
|
|
10579
10641
|
return message;
|
|
10580
10642
|
},
|
|
10581
10643
|
};
|
|
@@ -14493,10 +14555,10 @@ function createBaseChannelMessageHeader(): ChannelMessageHeader {
|
|
|
14493
14555
|
timestamp_seconds: 0,
|
|
14494
14556
|
sender_id: "",
|
|
14495
14557
|
content: "",
|
|
14496
|
-
attachment:
|
|
14497
|
-
reference:
|
|
14498
|
-
mention:
|
|
14499
|
-
reaction:
|
|
14558
|
+
attachment: new Uint8Array(0),
|
|
14559
|
+
reference: new Uint8Array(0),
|
|
14560
|
+
mention: new Uint8Array(0),
|
|
14561
|
+
reaction: new Uint8Array(0),
|
|
14500
14562
|
};
|
|
14501
14563
|
}
|
|
14502
14564
|
|
|
@@ -14514,17 +14576,17 @@ export const ChannelMessageHeader = {
|
|
|
14514
14576
|
if (message.content !== "") {
|
|
14515
14577
|
writer.uint32(34).string(message.content);
|
|
14516
14578
|
}
|
|
14517
|
-
if (message.attachment !==
|
|
14518
|
-
writer.uint32(42).
|
|
14579
|
+
if (message.attachment.length !== 0) {
|
|
14580
|
+
writer.uint32(42).bytes(message.attachment);
|
|
14519
14581
|
}
|
|
14520
|
-
if (message.reference !==
|
|
14521
|
-
writer.uint32(50).
|
|
14582
|
+
if (message.reference.length !== 0) {
|
|
14583
|
+
writer.uint32(50).bytes(message.reference);
|
|
14522
14584
|
}
|
|
14523
|
-
if (message.mention !==
|
|
14524
|
-
writer.uint32(58).
|
|
14585
|
+
if (message.mention.length !== 0) {
|
|
14586
|
+
writer.uint32(58).bytes(message.mention);
|
|
14525
14587
|
}
|
|
14526
|
-
if (message.reaction !==
|
|
14527
|
-
writer.uint32(66).
|
|
14588
|
+
if (message.reaction.length !== 0) {
|
|
14589
|
+
writer.uint32(66).bytes(message.reaction);
|
|
14528
14590
|
}
|
|
14529
14591
|
return writer;
|
|
14530
14592
|
},
|
|
@@ -14569,28 +14631,28 @@ export const ChannelMessageHeader = {
|
|
|
14569
14631
|
break;
|
|
14570
14632
|
}
|
|
14571
14633
|
|
|
14572
|
-
message.attachment = reader.
|
|
14634
|
+
message.attachment = reader.bytes();
|
|
14573
14635
|
continue;
|
|
14574
14636
|
case 6:
|
|
14575
14637
|
if (tag !== 50) {
|
|
14576
14638
|
break;
|
|
14577
14639
|
}
|
|
14578
14640
|
|
|
14579
|
-
message.reference = reader.
|
|
14641
|
+
message.reference = reader.bytes();
|
|
14580
14642
|
continue;
|
|
14581
14643
|
case 7:
|
|
14582
14644
|
if (tag !== 58) {
|
|
14583
14645
|
break;
|
|
14584
14646
|
}
|
|
14585
14647
|
|
|
14586
|
-
message.mention = reader.
|
|
14648
|
+
message.mention = reader.bytes();
|
|
14587
14649
|
continue;
|
|
14588
14650
|
case 8:
|
|
14589
14651
|
if (tag !== 66) {
|
|
14590
14652
|
break;
|
|
14591
14653
|
}
|
|
14592
14654
|
|
|
14593
|
-
message.reaction = reader.
|
|
14655
|
+
message.reaction = reader.bytes();
|
|
14594
14656
|
continue;
|
|
14595
14657
|
}
|
|
14596
14658
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -14607,10 +14669,10 @@ export const ChannelMessageHeader = {
|
|
|
14607
14669
|
timestamp_seconds: isSet(object.timestamp_seconds) ? globalThis.Number(object.timestamp_seconds) : 0,
|
|
14608
14670
|
sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
14609
14671
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
14610
|
-
attachment: isSet(object.attachment) ?
|
|
14611
|
-
reference: isSet(object.reference) ?
|
|
14612
|
-
mention: isSet(object.mention) ?
|
|
14613
|
-
reaction: isSet(object.reaction) ?
|
|
14672
|
+
attachment: isSet(object.attachment) ? bytesFromBase64(object.attachment) : new Uint8Array(0),
|
|
14673
|
+
reference: isSet(object.reference) ? bytesFromBase64(object.reference) : new Uint8Array(0),
|
|
14674
|
+
mention: isSet(object.mention) ? bytesFromBase64(object.mention) : new Uint8Array(0),
|
|
14675
|
+
reaction: isSet(object.reaction) ? bytesFromBase64(object.reaction) : new Uint8Array(0),
|
|
14614
14676
|
};
|
|
14615
14677
|
},
|
|
14616
14678
|
|
|
@@ -14628,17 +14690,17 @@ export const ChannelMessageHeader = {
|
|
|
14628
14690
|
if (message.content !== "") {
|
|
14629
14691
|
obj.content = message.content;
|
|
14630
14692
|
}
|
|
14631
|
-
if (message.attachment !==
|
|
14632
|
-
obj.attachment = message.attachment;
|
|
14693
|
+
if (message.attachment.length !== 0) {
|
|
14694
|
+
obj.attachment = base64FromBytes(message.attachment);
|
|
14633
14695
|
}
|
|
14634
|
-
if (message.reference !==
|
|
14635
|
-
obj.reference = message.reference;
|
|
14696
|
+
if (message.reference.length !== 0) {
|
|
14697
|
+
obj.reference = base64FromBytes(message.reference);
|
|
14636
14698
|
}
|
|
14637
|
-
if (message.mention !==
|
|
14638
|
-
obj.mention = message.mention;
|
|
14699
|
+
if (message.mention.length !== 0) {
|
|
14700
|
+
obj.mention = base64FromBytes(message.mention);
|
|
14639
14701
|
}
|
|
14640
|
-
if (message.reaction !==
|
|
14641
|
-
obj.reaction = message.reaction;
|
|
14702
|
+
if (message.reaction.length !== 0) {
|
|
14703
|
+
obj.reaction = base64FromBytes(message.reaction);
|
|
14642
14704
|
}
|
|
14643
14705
|
return obj;
|
|
14644
14706
|
},
|
|
@@ -14652,10 +14714,10 @@ export const ChannelMessageHeader = {
|
|
|
14652
14714
|
message.timestamp_seconds = object.timestamp_seconds ?? 0;
|
|
14653
14715
|
message.sender_id = object.sender_id ?? "";
|
|
14654
14716
|
message.content = object.content ?? "";
|
|
14655
|
-
message.attachment = object.attachment ??
|
|
14656
|
-
message.reference = object.reference ??
|
|
14657
|
-
message.mention = object.mention ??
|
|
14658
|
-
message.reaction = object.reaction ??
|
|
14717
|
+
message.attachment = object.attachment ?? new Uint8Array(0);
|
|
14718
|
+
message.reference = object.reference ?? new Uint8Array(0);
|
|
14719
|
+
message.mention = object.mention ?? new Uint8Array(0);
|
|
14720
|
+
message.reaction = object.reaction ?? new Uint8Array(0);
|
|
14659
14721
|
return message;
|
|
14660
14722
|
},
|
|
14661
14723
|
};
|
|
@@ -15226,11 +15288,72 @@ export const ChannelDescription = {
|
|
|
15226
15288
|
};
|
|
15227
15289
|
|
|
15228
15290
|
function createBaseChannelDescList(): ChannelDescList {
|
|
15229
|
-
return { channeldesc: []
|
|
15291
|
+
return { channeldesc: [] };
|
|
15230
15292
|
}
|
|
15231
15293
|
|
|
15232
15294
|
export const ChannelDescList = {
|
|
15233
15295
|
encode(message: ChannelDescList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
15296
|
+
for (const v of message.channeldesc) {
|
|
15297
|
+
ChannelDescription.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
15298
|
+
}
|
|
15299
|
+
return writer;
|
|
15300
|
+
},
|
|
15301
|
+
|
|
15302
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescList {
|
|
15303
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
15304
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
15305
|
+
const message = createBaseChannelDescList();
|
|
15306
|
+
while (reader.pos < end) {
|
|
15307
|
+
const tag = reader.uint32();
|
|
15308
|
+
switch (tag >>> 3) {
|
|
15309
|
+
case 1:
|
|
15310
|
+
if (tag !== 10) {
|
|
15311
|
+
break;
|
|
15312
|
+
}
|
|
15313
|
+
|
|
15314
|
+
message.channeldesc.push(ChannelDescription.decode(reader, reader.uint32()));
|
|
15315
|
+
continue;
|
|
15316
|
+
}
|
|
15317
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15318
|
+
break;
|
|
15319
|
+
}
|
|
15320
|
+
reader.skipType(tag & 7);
|
|
15321
|
+
}
|
|
15322
|
+
return message;
|
|
15323
|
+
},
|
|
15324
|
+
|
|
15325
|
+
fromJSON(object: any): ChannelDescList {
|
|
15326
|
+
return {
|
|
15327
|
+
channeldesc: globalThis.Array.isArray(object?.channeldesc)
|
|
15328
|
+
? object.channeldesc.map((e: any) => ChannelDescription.fromJSON(e))
|
|
15329
|
+
: [],
|
|
15330
|
+
};
|
|
15331
|
+
},
|
|
15332
|
+
|
|
15333
|
+
toJSON(message: ChannelDescList): unknown {
|
|
15334
|
+
const obj: any = {};
|
|
15335
|
+
if (message.channeldesc?.length) {
|
|
15336
|
+
obj.channeldesc = message.channeldesc.map((e) => ChannelDescription.toJSON(e));
|
|
15337
|
+
}
|
|
15338
|
+
return obj;
|
|
15339
|
+
},
|
|
15340
|
+
|
|
15341
|
+
create<I extends Exact<DeepPartial<ChannelDescList>, I>>(base?: I): ChannelDescList {
|
|
15342
|
+
return ChannelDescList.fromPartial(base ?? ({} as any));
|
|
15343
|
+
},
|
|
15344
|
+
fromPartial<I extends Exact<DeepPartial<ChannelDescList>, I>>(object: I): ChannelDescList {
|
|
15345
|
+
const message = createBaseChannelDescList();
|
|
15346
|
+
message.channeldesc = object.channeldesc?.map((e) => ChannelDescription.fromPartial(e)) || [];
|
|
15347
|
+
return message;
|
|
15348
|
+
},
|
|
15349
|
+
};
|
|
15350
|
+
|
|
15351
|
+
function createBaseChannelDescListNoPool(): ChannelDescListNoPool {
|
|
15352
|
+
return { channeldesc: [], page: 0 };
|
|
15353
|
+
}
|
|
15354
|
+
|
|
15355
|
+
export const ChannelDescListNoPool = {
|
|
15356
|
+
encode(message: ChannelDescListNoPool, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
15234
15357
|
for (const v of message.channeldesc) {
|
|
15235
15358
|
ChannelDescription.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
15236
15359
|
}
|
|
@@ -15240,10 +15363,10 @@ export const ChannelDescList = {
|
|
|
15240
15363
|
return writer;
|
|
15241
15364
|
},
|
|
15242
15365
|
|
|
15243
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
15366
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescListNoPool {
|
|
15244
15367
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
15245
15368
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
15246
|
-
const message =
|
|
15369
|
+
const message = createBaseChannelDescListNoPool();
|
|
15247
15370
|
while (reader.pos < end) {
|
|
15248
15371
|
const tag = reader.uint32();
|
|
15249
15372
|
switch (tag >>> 3) {
|
|
@@ -15270,7 +15393,7 @@ export const ChannelDescList = {
|
|
|
15270
15393
|
return message;
|
|
15271
15394
|
},
|
|
15272
15395
|
|
|
15273
|
-
fromJSON(object: any):
|
|
15396
|
+
fromJSON(object: any): ChannelDescListNoPool {
|
|
15274
15397
|
return {
|
|
15275
15398
|
channeldesc: globalThis.Array.isArray(object?.channeldesc)
|
|
15276
15399
|
? object.channeldesc.map((e: any) => ChannelDescription.fromJSON(e))
|
|
@@ -15279,7 +15402,7 @@ export const ChannelDescList = {
|
|
|
15279
15402
|
};
|
|
15280
15403
|
},
|
|
15281
15404
|
|
|
15282
|
-
toJSON(message:
|
|
15405
|
+
toJSON(message: ChannelDescListNoPool): unknown {
|
|
15283
15406
|
const obj: any = {};
|
|
15284
15407
|
if (message.channeldesc?.length) {
|
|
15285
15408
|
obj.channeldesc = message.channeldesc.map((e) => ChannelDescription.toJSON(e));
|
|
@@ -15290,11 +15413,11 @@ export const ChannelDescList = {
|
|
|
15290
15413
|
return obj;
|
|
15291
15414
|
},
|
|
15292
15415
|
|
|
15293
|
-
create<I extends Exact<DeepPartial<
|
|
15294
|
-
return
|
|
15416
|
+
create<I extends Exact<DeepPartial<ChannelDescListNoPool>, I>>(base?: I): ChannelDescListNoPool {
|
|
15417
|
+
return ChannelDescListNoPool.fromPartial(base ?? ({} as any));
|
|
15295
15418
|
},
|
|
15296
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
15297
|
-
const message =
|
|
15419
|
+
fromPartial<I extends Exact<DeepPartial<ChannelDescListNoPool>, I>>(object: I): ChannelDescListNoPool {
|
|
15420
|
+
const message = createBaseChannelDescListNoPool();
|
|
15298
15421
|
message.channeldesc = object.channeldesc?.map((e) => ChannelDescription.fromPartial(e)) || [];
|
|
15299
15422
|
message.page = object.page ?? 0;
|
|
15300
15423
|
return message;
|
|
@@ -37366,10 +37489,10 @@ function createBaseMessage2InboxRequest(): Message2InboxRequest {
|
|
|
37366
37489
|
clan_id: "",
|
|
37367
37490
|
avatar: "",
|
|
37368
37491
|
content: "",
|
|
37369
|
-
mentions:
|
|
37370
|
-
attachments:
|
|
37371
|
-
reactions:
|
|
37372
|
-
references:
|
|
37492
|
+
mentions: new Uint8Array(0),
|
|
37493
|
+
attachments: new Uint8Array(0),
|
|
37494
|
+
reactions: new Uint8Array(0),
|
|
37495
|
+
references: new Uint8Array(0),
|
|
37373
37496
|
};
|
|
37374
37497
|
}
|
|
37375
37498
|
|
|
@@ -37390,17 +37513,17 @@ export const Message2InboxRequest = {
|
|
|
37390
37513
|
if (message.content !== "") {
|
|
37391
37514
|
writer.uint32(42).string(message.content);
|
|
37392
37515
|
}
|
|
37393
|
-
if (message.mentions !==
|
|
37394
|
-
writer.uint32(50).
|
|
37516
|
+
if (message.mentions.length !== 0) {
|
|
37517
|
+
writer.uint32(50).bytes(message.mentions);
|
|
37395
37518
|
}
|
|
37396
|
-
if (message.attachments !==
|
|
37397
|
-
writer.uint32(58).
|
|
37519
|
+
if (message.attachments.length !== 0) {
|
|
37520
|
+
writer.uint32(58).bytes(message.attachments);
|
|
37398
37521
|
}
|
|
37399
|
-
if (message.reactions !==
|
|
37400
|
-
writer.uint32(66).
|
|
37522
|
+
if (message.reactions.length !== 0) {
|
|
37523
|
+
writer.uint32(66).bytes(message.reactions);
|
|
37401
37524
|
}
|
|
37402
|
-
if (message.references !==
|
|
37403
|
-
writer.uint32(74).
|
|
37525
|
+
if (message.references.length !== 0) {
|
|
37526
|
+
writer.uint32(74).bytes(message.references);
|
|
37404
37527
|
}
|
|
37405
37528
|
return writer;
|
|
37406
37529
|
},
|
|
@@ -37452,28 +37575,28 @@ export const Message2InboxRequest = {
|
|
|
37452
37575
|
break;
|
|
37453
37576
|
}
|
|
37454
37577
|
|
|
37455
|
-
message.mentions = reader.
|
|
37578
|
+
message.mentions = reader.bytes();
|
|
37456
37579
|
continue;
|
|
37457
37580
|
case 7:
|
|
37458
37581
|
if (tag !== 58) {
|
|
37459
37582
|
break;
|
|
37460
37583
|
}
|
|
37461
37584
|
|
|
37462
|
-
message.attachments = reader.
|
|
37585
|
+
message.attachments = reader.bytes();
|
|
37463
37586
|
continue;
|
|
37464
37587
|
case 8:
|
|
37465
37588
|
if (tag !== 66) {
|
|
37466
37589
|
break;
|
|
37467
37590
|
}
|
|
37468
37591
|
|
|
37469
|
-
message.reactions = reader.
|
|
37592
|
+
message.reactions = reader.bytes();
|
|
37470
37593
|
continue;
|
|
37471
37594
|
case 9:
|
|
37472
37595
|
if (tag !== 74) {
|
|
37473
37596
|
break;
|
|
37474
37597
|
}
|
|
37475
37598
|
|
|
37476
|
-
message.references = reader.
|
|
37599
|
+
message.references = reader.bytes();
|
|
37477
37600
|
continue;
|
|
37478
37601
|
}
|
|
37479
37602
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -37491,10 +37614,10 @@ export const Message2InboxRequest = {
|
|
|
37491
37614
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
37492
37615
|
avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
37493
37616
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
37494
|
-
mentions: isSet(object.mentions) ?
|
|
37495
|
-
attachments: isSet(object.attachments) ?
|
|
37496
|
-
reactions: isSet(object.reactions) ?
|
|
37497
|
-
references: isSet(object.references) ?
|
|
37617
|
+
mentions: isSet(object.mentions) ? bytesFromBase64(object.mentions) : new Uint8Array(0),
|
|
37618
|
+
attachments: isSet(object.attachments) ? bytesFromBase64(object.attachments) : new Uint8Array(0),
|
|
37619
|
+
reactions: isSet(object.reactions) ? bytesFromBase64(object.reactions) : new Uint8Array(0),
|
|
37620
|
+
references: isSet(object.references) ? bytesFromBase64(object.references) : new Uint8Array(0),
|
|
37498
37621
|
};
|
|
37499
37622
|
},
|
|
37500
37623
|
|
|
@@ -37515,17 +37638,17 @@ export const Message2InboxRequest = {
|
|
|
37515
37638
|
if (message.content !== "") {
|
|
37516
37639
|
obj.content = message.content;
|
|
37517
37640
|
}
|
|
37518
|
-
if (message.mentions !==
|
|
37519
|
-
obj.mentions = message.mentions;
|
|
37641
|
+
if (message.mentions.length !== 0) {
|
|
37642
|
+
obj.mentions = base64FromBytes(message.mentions);
|
|
37520
37643
|
}
|
|
37521
|
-
if (message.attachments !==
|
|
37522
|
-
obj.attachments = message.attachments;
|
|
37644
|
+
if (message.attachments.length !== 0) {
|
|
37645
|
+
obj.attachments = base64FromBytes(message.attachments);
|
|
37523
37646
|
}
|
|
37524
|
-
if (message.reactions !==
|
|
37525
|
-
obj.reactions = message.reactions;
|
|
37647
|
+
if (message.reactions.length !== 0) {
|
|
37648
|
+
obj.reactions = base64FromBytes(message.reactions);
|
|
37526
37649
|
}
|
|
37527
|
-
if (message.references !==
|
|
37528
|
-
obj.references = message.references;
|
|
37650
|
+
if (message.references.length !== 0) {
|
|
37651
|
+
obj.references = base64FromBytes(message.references);
|
|
37529
37652
|
}
|
|
37530
37653
|
return obj;
|
|
37531
37654
|
},
|
|
@@ -37540,10 +37663,10 @@ export const Message2InboxRequest = {
|
|
|
37540
37663
|
message.clan_id = object.clan_id ?? "";
|
|
37541
37664
|
message.avatar = object.avatar ?? "";
|
|
37542
37665
|
message.content = object.content ?? "";
|
|
37543
|
-
message.mentions = object.mentions ??
|
|
37544
|
-
message.attachments = object.attachments ??
|
|
37545
|
-
message.reactions = object.reactions ??
|
|
37546
|
-
message.references = object.references ??
|
|
37666
|
+
message.mentions = object.mentions ?? new Uint8Array(0);
|
|
37667
|
+
message.attachments = object.attachments ?? new Uint8Array(0);
|
|
37668
|
+
message.reactions = object.reactions ?? new Uint8Array(0);
|
|
37669
|
+
message.references = object.references ?? new Uint8Array(0);
|
|
37547
37670
|
return message;
|
|
37548
37671
|
},
|
|
37549
37672
|
};
|
|
@@ -39102,6 +39225,552 @@ export const LogedDevice = {
|
|
|
39102
39225
|
},
|
|
39103
39226
|
};
|
|
39104
39227
|
|
|
39228
|
+
function createBaseDirectFcmProto(): DirectFcmProto {
|
|
39229
|
+
return {
|
|
39230
|
+
title: "",
|
|
39231
|
+
link: "",
|
|
39232
|
+
content: "",
|
|
39233
|
+
channel_id: "",
|
|
39234
|
+
sender_id: "",
|
|
39235
|
+
avatar: "",
|
|
39236
|
+
clan_id: "",
|
|
39237
|
+
attachments: new Uint8Array(0),
|
|
39238
|
+
display_name: "",
|
|
39239
|
+
create_time_seconds: 0,
|
|
39240
|
+
update_time_seconds: 0,
|
|
39241
|
+
username: "",
|
|
39242
|
+
mentions: new Uint8Array(0),
|
|
39243
|
+
};
|
|
39244
|
+
}
|
|
39245
|
+
|
|
39246
|
+
export const DirectFcmProto = {
|
|
39247
|
+
encode(message: DirectFcmProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
39248
|
+
if (message.title !== "") {
|
|
39249
|
+
writer.uint32(10).string(message.title);
|
|
39250
|
+
}
|
|
39251
|
+
if (message.link !== "") {
|
|
39252
|
+
writer.uint32(18).string(message.link);
|
|
39253
|
+
}
|
|
39254
|
+
if (message.content !== "") {
|
|
39255
|
+
writer.uint32(26).string(message.content);
|
|
39256
|
+
}
|
|
39257
|
+
if (message.channel_id !== "") {
|
|
39258
|
+
writer.uint32(34).string(message.channel_id);
|
|
39259
|
+
}
|
|
39260
|
+
if (message.sender_id !== "") {
|
|
39261
|
+
writer.uint32(42).string(message.sender_id);
|
|
39262
|
+
}
|
|
39263
|
+
if (message.avatar !== "") {
|
|
39264
|
+
writer.uint32(50).string(message.avatar);
|
|
39265
|
+
}
|
|
39266
|
+
if (message.clan_id !== "") {
|
|
39267
|
+
writer.uint32(58).string(message.clan_id);
|
|
39268
|
+
}
|
|
39269
|
+
if (message.attachments.length !== 0) {
|
|
39270
|
+
writer.uint32(66).bytes(message.attachments);
|
|
39271
|
+
}
|
|
39272
|
+
if (message.display_name !== "") {
|
|
39273
|
+
writer.uint32(74).string(message.display_name);
|
|
39274
|
+
}
|
|
39275
|
+
if (message.create_time_seconds !== 0) {
|
|
39276
|
+
writer.uint32(80).int32(message.create_time_seconds);
|
|
39277
|
+
}
|
|
39278
|
+
if (message.update_time_seconds !== 0) {
|
|
39279
|
+
writer.uint32(88).int32(message.update_time_seconds);
|
|
39280
|
+
}
|
|
39281
|
+
if (message.username !== "") {
|
|
39282
|
+
writer.uint32(98).string(message.username);
|
|
39283
|
+
}
|
|
39284
|
+
if (message.mentions.length !== 0) {
|
|
39285
|
+
writer.uint32(106).bytes(message.mentions);
|
|
39286
|
+
}
|
|
39287
|
+
return writer;
|
|
39288
|
+
},
|
|
39289
|
+
|
|
39290
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DirectFcmProto {
|
|
39291
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39292
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39293
|
+
const message = createBaseDirectFcmProto();
|
|
39294
|
+
while (reader.pos < end) {
|
|
39295
|
+
const tag = reader.uint32();
|
|
39296
|
+
switch (tag >>> 3) {
|
|
39297
|
+
case 1:
|
|
39298
|
+
if (tag !== 10) {
|
|
39299
|
+
break;
|
|
39300
|
+
}
|
|
39301
|
+
|
|
39302
|
+
message.title = reader.string();
|
|
39303
|
+
continue;
|
|
39304
|
+
case 2:
|
|
39305
|
+
if (tag !== 18) {
|
|
39306
|
+
break;
|
|
39307
|
+
}
|
|
39308
|
+
|
|
39309
|
+
message.link = reader.string();
|
|
39310
|
+
continue;
|
|
39311
|
+
case 3:
|
|
39312
|
+
if (tag !== 26) {
|
|
39313
|
+
break;
|
|
39314
|
+
}
|
|
39315
|
+
|
|
39316
|
+
message.content = reader.string();
|
|
39317
|
+
continue;
|
|
39318
|
+
case 4:
|
|
39319
|
+
if (tag !== 34) {
|
|
39320
|
+
break;
|
|
39321
|
+
}
|
|
39322
|
+
|
|
39323
|
+
message.channel_id = reader.string();
|
|
39324
|
+
continue;
|
|
39325
|
+
case 5:
|
|
39326
|
+
if (tag !== 42) {
|
|
39327
|
+
break;
|
|
39328
|
+
}
|
|
39329
|
+
|
|
39330
|
+
message.sender_id = reader.string();
|
|
39331
|
+
continue;
|
|
39332
|
+
case 6:
|
|
39333
|
+
if (tag !== 50) {
|
|
39334
|
+
break;
|
|
39335
|
+
}
|
|
39336
|
+
|
|
39337
|
+
message.avatar = reader.string();
|
|
39338
|
+
continue;
|
|
39339
|
+
case 7:
|
|
39340
|
+
if (tag !== 58) {
|
|
39341
|
+
break;
|
|
39342
|
+
}
|
|
39343
|
+
|
|
39344
|
+
message.clan_id = reader.string();
|
|
39345
|
+
continue;
|
|
39346
|
+
case 8:
|
|
39347
|
+
if (tag !== 66) {
|
|
39348
|
+
break;
|
|
39349
|
+
}
|
|
39350
|
+
|
|
39351
|
+
message.attachments = reader.bytes();
|
|
39352
|
+
continue;
|
|
39353
|
+
case 9:
|
|
39354
|
+
if (tag !== 74) {
|
|
39355
|
+
break;
|
|
39356
|
+
}
|
|
39357
|
+
|
|
39358
|
+
message.display_name = reader.string();
|
|
39359
|
+
continue;
|
|
39360
|
+
case 10:
|
|
39361
|
+
if (tag !== 80) {
|
|
39362
|
+
break;
|
|
39363
|
+
}
|
|
39364
|
+
|
|
39365
|
+
message.create_time_seconds = reader.int32();
|
|
39366
|
+
continue;
|
|
39367
|
+
case 11:
|
|
39368
|
+
if (tag !== 88) {
|
|
39369
|
+
break;
|
|
39370
|
+
}
|
|
39371
|
+
|
|
39372
|
+
message.update_time_seconds = reader.int32();
|
|
39373
|
+
continue;
|
|
39374
|
+
case 12:
|
|
39375
|
+
if (tag !== 98) {
|
|
39376
|
+
break;
|
|
39377
|
+
}
|
|
39378
|
+
|
|
39379
|
+
message.username = reader.string();
|
|
39380
|
+
continue;
|
|
39381
|
+
case 13:
|
|
39382
|
+
if (tag !== 106) {
|
|
39383
|
+
break;
|
|
39384
|
+
}
|
|
39385
|
+
|
|
39386
|
+
message.mentions = reader.bytes();
|
|
39387
|
+
continue;
|
|
39388
|
+
}
|
|
39389
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39390
|
+
break;
|
|
39391
|
+
}
|
|
39392
|
+
reader.skipType(tag & 7);
|
|
39393
|
+
}
|
|
39394
|
+
return message;
|
|
39395
|
+
},
|
|
39396
|
+
|
|
39397
|
+
fromJSON(object: any): DirectFcmProto {
|
|
39398
|
+
return {
|
|
39399
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
39400
|
+
link: isSet(object.link) ? globalThis.String(object.link) : "",
|
|
39401
|
+
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
39402
|
+
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
39403
|
+
sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
39404
|
+
avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
39405
|
+
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
39406
|
+
attachments: isSet(object.attachments) ? bytesFromBase64(object.attachments) : new Uint8Array(0),
|
|
39407
|
+
display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
39408
|
+
create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
39409
|
+
update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
39410
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
39411
|
+
mentions: isSet(object.mentions) ? bytesFromBase64(object.mentions) : new Uint8Array(0),
|
|
39412
|
+
};
|
|
39413
|
+
},
|
|
39414
|
+
|
|
39415
|
+
toJSON(message: DirectFcmProto): unknown {
|
|
39416
|
+
const obj: any = {};
|
|
39417
|
+
if (message.title !== "") {
|
|
39418
|
+
obj.title = message.title;
|
|
39419
|
+
}
|
|
39420
|
+
if (message.link !== "") {
|
|
39421
|
+
obj.link = message.link;
|
|
39422
|
+
}
|
|
39423
|
+
if (message.content !== "") {
|
|
39424
|
+
obj.content = message.content;
|
|
39425
|
+
}
|
|
39426
|
+
if (message.channel_id !== "") {
|
|
39427
|
+
obj.channel_id = message.channel_id;
|
|
39428
|
+
}
|
|
39429
|
+
if (message.sender_id !== "") {
|
|
39430
|
+
obj.sender_id = message.sender_id;
|
|
39431
|
+
}
|
|
39432
|
+
if (message.avatar !== "") {
|
|
39433
|
+
obj.avatar = message.avatar;
|
|
39434
|
+
}
|
|
39435
|
+
if (message.clan_id !== "") {
|
|
39436
|
+
obj.clan_id = message.clan_id;
|
|
39437
|
+
}
|
|
39438
|
+
if (message.attachments.length !== 0) {
|
|
39439
|
+
obj.attachments = base64FromBytes(message.attachments);
|
|
39440
|
+
}
|
|
39441
|
+
if (message.display_name !== "") {
|
|
39442
|
+
obj.display_name = message.display_name;
|
|
39443
|
+
}
|
|
39444
|
+
if (message.create_time_seconds !== 0) {
|
|
39445
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
39446
|
+
}
|
|
39447
|
+
if (message.update_time_seconds !== 0) {
|
|
39448
|
+
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
39449
|
+
}
|
|
39450
|
+
if (message.username !== "") {
|
|
39451
|
+
obj.username = message.username;
|
|
39452
|
+
}
|
|
39453
|
+
if (message.mentions.length !== 0) {
|
|
39454
|
+
obj.mentions = base64FromBytes(message.mentions);
|
|
39455
|
+
}
|
|
39456
|
+
return obj;
|
|
39457
|
+
},
|
|
39458
|
+
|
|
39459
|
+
create<I extends Exact<DeepPartial<DirectFcmProto>, I>>(base?: I): DirectFcmProto {
|
|
39460
|
+
return DirectFcmProto.fromPartial(base ?? ({} as any));
|
|
39461
|
+
},
|
|
39462
|
+
fromPartial<I extends Exact<DeepPartial<DirectFcmProto>, I>>(object: I): DirectFcmProto {
|
|
39463
|
+
const message = createBaseDirectFcmProto();
|
|
39464
|
+
message.title = object.title ?? "";
|
|
39465
|
+
message.link = object.link ?? "";
|
|
39466
|
+
message.content = object.content ?? "";
|
|
39467
|
+
message.channel_id = object.channel_id ?? "";
|
|
39468
|
+
message.sender_id = object.sender_id ?? "";
|
|
39469
|
+
message.avatar = object.avatar ?? "";
|
|
39470
|
+
message.clan_id = object.clan_id ?? "";
|
|
39471
|
+
message.attachments = object.attachments ?? new Uint8Array(0);
|
|
39472
|
+
message.display_name = object.display_name ?? "";
|
|
39473
|
+
message.create_time_seconds = object.create_time_seconds ?? 0;
|
|
39474
|
+
message.update_time_seconds = object.update_time_seconds ?? 0;
|
|
39475
|
+
message.username = object.username ?? "";
|
|
39476
|
+
message.mentions = object.mentions ?? new Uint8Array(0);
|
|
39477
|
+
return message;
|
|
39478
|
+
},
|
|
39479
|
+
};
|
|
39480
|
+
|
|
39481
|
+
function createBaseMessageMentionList(): MessageMentionList {
|
|
39482
|
+
return { mentions: [] };
|
|
39483
|
+
}
|
|
39484
|
+
|
|
39485
|
+
export const MessageMentionList = {
|
|
39486
|
+
encode(message: MessageMentionList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
39487
|
+
for (const v of message.mentions) {
|
|
39488
|
+
MessageMention.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
39489
|
+
}
|
|
39490
|
+
return writer;
|
|
39491
|
+
},
|
|
39492
|
+
|
|
39493
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MessageMentionList {
|
|
39494
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39495
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39496
|
+
const message = createBaseMessageMentionList();
|
|
39497
|
+
while (reader.pos < end) {
|
|
39498
|
+
const tag = reader.uint32();
|
|
39499
|
+
switch (tag >>> 3) {
|
|
39500
|
+
case 1:
|
|
39501
|
+
if (tag !== 10) {
|
|
39502
|
+
break;
|
|
39503
|
+
}
|
|
39504
|
+
|
|
39505
|
+
message.mentions.push(MessageMention.decode(reader, reader.uint32()));
|
|
39506
|
+
continue;
|
|
39507
|
+
}
|
|
39508
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39509
|
+
break;
|
|
39510
|
+
}
|
|
39511
|
+
reader.skipType(tag & 7);
|
|
39512
|
+
}
|
|
39513
|
+
return message;
|
|
39514
|
+
},
|
|
39515
|
+
|
|
39516
|
+
fromJSON(object: any): MessageMentionList {
|
|
39517
|
+
return {
|
|
39518
|
+
mentions: globalThis.Array.isArray(object?.mentions)
|
|
39519
|
+
? object.mentions.map((e: any) => MessageMention.fromJSON(e))
|
|
39520
|
+
: [],
|
|
39521
|
+
};
|
|
39522
|
+
},
|
|
39523
|
+
|
|
39524
|
+
toJSON(message: MessageMentionList): unknown {
|
|
39525
|
+
const obj: any = {};
|
|
39526
|
+
if (message.mentions?.length) {
|
|
39527
|
+
obj.mentions = message.mentions.map((e) => MessageMention.toJSON(e));
|
|
39528
|
+
}
|
|
39529
|
+
return obj;
|
|
39530
|
+
},
|
|
39531
|
+
|
|
39532
|
+
create<I extends Exact<DeepPartial<MessageMentionList>, I>>(base?: I): MessageMentionList {
|
|
39533
|
+
return MessageMentionList.fromPartial(base ?? ({} as any));
|
|
39534
|
+
},
|
|
39535
|
+
fromPartial<I extends Exact<DeepPartial<MessageMentionList>, I>>(object: I): MessageMentionList {
|
|
39536
|
+
const message = createBaseMessageMentionList();
|
|
39537
|
+
message.mentions = object.mentions?.map((e) => MessageMention.fromPartial(e)) || [];
|
|
39538
|
+
return message;
|
|
39539
|
+
},
|
|
39540
|
+
};
|
|
39541
|
+
|
|
39542
|
+
function createBaseMessageAttachmentList(): MessageAttachmentList {
|
|
39543
|
+
return { attachments: [] };
|
|
39544
|
+
}
|
|
39545
|
+
|
|
39546
|
+
export const MessageAttachmentList = {
|
|
39547
|
+
encode(message: MessageAttachmentList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
39548
|
+
for (const v of message.attachments) {
|
|
39549
|
+
MessageAttachment.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
39550
|
+
}
|
|
39551
|
+
return writer;
|
|
39552
|
+
},
|
|
39553
|
+
|
|
39554
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MessageAttachmentList {
|
|
39555
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39556
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39557
|
+
const message = createBaseMessageAttachmentList();
|
|
39558
|
+
while (reader.pos < end) {
|
|
39559
|
+
const tag = reader.uint32();
|
|
39560
|
+
switch (tag >>> 3) {
|
|
39561
|
+
case 1:
|
|
39562
|
+
if (tag !== 10) {
|
|
39563
|
+
break;
|
|
39564
|
+
}
|
|
39565
|
+
|
|
39566
|
+
message.attachments.push(MessageAttachment.decode(reader, reader.uint32()));
|
|
39567
|
+
continue;
|
|
39568
|
+
}
|
|
39569
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39570
|
+
break;
|
|
39571
|
+
}
|
|
39572
|
+
reader.skipType(tag & 7);
|
|
39573
|
+
}
|
|
39574
|
+
return message;
|
|
39575
|
+
},
|
|
39576
|
+
|
|
39577
|
+
fromJSON(object: any): MessageAttachmentList {
|
|
39578
|
+
return {
|
|
39579
|
+
attachments: globalThis.Array.isArray(object?.attachments)
|
|
39580
|
+
? object.attachments.map((e: any) => MessageAttachment.fromJSON(e))
|
|
39581
|
+
: [],
|
|
39582
|
+
};
|
|
39583
|
+
},
|
|
39584
|
+
|
|
39585
|
+
toJSON(message: MessageAttachmentList): unknown {
|
|
39586
|
+
const obj: any = {};
|
|
39587
|
+
if (message.attachments?.length) {
|
|
39588
|
+
obj.attachments = message.attachments.map((e) => MessageAttachment.toJSON(e));
|
|
39589
|
+
}
|
|
39590
|
+
return obj;
|
|
39591
|
+
},
|
|
39592
|
+
|
|
39593
|
+
create<I extends Exact<DeepPartial<MessageAttachmentList>, I>>(base?: I): MessageAttachmentList {
|
|
39594
|
+
return MessageAttachmentList.fromPartial(base ?? ({} as any));
|
|
39595
|
+
},
|
|
39596
|
+
fromPartial<I extends Exact<DeepPartial<MessageAttachmentList>, I>>(object: I): MessageAttachmentList {
|
|
39597
|
+
const message = createBaseMessageAttachmentList();
|
|
39598
|
+
message.attachments = object.attachments?.map((e) => MessageAttachment.fromPartial(e)) || [];
|
|
39599
|
+
return message;
|
|
39600
|
+
},
|
|
39601
|
+
};
|
|
39602
|
+
|
|
39603
|
+
function createBaseMessageRefList(): MessageRefList {
|
|
39604
|
+
return { refs: [] };
|
|
39605
|
+
}
|
|
39606
|
+
|
|
39607
|
+
export const MessageRefList = {
|
|
39608
|
+
encode(message: MessageRefList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
39609
|
+
for (const v of message.refs) {
|
|
39610
|
+
MessageRef.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
39611
|
+
}
|
|
39612
|
+
return writer;
|
|
39613
|
+
},
|
|
39614
|
+
|
|
39615
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MessageRefList {
|
|
39616
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39617
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39618
|
+
const message = createBaseMessageRefList();
|
|
39619
|
+
while (reader.pos < end) {
|
|
39620
|
+
const tag = reader.uint32();
|
|
39621
|
+
switch (tag >>> 3) {
|
|
39622
|
+
case 1:
|
|
39623
|
+
if (tag !== 10) {
|
|
39624
|
+
break;
|
|
39625
|
+
}
|
|
39626
|
+
|
|
39627
|
+
message.refs.push(MessageRef.decode(reader, reader.uint32()));
|
|
39628
|
+
continue;
|
|
39629
|
+
}
|
|
39630
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39631
|
+
break;
|
|
39632
|
+
}
|
|
39633
|
+
reader.skipType(tag & 7);
|
|
39634
|
+
}
|
|
39635
|
+
return message;
|
|
39636
|
+
},
|
|
39637
|
+
|
|
39638
|
+
fromJSON(object: any): MessageRefList {
|
|
39639
|
+
return { refs: globalThis.Array.isArray(object?.refs) ? object.refs.map((e: any) => MessageRef.fromJSON(e)) : [] };
|
|
39640
|
+
},
|
|
39641
|
+
|
|
39642
|
+
toJSON(message: MessageRefList): unknown {
|
|
39643
|
+
const obj: any = {};
|
|
39644
|
+
if (message.refs?.length) {
|
|
39645
|
+
obj.refs = message.refs.map((e) => MessageRef.toJSON(e));
|
|
39646
|
+
}
|
|
39647
|
+
return obj;
|
|
39648
|
+
},
|
|
39649
|
+
|
|
39650
|
+
create<I extends Exact<DeepPartial<MessageRefList>, I>>(base?: I): MessageRefList {
|
|
39651
|
+
return MessageRefList.fromPartial(base ?? ({} as any));
|
|
39652
|
+
},
|
|
39653
|
+
fromPartial<I extends Exact<DeepPartial<MessageRefList>, I>>(object: I): MessageRefList {
|
|
39654
|
+
const message = createBaseMessageRefList();
|
|
39655
|
+
message.refs = object.refs?.map((e) => MessageRef.fromPartial(e)) || [];
|
|
39656
|
+
return message;
|
|
39657
|
+
},
|
|
39658
|
+
};
|
|
39659
|
+
|
|
39660
|
+
function createBaseListClanBadgeCountRequest(): ListClanBadgeCountRequest {
|
|
39661
|
+
return { clan_id: "" };
|
|
39662
|
+
}
|
|
39663
|
+
|
|
39664
|
+
export const ListClanBadgeCountRequest = {
|
|
39665
|
+
encode(message: ListClanBadgeCountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
39666
|
+
if (message.clan_id !== "") {
|
|
39667
|
+
writer.uint32(10).string(message.clan_id);
|
|
39668
|
+
}
|
|
39669
|
+
return writer;
|
|
39670
|
+
},
|
|
39671
|
+
|
|
39672
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListClanBadgeCountRequest {
|
|
39673
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39674
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39675
|
+
const message = createBaseListClanBadgeCountRequest();
|
|
39676
|
+
while (reader.pos < end) {
|
|
39677
|
+
const tag = reader.uint32();
|
|
39678
|
+
switch (tag >>> 3) {
|
|
39679
|
+
case 1:
|
|
39680
|
+
if (tag !== 10) {
|
|
39681
|
+
break;
|
|
39682
|
+
}
|
|
39683
|
+
|
|
39684
|
+
message.clan_id = reader.string();
|
|
39685
|
+
continue;
|
|
39686
|
+
}
|
|
39687
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39688
|
+
break;
|
|
39689
|
+
}
|
|
39690
|
+
reader.skipType(tag & 7);
|
|
39691
|
+
}
|
|
39692
|
+
return message;
|
|
39693
|
+
},
|
|
39694
|
+
|
|
39695
|
+
fromJSON(object: any): ListClanBadgeCountRequest {
|
|
39696
|
+
return { clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "" };
|
|
39697
|
+
},
|
|
39698
|
+
|
|
39699
|
+
toJSON(message: ListClanBadgeCountRequest): unknown {
|
|
39700
|
+
const obj: any = {};
|
|
39701
|
+
if (message.clan_id !== "") {
|
|
39702
|
+
obj.clan_id = message.clan_id;
|
|
39703
|
+
}
|
|
39704
|
+
return obj;
|
|
39705
|
+
},
|
|
39706
|
+
|
|
39707
|
+
create<I extends Exact<DeepPartial<ListClanBadgeCountRequest>, I>>(base?: I): ListClanBadgeCountRequest {
|
|
39708
|
+
return ListClanBadgeCountRequest.fromPartial(base ?? ({} as any));
|
|
39709
|
+
},
|
|
39710
|
+
fromPartial<I extends Exact<DeepPartial<ListClanBadgeCountRequest>, I>>(object: I): ListClanBadgeCountRequest {
|
|
39711
|
+
const message = createBaseListClanBadgeCountRequest();
|
|
39712
|
+
message.clan_id = object.clan_id ?? "";
|
|
39713
|
+
return message;
|
|
39714
|
+
},
|
|
39715
|
+
};
|
|
39716
|
+
|
|
39717
|
+
function createBaseListClanBadgeCountResponse(): ListClanBadgeCountResponse {
|
|
39718
|
+
return { badge_count: 0 };
|
|
39719
|
+
}
|
|
39720
|
+
|
|
39721
|
+
export const ListClanBadgeCountResponse = {
|
|
39722
|
+
encode(message: ListClanBadgeCountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
39723
|
+
if (message.badge_count !== 0) {
|
|
39724
|
+
writer.uint32(8).int32(message.badge_count);
|
|
39725
|
+
}
|
|
39726
|
+
return writer;
|
|
39727
|
+
},
|
|
39728
|
+
|
|
39729
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListClanBadgeCountResponse {
|
|
39730
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39731
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39732
|
+
const message = createBaseListClanBadgeCountResponse();
|
|
39733
|
+
while (reader.pos < end) {
|
|
39734
|
+
const tag = reader.uint32();
|
|
39735
|
+
switch (tag >>> 3) {
|
|
39736
|
+
case 1:
|
|
39737
|
+
if (tag !== 8) {
|
|
39738
|
+
break;
|
|
39739
|
+
}
|
|
39740
|
+
|
|
39741
|
+
message.badge_count = reader.int32();
|
|
39742
|
+
continue;
|
|
39743
|
+
}
|
|
39744
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39745
|
+
break;
|
|
39746
|
+
}
|
|
39747
|
+
reader.skipType(tag & 7);
|
|
39748
|
+
}
|
|
39749
|
+
return message;
|
|
39750
|
+
},
|
|
39751
|
+
|
|
39752
|
+
fromJSON(object: any): ListClanBadgeCountResponse {
|
|
39753
|
+
return { badge_count: isSet(object.badge_count) ? globalThis.Number(object.badge_count) : 0 };
|
|
39754
|
+
},
|
|
39755
|
+
|
|
39756
|
+
toJSON(message: ListClanBadgeCountResponse): unknown {
|
|
39757
|
+
const obj: any = {};
|
|
39758
|
+
if (message.badge_count !== 0) {
|
|
39759
|
+
obj.badge_count = Math.round(message.badge_count);
|
|
39760
|
+
}
|
|
39761
|
+
return obj;
|
|
39762
|
+
},
|
|
39763
|
+
|
|
39764
|
+
create<I extends Exact<DeepPartial<ListClanBadgeCountResponse>, I>>(base?: I): ListClanBadgeCountResponse {
|
|
39765
|
+
return ListClanBadgeCountResponse.fromPartial(base ?? ({} as any));
|
|
39766
|
+
},
|
|
39767
|
+
fromPartial<I extends Exact<DeepPartial<ListClanBadgeCountResponse>, I>>(object: I): ListClanBadgeCountResponse {
|
|
39768
|
+
const message = createBaseListClanBadgeCountResponse();
|
|
39769
|
+
message.badge_count = object.badge_count ?? 0;
|
|
39770
|
+
return message;
|
|
39771
|
+
},
|
|
39772
|
+
};
|
|
39773
|
+
|
|
39105
39774
|
function bytesFromBase64(b64: string): Uint8Array {
|
|
39106
39775
|
if ((globalThis as any).Buffer) {
|
|
39107
39776
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|