mezon-js-protobuf 1.7.46 → 1.7.47
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
CHANGED
|
@@ -1905,7 +1905,7 @@ export interface ChannelMessageHeader {
|
|
|
1905
1905
|
/** the attachment */
|
|
1906
1906
|
attachment: string;
|
|
1907
1907
|
/** the reference */
|
|
1908
|
-
|
|
1908
|
+
reference: string;
|
|
1909
1909
|
/** the mention */
|
|
1910
1910
|
mention: string;
|
|
1911
1911
|
/** the reactions */
|
|
@@ -4068,6 +4068,18 @@ export interface GetMezonAccountRequest {
|
|
|
4068
4068
|
email: string;
|
|
4069
4069
|
}
|
|
4070
4070
|
|
|
4071
|
+
export interface Message2InboxRequest {
|
|
4072
|
+
message_id: string;
|
|
4073
|
+
channel_id: string;
|
|
4074
|
+
clan_id: string;
|
|
4075
|
+
avatar: string;
|
|
4076
|
+
content: string;
|
|
4077
|
+
mentions: string;
|
|
4078
|
+
attachments: string;
|
|
4079
|
+
reactions: string;
|
|
4080
|
+
references: string;
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4071
4083
|
function createBaseAccount(): Account {
|
|
4072
4084
|
return {
|
|
4073
4085
|
user: undefined,
|
|
@@ -17521,7 +17533,7 @@ function createBaseChannelMessageHeader(): ChannelMessageHeader {
|
|
|
17521
17533
|
sender_id: "",
|
|
17522
17534
|
content: "",
|
|
17523
17535
|
attachment: "",
|
|
17524
|
-
|
|
17536
|
+
reference: "",
|
|
17525
17537
|
mention: "",
|
|
17526
17538
|
reaction: "",
|
|
17527
17539
|
repliers: [],
|
|
@@ -17545,8 +17557,8 @@ export const ChannelMessageHeader = {
|
|
|
17545
17557
|
if (message.attachment !== "") {
|
|
17546
17558
|
writer.uint32(42).string(message.attachment);
|
|
17547
17559
|
}
|
|
17548
|
-
if (message.
|
|
17549
|
-
writer.uint32(50).string(message.
|
|
17560
|
+
if (message.reference !== "") {
|
|
17561
|
+
writer.uint32(50).string(message.reference);
|
|
17550
17562
|
}
|
|
17551
17563
|
if (message.mention !== "") {
|
|
17552
17564
|
writer.uint32(58).string(message.mention);
|
|
@@ -17607,7 +17619,7 @@ export const ChannelMessageHeader = {
|
|
|
17607
17619
|
break;
|
|
17608
17620
|
}
|
|
17609
17621
|
|
|
17610
|
-
message.
|
|
17622
|
+
message.reference = reader.string();
|
|
17611
17623
|
continue;
|
|
17612
17624
|
case 7:
|
|
17613
17625
|
if (tag !== 58) {
|
|
@@ -17646,7 +17658,7 @@ export const ChannelMessageHeader = {
|
|
|
17646
17658
|
sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
17647
17659
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
17648
17660
|
attachment: isSet(object.attachment) ? globalThis.String(object.attachment) : "",
|
|
17649
|
-
|
|
17661
|
+
reference: isSet(object.reference) ? globalThis.String(object.reference) : "",
|
|
17650
17662
|
mention: isSet(object.mention) ? globalThis.String(object.mention) : "",
|
|
17651
17663
|
reaction: isSet(object.reaction) ? globalThis.String(object.reaction) : "",
|
|
17652
17664
|
repliers: globalThis.Array.isArray(object?.repliers) ? object.repliers.map((e: any) => globalThis.String(e)) : [],
|
|
@@ -17670,8 +17682,8 @@ export const ChannelMessageHeader = {
|
|
|
17670
17682
|
if (message.attachment !== "") {
|
|
17671
17683
|
obj.attachment = message.attachment;
|
|
17672
17684
|
}
|
|
17673
|
-
if (message.
|
|
17674
|
-
obj.
|
|
17685
|
+
if (message.reference !== "") {
|
|
17686
|
+
obj.reference = message.reference;
|
|
17675
17687
|
}
|
|
17676
17688
|
if (message.mention !== "") {
|
|
17677
17689
|
obj.mention = message.mention;
|
|
@@ -17695,7 +17707,7 @@ export const ChannelMessageHeader = {
|
|
|
17695
17707
|
message.sender_id = object.sender_id ?? "";
|
|
17696
17708
|
message.content = object.content ?? "";
|
|
17697
17709
|
message.attachment = object.attachment ?? "";
|
|
17698
|
-
message.
|
|
17710
|
+
message.reference = object.reference ?? "";
|
|
17699
17711
|
message.mention = object.mention ?? "";
|
|
17700
17712
|
message.reaction = object.reaction ?? "";
|
|
17701
17713
|
message.repliers = object.repliers?.map((e) => e) || [];
|
|
@@ -40545,6 +40557,195 @@ export const GetMezonAccountRequest = {
|
|
|
40545
40557
|
},
|
|
40546
40558
|
};
|
|
40547
40559
|
|
|
40560
|
+
function createBaseMessage2InboxRequest(): Message2InboxRequest {
|
|
40561
|
+
return {
|
|
40562
|
+
message_id: "",
|
|
40563
|
+
channel_id: "",
|
|
40564
|
+
clan_id: "",
|
|
40565
|
+
avatar: "",
|
|
40566
|
+
content: "",
|
|
40567
|
+
mentions: "",
|
|
40568
|
+
attachments: "",
|
|
40569
|
+
reactions: "",
|
|
40570
|
+
references: "",
|
|
40571
|
+
};
|
|
40572
|
+
}
|
|
40573
|
+
|
|
40574
|
+
export const Message2InboxRequest = {
|
|
40575
|
+
encode(message: Message2InboxRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
40576
|
+
if (message.message_id !== "") {
|
|
40577
|
+
writer.uint32(10).string(message.message_id);
|
|
40578
|
+
}
|
|
40579
|
+
if (message.channel_id !== "") {
|
|
40580
|
+
writer.uint32(18).string(message.channel_id);
|
|
40581
|
+
}
|
|
40582
|
+
if (message.clan_id !== "") {
|
|
40583
|
+
writer.uint32(26).string(message.clan_id);
|
|
40584
|
+
}
|
|
40585
|
+
if (message.avatar !== "") {
|
|
40586
|
+
writer.uint32(34).string(message.avatar);
|
|
40587
|
+
}
|
|
40588
|
+
if (message.content !== "") {
|
|
40589
|
+
writer.uint32(42).string(message.content);
|
|
40590
|
+
}
|
|
40591
|
+
if (message.mentions !== "") {
|
|
40592
|
+
writer.uint32(50).string(message.mentions);
|
|
40593
|
+
}
|
|
40594
|
+
if (message.attachments !== "") {
|
|
40595
|
+
writer.uint32(58).string(message.attachments);
|
|
40596
|
+
}
|
|
40597
|
+
if (message.reactions !== "") {
|
|
40598
|
+
writer.uint32(66).string(message.reactions);
|
|
40599
|
+
}
|
|
40600
|
+
if (message.references !== "") {
|
|
40601
|
+
writer.uint32(74).string(message.references);
|
|
40602
|
+
}
|
|
40603
|
+
return writer;
|
|
40604
|
+
},
|
|
40605
|
+
|
|
40606
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Message2InboxRequest {
|
|
40607
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
40608
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
40609
|
+
const message = createBaseMessage2InboxRequest();
|
|
40610
|
+
while (reader.pos < end) {
|
|
40611
|
+
const tag = reader.uint32();
|
|
40612
|
+
switch (tag >>> 3) {
|
|
40613
|
+
case 1:
|
|
40614
|
+
if (tag !== 10) {
|
|
40615
|
+
break;
|
|
40616
|
+
}
|
|
40617
|
+
|
|
40618
|
+
message.message_id = reader.string();
|
|
40619
|
+
continue;
|
|
40620
|
+
case 2:
|
|
40621
|
+
if (tag !== 18) {
|
|
40622
|
+
break;
|
|
40623
|
+
}
|
|
40624
|
+
|
|
40625
|
+
message.channel_id = reader.string();
|
|
40626
|
+
continue;
|
|
40627
|
+
case 3:
|
|
40628
|
+
if (tag !== 26) {
|
|
40629
|
+
break;
|
|
40630
|
+
}
|
|
40631
|
+
|
|
40632
|
+
message.clan_id = reader.string();
|
|
40633
|
+
continue;
|
|
40634
|
+
case 4:
|
|
40635
|
+
if (tag !== 34) {
|
|
40636
|
+
break;
|
|
40637
|
+
}
|
|
40638
|
+
|
|
40639
|
+
message.avatar = reader.string();
|
|
40640
|
+
continue;
|
|
40641
|
+
case 5:
|
|
40642
|
+
if (tag !== 42) {
|
|
40643
|
+
break;
|
|
40644
|
+
}
|
|
40645
|
+
|
|
40646
|
+
message.content = reader.string();
|
|
40647
|
+
continue;
|
|
40648
|
+
case 6:
|
|
40649
|
+
if (tag !== 50) {
|
|
40650
|
+
break;
|
|
40651
|
+
}
|
|
40652
|
+
|
|
40653
|
+
message.mentions = reader.string();
|
|
40654
|
+
continue;
|
|
40655
|
+
case 7:
|
|
40656
|
+
if (tag !== 58) {
|
|
40657
|
+
break;
|
|
40658
|
+
}
|
|
40659
|
+
|
|
40660
|
+
message.attachments = reader.string();
|
|
40661
|
+
continue;
|
|
40662
|
+
case 8:
|
|
40663
|
+
if (tag !== 66) {
|
|
40664
|
+
break;
|
|
40665
|
+
}
|
|
40666
|
+
|
|
40667
|
+
message.reactions = reader.string();
|
|
40668
|
+
continue;
|
|
40669
|
+
case 9:
|
|
40670
|
+
if (tag !== 74) {
|
|
40671
|
+
break;
|
|
40672
|
+
}
|
|
40673
|
+
|
|
40674
|
+
message.references = reader.string();
|
|
40675
|
+
continue;
|
|
40676
|
+
}
|
|
40677
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
40678
|
+
break;
|
|
40679
|
+
}
|
|
40680
|
+
reader.skipType(tag & 7);
|
|
40681
|
+
}
|
|
40682
|
+
return message;
|
|
40683
|
+
},
|
|
40684
|
+
|
|
40685
|
+
fromJSON(object: any): Message2InboxRequest {
|
|
40686
|
+
return {
|
|
40687
|
+
message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
|
|
40688
|
+
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
40689
|
+
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
40690
|
+
avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
40691
|
+
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
40692
|
+
mentions: isSet(object.mentions) ? globalThis.String(object.mentions) : "",
|
|
40693
|
+
attachments: isSet(object.attachments) ? globalThis.String(object.attachments) : "",
|
|
40694
|
+
reactions: isSet(object.reactions) ? globalThis.String(object.reactions) : "",
|
|
40695
|
+
references: isSet(object.references) ? globalThis.String(object.references) : "",
|
|
40696
|
+
};
|
|
40697
|
+
},
|
|
40698
|
+
|
|
40699
|
+
toJSON(message: Message2InboxRequest): unknown {
|
|
40700
|
+
const obj: any = {};
|
|
40701
|
+
if (message.message_id !== "") {
|
|
40702
|
+
obj.message_id = message.message_id;
|
|
40703
|
+
}
|
|
40704
|
+
if (message.channel_id !== "") {
|
|
40705
|
+
obj.channel_id = message.channel_id;
|
|
40706
|
+
}
|
|
40707
|
+
if (message.clan_id !== "") {
|
|
40708
|
+
obj.clan_id = message.clan_id;
|
|
40709
|
+
}
|
|
40710
|
+
if (message.avatar !== "") {
|
|
40711
|
+
obj.avatar = message.avatar;
|
|
40712
|
+
}
|
|
40713
|
+
if (message.content !== "") {
|
|
40714
|
+
obj.content = message.content;
|
|
40715
|
+
}
|
|
40716
|
+
if (message.mentions !== "") {
|
|
40717
|
+
obj.mentions = message.mentions;
|
|
40718
|
+
}
|
|
40719
|
+
if (message.attachments !== "") {
|
|
40720
|
+
obj.attachments = message.attachments;
|
|
40721
|
+
}
|
|
40722
|
+
if (message.reactions !== "") {
|
|
40723
|
+
obj.reactions = message.reactions;
|
|
40724
|
+
}
|
|
40725
|
+
if (message.references !== "") {
|
|
40726
|
+
obj.references = message.references;
|
|
40727
|
+
}
|
|
40728
|
+
return obj;
|
|
40729
|
+
},
|
|
40730
|
+
|
|
40731
|
+
create<I extends Exact<DeepPartial<Message2InboxRequest>, I>>(base?: I): Message2InboxRequest {
|
|
40732
|
+
return Message2InboxRequest.fromPartial(base ?? ({} as any));
|
|
40733
|
+
},
|
|
40734
|
+
fromPartial<I extends Exact<DeepPartial<Message2InboxRequest>, I>>(object: I): Message2InboxRequest {
|
|
40735
|
+
const message = createBaseMessage2InboxRequest();
|
|
40736
|
+
message.message_id = object.message_id ?? "";
|
|
40737
|
+
message.channel_id = object.channel_id ?? "";
|
|
40738
|
+
message.clan_id = object.clan_id ?? "";
|
|
40739
|
+
message.avatar = object.avatar ?? "";
|
|
40740
|
+
message.content = object.content ?? "";
|
|
40741
|
+
message.mentions = object.mentions ?? "";
|
|
40742
|
+
message.attachments = object.attachments ?? "";
|
|
40743
|
+
message.reactions = object.reactions ?? "";
|
|
40744
|
+
message.references = object.references ?? "";
|
|
40745
|
+
return message;
|
|
40746
|
+
},
|
|
40747
|
+
};
|
|
40748
|
+
|
|
40548
40749
|
function bytesFromBase64(b64: string): Uint8Array {
|
|
40549
40750
|
if ((globalThis as any).Buffer) {
|
|
40550
40751
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|