| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- // Code generated by tools/openapigen. DO NOT EDIT.
- import { z } from 'zod';
- export const ProtocolSchema = z.string();
- export type Protocol = z.infer<typeof ProtocolSchema>;
- export const AllSettingSchema = z.object({
- datepicker: z.string(),
- expireDiff: z.number().int().min(0),
- externalTrafficInformEnable: z.boolean(),
- externalTrafficInformURI: z.string(),
- ldapAutoCreate: z.boolean(),
- ldapAutoDelete: z.boolean(),
- ldapBaseDN: z.string(),
- ldapBindDN: z.string(),
- ldapDefaultExpiryDays: z.number().int().min(0),
- ldapDefaultLimitIP: z.number().int().min(0),
- ldapDefaultTotalGB: z.number().int().min(0),
- ldapEnable: z.boolean(),
- ldapFlagField: z.string(),
- ldapHost: z.string(),
- ldapInboundTags: z.string(),
- ldapInvertFlag: z.boolean(),
- ldapPassword: z.string(),
- ldapPort: z.number().int().min(0).max(65535),
- ldapSyncCron: z.string(),
- ldapTruthyValues: z.string(),
- ldapUseTLS: z.boolean(),
- ldapUserAttr: z.string(),
- ldapUserFilter: z.string(),
- ldapVlessField: z.string(),
- pageSize: z.number().int().min(1).max(1000),
- remarkModel: z.string(),
- restartXrayOnClientDisable: z.boolean(),
- sessionMaxAge: z.number().int().min(0).max(525600),
- subAnnounce: z.string(),
- subCertFile: z.string(),
- subClashEnable: z.boolean(),
- subClashPath: z.string(),
- subClashURI: z.string(),
- subDomain: z.string(),
- subEmailInRemark: z.boolean(),
- subEnable: z.boolean(),
- subEnableRouting: z.boolean(),
- subEncrypt: z.boolean(),
- subJsonEnable: z.boolean(),
- subJsonFragment: z.string(),
- subJsonMux: z.string(),
- subJsonNoises: z.string(),
- subJsonPath: z.string(),
- subJsonRules: z.string(),
- subJsonURI: z.string(),
- subKeyFile: z.string(),
- subListen: z.string(),
- subPath: z.string(),
- subPort: z.number().int().min(1).max(65535),
- subProfileUrl: z.string(),
- subRoutingRules: z.string(),
- subShowInfo: z.boolean(),
- subSupportUrl: z.string(),
- subTitle: z.string(),
- subURI: z.string(),
- subUpdates: z.number().int().min(0).max(525600),
- tgBotAPIServer: z.string(),
- tgBotBackup: z.boolean(),
- tgBotChatId: z.string(),
- tgBotEnable: z.boolean(),
- tgBotLoginNotify: z.boolean(),
- tgBotProxy: z.string(),
- tgBotToken: z.string(),
- tgCpu: z.number().int().min(0).max(100),
- tgLang: z.string(),
- tgRunTime: z.string(),
- timeLocation: z.string(),
- trafficDiff: z.number().int().min(0).max(100),
- trustedProxyCIDRs: z.string(),
- twoFactorEnable: z.boolean(),
- twoFactorToken: z.string(),
- webBasePath: z.string(),
- webCertFile: z.string(),
- webDomain: z.string(),
- webKeyFile: z.string(),
- webListen: z.string(),
- webPort: z.number().int().min(1).max(65535),
- });
- export type AllSetting = z.infer<typeof AllSettingSchema>;
- export const AllSettingViewSchema = z.object({
- datepicker: z.string(),
- expireDiff: z.number().int().min(0),
- externalTrafficInformEnable: z.boolean(),
- externalTrafficInformURI: z.string(),
- hasApiToken: z.boolean(),
- hasLdapPassword: z.boolean(),
- hasNordSecret: z.boolean(),
- hasTgBotToken: z.boolean(),
- hasTwoFactorToken: z.boolean(),
- hasWarpSecret: z.boolean(),
- ldapAutoCreate: z.boolean(),
- ldapAutoDelete: z.boolean(),
- ldapBaseDN: z.string(),
- ldapBindDN: z.string(),
- ldapDefaultExpiryDays: z.number().int().min(0),
- ldapDefaultLimitIP: z.number().int().min(0),
- ldapDefaultTotalGB: z.number().int().min(0),
- ldapEnable: z.boolean(),
- ldapFlagField: z.string(),
- ldapHost: z.string(),
- ldapInboundTags: z.string(),
- ldapInvertFlag: z.boolean(),
- ldapPassword: z.string(),
- ldapPort: z.number().int().min(0).max(65535),
- ldapSyncCron: z.string(),
- ldapTruthyValues: z.string(),
- ldapUseTLS: z.boolean(),
- ldapUserAttr: z.string(),
- ldapUserFilter: z.string(),
- ldapVlessField: z.string(),
- pageSize: z.number().int().min(1).max(1000),
- remarkModel: z.string(),
- restartXrayOnClientDisable: z.boolean(),
- sessionMaxAge: z.number().int().min(0).max(525600),
- subAnnounce: z.string(),
- subCertFile: z.string(),
- subClashEnable: z.boolean(),
- subClashPath: z.string(),
- subClashURI: z.string(),
- subDomain: z.string(),
- subEmailInRemark: z.boolean(),
- subEnable: z.boolean(),
- subEnableRouting: z.boolean(),
- subEncrypt: z.boolean(),
- subJsonEnable: z.boolean(),
- subJsonFragment: z.string(),
- subJsonMux: z.string(),
- subJsonNoises: z.string(),
- subJsonPath: z.string(),
- subJsonRules: z.string(),
- subJsonURI: z.string(),
- subKeyFile: z.string(),
- subListen: z.string(),
- subPath: z.string(),
- subPort: z.number().int().min(1).max(65535),
- subProfileUrl: z.string(),
- subRoutingRules: z.string(),
- subShowInfo: z.boolean(),
- subSupportUrl: z.string(),
- subTitle: z.string(),
- subURI: z.string(),
- subUpdates: z.number().int().min(0).max(525600),
- tgBotAPIServer: z.string(),
- tgBotBackup: z.boolean(),
- tgBotChatId: z.string(),
- tgBotEnable: z.boolean(),
- tgBotLoginNotify: z.boolean(),
- tgBotProxy: z.string(),
- tgBotToken: z.string(),
- tgCpu: z.number().int().min(0).max(100),
- tgLang: z.string(),
- tgRunTime: z.string(),
- timeLocation: z.string(),
- trafficDiff: z.number().int().min(0).max(100),
- trustedProxyCIDRs: z.string(),
- twoFactorEnable: z.boolean(),
- twoFactorToken: z.string(),
- webBasePath: z.string(),
- webCertFile: z.string(),
- webDomain: z.string(),
- webKeyFile: z.string(),
- webListen: z.string(),
- webPort: z.number().int().min(1).max(65535),
- });
- export type AllSettingView = z.infer<typeof AllSettingViewSchema>;
- export const ApiTokenSchema = z.object({
- createdAt: z.number().int(),
- enabled: z.boolean(),
- id: z.number().int(),
- name: z.string(),
- token: z.string(),
- });
- export type ApiToken = z.infer<typeof ApiTokenSchema>;
- export const ClientSchema = z.object({
- auth: z.string().optional(),
- comment: z.string(),
- created_at: z.number().int().optional(),
- email: z.string(),
- enable: z.boolean(),
- expiryTime: z.number().int(),
- flow: z.string().optional(),
- id: z.string().optional(),
- limitIp: z.number().int(),
- password: z.string().optional(),
- reset: z.number().int(),
- reverse: z.lazy(() => ClientReverseSchema).nullable().optional(),
- security: z.string(),
- subId: z.string(),
- tgId: z.number().int(),
- totalGB: z.number().int(),
- updated_at: z.number().int().optional(),
- });
- export type Client = z.infer<typeof ClientSchema>;
- export const ClientInboundSchema = z.object({
- clientId: z.number().int(),
- createdAt: z.number().int(),
- flowOverride: z.string(),
- inboundId: z.number().int(),
- });
- export type ClientInbound = z.infer<typeof ClientInboundSchema>;
- export const ClientRecordSchema = z.object({
- auth: z.string(),
- comment: z.string(),
- createdAt: z.number().int(),
- email: z.string(),
- enable: z.boolean(),
- expiryTime: z.number().int(),
- flow: z.string(),
- id: z.number().int(),
- limitIp: z.number().int(),
- password: z.string(),
- reset: z.number().int(),
- reverse: z.unknown(),
- security: z.string(),
- subId: z.string(),
- tgId: z.number().int(),
- totalGB: z.number().int(),
- updatedAt: z.number().int(),
- uuid: z.string(),
- });
- export type ClientRecord = z.infer<typeof ClientRecordSchema>;
- export const ClientReverseSchema = z.object({
- tag: z.string(),
- });
- export type ClientReverse = z.infer<typeof ClientReverseSchema>;
- export const ClientTrafficSchema = z.object({
- down: z.number().int(),
- email: z.string(),
- enable: z.boolean(),
- expiryTime: z.number().int(),
- id: z.number().int(),
- inboundId: z.number().int(),
- lastOnline: z.number().int(),
- reset: z.number().int(),
- subId: z.string(),
- total: z.number().int(),
- up: z.number().int(),
- uuid: z.string(),
- });
- export type ClientTraffic = z.infer<typeof ClientTrafficSchema>;
- export const CustomGeoResourceSchema = z.object({
- alias: z.string(),
- createdAt: z.number().int(),
- id: z.number().int(),
- lastModified: z.string(),
- lastUpdatedAt: z.number().int(),
- localPath: z.string(),
- type: z.string(),
- updatedAt: z.number().int(),
- url: z.string(),
- });
- export type CustomGeoResource = z.infer<typeof CustomGeoResourceSchema>;
- export const FallbackParentInfoSchema = z.object({
- masterId: z.number().int(),
- path: z.string().optional(),
- });
- export type FallbackParentInfo = z.infer<typeof FallbackParentInfoSchema>;
- export const HistoryOfSeedersSchema = z.object({
- id: z.number().int(),
- seederName: z.string(),
- });
- export type HistoryOfSeeders = z.infer<typeof HistoryOfSeedersSchema>;
- export const InboundSchema = z.object({
- clientStats: z.array(z.lazy(() => ClientTrafficSchema)),
- down: z.number().int(),
- enable: z.boolean(),
- expiryTime: z.number().int(),
- fallbackParent: z.lazy(() => FallbackParentInfoSchema).nullable().optional(),
- id: z.number().int(),
- lastTrafficResetTime: z.number().int(),
- listen: z.string(),
- nodeId: z.number().int().nullable().optional(),
- port: z.number().int().min(1).max(65535),
- protocol: z.enum(['vmess', 'vless', 'trojan', 'shadowsocks', 'wireguard', 'hysteria', 'hysteria2', 'http', 'mixed', 'tunnel']),
- remark: z.string(),
- settings: z.unknown(),
- sniffing: z.unknown(),
- streamSettings: z.unknown(),
- tag: z.string(),
- total: z.number().int(),
- trafficReset: z.enum(['never', 'hourly', 'daily', 'weekly', 'monthly']),
- up: z.number().int(),
- });
- export type Inbound = z.infer<typeof InboundSchema>;
- export const InboundClientIpsSchema = z.object({
- clientEmail: z.string(),
- id: z.number().int(),
- ips: z.unknown(),
- });
- export type InboundClientIps = z.infer<typeof InboundClientIpsSchema>;
- export const InboundFallbackSchema = z.object({
- alpn: z.string(),
- childId: z.number().int(),
- id: z.number().int(),
- masterId: z.number().int(),
- name: z.string(),
- path: z.string(),
- sortOrder: z.number().int(),
- xver: z.number().int(),
- });
- export type InboundFallback = z.infer<typeof InboundFallbackSchema>;
- export const MsgSchema = z.object({
- msg: z.string(),
- obj: z.unknown(),
- success: z.boolean(),
- });
- export type Msg = z.infer<typeof MsgSchema>;
- export const NodeSchema = z.object({
- address: z.string(),
- allowPrivateAddress: z.boolean(),
- apiToken: z.string(),
- basePath: z.string(),
- clientCount: z.number().int(),
- cpuPct: z.number(),
- createdAt: z.number().int(),
- depletedCount: z.number().int(),
- enable: z.boolean(),
- id: z.number().int(),
- inboundCount: z.number().int(),
- lastError: z.string(),
- lastHeartbeat: z.number().int(),
- latencyMs: z.number().int(),
- memPct: z.number(),
- name: z.string(),
- onlineCount: z.number().int(),
- panelVersion: z.string(),
- port: z.number().int().min(1).max(65535),
- remark: z.string(),
- scheme: z.enum(['http', 'https']),
- status: z.string(),
- updatedAt: z.number().int(),
- uptimeSecs: z.number().int(),
- xrayVersion: z.string(),
- });
- export type Node = z.infer<typeof NodeSchema>;
- export const OutboundTrafficsSchema = z.object({
- down: z.number().int(),
- id: z.number().int(),
- tag: z.string(),
- total: z.number().int(),
- up: z.number().int(),
- });
- export type OutboundTraffics = z.infer<typeof OutboundTrafficsSchema>;
- export const SettingSchema = z.object({
- id: z.number().int(),
- key: z.string(),
- value: z.string(),
- });
- export type Setting = z.infer<typeof SettingSchema>;
- export const UserSchema = z.object({
- id: z.number().int(),
- password: z.string(),
- username: z.string(),
- });
- export type User = z.infer<typeof UserSchema>;
|