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 +26 -55
- package/dist/index.esm.js +502 -100
- package/dist/index.min.js +1 -1
- package/dist/password-validator.d.ts +83 -4
- package/dist/password-validator.esm.js +224 -24
- package/dist/password-validator.min.js +1 -1
- package/dist/slider-captcha.d.ts +78 -8
- package/dist/slider-captcha.esm.js +265 -69
- package/dist/slider-captcha.min.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,68 +1,39 @@
|
|
|
1
1
|
declare module 'slider-captcha-sdk' {
|
|
2
|
-
//
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
63
|
-
PasswordValidator: typeof
|
|
64
|
-
createPasswordValidator: typeof createPasswordValidator
|
|
65
|
-
|
|
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
|