@authing/guard-shim-react 4.5.46-alpha.9 → 4.5.46-carzon.2

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.
@@ -61,7 +61,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
61
61
  getOriginAccount: () => string;
62
62
  getOriginWay: () => string;
63
63
  } | undefined;
64
- referMultipleState: ((type: "login" | "multiple") => void) | undefined;
64
+ referMultipleState: ((type: "multiple" | "login") => void) | undefined;
65
65
  backfillData: BackFillMultipleState | undefined;
66
66
  defaultQrWay: string | undefined;
67
67
  };
@@ -388,17 +388,30 @@ export interface ApplicationConfig {
388
388
  robot: {
389
389
  switch: 'OFF' | 'ON' | 'CONDON';
390
390
  };
391
+ robotVerifyService: {
392
+ type: 'Authing' | 'Tencent';
393
+ appId: string;
394
+ };
391
395
  };
392
396
  /** 登录阶段短信安全配置 */
393
397
  loginSmsConfig?: {
394
398
  robot: {
395
399
  switch: 'OFF' | 'ON' | 'CONDON';
396
400
  };
401
+ robotVerifyService: {
402
+ type: 'Authing' | 'Tencent';
403
+ appId: string;
404
+ };
397
405
  };
406
+ /** 忘记密码阶段短信安全配置 */
398
407
  forgetPasswordSmsConfig?: {
399
408
  robot: {
400
409
  switch: 'OFF' | 'ON' | 'CONDON';
401
410
  };
411
+ robotVerifyService: {
412
+ type: 'Authing' | 'Tencent';
413
+ appId: string;
414
+ };
402
415
  };
403
416
  /** 特殊浏览器匹配字符串 */
404
417
  specialBrowserSymbols?: string[];
@@ -416,4 +429,8 @@ export interface ApplicationConfig {
416
429
  title: I18nLang;
417
430
  desc: I18nLang;
418
431
  };
432
+ robotVerifyService?: {
433
+ type: 'Authing' | 'Tencent';
434
+ appId: string;
435
+ };
419
436
  }
@@ -54,7 +54,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
54
54
  loginMethods?: LoginMethods[] | undefined;
55
55
  passwordLoginMethods?: string[] | undefined;
56
56
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
57
- socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
57
+ socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
58
58
  enterpriseConnections?: string[] | undefined;
59
59
  qrCodeScanOptions?: {
60
60
  extIdpConnId?: string | undefined;
@@ -162,6 +162,16 @@ export declare const useGuardDefaultLanguage: () => Lang;
162
162
  /** 用来操作和获取租户相关的内容 */
163
163
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
164
164
  /** 当前人机验证策略 */
165
- export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
165
+ export declare const useRobotVerify: () => {
166
+ robotVerify: "always_enable" | "disable" | "condition_set";
167
+ robotVerifyService: {
168
+ type: "Authing" | "Tencent";
169
+ appId: string;
170
+ } | undefined;
171
+ };
166
172
  /** 当前应用是否开启人机验证策略 */
167
- export declare const useCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
173
+ export declare const useCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => {
174
+ captchaCheck: boolean;
175
+ type: string;
176
+ appId: string;
177
+ };
@@ -1,5 +1,6 @@
1
1
  import { GuardLocalConfig } from '../../Guard';
2
2
  import { ApplicationConfig } from '../../Type/application';
3
+ export * from './useTencentCaptcha';
3
4
  export interface PhoneValidResult {
4
5
  isValid: boolean;
5
6
  phoneNumber: string;
@@ -0,0 +1,18 @@
1
+ export declare const TENCENT_CAPTCHA_CANCELLED = "tencent_captcha_cancelled";
2
+ export interface TencentCaptchaResult {
3
+ ticket: string;
4
+ randstr: string;
5
+ }
6
+ interface UseTencentCaptchaOptions {
7
+ enabled?: boolean;
8
+ appId?: string;
9
+ form?: any;
10
+ userLanguage?: string;
11
+ }
12
+ export declare const useTencentCaptcha: ({ enabled, appId, form, userLanguage }: UseTencentCaptchaOptions) => {
13
+ loadTencentCaptchaScript: () => Promise<void>;
14
+ runTencentCaptcha: () => Promise<TencentCaptchaResult>;
15
+ setTencentCaptchaFields: () => Promise<TencentCaptchaResult>;
16
+ resetTencentCaptchaFields: () => void;
17
+ };
18
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.46-alpha.9",
3
+ "version": "4.5.46-carzon.2",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",