mezon-js-protobuf 1.4.14 → 1.4.16
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 +720 -0
- package/dist/mezon-js-protobuf/api/api.d.ts +342 -0
- package/dist/mezon-js-protobuf/google/protobuf/timestamp.d.ts +17 -29
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +185 -75
- package/dist/mezon-js-protobuf.cjs.js +121 -2
- package/dist/mezon-js-protobuf.esm.mjs +121 -2
- package/google/protobuf/timestamp.ts +208 -220
- package/package.json +1 -1
- package/rtapi/realtime.ts +154 -1
package/api/api.ts
CHANGED
|
@@ -1972,6 +1972,78 @@ export interface Permission {
|
|
|
1972
1972
|
active: number;
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
1975
|
+
/** Notification setting record */
|
|
1976
|
+
export interface NotificationSetting {
|
|
1977
|
+
/** Notification id */
|
|
1978
|
+
id: string;
|
|
1979
|
+
/** Notification title */
|
|
1980
|
+
notification_setting_type: string;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
/** Notification setting record */
|
|
1984
|
+
export interface NotificationChannelCategoySetting {
|
|
1985
|
+
/** Notification id */
|
|
1986
|
+
id: string;
|
|
1987
|
+
/** */
|
|
1988
|
+
channel_category_label: string;
|
|
1989
|
+
/** Notification title */
|
|
1990
|
+
notification_setting_type: string;
|
|
1991
|
+
/** */
|
|
1992
|
+
channel_category_title: string;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
export interface NotificationChannelCategoySettingsList {
|
|
1996
|
+
noti_channel_categoy_setting: NotificationChannelCategoySetting[];
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
/** Notification channel */
|
|
2000
|
+
export interface NotificationUserChannel {
|
|
2001
|
+
/** Notification id */
|
|
2002
|
+
id: string;
|
|
2003
|
+
/** */
|
|
2004
|
+
notification_setting_type: string;
|
|
2005
|
+
/** */
|
|
2006
|
+
time_mute: Date | undefined;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
/** */
|
|
2010
|
+
export interface DefaultNotificationClan {
|
|
2011
|
+
/** */
|
|
2012
|
+
clan_id: string;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
/** */
|
|
2016
|
+
export interface DefaultNotificationCategory {
|
|
2017
|
+
/** */
|
|
2018
|
+
category_id: string;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
/** */
|
|
2022
|
+
export interface NotificationChannel {
|
|
2023
|
+
/** */
|
|
2024
|
+
channel_id: string;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
/** */
|
|
2028
|
+
export interface NotificationSettingList {
|
|
2029
|
+
/** A list of notification setting. */
|
|
2030
|
+
notification_setting: NotificationSetting[];
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
/** set notification */
|
|
2034
|
+
export interface SetNotificationRequest {
|
|
2035
|
+
channel_id: string;
|
|
2036
|
+
notification_type: string;
|
|
2037
|
+
time_mute: Date | undefined;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/** set default notification */
|
|
2041
|
+
export interface SetDefaultNotificationRequest {
|
|
2042
|
+
clan_id: string;
|
|
2043
|
+
notification_type: string;
|
|
2044
|
+
category_id: string;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
1975
2047
|
/** A list of role description, usually a result of a list operation. */
|
|
1976
2048
|
export interface RoleList {
|
|
1977
2049
|
/** A list of role. */
|
|
@@ -13632,6 +13704,654 @@ export const Permission = {
|
|
|
13632
13704
|
},
|
|
13633
13705
|
};
|
|
13634
13706
|
|
|
13707
|
+
function createBaseNotificationSetting(): NotificationSetting {
|
|
13708
|
+
return { id: "", notification_setting_type: "" };
|
|
13709
|
+
}
|
|
13710
|
+
|
|
13711
|
+
export const NotificationSetting = {
|
|
13712
|
+
encode(message: NotificationSetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
13713
|
+
if (message.id !== "") {
|
|
13714
|
+
writer.uint32(10).string(message.id);
|
|
13715
|
+
}
|
|
13716
|
+
if (message.notification_setting_type !== "") {
|
|
13717
|
+
writer.uint32(18).string(message.notification_setting_type);
|
|
13718
|
+
}
|
|
13719
|
+
return writer;
|
|
13720
|
+
},
|
|
13721
|
+
|
|
13722
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): NotificationSetting {
|
|
13723
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
13724
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
13725
|
+
const message = createBaseNotificationSetting();
|
|
13726
|
+
while (reader.pos < end) {
|
|
13727
|
+
const tag = reader.uint32();
|
|
13728
|
+
switch (tag >>> 3) {
|
|
13729
|
+
case 1:
|
|
13730
|
+
message.id = reader.string();
|
|
13731
|
+
break;
|
|
13732
|
+
case 2:
|
|
13733
|
+
message.notification_setting_type = reader.string();
|
|
13734
|
+
break;
|
|
13735
|
+
default:
|
|
13736
|
+
reader.skipType(tag & 7);
|
|
13737
|
+
break;
|
|
13738
|
+
}
|
|
13739
|
+
}
|
|
13740
|
+
return message;
|
|
13741
|
+
},
|
|
13742
|
+
|
|
13743
|
+
fromJSON(object: any): NotificationSetting {
|
|
13744
|
+
return {
|
|
13745
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
13746
|
+
notification_setting_type: isSet(object.notification_setting_type)
|
|
13747
|
+
? String(object.notification_setting_type)
|
|
13748
|
+
: "",
|
|
13749
|
+
};
|
|
13750
|
+
},
|
|
13751
|
+
|
|
13752
|
+
toJSON(message: NotificationSetting): unknown {
|
|
13753
|
+
const obj: any = {};
|
|
13754
|
+
message.id !== undefined && (obj.id = message.id);
|
|
13755
|
+
message.notification_setting_type !== undefined &&
|
|
13756
|
+
(obj.notification_setting_type = message.notification_setting_type);
|
|
13757
|
+
return obj;
|
|
13758
|
+
},
|
|
13759
|
+
|
|
13760
|
+
create<I extends Exact<DeepPartial<NotificationSetting>, I>>(base?: I): NotificationSetting {
|
|
13761
|
+
return NotificationSetting.fromPartial(base ?? {});
|
|
13762
|
+
},
|
|
13763
|
+
|
|
13764
|
+
fromPartial<I extends Exact<DeepPartial<NotificationSetting>, I>>(object: I): NotificationSetting {
|
|
13765
|
+
const message = createBaseNotificationSetting();
|
|
13766
|
+
message.id = object.id ?? "";
|
|
13767
|
+
message.notification_setting_type = object.notification_setting_type ?? "";
|
|
13768
|
+
return message;
|
|
13769
|
+
},
|
|
13770
|
+
};
|
|
13771
|
+
|
|
13772
|
+
function createBaseNotificationChannelCategoySetting(): NotificationChannelCategoySetting {
|
|
13773
|
+
return { id: "", channel_category_label: "", notification_setting_type: "", channel_category_title: "" };
|
|
13774
|
+
}
|
|
13775
|
+
|
|
13776
|
+
export const NotificationChannelCategoySetting = {
|
|
13777
|
+
encode(message: NotificationChannelCategoySetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
13778
|
+
if (message.id !== "") {
|
|
13779
|
+
writer.uint32(10).string(message.id);
|
|
13780
|
+
}
|
|
13781
|
+
if (message.channel_category_label !== "") {
|
|
13782
|
+
writer.uint32(18).string(message.channel_category_label);
|
|
13783
|
+
}
|
|
13784
|
+
if (message.notification_setting_type !== "") {
|
|
13785
|
+
writer.uint32(26).string(message.notification_setting_type);
|
|
13786
|
+
}
|
|
13787
|
+
if (message.channel_category_title !== "") {
|
|
13788
|
+
writer.uint32(34).string(message.channel_category_title);
|
|
13789
|
+
}
|
|
13790
|
+
return writer;
|
|
13791
|
+
},
|
|
13792
|
+
|
|
13793
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): NotificationChannelCategoySetting {
|
|
13794
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
13795
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
13796
|
+
const message = createBaseNotificationChannelCategoySetting();
|
|
13797
|
+
while (reader.pos < end) {
|
|
13798
|
+
const tag = reader.uint32();
|
|
13799
|
+
switch (tag >>> 3) {
|
|
13800
|
+
case 1:
|
|
13801
|
+
message.id = reader.string();
|
|
13802
|
+
break;
|
|
13803
|
+
case 2:
|
|
13804
|
+
message.channel_category_label = reader.string();
|
|
13805
|
+
break;
|
|
13806
|
+
case 3:
|
|
13807
|
+
message.notification_setting_type = reader.string();
|
|
13808
|
+
break;
|
|
13809
|
+
case 4:
|
|
13810
|
+
message.channel_category_title = reader.string();
|
|
13811
|
+
break;
|
|
13812
|
+
default:
|
|
13813
|
+
reader.skipType(tag & 7);
|
|
13814
|
+
break;
|
|
13815
|
+
}
|
|
13816
|
+
}
|
|
13817
|
+
return message;
|
|
13818
|
+
},
|
|
13819
|
+
|
|
13820
|
+
fromJSON(object: any): NotificationChannelCategoySetting {
|
|
13821
|
+
return {
|
|
13822
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
13823
|
+
channel_category_label: isSet(object.channel_category_label) ? String(object.channel_category_label) : "",
|
|
13824
|
+
notification_setting_type: isSet(object.notification_setting_type)
|
|
13825
|
+
? String(object.notification_setting_type)
|
|
13826
|
+
: "",
|
|
13827
|
+
channel_category_title: isSet(object.channel_category_title) ? String(object.channel_category_title) : "",
|
|
13828
|
+
};
|
|
13829
|
+
},
|
|
13830
|
+
|
|
13831
|
+
toJSON(message: NotificationChannelCategoySetting): unknown {
|
|
13832
|
+
const obj: any = {};
|
|
13833
|
+
message.id !== undefined && (obj.id = message.id);
|
|
13834
|
+
message.channel_category_label !== undefined && (obj.channel_category_label = message.channel_category_label);
|
|
13835
|
+
message.notification_setting_type !== undefined &&
|
|
13836
|
+
(obj.notification_setting_type = message.notification_setting_type);
|
|
13837
|
+
message.channel_category_title !== undefined && (obj.channel_category_title = message.channel_category_title);
|
|
13838
|
+
return obj;
|
|
13839
|
+
},
|
|
13840
|
+
|
|
13841
|
+
create<I extends Exact<DeepPartial<NotificationChannelCategoySetting>, I>>(
|
|
13842
|
+
base?: I,
|
|
13843
|
+
): NotificationChannelCategoySetting {
|
|
13844
|
+
return NotificationChannelCategoySetting.fromPartial(base ?? {});
|
|
13845
|
+
},
|
|
13846
|
+
|
|
13847
|
+
fromPartial<I extends Exact<DeepPartial<NotificationChannelCategoySetting>, I>>(
|
|
13848
|
+
object: I,
|
|
13849
|
+
): NotificationChannelCategoySetting {
|
|
13850
|
+
const message = createBaseNotificationChannelCategoySetting();
|
|
13851
|
+
message.id = object.id ?? "";
|
|
13852
|
+
message.channel_category_label = object.channel_category_label ?? "";
|
|
13853
|
+
message.notification_setting_type = object.notification_setting_type ?? "";
|
|
13854
|
+
message.channel_category_title = object.channel_category_title ?? "";
|
|
13855
|
+
return message;
|
|
13856
|
+
},
|
|
13857
|
+
};
|
|
13858
|
+
|
|
13859
|
+
function createBaseNotificationChannelCategoySettingsList(): NotificationChannelCategoySettingsList {
|
|
13860
|
+
return { noti_channel_categoy_setting: [] };
|
|
13861
|
+
}
|
|
13862
|
+
|
|
13863
|
+
export const NotificationChannelCategoySettingsList = {
|
|
13864
|
+
encode(message: NotificationChannelCategoySettingsList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
13865
|
+
for (const v of message.noti_channel_categoy_setting) {
|
|
13866
|
+
NotificationChannelCategoySetting.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
13867
|
+
}
|
|
13868
|
+
return writer;
|
|
13869
|
+
},
|
|
13870
|
+
|
|
13871
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): NotificationChannelCategoySettingsList {
|
|
13872
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
13873
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
13874
|
+
const message = createBaseNotificationChannelCategoySettingsList();
|
|
13875
|
+
while (reader.pos < end) {
|
|
13876
|
+
const tag = reader.uint32();
|
|
13877
|
+
switch (tag >>> 3) {
|
|
13878
|
+
case 1:
|
|
13879
|
+
message.noti_channel_categoy_setting.push(NotificationChannelCategoySetting.decode(reader, reader.uint32()));
|
|
13880
|
+
break;
|
|
13881
|
+
default:
|
|
13882
|
+
reader.skipType(tag & 7);
|
|
13883
|
+
break;
|
|
13884
|
+
}
|
|
13885
|
+
}
|
|
13886
|
+
return message;
|
|
13887
|
+
},
|
|
13888
|
+
|
|
13889
|
+
fromJSON(object: any): NotificationChannelCategoySettingsList {
|
|
13890
|
+
return {
|
|
13891
|
+
noti_channel_categoy_setting: Array.isArray(object?.noti_channel_categoy_setting)
|
|
13892
|
+
? object.noti_channel_categoy_setting.map((e: any) => NotificationChannelCategoySetting.fromJSON(e))
|
|
13893
|
+
: [],
|
|
13894
|
+
};
|
|
13895
|
+
},
|
|
13896
|
+
|
|
13897
|
+
toJSON(message: NotificationChannelCategoySettingsList): unknown {
|
|
13898
|
+
const obj: any = {};
|
|
13899
|
+
if (message.noti_channel_categoy_setting) {
|
|
13900
|
+
obj.noti_channel_categoy_setting = message.noti_channel_categoy_setting.map((e) =>
|
|
13901
|
+
e ? NotificationChannelCategoySetting.toJSON(e) : undefined
|
|
13902
|
+
);
|
|
13903
|
+
} else {
|
|
13904
|
+
obj.noti_channel_categoy_setting = [];
|
|
13905
|
+
}
|
|
13906
|
+
return obj;
|
|
13907
|
+
},
|
|
13908
|
+
|
|
13909
|
+
create<I extends Exact<DeepPartial<NotificationChannelCategoySettingsList>, I>>(
|
|
13910
|
+
base?: I,
|
|
13911
|
+
): NotificationChannelCategoySettingsList {
|
|
13912
|
+
return NotificationChannelCategoySettingsList.fromPartial(base ?? {});
|
|
13913
|
+
},
|
|
13914
|
+
|
|
13915
|
+
fromPartial<I extends Exact<DeepPartial<NotificationChannelCategoySettingsList>, I>>(
|
|
13916
|
+
object: I,
|
|
13917
|
+
): NotificationChannelCategoySettingsList {
|
|
13918
|
+
const message = createBaseNotificationChannelCategoySettingsList();
|
|
13919
|
+
message.noti_channel_categoy_setting =
|
|
13920
|
+
object.noti_channel_categoy_setting?.map((e) => NotificationChannelCategoySetting.fromPartial(e)) || [];
|
|
13921
|
+
return message;
|
|
13922
|
+
},
|
|
13923
|
+
};
|
|
13924
|
+
|
|
13925
|
+
function createBaseNotificationUserChannel(): NotificationUserChannel {
|
|
13926
|
+
return { id: "", notification_setting_type: "", time_mute: undefined };
|
|
13927
|
+
}
|
|
13928
|
+
|
|
13929
|
+
export const NotificationUserChannel = {
|
|
13930
|
+
encode(message: NotificationUserChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
13931
|
+
if (message.id !== "") {
|
|
13932
|
+
writer.uint32(10).string(message.id);
|
|
13933
|
+
}
|
|
13934
|
+
if (message.notification_setting_type !== "") {
|
|
13935
|
+
writer.uint32(18).string(message.notification_setting_type);
|
|
13936
|
+
}
|
|
13937
|
+
if (message.time_mute !== undefined) {
|
|
13938
|
+
Timestamp.encode(toTimestamp(message.time_mute), writer.uint32(26).fork()).ldelim();
|
|
13939
|
+
}
|
|
13940
|
+
return writer;
|
|
13941
|
+
},
|
|
13942
|
+
|
|
13943
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): NotificationUserChannel {
|
|
13944
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
13945
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
13946
|
+
const message = createBaseNotificationUserChannel();
|
|
13947
|
+
while (reader.pos < end) {
|
|
13948
|
+
const tag = reader.uint32();
|
|
13949
|
+
switch (tag >>> 3) {
|
|
13950
|
+
case 1:
|
|
13951
|
+
message.id = reader.string();
|
|
13952
|
+
break;
|
|
13953
|
+
case 2:
|
|
13954
|
+
message.notification_setting_type = reader.string();
|
|
13955
|
+
break;
|
|
13956
|
+
case 3:
|
|
13957
|
+
message.time_mute = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
13958
|
+
break;
|
|
13959
|
+
default:
|
|
13960
|
+
reader.skipType(tag & 7);
|
|
13961
|
+
break;
|
|
13962
|
+
}
|
|
13963
|
+
}
|
|
13964
|
+
return message;
|
|
13965
|
+
},
|
|
13966
|
+
|
|
13967
|
+
fromJSON(object: any): NotificationUserChannel {
|
|
13968
|
+
return {
|
|
13969
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
13970
|
+
notification_setting_type: isSet(object.notification_setting_type)
|
|
13971
|
+
? String(object.notification_setting_type)
|
|
13972
|
+
: "",
|
|
13973
|
+
time_mute: isSet(object.time_mute) ? fromJsonTimestamp(object.time_mute) : undefined,
|
|
13974
|
+
};
|
|
13975
|
+
},
|
|
13976
|
+
|
|
13977
|
+
toJSON(message: NotificationUserChannel): unknown {
|
|
13978
|
+
const obj: any = {};
|
|
13979
|
+
message.id !== undefined && (obj.id = message.id);
|
|
13980
|
+
message.notification_setting_type !== undefined &&
|
|
13981
|
+
(obj.notification_setting_type = message.notification_setting_type);
|
|
13982
|
+
message.time_mute !== undefined && (obj.time_mute = message.time_mute.toISOString());
|
|
13983
|
+
return obj;
|
|
13984
|
+
},
|
|
13985
|
+
|
|
13986
|
+
create<I extends Exact<DeepPartial<NotificationUserChannel>, I>>(base?: I): NotificationUserChannel {
|
|
13987
|
+
return NotificationUserChannel.fromPartial(base ?? {});
|
|
13988
|
+
},
|
|
13989
|
+
|
|
13990
|
+
fromPartial<I extends Exact<DeepPartial<NotificationUserChannel>, I>>(object: I): NotificationUserChannel {
|
|
13991
|
+
const message = createBaseNotificationUserChannel();
|
|
13992
|
+
message.id = object.id ?? "";
|
|
13993
|
+
message.notification_setting_type = object.notification_setting_type ?? "";
|
|
13994
|
+
message.time_mute = object.time_mute ?? undefined;
|
|
13995
|
+
return message;
|
|
13996
|
+
},
|
|
13997
|
+
};
|
|
13998
|
+
|
|
13999
|
+
function createBaseDefaultNotificationClan(): DefaultNotificationClan {
|
|
14000
|
+
return { clan_id: "" };
|
|
14001
|
+
}
|
|
14002
|
+
|
|
14003
|
+
export const DefaultNotificationClan = {
|
|
14004
|
+
encode(message: DefaultNotificationClan, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14005
|
+
if (message.clan_id !== "") {
|
|
14006
|
+
writer.uint32(10).string(message.clan_id);
|
|
14007
|
+
}
|
|
14008
|
+
return writer;
|
|
14009
|
+
},
|
|
14010
|
+
|
|
14011
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DefaultNotificationClan {
|
|
14012
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
14013
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14014
|
+
const message = createBaseDefaultNotificationClan();
|
|
14015
|
+
while (reader.pos < end) {
|
|
14016
|
+
const tag = reader.uint32();
|
|
14017
|
+
switch (tag >>> 3) {
|
|
14018
|
+
case 1:
|
|
14019
|
+
message.clan_id = reader.string();
|
|
14020
|
+
break;
|
|
14021
|
+
default:
|
|
14022
|
+
reader.skipType(tag & 7);
|
|
14023
|
+
break;
|
|
14024
|
+
}
|
|
14025
|
+
}
|
|
14026
|
+
return message;
|
|
14027
|
+
},
|
|
14028
|
+
|
|
14029
|
+
fromJSON(object: any): DefaultNotificationClan {
|
|
14030
|
+
return { clan_id: isSet(object.clan_id) ? String(object.clan_id) : "" };
|
|
14031
|
+
},
|
|
14032
|
+
|
|
14033
|
+
toJSON(message: DefaultNotificationClan): unknown {
|
|
14034
|
+
const obj: any = {};
|
|
14035
|
+
message.clan_id !== undefined && (obj.clan_id = message.clan_id);
|
|
14036
|
+
return obj;
|
|
14037
|
+
},
|
|
14038
|
+
|
|
14039
|
+
create<I extends Exact<DeepPartial<DefaultNotificationClan>, I>>(base?: I): DefaultNotificationClan {
|
|
14040
|
+
return DefaultNotificationClan.fromPartial(base ?? {});
|
|
14041
|
+
},
|
|
14042
|
+
|
|
14043
|
+
fromPartial<I extends Exact<DeepPartial<DefaultNotificationClan>, I>>(object: I): DefaultNotificationClan {
|
|
14044
|
+
const message = createBaseDefaultNotificationClan();
|
|
14045
|
+
message.clan_id = object.clan_id ?? "";
|
|
14046
|
+
return message;
|
|
14047
|
+
},
|
|
14048
|
+
};
|
|
14049
|
+
|
|
14050
|
+
function createBaseDefaultNotificationCategory(): DefaultNotificationCategory {
|
|
14051
|
+
return { category_id: "" };
|
|
14052
|
+
}
|
|
14053
|
+
|
|
14054
|
+
export const DefaultNotificationCategory = {
|
|
14055
|
+
encode(message: DefaultNotificationCategory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14056
|
+
if (message.category_id !== "") {
|
|
14057
|
+
writer.uint32(10).string(message.category_id);
|
|
14058
|
+
}
|
|
14059
|
+
return writer;
|
|
14060
|
+
},
|
|
14061
|
+
|
|
14062
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DefaultNotificationCategory {
|
|
14063
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
14064
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14065
|
+
const message = createBaseDefaultNotificationCategory();
|
|
14066
|
+
while (reader.pos < end) {
|
|
14067
|
+
const tag = reader.uint32();
|
|
14068
|
+
switch (tag >>> 3) {
|
|
14069
|
+
case 1:
|
|
14070
|
+
message.category_id = reader.string();
|
|
14071
|
+
break;
|
|
14072
|
+
default:
|
|
14073
|
+
reader.skipType(tag & 7);
|
|
14074
|
+
break;
|
|
14075
|
+
}
|
|
14076
|
+
}
|
|
14077
|
+
return message;
|
|
14078
|
+
},
|
|
14079
|
+
|
|
14080
|
+
fromJSON(object: any): DefaultNotificationCategory {
|
|
14081
|
+
return { category_id: isSet(object.category_id) ? String(object.category_id) : "" };
|
|
14082
|
+
},
|
|
14083
|
+
|
|
14084
|
+
toJSON(message: DefaultNotificationCategory): unknown {
|
|
14085
|
+
const obj: any = {};
|
|
14086
|
+
message.category_id !== undefined && (obj.category_id = message.category_id);
|
|
14087
|
+
return obj;
|
|
14088
|
+
},
|
|
14089
|
+
|
|
14090
|
+
create<I extends Exact<DeepPartial<DefaultNotificationCategory>, I>>(base?: I): DefaultNotificationCategory {
|
|
14091
|
+
return DefaultNotificationCategory.fromPartial(base ?? {});
|
|
14092
|
+
},
|
|
14093
|
+
|
|
14094
|
+
fromPartial<I extends Exact<DeepPartial<DefaultNotificationCategory>, I>>(object: I): DefaultNotificationCategory {
|
|
14095
|
+
const message = createBaseDefaultNotificationCategory();
|
|
14096
|
+
message.category_id = object.category_id ?? "";
|
|
14097
|
+
return message;
|
|
14098
|
+
},
|
|
14099
|
+
};
|
|
14100
|
+
|
|
14101
|
+
function createBaseNotificationChannel(): NotificationChannel {
|
|
14102
|
+
return { channel_id: "" };
|
|
14103
|
+
}
|
|
14104
|
+
|
|
14105
|
+
export const NotificationChannel = {
|
|
14106
|
+
encode(message: NotificationChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14107
|
+
if (message.channel_id !== "") {
|
|
14108
|
+
writer.uint32(10).string(message.channel_id);
|
|
14109
|
+
}
|
|
14110
|
+
return writer;
|
|
14111
|
+
},
|
|
14112
|
+
|
|
14113
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): NotificationChannel {
|
|
14114
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
14115
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14116
|
+
const message = createBaseNotificationChannel();
|
|
14117
|
+
while (reader.pos < end) {
|
|
14118
|
+
const tag = reader.uint32();
|
|
14119
|
+
switch (tag >>> 3) {
|
|
14120
|
+
case 1:
|
|
14121
|
+
message.channel_id = reader.string();
|
|
14122
|
+
break;
|
|
14123
|
+
default:
|
|
14124
|
+
reader.skipType(tag & 7);
|
|
14125
|
+
break;
|
|
14126
|
+
}
|
|
14127
|
+
}
|
|
14128
|
+
return message;
|
|
14129
|
+
},
|
|
14130
|
+
|
|
14131
|
+
fromJSON(object: any): NotificationChannel {
|
|
14132
|
+
return { channel_id: isSet(object.channel_id) ? String(object.channel_id) : "" };
|
|
14133
|
+
},
|
|
14134
|
+
|
|
14135
|
+
toJSON(message: NotificationChannel): unknown {
|
|
14136
|
+
const obj: any = {};
|
|
14137
|
+
message.channel_id !== undefined && (obj.channel_id = message.channel_id);
|
|
14138
|
+
return obj;
|
|
14139
|
+
},
|
|
14140
|
+
|
|
14141
|
+
create<I extends Exact<DeepPartial<NotificationChannel>, I>>(base?: I): NotificationChannel {
|
|
14142
|
+
return NotificationChannel.fromPartial(base ?? {});
|
|
14143
|
+
},
|
|
14144
|
+
|
|
14145
|
+
fromPartial<I extends Exact<DeepPartial<NotificationChannel>, I>>(object: I): NotificationChannel {
|
|
14146
|
+
const message = createBaseNotificationChannel();
|
|
14147
|
+
message.channel_id = object.channel_id ?? "";
|
|
14148
|
+
return message;
|
|
14149
|
+
},
|
|
14150
|
+
};
|
|
14151
|
+
|
|
14152
|
+
function createBaseNotificationSettingList(): NotificationSettingList {
|
|
14153
|
+
return { notification_setting: [] };
|
|
14154
|
+
}
|
|
14155
|
+
|
|
14156
|
+
export const NotificationSettingList = {
|
|
14157
|
+
encode(message: NotificationSettingList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14158
|
+
for (const v of message.notification_setting) {
|
|
14159
|
+
NotificationSetting.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
14160
|
+
}
|
|
14161
|
+
return writer;
|
|
14162
|
+
},
|
|
14163
|
+
|
|
14164
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): NotificationSettingList {
|
|
14165
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
14166
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14167
|
+
const message = createBaseNotificationSettingList();
|
|
14168
|
+
while (reader.pos < end) {
|
|
14169
|
+
const tag = reader.uint32();
|
|
14170
|
+
switch (tag >>> 3) {
|
|
14171
|
+
case 1:
|
|
14172
|
+
message.notification_setting.push(NotificationSetting.decode(reader, reader.uint32()));
|
|
14173
|
+
break;
|
|
14174
|
+
default:
|
|
14175
|
+
reader.skipType(tag & 7);
|
|
14176
|
+
break;
|
|
14177
|
+
}
|
|
14178
|
+
}
|
|
14179
|
+
return message;
|
|
14180
|
+
},
|
|
14181
|
+
|
|
14182
|
+
fromJSON(object: any): NotificationSettingList {
|
|
14183
|
+
return {
|
|
14184
|
+
notification_setting: Array.isArray(object?.notification_setting)
|
|
14185
|
+
? object.notification_setting.map((e: any) => NotificationSetting.fromJSON(e))
|
|
14186
|
+
: [],
|
|
14187
|
+
};
|
|
14188
|
+
},
|
|
14189
|
+
|
|
14190
|
+
toJSON(message: NotificationSettingList): unknown {
|
|
14191
|
+
const obj: any = {};
|
|
14192
|
+
if (message.notification_setting) {
|
|
14193
|
+
obj.notification_setting = message.notification_setting.map((e) => e ? NotificationSetting.toJSON(e) : undefined);
|
|
14194
|
+
} else {
|
|
14195
|
+
obj.notification_setting = [];
|
|
14196
|
+
}
|
|
14197
|
+
return obj;
|
|
14198
|
+
},
|
|
14199
|
+
|
|
14200
|
+
create<I extends Exact<DeepPartial<NotificationSettingList>, I>>(base?: I): NotificationSettingList {
|
|
14201
|
+
return NotificationSettingList.fromPartial(base ?? {});
|
|
14202
|
+
},
|
|
14203
|
+
|
|
14204
|
+
fromPartial<I extends Exact<DeepPartial<NotificationSettingList>, I>>(object: I): NotificationSettingList {
|
|
14205
|
+
const message = createBaseNotificationSettingList();
|
|
14206
|
+
message.notification_setting = object.notification_setting?.map((e) => NotificationSetting.fromPartial(e)) || [];
|
|
14207
|
+
return message;
|
|
14208
|
+
},
|
|
14209
|
+
};
|
|
14210
|
+
|
|
14211
|
+
function createBaseSetNotificationRequest(): SetNotificationRequest {
|
|
14212
|
+
return { channel_id: "", notification_type: "", time_mute: undefined };
|
|
14213
|
+
}
|
|
14214
|
+
|
|
14215
|
+
export const SetNotificationRequest = {
|
|
14216
|
+
encode(message: SetNotificationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14217
|
+
if (message.channel_id !== "") {
|
|
14218
|
+
writer.uint32(10).string(message.channel_id);
|
|
14219
|
+
}
|
|
14220
|
+
if (message.notification_type !== "") {
|
|
14221
|
+
writer.uint32(18).string(message.notification_type);
|
|
14222
|
+
}
|
|
14223
|
+
if (message.time_mute !== undefined) {
|
|
14224
|
+
Timestamp.encode(toTimestamp(message.time_mute), writer.uint32(26).fork()).ldelim();
|
|
14225
|
+
}
|
|
14226
|
+
return writer;
|
|
14227
|
+
},
|
|
14228
|
+
|
|
14229
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SetNotificationRequest {
|
|
14230
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
14231
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14232
|
+
const message = createBaseSetNotificationRequest();
|
|
14233
|
+
while (reader.pos < end) {
|
|
14234
|
+
const tag = reader.uint32();
|
|
14235
|
+
switch (tag >>> 3) {
|
|
14236
|
+
case 1:
|
|
14237
|
+
message.channel_id = reader.string();
|
|
14238
|
+
break;
|
|
14239
|
+
case 2:
|
|
14240
|
+
message.notification_type = reader.string();
|
|
14241
|
+
break;
|
|
14242
|
+
case 3:
|
|
14243
|
+
message.time_mute = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
14244
|
+
break;
|
|
14245
|
+
default:
|
|
14246
|
+
reader.skipType(tag & 7);
|
|
14247
|
+
break;
|
|
14248
|
+
}
|
|
14249
|
+
}
|
|
14250
|
+
return message;
|
|
14251
|
+
},
|
|
14252
|
+
|
|
14253
|
+
fromJSON(object: any): SetNotificationRequest {
|
|
14254
|
+
return {
|
|
14255
|
+
channel_id: isSet(object.channel_id) ? String(object.channel_id) : "",
|
|
14256
|
+
notification_type: isSet(object.notification_type) ? String(object.notification_type) : "",
|
|
14257
|
+
time_mute: isSet(object.time_mute) ? fromJsonTimestamp(object.time_mute) : undefined,
|
|
14258
|
+
};
|
|
14259
|
+
},
|
|
14260
|
+
|
|
14261
|
+
toJSON(message: SetNotificationRequest): unknown {
|
|
14262
|
+
const obj: any = {};
|
|
14263
|
+
message.channel_id !== undefined && (obj.channel_id = message.channel_id);
|
|
14264
|
+
message.notification_type !== undefined && (obj.notification_type = message.notification_type);
|
|
14265
|
+
message.time_mute !== undefined && (obj.time_mute = message.time_mute.toISOString());
|
|
14266
|
+
return obj;
|
|
14267
|
+
},
|
|
14268
|
+
|
|
14269
|
+
create<I extends Exact<DeepPartial<SetNotificationRequest>, I>>(base?: I): SetNotificationRequest {
|
|
14270
|
+
return SetNotificationRequest.fromPartial(base ?? {});
|
|
14271
|
+
},
|
|
14272
|
+
|
|
14273
|
+
fromPartial<I extends Exact<DeepPartial<SetNotificationRequest>, I>>(object: I): SetNotificationRequest {
|
|
14274
|
+
const message = createBaseSetNotificationRequest();
|
|
14275
|
+
message.channel_id = object.channel_id ?? "";
|
|
14276
|
+
message.notification_type = object.notification_type ?? "";
|
|
14277
|
+
message.time_mute = object.time_mute ?? undefined;
|
|
14278
|
+
return message;
|
|
14279
|
+
},
|
|
14280
|
+
};
|
|
14281
|
+
|
|
14282
|
+
function createBaseSetDefaultNotificationRequest(): SetDefaultNotificationRequest {
|
|
14283
|
+
return { clan_id: "", notification_type: "", category_id: "" };
|
|
14284
|
+
}
|
|
14285
|
+
|
|
14286
|
+
export const SetDefaultNotificationRequest = {
|
|
14287
|
+
encode(message: SetDefaultNotificationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14288
|
+
if (message.clan_id !== "") {
|
|
14289
|
+
writer.uint32(10).string(message.clan_id);
|
|
14290
|
+
}
|
|
14291
|
+
if (message.notification_type !== "") {
|
|
14292
|
+
writer.uint32(18).string(message.notification_type);
|
|
14293
|
+
}
|
|
14294
|
+
if (message.category_id !== "") {
|
|
14295
|
+
writer.uint32(26).string(message.category_id);
|
|
14296
|
+
}
|
|
14297
|
+
return writer;
|
|
14298
|
+
},
|
|
14299
|
+
|
|
14300
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SetDefaultNotificationRequest {
|
|
14301
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
14302
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14303
|
+
const message = createBaseSetDefaultNotificationRequest();
|
|
14304
|
+
while (reader.pos < end) {
|
|
14305
|
+
const tag = reader.uint32();
|
|
14306
|
+
switch (tag >>> 3) {
|
|
14307
|
+
case 1:
|
|
14308
|
+
message.clan_id = reader.string();
|
|
14309
|
+
break;
|
|
14310
|
+
case 2:
|
|
14311
|
+
message.notification_type = reader.string();
|
|
14312
|
+
break;
|
|
14313
|
+
case 3:
|
|
14314
|
+
message.category_id = reader.string();
|
|
14315
|
+
break;
|
|
14316
|
+
default:
|
|
14317
|
+
reader.skipType(tag & 7);
|
|
14318
|
+
break;
|
|
14319
|
+
}
|
|
14320
|
+
}
|
|
14321
|
+
return message;
|
|
14322
|
+
},
|
|
14323
|
+
|
|
14324
|
+
fromJSON(object: any): SetDefaultNotificationRequest {
|
|
14325
|
+
return {
|
|
14326
|
+
clan_id: isSet(object.clan_id) ? String(object.clan_id) : "",
|
|
14327
|
+
notification_type: isSet(object.notification_type) ? String(object.notification_type) : "",
|
|
14328
|
+
category_id: isSet(object.category_id) ? String(object.category_id) : "",
|
|
14329
|
+
};
|
|
14330
|
+
},
|
|
14331
|
+
|
|
14332
|
+
toJSON(message: SetDefaultNotificationRequest): unknown {
|
|
14333
|
+
const obj: any = {};
|
|
14334
|
+
message.clan_id !== undefined && (obj.clan_id = message.clan_id);
|
|
14335
|
+
message.notification_type !== undefined && (obj.notification_type = message.notification_type);
|
|
14336
|
+
message.category_id !== undefined && (obj.category_id = message.category_id);
|
|
14337
|
+
return obj;
|
|
14338
|
+
},
|
|
14339
|
+
|
|
14340
|
+
create<I extends Exact<DeepPartial<SetDefaultNotificationRequest>, I>>(base?: I): SetDefaultNotificationRequest {
|
|
14341
|
+
return SetDefaultNotificationRequest.fromPartial(base ?? {});
|
|
14342
|
+
},
|
|
14343
|
+
|
|
14344
|
+
fromPartial<I extends Exact<DeepPartial<SetDefaultNotificationRequest>, I>>(
|
|
14345
|
+
object: I,
|
|
14346
|
+
): SetDefaultNotificationRequest {
|
|
14347
|
+
const message = createBaseSetDefaultNotificationRequest();
|
|
14348
|
+
message.clan_id = object.clan_id ?? "";
|
|
14349
|
+
message.notification_type = object.notification_type ?? "";
|
|
14350
|
+
message.category_id = object.category_id ?? "";
|
|
14351
|
+
return message;
|
|
14352
|
+
},
|
|
14353
|
+
};
|
|
14354
|
+
|
|
13635
14355
|
function createBaseRoleList(): RoleList {
|
|
13636
14356
|
return { roles: [], next_cursor: "", prev_cursor: "", cacheable_cursor: "" };
|
|
13637
14357
|
}
|