Files
energy_dist/dist/app/common/service/captcha.service.d.ts
T
2026-04-21 22:34:39 +08:00

26 lines
668 B
TypeScript

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>;
}