mezon-js-protobuf 1.7.40 → 1.7.41
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 +223 -29
- package/dist/mezon-js-protobuf/api/api.d.ts +121 -55
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +119 -63
- package/dist/mezon-js-protobuf.cjs.js +42 -27
- package/dist/mezon-js-protobuf.esm.mjs +42 -27
- package/package.json +1 -1
- package/rtapi/realtime.ts +37 -19
package/api/api.ts
CHANGED
|
@@ -1961,7 +1961,7 @@ export interface ChannelDescription {
|
|
|
1961
1961
|
/** clan_name */
|
|
1962
1962
|
clan_name: string;
|
|
1963
1963
|
/** app url */
|
|
1964
|
-
|
|
1964
|
+
app_id: string;
|
|
1965
1965
|
/** channel all message */
|
|
1966
1966
|
is_mute: boolean;
|
|
1967
1967
|
/** age restricted */
|
|
@@ -2025,6 +2025,12 @@ export interface ListChannelDescsRequest {
|
|
|
2025
2025
|
channel_type: number;
|
|
2026
2026
|
}
|
|
2027
2027
|
|
|
2028
|
+
/** List channel description detail */
|
|
2029
|
+
export interface ListChannelDetailRequest {
|
|
2030
|
+
/** channel id */
|
|
2031
|
+
channel_id: string;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2028
2034
|
/** Add a role for channel. */
|
|
2029
2035
|
export interface AddRoleChannelDescRequest {
|
|
2030
2036
|
/** This is the role that needs to be added to the channel */
|
|
@@ -2054,7 +2060,7 @@ export interface CreateChannelDescRequest {
|
|
|
2054
2060
|
/** The users to add. */
|
|
2055
2061
|
user_ids: string[];
|
|
2056
2062
|
/** app url for channel type app */
|
|
2057
|
-
|
|
2063
|
+
app_id: string;
|
|
2058
2064
|
}
|
|
2059
2065
|
|
|
2060
2066
|
/** Delete a channel the user has access to. */
|
|
@@ -2076,9 +2082,7 @@ export interface UpdateChannelDescRequest {
|
|
|
2076
2082
|
| string
|
|
2077
2083
|
| undefined;
|
|
2078
2084
|
/** app url for channel type app */
|
|
2079
|
-
|
|
2080
|
-
| string
|
|
2081
|
-
| undefined;
|
|
2085
|
+
app_id: string;
|
|
2082
2086
|
/** topic */
|
|
2083
2087
|
topic: string;
|
|
2084
2088
|
/** */
|
|
@@ -2988,6 +2992,20 @@ export interface UpdateAppRequest {
|
|
|
2988
2992
|
about: string;
|
|
2989
2993
|
}
|
|
2990
2994
|
|
|
2995
|
+
/** Add a new app */
|
|
2996
|
+
export interface AddChannelAppRequest {
|
|
2997
|
+
/** The appname. */
|
|
2998
|
+
appname: string;
|
|
2999
|
+
/** The password. */
|
|
3000
|
+
token: string;
|
|
3001
|
+
/** Creator of the app. */
|
|
3002
|
+
creator_id: string;
|
|
3003
|
+
/** Role of this app. */
|
|
3004
|
+
role: number;
|
|
3005
|
+
/** App url. */
|
|
3006
|
+
app_url: string;
|
|
3007
|
+
}
|
|
3008
|
+
|
|
2991
3009
|
/** The identifier for an app. */
|
|
2992
3010
|
export interface AppId {
|
|
2993
3011
|
/** The unique identifier of the app. */
|
|
@@ -17544,7 +17562,7 @@ function createBaseChannelDescription(): ChannelDescription {
|
|
|
17544
17562
|
metadata: [],
|
|
17545
17563
|
about_me: [],
|
|
17546
17564
|
clan_name: "",
|
|
17547
|
-
|
|
17565
|
+
app_id: "",
|
|
17548
17566
|
is_mute: false,
|
|
17549
17567
|
age_restricted: 0,
|
|
17550
17568
|
topic: "",
|
|
@@ -17632,8 +17650,8 @@ export const ChannelDescription = {
|
|
|
17632
17650
|
if (message.clan_name !== "") {
|
|
17633
17651
|
writer.uint32(202).string(message.clan_name);
|
|
17634
17652
|
}
|
|
17635
|
-
if (message.
|
|
17636
|
-
writer.uint32(210).string(message.
|
|
17653
|
+
if (message.app_id !== "") {
|
|
17654
|
+
writer.uint32(210).string(message.app_id);
|
|
17637
17655
|
}
|
|
17638
17656
|
if (message.is_mute !== false) {
|
|
17639
17657
|
writer.uint32(216).bool(message.is_mute);
|
|
@@ -17850,7 +17868,7 @@ export const ChannelDescription = {
|
|
|
17850
17868
|
break;
|
|
17851
17869
|
}
|
|
17852
17870
|
|
|
17853
|
-
message.
|
|
17871
|
+
message.app_id = reader.string();
|
|
17854
17872
|
continue;
|
|
17855
17873
|
case 27:
|
|
17856
17874
|
if (tag !== 216) {
|
|
@@ -17935,7 +17953,7 @@ export const ChannelDescription = {
|
|
|
17935
17953
|
: [],
|
|
17936
17954
|
about_me: globalThis.Array.isArray(object?.about_me) ? object.about_me.map((e: any) => globalThis.String(e)) : [],
|
|
17937
17955
|
clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
|
|
17938
|
-
|
|
17956
|
+
app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
|
|
17939
17957
|
is_mute: isSet(object.is_mute) ? globalThis.Boolean(object.is_mute) : false,
|
|
17940
17958
|
age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
17941
17959
|
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
@@ -18023,8 +18041,8 @@ export const ChannelDescription = {
|
|
|
18023
18041
|
if (message.clan_name !== "") {
|
|
18024
18042
|
obj.clan_name = message.clan_name;
|
|
18025
18043
|
}
|
|
18026
|
-
if (message.
|
|
18027
|
-
obj.
|
|
18044
|
+
if (message.app_id !== "") {
|
|
18045
|
+
obj.app_id = message.app_id;
|
|
18028
18046
|
}
|
|
18029
18047
|
if (message.is_mute !== false) {
|
|
18030
18048
|
obj.is_mute = message.is_mute;
|
|
@@ -18078,7 +18096,7 @@ export const ChannelDescription = {
|
|
|
18078
18096
|
message.metadata = object.metadata?.map((e) => e) || [];
|
|
18079
18097
|
message.about_me = object.about_me?.map((e) => e) || [];
|
|
18080
18098
|
message.clan_name = object.clan_name ?? "";
|
|
18081
|
-
message.
|
|
18099
|
+
message.app_id = object.app_id ?? "";
|
|
18082
18100
|
message.is_mute = object.is_mute ?? false;
|
|
18083
18101
|
message.age_restricted = object.age_restricted ?? 0;
|
|
18084
18102
|
message.topic = object.topic ?? "";
|
|
@@ -18462,6 +18480,63 @@ export const ListChannelDescsRequest = {
|
|
|
18462
18480
|
},
|
|
18463
18481
|
};
|
|
18464
18482
|
|
|
18483
|
+
function createBaseListChannelDetailRequest(): ListChannelDetailRequest {
|
|
18484
|
+
return { channel_id: "" };
|
|
18485
|
+
}
|
|
18486
|
+
|
|
18487
|
+
export const ListChannelDetailRequest = {
|
|
18488
|
+
encode(message: ListChannelDetailRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
18489
|
+
if (message.channel_id !== "") {
|
|
18490
|
+
writer.uint32(10).string(message.channel_id);
|
|
18491
|
+
}
|
|
18492
|
+
return writer;
|
|
18493
|
+
},
|
|
18494
|
+
|
|
18495
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ListChannelDetailRequest {
|
|
18496
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
18497
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
18498
|
+
const message = createBaseListChannelDetailRequest();
|
|
18499
|
+
while (reader.pos < end) {
|
|
18500
|
+
const tag = reader.uint32();
|
|
18501
|
+
switch (tag >>> 3) {
|
|
18502
|
+
case 1:
|
|
18503
|
+
if (tag !== 10) {
|
|
18504
|
+
break;
|
|
18505
|
+
}
|
|
18506
|
+
|
|
18507
|
+
message.channel_id = reader.string();
|
|
18508
|
+
continue;
|
|
18509
|
+
}
|
|
18510
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
18511
|
+
break;
|
|
18512
|
+
}
|
|
18513
|
+
reader.skipType(tag & 7);
|
|
18514
|
+
}
|
|
18515
|
+
return message;
|
|
18516
|
+
},
|
|
18517
|
+
|
|
18518
|
+
fromJSON(object: any): ListChannelDetailRequest {
|
|
18519
|
+
return { channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "" };
|
|
18520
|
+
},
|
|
18521
|
+
|
|
18522
|
+
toJSON(message: ListChannelDetailRequest): unknown {
|
|
18523
|
+
const obj: any = {};
|
|
18524
|
+
if (message.channel_id !== "") {
|
|
18525
|
+
obj.channel_id = message.channel_id;
|
|
18526
|
+
}
|
|
18527
|
+
return obj;
|
|
18528
|
+
},
|
|
18529
|
+
|
|
18530
|
+
create<I extends Exact<DeepPartial<ListChannelDetailRequest>, I>>(base?: I): ListChannelDetailRequest {
|
|
18531
|
+
return ListChannelDetailRequest.fromPartial(base ?? ({} as any));
|
|
18532
|
+
},
|
|
18533
|
+
fromPartial<I extends Exact<DeepPartial<ListChannelDetailRequest>, I>>(object: I): ListChannelDetailRequest {
|
|
18534
|
+
const message = createBaseListChannelDetailRequest();
|
|
18535
|
+
message.channel_id = object.channel_id ?? "";
|
|
18536
|
+
return message;
|
|
18537
|
+
},
|
|
18538
|
+
};
|
|
18539
|
+
|
|
18465
18540
|
function createBaseAddRoleChannelDescRequest(): AddRoleChannelDescRequest {
|
|
18466
18541
|
return { role_ids: [], channel_id: "" };
|
|
18467
18542
|
}
|
|
@@ -18546,7 +18621,7 @@ function createBaseCreateChannelDescRequest(): CreateChannelDescRequest {
|
|
|
18546
18621
|
channel_label: "",
|
|
18547
18622
|
channel_private: 0,
|
|
18548
18623
|
user_ids: [],
|
|
18549
|
-
|
|
18624
|
+
app_id: "",
|
|
18550
18625
|
};
|
|
18551
18626
|
}
|
|
18552
18627
|
|
|
@@ -18576,8 +18651,8 @@ export const CreateChannelDescRequest = {
|
|
|
18576
18651
|
for (const v of message.user_ids) {
|
|
18577
18652
|
writer.uint32(66).string(v!);
|
|
18578
18653
|
}
|
|
18579
|
-
if (message.
|
|
18580
|
-
|
|
18654
|
+
if (message.app_id !== "") {
|
|
18655
|
+
writer.uint32(74).string(message.app_id);
|
|
18581
18656
|
}
|
|
18582
18657
|
return writer;
|
|
18583
18658
|
},
|
|
@@ -18650,7 +18725,7 @@ export const CreateChannelDescRequest = {
|
|
|
18650
18725
|
break;
|
|
18651
18726
|
}
|
|
18652
18727
|
|
|
18653
|
-
message.
|
|
18728
|
+
message.app_id = reader.string();
|
|
18654
18729
|
continue;
|
|
18655
18730
|
}
|
|
18656
18731
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -18671,7 +18746,7 @@ export const CreateChannelDescRequest = {
|
|
|
18671
18746
|
channel_label: isSet(object.channel_label) ? globalThis.String(object.channel_label) : "",
|
|
18672
18747
|
channel_private: isSet(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
|
|
18673
18748
|
user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
|
|
18674
|
-
|
|
18749
|
+
app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
|
|
18675
18750
|
};
|
|
18676
18751
|
},
|
|
18677
18752
|
|
|
@@ -18701,8 +18776,8 @@ export const CreateChannelDescRequest = {
|
|
|
18701
18776
|
if (message.user_ids?.length) {
|
|
18702
18777
|
obj.user_ids = message.user_ids;
|
|
18703
18778
|
}
|
|
18704
|
-
if (message.
|
|
18705
|
-
obj.
|
|
18779
|
+
if (message.app_id !== "") {
|
|
18780
|
+
obj.app_id = message.app_id;
|
|
18706
18781
|
}
|
|
18707
18782
|
return obj;
|
|
18708
18783
|
},
|
|
@@ -18720,7 +18795,7 @@ export const CreateChannelDescRequest = {
|
|
|
18720
18795
|
message.channel_label = object.channel_label ?? "";
|
|
18721
18796
|
message.channel_private = object.channel_private ?? 0;
|
|
18722
18797
|
message.user_ids = object.user_ids?.map((e) => e) || [];
|
|
18723
|
-
message.
|
|
18798
|
+
message.app_id = object.app_id ?? "";
|
|
18724
18799
|
return message;
|
|
18725
18800
|
},
|
|
18726
18801
|
};
|
|
@@ -18787,7 +18862,7 @@ function createBaseUpdateChannelDescRequest(): UpdateChannelDescRequest {
|
|
|
18787
18862
|
channel_id: "",
|
|
18788
18863
|
channel_label: undefined,
|
|
18789
18864
|
category_id: undefined,
|
|
18790
|
-
|
|
18865
|
+
app_id: "",
|
|
18791
18866
|
topic: "",
|
|
18792
18867
|
age_restricted: 0,
|
|
18793
18868
|
e2ee: 0,
|
|
@@ -18805,8 +18880,8 @@ export const UpdateChannelDescRequest = {
|
|
|
18805
18880
|
if (message.category_id !== undefined) {
|
|
18806
18881
|
StringValue.encode({ value: message.category_id! }, writer.uint32(26).fork()).ldelim();
|
|
18807
18882
|
}
|
|
18808
|
-
if (message.
|
|
18809
|
-
|
|
18883
|
+
if (message.app_id !== "") {
|
|
18884
|
+
writer.uint32(34).string(message.app_id);
|
|
18810
18885
|
}
|
|
18811
18886
|
if (message.topic !== "") {
|
|
18812
18887
|
writer.uint32(42).string(message.topic);
|
|
@@ -18853,7 +18928,7 @@ export const UpdateChannelDescRequest = {
|
|
|
18853
18928
|
break;
|
|
18854
18929
|
}
|
|
18855
18930
|
|
|
18856
|
-
message.
|
|
18931
|
+
message.app_id = reader.string();
|
|
18857
18932
|
continue;
|
|
18858
18933
|
case 5:
|
|
18859
18934
|
if (tag !== 42) {
|
|
@@ -18890,7 +18965,7 @@ export const UpdateChannelDescRequest = {
|
|
|
18890
18965
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
18891
18966
|
channel_label: isSet(object.channel_label) ? String(object.channel_label) : undefined,
|
|
18892
18967
|
category_id: isSet(object.category_id) ? String(object.category_id) : undefined,
|
|
18893
|
-
|
|
18968
|
+
app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
|
|
18894
18969
|
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
18895
18970
|
age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
18896
18971
|
e2ee: isSet(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
|
|
@@ -18908,8 +18983,8 @@ export const UpdateChannelDescRequest = {
|
|
|
18908
18983
|
if (message.category_id !== undefined) {
|
|
18909
18984
|
obj.category_id = message.category_id;
|
|
18910
18985
|
}
|
|
18911
|
-
if (message.
|
|
18912
|
-
obj.
|
|
18986
|
+
if (message.app_id !== "") {
|
|
18987
|
+
obj.app_id = message.app_id;
|
|
18913
18988
|
}
|
|
18914
18989
|
if (message.topic !== "") {
|
|
18915
18990
|
obj.topic = message.topic;
|
|
@@ -18931,7 +19006,7 @@ export const UpdateChannelDescRequest = {
|
|
|
18931
19006
|
message.channel_id = object.channel_id ?? "";
|
|
18932
19007
|
message.channel_label = object.channel_label ?? undefined;
|
|
18933
19008
|
message.category_id = object.category_id ?? undefined;
|
|
18934
|
-
message.
|
|
19009
|
+
message.app_id = object.app_id ?? "";
|
|
18935
19010
|
message.topic = object.topic ?? "";
|
|
18936
19011
|
message.age_restricted = object.age_restricted ?? 0;
|
|
18937
19012
|
message.e2ee = object.e2ee ?? 0;
|
|
@@ -28636,6 +28711,125 @@ export const UpdateAppRequest = {
|
|
|
28636
28711
|
},
|
|
28637
28712
|
};
|
|
28638
28713
|
|
|
28714
|
+
function createBaseAddChannelAppRequest(): AddChannelAppRequest {
|
|
28715
|
+
return { appname: "", token: "", creator_id: "", role: 0, app_url: "" };
|
|
28716
|
+
}
|
|
28717
|
+
|
|
28718
|
+
export const AddChannelAppRequest = {
|
|
28719
|
+
encode(message: AddChannelAppRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
28720
|
+
if (message.appname !== "") {
|
|
28721
|
+
writer.uint32(10).string(message.appname);
|
|
28722
|
+
}
|
|
28723
|
+
if (message.token !== "") {
|
|
28724
|
+
writer.uint32(18).string(message.token);
|
|
28725
|
+
}
|
|
28726
|
+
if (message.creator_id !== "") {
|
|
28727
|
+
writer.uint32(26).string(message.creator_id);
|
|
28728
|
+
}
|
|
28729
|
+
if (message.role !== 0) {
|
|
28730
|
+
writer.uint32(32).int32(message.role);
|
|
28731
|
+
}
|
|
28732
|
+
if (message.app_url !== "") {
|
|
28733
|
+
writer.uint32(42).string(message.app_url);
|
|
28734
|
+
}
|
|
28735
|
+
return writer;
|
|
28736
|
+
},
|
|
28737
|
+
|
|
28738
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): AddChannelAppRequest {
|
|
28739
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
28740
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28741
|
+
const message = createBaseAddChannelAppRequest();
|
|
28742
|
+
while (reader.pos < end) {
|
|
28743
|
+
const tag = reader.uint32();
|
|
28744
|
+
switch (tag >>> 3) {
|
|
28745
|
+
case 1:
|
|
28746
|
+
if (tag !== 10) {
|
|
28747
|
+
break;
|
|
28748
|
+
}
|
|
28749
|
+
|
|
28750
|
+
message.appname = reader.string();
|
|
28751
|
+
continue;
|
|
28752
|
+
case 2:
|
|
28753
|
+
if (tag !== 18) {
|
|
28754
|
+
break;
|
|
28755
|
+
}
|
|
28756
|
+
|
|
28757
|
+
message.token = reader.string();
|
|
28758
|
+
continue;
|
|
28759
|
+
case 3:
|
|
28760
|
+
if (tag !== 26) {
|
|
28761
|
+
break;
|
|
28762
|
+
}
|
|
28763
|
+
|
|
28764
|
+
message.creator_id = reader.string();
|
|
28765
|
+
continue;
|
|
28766
|
+
case 4:
|
|
28767
|
+
if (tag !== 32) {
|
|
28768
|
+
break;
|
|
28769
|
+
}
|
|
28770
|
+
|
|
28771
|
+
message.role = reader.int32();
|
|
28772
|
+
continue;
|
|
28773
|
+
case 5:
|
|
28774
|
+
if (tag !== 42) {
|
|
28775
|
+
break;
|
|
28776
|
+
}
|
|
28777
|
+
|
|
28778
|
+
message.app_url = reader.string();
|
|
28779
|
+
continue;
|
|
28780
|
+
}
|
|
28781
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
28782
|
+
break;
|
|
28783
|
+
}
|
|
28784
|
+
reader.skipType(tag & 7);
|
|
28785
|
+
}
|
|
28786
|
+
return message;
|
|
28787
|
+
},
|
|
28788
|
+
|
|
28789
|
+
fromJSON(object: any): AddChannelAppRequest {
|
|
28790
|
+
return {
|
|
28791
|
+
appname: isSet(object.appname) ? globalThis.String(object.appname) : "",
|
|
28792
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
28793
|
+
creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
|
|
28794
|
+
role: isSet(object.role) ? globalThis.Number(object.role) : 0,
|
|
28795
|
+
app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
|
|
28796
|
+
};
|
|
28797
|
+
},
|
|
28798
|
+
|
|
28799
|
+
toJSON(message: AddChannelAppRequest): unknown {
|
|
28800
|
+
const obj: any = {};
|
|
28801
|
+
if (message.appname !== "") {
|
|
28802
|
+
obj.appname = message.appname;
|
|
28803
|
+
}
|
|
28804
|
+
if (message.token !== "") {
|
|
28805
|
+
obj.token = message.token;
|
|
28806
|
+
}
|
|
28807
|
+
if (message.creator_id !== "") {
|
|
28808
|
+
obj.creator_id = message.creator_id;
|
|
28809
|
+
}
|
|
28810
|
+
if (message.role !== 0) {
|
|
28811
|
+
obj.role = Math.round(message.role);
|
|
28812
|
+
}
|
|
28813
|
+
if (message.app_url !== "") {
|
|
28814
|
+
obj.app_url = message.app_url;
|
|
28815
|
+
}
|
|
28816
|
+
return obj;
|
|
28817
|
+
},
|
|
28818
|
+
|
|
28819
|
+
create<I extends Exact<DeepPartial<AddChannelAppRequest>, I>>(base?: I): AddChannelAppRequest {
|
|
28820
|
+
return AddChannelAppRequest.fromPartial(base ?? ({} as any));
|
|
28821
|
+
},
|
|
28822
|
+
fromPartial<I extends Exact<DeepPartial<AddChannelAppRequest>, I>>(object: I): AddChannelAppRequest {
|
|
28823
|
+
const message = createBaseAddChannelAppRequest();
|
|
28824
|
+
message.appname = object.appname ?? "";
|
|
28825
|
+
message.token = object.token ?? "";
|
|
28826
|
+
message.creator_id = object.creator_id ?? "";
|
|
28827
|
+
message.role = object.role ?? 0;
|
|
28828
|
+
message.app_url = object.app_url ?? "";
|
|
28829
|
+
return message;
|
|
28830
|
+
},
|
|
28831
|
+
};
|
|
28832
|
+
|
|
28639
28833
|
function createBaseAppId(): AppId {
|
|
28640
28834
|
return { id: "" };
|
|
28641
28835
|
}
|