Skip to content

Commit 6e29751

Browse files
x0sinaImMohammad20000
authored andcommitted
chore: update api.ts file
1 parent 9750c37 commit 6e29751

File tree

1 file changed

+50
-12
lines changed

1 file changed

+50
-12
lines changed

dashboard/src/service/api/index.ts

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ export type UserResponseOnHoldExpireDuration = number | null
581581

582582
export type UserResponseNote = string | null
583583

584+
export type UserResponseDataLimitResetStrategy = UserDataLimitResetStrategy | null
585+
584586
/**
585587
* data_limit can be 0 or greater
586588
*/
@@ -612,6 +614,16 @@ export interface UserResponse {
612614
admin?: UserResponseAdmin
613615
}
614616

617+
export interface UserNotificationEnable {
618+
create?: boolean
619+
modify?: boolean
620+
delete?: boolean
621+
status_change?: boolean
622+
reset_data_usage?: boolean
623+
data_reset_by_next?: boolean
624+
subscription_revoked?: boolean
625+
}
626+
615627
export type UserModifyStatus = UserStatusModify | null
616628

617629
export type UserModifyNextPlan = NextPlanModel | null
@@ -663,8 +675,6 @@ export const UserDataLimitResetStrategy = {
663675
year: 'year',
664676
} as const
665677

666-
export type UserResponseDataLimitResetStrategy = UserDataLimitResetStrategy | null
667-
668678
export type UserCreateStatus = UserStatusCreate | null
669679

670680
export type UserCreateNextPlan = NextPlanModel | null
@@ -944,6 +954,8 @@ export type SettingsSchemaOutputSubscription = SubscriptionOutput | null
944954

945955
export type SettingsSchemaOutputNotificationEnable = NotificationEnable | null
946956

957+
export type SettingsSchemaOutputNotificationSettings = NotificationSettings | null
958+
947959
export type SettingsSchemaOutputWebhook = Webhook | null
948960

949961
export type SettingsSchemaOutputDiscord = Discord | null
@@ -1096,17 +1108,14 @@ export interface NotificationSettings {
10961108
max_retries: number
10971109
}
10981110

1099-
export type SettingsSchemaOutputNotificationSettings = NotificationSettings | null
1100-
11011111
export interface NotificationEnable {
1102-
admin?: boolean
1103-
core?: boolean
1104-
group?: boolean
1105-
host?: boolean
1106-
login?: boolean
1107-
node?: boolean
1108-
user?: boolean
1109-
user_template?: boolean
1112+
admin?: AdminNotificationEnable
1113+
core?: BaseNotificationEnable
1114+
group?: BaseNotificationEnable
1115+
host?: HostNotificationEnable
1116+
node?: NodeNotificationEnable
1117+
user?: UserNotificationEnable
1118+
user_template?: BaseNotificationEnable
11101119
days_left?: boolean
11111120
percentage_reached?: boolean
11121121
}
@@ -1209,6 +1218,14 @@ export interface NodeRealtimeStats {
12091218
outgoing_bandwidth_speed: number
12101219
}
12111220

1221+
export interface NodeNotificationEnable {
1222+
create?: boolean
1223+
modify?: boolean
1224+
delete?: boolean
1225+
connect?: boolean
1226+
error?: boolean
1227+
}
1228+
12121229
export type NodeModifyStatus = NodeStatus | null
12131230

12141231
export type NodeModifyGatherLogs = boolean | null
@@ -1361,6 +1378,13 @@ export interface KCPSettings {
13611378
write_buffer_size?: KCPSettingsWriteBufferSize
13621379
}
13631380

1381+
export interface HostNotificationEnable {
1382+
create?: boolean
1383+
modify?: boolean
1384+
delete?: boolean
1385+
modify_hosts?: boolean
1386+
}
1387+
13641388
export interface HTTPValidationError {
13651389
detail?: ValidationError[]
13661390
}
@@ -1677,6 +1701,12 @@ export interface BodyAdminTokenApiAdminTokenPost {
16771701
client_secret?: BodyAdminTokenApiAdminTokenPostClientSecret
16781702
}
16791703

1704+
export interface BaseNotificationEnable {
1705+
create?: boolean
1706+
modify?: boolean
1707+
delete?: boolean
1708+
}
1709+
16801710
export type BaseHostEchConfigList = string | null
16811711

16821712
export type BaseHostStatus = UserStatus[] | null
@@ -1765,6 +1795,14 @@ export interface ApplicationInput {
17651795
download_links: DownloadLink[]
17661796
}
17671797

1798+
export interface AdminNotificationEnable {
1799+
create?: boolean
1800+
modify?: boolean
1801+
delete?: boolean
1802+
reset_usage?: boolean
1803+
login?: boolean
1804+
}
1805+
17681806
export type AdminModifySupportUrl = string | null
17691807

17701808
export type AdminModifyProfileTitle = string | null

0 commit comments

Comments
 (0)