import { z } from 'zod'; export declare enum UserRole { VIEWER = "viewer", OPERATOR = "operator", ADMIN = "admin" } /** 角色权限等级(用于比较) */ export declare const USER_ROLE_LEVEL: Record; export declare const AuthTokenSchema: z.ZodObject<{ id: z.ZodString; tokenHash: z.ZodString; tokenPlain: z.ZodOptional; label: z.ZodString; role: z.ZodNativeEnum; operatorIds: z.ZodArray; createdBy: z.ZodNullable; createdAt: z.ZodNumber; expiresAt: z.ZodOptional; lastUsedAt: z.ZodOptional; revoked: z.ZodBoolean; system: z.ZodOptional; maxOperators: z.ZodOptional; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; allowSelfLoginCredential: z.ZodOptional; loginCredential: z.ZodOptional>; }, "strip", z.ZodTypeAny, { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; tokenHash: string; createdBy: string | null; revoked: boolean; system?: boolean | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; tokenPlain?: string | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { updatedAt: number; username: string; usernameNormalized: string; passwordHash: string; } | undefined; }, { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; tokenHash: string; createdBy: string | null; revoked: boolean; system?: boolean | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; tokenPlain?: string | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { updatedAt: number; username: string; usernameNormalized: string; passwordHash: string; } | undefined; }>; export type AuthToken = z.infer; export declare const JWTPayloadSchema: z.ZodObject<{ tokenId: z.ZodString; role: z.ZodNativeEnum; operatorIds: z.ZodArray; iat: z.ZodNumber; exp: z.ZodNumber; }, "strip", z.ZodTypeAny, { role: UserRole; operatorIds: string[]; tokenId: string; iat: number; exp: number; }, { role: UserRole; operatorIds: string[]; tokenId: string; iat: number; exp: number; }>; export type JWTPayload = z.infer; export declare const LoginRequestSchema: z.ZodObject<{ token: z.ZodString; }, "strip", z.ZodTypeAny, { token: string; }, { token: string; }>; export type LoginRequest = z.infer; export declare const PasswordLoginRequestSchema: z.ZodObject<{ username: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { password: string; username: string; }, { password: string; username: string; }>; export type PasswordLoginRequest = z.infer; export declare const LoginResponseSchema: z.ZodObject<{ jwt: z.ZodString; role: z.ZodNativeEnum; label: z.ZodString; operatorIds: z.ZodArray; maxOperators: z.ZodOptional; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { label: string; jwt: string; role: UserRole; operatorIds: string[]; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; maxOperators?: number | undefined; }, { label: string; jwt: string; role: UserRole; operatorIds: string[]; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; maxOperators?: number | undefined; }>; export type LoginResponse = z.infer; export declare const LoginCredentialSummarySchema: z.ZodObject<{ username: z.ZodString; allowSelfService: z.ZodBoolean; }, "strip", z.ZodTypeAny, { username: string; allowSelfService: boolean; }, { username: string; allowSelfService: boolean; }>; export type LoginCredentialSummary = z.infer; export declare const AuthMeLoginCredentialSchema: z.ZodObject<{ configured: z.ZodBoolean; username: z.ZodNullable; allowSelfService: z.ZodBoolean; }, "strip", z.ZodTypeAny, { username: string | null; allowSelfService: boolean; configured: boolean; }, { username: string | null; allowSelfService: boolean; configured: boolean; }>; export type AuthMeLoginCredential = z.infer; export declare const CreateTokenLoginCredentialRequestSchema: z.ZodObject<{ username: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { password: string; username: string; }, { password: string; username: string; }>; export type CreateTokenLoginCredentialRequest = z.infer; export declare const UpdateTokenLoginCredentialRequestSchema: z.ZodObject<{ username: z.ZodString; password: z.ZodOptional; }, "strip", z.ZodTypeAny, { username: string; password?: string | undefined; }, { username: string; password?: string | undefined; }>; export type UpdateTokenLoginCredentialRequest = z.infer; export declare const CreateTokenRequestSchema: z.ZodObject<{ label: z.ZodString; role: z.ZodNativeEnum; operatorIds: z.ZodArray; expiresAt: z.ZodOptional; maxOperators: z.ZodNumber; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; allowSelfLoginCredential: z.ZodOptional; loginCredential: z.ZodOptional>; }, "strip", z.ZodTypeAny, { label: string; role: UserRole; operatorIds: string[]; maxOperators: number; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; expiresAt?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { password: string; username: string; } | undefined; }, { label: string; role: UserRole; operatorIds: string[]; maxOperators: number; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; expiresAt?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { password: string; username: string; } | undefined; }>; export type CreateTokenRequest = z.infer; export declare const CreateTokenResponseSchema: z.ZodObject<{ id: z.ZodString; token: z.ZodString; label: z.ZodString; role: z.ZodNativeEnum; operatorIds: z.ZodArray; maxOperators: z.ZodOptional; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; allowSelfLoginCredential: z.ZodOptional; loginCredential: z.ZodOptional>; }, "strip", z.ZodTypeAny, { id: string; label: string; token: string; role: UserRole; operatorIds: string[]; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { username: string; allowSelfService: boolean; } | undefined; }, { id: string; label: string; token: string; role: UserRole; operatorIds: string[]; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { username: string; allowSelfService: boolean; } | undefined; }>; export type CreateTokenResponse = z.infer; export declare const TokenInfoSchema: z.ZodObject<{ id: z.ZodString; token: z.ZodOptional; label: z.ZodString; role: z.ZodNativeEnum; operatorIds: z.ZodArray; createdBy: z.ZodNullable; createdAt: z.ZodNumber; expiresAt: z.ZodOptional; lastUsedAt: z.ZodOptional; revoked: z.ZodBoolean; system: z.ZodOptional; maxOperators: z.ZodOptional; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; allowSelfLoginCredential: z.ZodOptional; loginCredential: z.ZodOptional>; }, "strip", z.ZodTypeAny, { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; createdBy: string | null; revoked: boolean; system?: boolean | undefined; token?: string | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { username: string; allowSelfService: boolean; } | undefined; }, { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; createdBy: string | null; revoked: boolean; system?: boolean | undefined; token?: string | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { username: string; allowSelfService: boolean; } | undefined; }>; export type TokenInfo = z.infer; export declare const UpdateTokenRequestSchema: z.ZodObject<{ label: z.ZodOptional; role: z.ZodOptional>; operatorIds: z.ZodOptional>; expiresAt: z.ZodOptional>; maxOperators: z.ZodOptional>; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>>; allowSelfLoginCredential: z.ZodOptional; loginCredential: z.ZodOptional; }, "strip", z.ZodTypeAny, { username: string; password?: string | undefined; }, { username: string; password?: string | undefined; }>>>; }, "strip", z.ZodTypeAny, { label?: string | undefined; role?: UserRole | undefined; operatorIds?: string[] | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | null | undefined; expiresAt?: number | null | undefined; maxOperators?: number | null | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { username: string; password?: string | undefined; } | null | undefined; }, { label?: string | undefined; role?: UserRole | undefined; operatorIds?: string[] | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | null | undefined; expiresAt?: number | null | undefined; maxOperators?: number | null | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { username: string; password?: string | undefined; } | null | undefined; }>; export type UpdateTokenRequest = z.infer; export declare const AuthStatusSchema: z.ZodObject<{ enabled: z.ZodBoolean; allowPublicViewing: z.ZodBoolean; }, "strip", z.ZodTypeAny, { enabled: boolean; allowPublicViewing: boolean; }, { enabled: boolean; allowPublicViewing: boolean; }>; export type AuthStatus = z.infer; export declare const AuthMeResponseSchema: z.ZodObject<{ role: z.ZodNativeEnum; label: z.ZodString; operatorIds: z.ZodArray; tokenId: z.ZodString; maxOperators: z.ZodOptional; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; loginCredential: z.ZodObject<{ configured: z.ZodBoolean; username: z.ZodNullable; allowSelfService: z.ZodBoolean; }, "strip", z.ZodTypeAny, { username: string | null; allowSelfService: boolean; configured: boolean; }, { username: string | null; allowSelfService: boolean; configured: boolean; }>; }, "strip", z.ZodTypeAny, { label: string; role: UserRole; operatorIds: string[]; loginCredential: { username: string | null; allowSelfService: boolean; configured: boolean; }; tokenId: string; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; maxOperators?: number | undefined; }, { label: string; role: UserRole; operatorIds: string[]; loginCredential: { username: string | null; allowSelfService: boolean; configured: boolean; }; tokenId: string; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; maxOperators?: number | undefined; }>; export type AuthMeResponse = z.infer; export declare const UpdateSelfLoginCredentialRequestSchema: z.ZodObject<{ username: z.ZodString; password: z.ZodOptional; }, "strip", z.ZodTypeAny, { username: string; password?: string | undefined; }, { username: string; password?: string | undefined; }>; export type UpdateSelfLoginCredentialRequest = z.infer; export declare const UpdateAuthConfigRequestSchema: z.ZodObject<{ allowPublicViewing: z.ZodOptional; }, "strip", z.ZodTypeAny, { allowPublicViewing?: boolean | undefined; }, { allowPublicViewing?: boolean | undefined; }>; export type UpdateAuthConfigRequest = z.infer; export declare const AuthConfigSchema: z.ZodObject<{ enabled: z.ZodDefault; allowPublicViewing: z.ZodDefault; jwtSecret: z.ZodOptional; jwtExpiresInSeconds: z.ZodDefault; tokens: z.ZodDefault; label: z.ZodString; role: z.ZodNativeEnum; operatorIds: z.ZodArray; createdBy: z.ZodNullable; createdAt: z.ZodNumber; expiresAt: z.ZodOptional; lastUsedAt: z.ZodOptional; revoked: z.ZodBoolean; system: z.ZodOptional; maxOperators: z.ZodOptional; permissionGrants: z.ZodOptional; conditions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }, { permission: import("./ability.js").Permission; conditions?: Record | undefined; }>, "many">>; allowSelfLoginCredential: z.ZodOptional; loginCredential: z.ZodOptional>; }, "strip", z.ZodTypeAny, { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; tokenHash: string; createdBy: string | null; revoked: boolean; system?: boolean | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; tokenPlain?: string | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { updatedAt: number; username: string; usernameNormalized: string; passwordHash: string; } | undefined; }, { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; tokenHash: string; createdBy: string | null; revoked: boolean; system?: boolean | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; tokenPlain?: string | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { updatedAt: number; username: string; usernameNormalized: string; passwordHash: string; } | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { enabled: boolean; allowPublicViewing: boolean; jwtExpiresInSeconds: number; tokens: { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; tokenHash: string; createdBy: string | null; revoked: boolean; system?: boolean | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; tokenPlain?: string | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { updatedAt: number; username: string; usernameNormalized: string; passwordHash: string; } | undefined; }[]; jwtSecret?: string | undefined; }, { enabled?: boolean | undefined; allowPublicViewing?: boolean | undefined; jwtSecret?: string | undefined; jwtExpiresInSeconds?: number | undefined; tokens?: { id: string; label: string; createdAt: number; role: UserRole; operatorIds: string[]; tokenHash: string; createdBy: string | null; revoked: boolean; system?: boolean | undefined; permissionGrants?: { permission: import("./ability.js").Permission; conditions?: Record | undefined; }[] | undefined; tokenPlain?: string | undefined; expiresAt?: number | undefined; lastUsedAt?: number | undefined; maxOperators?: number | undefined; allowSelfLoginCredential?: boolean | undefined; loginCredential?: { updatedAt: number; username: string; usernameNormalized: string; passwordHash: string; } | undefined; }[] | undefined; }>; export type AuthConfig = z.infer; //# sourceMappingURL=auth.schema.d.ts.map