slider-captcha-sdk 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,68 +1,39 @@
1
1
  declare module 'slider-captcha-sdk' {
2
- // 滑块验证码相关类型
3
- export interface SliderCaptchaOptions {
4
- width?: number
5
- height?: number
6
- sliderSize?: number
7
- tolerance?: number
8
- loadingText?: string
9
- failedText?: string
10
- passedText?: string
11
- clickMaskClose?: boolean
12
- throttleDelay?: number
13
- onSuccess?: (data: any) => void
14
- onFail?: (data: any) => void
15
- onRefresh?: () => void
16
- getCaptcha?: () => Promise<any>
17
- verifyCaptcha?: (data: any) => Promise<any>
18
- }
19
-
20
- // 密码校验器相关类型
21
- export interface PasswordValidatorOptions {
22
- publicKeyUrl?: string
23
- validateUrl?: string
24
- timeout?: number
25
- headers?: Record<string, string>
26
- }
27
-
28
- export interface ValidationResult {
29
- success: boolean
30
- message: string
31
- data?: any
32
- code: string
33
- }
2
+ // 重新导出滑块验证码相关类型
3
+ export type {
4
+ SliderCaptchaOptions,
5
+ CaptchaData,
6
+ DragEvent,
7
+ VerifyResult,
8
+ ErrorInfo as SliderCaptchaErrorInfo,
9
+ SliderCaptchaState
10
+ } from './slider-captcha'
11
+
12
+ // 重新导出密码校验器相关类型
13
+ export type {
14
+ PasswordValidatorOptions,
15
+ ValidationResult,
16
+ ErrorInfo as PasswordValidatorErrorInfo,
17
+ CacheStatus,
18
+ PublicKeyResponse,
19
+ ValidateResponse
20
+ } from './password-validator'
34
21
 
35
22
  // 滑块验证码类
36
- export declare class PopupSliderCaptcha {
37
- constructor(options?: SliderCaptchaOptions)
38
- show(): void
39
- hide(): void
40
- refresh(): void
41
- destroy(): void
42
- static create(options?: SliderCaptchaOptions): PopupSliderCaptcha
43
- static show(options?: SliderCaptchaOptions): PopupSliderCaptcha
44
- }
23
+ export { default as PopupSliderCaptcha } from './slider-captcha'
45
24
 
46
25
  // 密码校验器类
47
- export declare class PasswordValidator {
48
- constructor(options?: PasswordValidatorOptions)
49
- getPublicKey(): Promise<string>
50
- encryptPassword(password: string, publicKey: string): string
51
- validatePassword(password: string, additionalData?: any): Promise<ValidationResult>
52
- clearCache(): void
53
- updateOptions(newOptions: PasswordValidatorOptions): void
54
- }
26
+ export { default as PasswordValidator } from './password-validator'
55
27
 
56
28
  // 工厂函数
57
- export declare function createPasswordValidator(options?: PasswordValidatorOptions): PasswordValidator
58
- export declare function quickValidatePassword(password: string, options?: PasswordValidatorOptions, additionalData?: any): Promise<ValidationResult>
29
+ export { createPasswordValidator, validatePassword } from './password-validator'
59
30
 
60
31
  // 默认导出
61
32
  declare const _default: {
62
- PopupSliderCaptcha: typeof PopupSliderCaptcha
63
- PasswordValidator: typeof PasswordValidator
64
- createPasswordValidator: typeof createPasswordValidator
65
- quickValidatePassword: typeof quickValidatePassword
33
+ PopupSliderCaptcha: typeof import('./slider-captcha').default
34
+ PasswordValidator: typeof import('./password-validator').default
35
+ createPasswordValidator: typeof import('./password-validator').createPasswordValidator
36
+ validatePassword: typeof import('./password-validator').validatePassword
66
37
  }
67
38
 
68
39
  export default _default