@authing/react-ui-components 3.1.16-rc.1 → 3.1.17-rc.0

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/lib/index.d.ts CHANGED
@@ -1513,19 +1513,21 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1513
1513
  declare module '@authing/react-ui-components/components/Guard/authClient' {
1514
1514
  import { AuthenticationClient } from 'authing-js-sdk';
1515
1515
  import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
1516
+ let authClient: AuthenticationClient;
1516
1517
  export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
1517
1518
  export const useInitGuardAuthClient: (props: {
1518
1519
  config?: GuardLocalConfig | undefined;
1519
- appId: string;
1520
+ appId?: string | undefined;
1521
+ authClient?: AuthenticationClient | undefined;
1520
1522
  setError?: any;
1521
1523
  tenantId?: string | undefined;
1522
1524
  }) => AuthenticationClient | undefined;
1523
1525
  export const getGuardAuthClient: () => AuthenticationClient;
1524
1526
  export const useGuardAuthClient: () => AuthenticationClient;
1527
+ export {};
1525
1528
 
1526
1529
  }
1527
1530
  declare module '@authing/react-ui-components/components/Guard/config' {
1528
- import { AuthenticationClient } from 'authing-js-sdk';
1529
1531
  import { ReactNode } from 'react';
1530
1532
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
1531
1533
  import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
@@ -1551,7 +1553,6 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1551
1553
  */
1552
1554
  openEventsMapping?: boolean;
1553
1555
  _qrCodeScanOptions?: Record<QrCodeScanType, QrCodeScanOptions>;
1554
- authClient?: AuthenticationClient;
1555
1556
  }
1556
1557
  export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
1557
1558
 
@@ -1574,7 +1575,6 @@ declare module '@authing/react-ui-components/components/Guard/core/renderContext
1574
1575
  export const RenderContext: React.FC<{
1575
1576
  guardProps: GuardProps;
1576
1577
  initState: ModuleState;
1577
- forceUpdate: number;
1578
1578
  }>;
1579
1579
 
1580
1580
  }
@@ -1592,10 +1592,10 @@ declare module '@authing/react-ui-components/components/Guard/core/renderModule'
1592
1592
 
1593
1593
  }
1594
1594
  declare module '@authing/react-ui-components/components/Guard/core/useAppendConfig' {
1595
- import { GuardProps } from '@authing/react-ui-components/components/index';
1595
+ import { GuardAppendConfig } from '@authing/react-ui-components/components/index';
1596
1596
  export const getGuardWindow: () => (Window & typeof globalThis) | undefined;
1597
1597
  export const useGuardWindow: () => (Window & typeof globalThis) | undefined;
1598
- export const useInitGuardAppendConfig: (guardProps: GuardProps, setForceUpdate: any) => void;
1598
+ export const useInitGuardAppendConfig: (appId?: string | undefined, appendConfig?: GuardAppendConfig | undefined) => void;
1599
1599
 
1600
1600
  }
1601
1601
  declare module '@authing/react-ui-components/components/Guard/core/usePlugin' {
@@ -1617,6 +1617,50 @@ declare module '@authing/react-ui-components/components/Guard/event' {
1617
1617
  }
1618
1618
  export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
1619
1619
  export const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
1620
+ export const GuardEventsCamelToKebabMapping: {
1621
+ readonly onLoad: "load";
1622
+ readonly onLoadError: "load-error";
1623
+ readonly onLogin: "login";
1624
+ readonly onBeforeLogin: "before-login";
1625
+ readonly onLoginError: "login-error";
1626
+ readonly onRegister: "register";
1627
+ readonly onBeforeRegister: "before-register";
1628
+ readonly onRegisterError: "register-error";
1629
+ readonly onPwdEmailSend: "pwd-email-send";
1630
+ readonly onPwdEmailSendError: "pwd-email-send-error";
1631
+ readonly onPwdPhoneSend: "pwd-phone-send";
1632
+ readonly onPwdPhoneSendError: "pwd-phone-send-error";
1633
+ readonly onPwdReset: "pwd-reset";
1634
+ readonly onPwdResetError: "pwd-reset-error";
1635
+ readonly onClose: "close";
1636
+ readonly onLoginTabChange: "login-tab-change";
1637
+ readonly onRegisterTabChange: "register-tab-change";
1638
+ readonly onRegisterInfoCompleted: "register-info-completed";
1639
+ readonly onRegisterInfoCompletedError: "register-info-completed-error";
1640
+ readonly onLangChange: "lang-change";
1641
+ };
1642
+ export interface GuardEventsKebabToCamelType {
1643
+ load: GuardEvents['onLoad'];
1644
+ 'load-error': GuardEvents['onLoadError'];
1645
+ 'before-login': GuardEvents['onBeforeLogin'];
1646
+ login: GuardEvents['onLogin'];
1647
+ 'login-error': GuardEvents['onLoginError'];
1648
+ 'before-register': GuardEvents['onBeforeRegister'];
1649
+ register: GuardEvents['onRegister'];
1650
+ 'register-error': GuardEvents['onRegisterError'];
1651
+ 'pwd-email-send': GuardEvents['onPwdEmailSend'];
1652
+ 'pwd-email-send-error': GuardEvents['onPwdEmailSendError'];
1653
+ 'pwd-phone-send': GuardEvents['onPwdPhoneSend'];
1654
+ 'pwd-phone-send-error': GuardEvents['onPwdPhoneSendError'];
1655
+ 'pwd-reset': GuardEvents['onPwdReset'];
1656
+ 'pwd-reset-error': GuardEvents['onPwdResetError'];
1657
+ close: GuardEvents['onClose'];
1658
+ 'login-tab-change': GuardEvents['onLoginTabChange'];
1659
+ 'register-tab-change': GuardEvents['onRegisterTabChange'];
1660
+ 'register-info-completed': GuardEvents['onRegisterInfoCompleted'];
1661
+ 'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
1662
+ 'lang-change': GuardEvents['onLangChange'];
1663
+ }
1620
1664
 
1621
1665
  }
