This commit is contained in:
qq
2026-04-21 22:34:39 +08:00
commit c28429b589
718 changed files with 48804 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { Cache } from 'cache-manager';
export interface CaptchaResult {
svg: string;
key: string;
}
export declare class CaptchaService {
private cacheManager;
constructor(cacheManager: Cache);
generate(options?: {
size?: number;
charPreset?: string;
noise?: number;
width?: number;
height?: number;
fontSize?: number;
inverse?: boolean;
}): Promise<CaptchaResult>;
generateMath(options?: {
noise?: number;
width?: number;
height?: number;
fontSize?: number;
}): Promise<CaptchaResult>;
validate(key: string, code: string): Promise<boolean>;
}