1622
1666
  declare module '@authing/react-ui-components/components/Guard/index' {
@@ -1720,6 +1764,12 @@ declare module '@authing/react-ui-components/components/IdentityBinding/business
1720
1764
  account: string;
1721
1765
  password: string;
1722
1766
  }
1767
+ export enum IdentityBindingAction {
1768
+ CreateUser = "create-federation-account",
1769
+ BindByPassword = "bind-identity-by-password",
1770
+ BindByPhoneCode = "bind-identity-by-phone-code",
1771
+ BindByEmailCode = "bind-identity-by-email-code"
1772
+ }
1723
1773
  export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1724
1774
  export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1725
1775
  export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
@@ -2610,13 +2660,14 @@ declare module '@authing/react-ui-components/components/Type/index' {
2610
2660
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2611
2661
  import { FacePlugin } from '@authing/react-ui-components/components/_utils/facePlugin/interface';
2612
2662
  export interface IG2FCProps extends IG2Events {
2613
- appId: string;
2663
+ appId?: string;
2614
2664
  tenantId?: string;
2615
2665
  config?: Partial<IG2Config>;
2616
2666
  visible?: boolean;
2617
2667
  initData?: any;
2618
2668
  appendConfig?: GuardAppendConfig;
2619
2669
  facePlugin?: FacePlugin;
2670
+ authClient?: AuthenticationClient;
2620
2671
  }
2621
2672
  export interface GuardAppendConfig {
2622
2673
  internalRequest?: boolean;
@@ -2787,7 +2838,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2787
2838
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2788
2839
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2789
2840
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
2790
- export const useMergePublicConfig: (appId: string, forceUpdate: number, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
2841
+ export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
2791
2842
  host: string;
2792
2843
  isSSO?: boolean | undefined;
2793
2844
  defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
@@ -2796,7 +2847,6 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2796
2847
  loadingComponent?: import("react").ReactNode;
2797
2848
  openEventsMapping?: boolean | undefined;
2798
2849
  _qrCodeScanOptions?: Record<import("@authing/react-ui-components/components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2799
- authClient?: import("authing-js-sdk").AuthenticationClient | undefined;
2800
2850
  disableRegister?: boolean | undefined;
2801
2851
  registerMethods?: NewRegisterMethods[] | undefined;
2802
2852
  defaultRegisterMethod?: NewRegisterMethods | undefined;
@@ -2827,6 +2877,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2827
2877
  socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
2828
2878
  enterpriseConnections?: string[] | undefined;
2829
2879
  qrCodeScanOptions?: {
2880
+ currentDocument?: Document | undefined;
2830
2881
  extIdpConnId?: string | undefined;
2831
2882
  autoExchangeUserInfo?: boolean | undefined;
2832
2883
  size?: {
@@ -2873,7 +2924,7 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2873
2924
  export const getPageConfig: (appId: string) => GuardPageConfig;
2874
2925
  export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
2875
2926
  export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
2876
- export const useGuardPageConfig: (appId: string, forceUpdate: number, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2927
+ export const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2877
2928
 
2878
2929
  }
2879
2930
  declare module '@authing/react-ui-components/components/_utils/context' {
@@ -2968,6 +3019,13 @@ declare module '@authing/react-ui-components/components/_utils/facePlugin/interf
2968
3019
  nets: any;
2969
3020
  }
2970
3021
 
3022
+ }
3023
+ declare module '@authing/react-ui-components/components/_utils/flowHandleStorage' {
3024
+ export const getFlowHandle: () => string | undefined;
3025
+ export const useFlowHandle: () => string | undefined;
3026
+ export const updateFlowHandle: (flowHandle: string) => void;
3027
+ export const useUpdateFlowHandle: (flowHandle: string) => void;
3028
+
2971
3029
  }
2972
3030
  declare module '@authing/react-ui-components/components/_utils/guardDocument' {
2973
3031
  export const getGuardDocument: () => Document;
@@ -3074,6 +3132,7 @@ declare module '@authing/react-ui-components/components/_utils/http' {
3074
3132
  data?: T;
3075
3133
  messages?: string;
3076
3134
  message?: string;
3135
+ flowHandle?: string;
3077
3136
  }
3078
3137
  export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
3079
3138
  onGuardHandling?: () => CodeAction;
@@ -3157,6 +3216,16 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3157
3216
  export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
3158
3217
  export const getDocumentNode: (node: Node & ParentNode) => Document;
3159
3218
 
3219
+ }
3220
+ declare module '@authing/react-ui-components/components/_utils/initAppId' {
3221
+ import { AuthenticationClient } from 'authing-js-sdk';
3222
+ export interface UseInitAppidProps {
3223
+ propsAppid?: string;
3224
+ propsAuthClient?: AuthenticationClient;
3225
+ setError?: any;
3226
+ }
3227
+ export const useInitAppId: (propsAppid?: string | undefined, propsAuthClient?: AuthenticationClient | undefined, setError?: any) => string | undefined;
3228
+
3160
3229
  }
3161
3230
  declare module '@authing/react-ui-components/components/_utils/locales/en/index' {
3162
3231
  import common from '@authing/react-ui-components/components/_utils/locales/en/common/index';
@@ -3339,7 +3408,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3339
3408
 
3340
3409
  }
3341
3410
  declare module '@authing/react-ui-components/components/version/version' {
3342
- const _default: "3.1.16-rc.1";
3411
+ const _default: "3.1.17-rc.0";
3343
3412
  export default _default;
3344
3413
 
3345
3414
  }