@mcurros2/microm 1.1.291-0 → 1.1.293-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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AlertProps, DefaultMantineColor, Variants, StepperProps, MantineTheme, TextareaProps, TextInputProps, MantineNumberSize, MantineColor, PasswordInputProps, NotificationProps, CheckboxProps, ProgressProps, ButtonProps, ActionIconProps, NumberInputProps, ImageProps, MultiSelectProps, SelectItem, BadgeVariant, MantineSize, CardProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps } from "@mantine/core";
1
+ import { AlertProps, DefaultMantineColor, ProgressProps, Variants, StepperProps, MantineTheme, TextareaProps, TextInputProps, MantineNumberSize, MantineColor, PasswordInputProps, NotificationProps, CheckboxProps, ButtonProps, ActionIconProps, NumberInputProps, ImageProps, MultiSelectProps, SelectItem, BadgeVariant, MantineSize, CardProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps } from "@mantine/core";
2
2
  import { JSX } from "react/jsx-runtime";
3
3
  import React, { JSXElementConstructor, ReactElement, ReactNode, PropsWithChildren, ComponentType, RefAttributes, ForwardRefExoticComponent, MutableRefObject, useState, Dispatch, SetStateAction, KeyboardEvent, RefObject, CSSProperties, ComponentPropsWithoutRef, Context, ReactPortal } from "react";
4
4
  import { hasLength, isInRange, isNotEmpty, matches, UseFormReturnType } from "@mantine/form";
@@ -80,6 +80,33 @@ export interface ColorConfigurationProps {
80
80
  value: ColorConfigurationValue;
81
81
  }
82
82
  export function ColorConfiguration({ onChange, value }: ColorConfigurationProps): JSX.Element;
83
+ export function FakeProgressBar(props: ProgressProps): JSX.Element;
84
+ export interface TotpSetupProps {
85
+ client: MicroMClient;
86
+ onConfirmed?: () => void;
87
+ setupButtonLabel?: string;
88
+ confirmButtonLabel?: string;
89
+ qrAlt?: string;
90
+ codePlaceholder?: string;
91
+ setupTitle?: string;
92
+ setupDescription?: string;
93
+ authenticatorNameLabel?: string;
94
+ authenticatorNamePlaceholder?: string;
95
+ successMessage?: string;
96
+ errorMessage?: string;
97
+ }
98
+ export const TotpSetupDefaultProps: Partial<TotpSetupProps>;
99
+ export function TotpSetup(props: TotpSetupProps): JSX.Element;
100
+ export interface TotpAuthenticatorsManagementProps {
101
+ client: MicroMClient;
102
+ title?: string;
103
+ emptyMessage?: string;
104
+ deleteLabel?: string;
105
+ errorMessage?: string;
106
+ onChanged?: () => void;
107
+ }
108
+ export const TotpAuthenticatorsManagementDefaultProps: Partial<TotpAuthenticatorsManagementProps>;
109
+ export function TotpAuthenticatorsManagement(props: TotpAuthenticatorsManagementProps): JSX.Element;
83
110
  export interface LoginOptions {
84
111
  client: MicroMClient;
85
112
  onStatusCompleted: StatusCompletedHandler<MicroMToken | TwoFactorLoginResult>;
@@ -97,7 +124,12 @@ export interface LoginOptions {
97
124
  verifyCodeButtonLabel?: string;
98
125
  twoFactorTitle?: string;
99
126
  twoFactorDescription?: string;
100
- registerAuthenticatorLabel?: string;
127
+ twoFactorEmailDescription?: string;
128
+ twoFactorSupportDescription?: string;
129
+ twoFactorSqlSetupDescription?: string;
130
+ authenticatorManagementTitle?: string;
131
+ authenticatorManagementDescription?: string;
132
+ sendEmailCodeLabel?: string;
101
133
  cancelTwoFactorButtonLabel?: string;
102
134
  }
103
135
  export const LoginDefaultProps: Partial<LoginOptions>;
@@ -809,7 +841,6 @@ export interface CheckboxFieldProps extends CheckboxProps {
809
841
  requiredMessage?: ReactNode;
810
842
  }
811
843
  export function CheckboxField(props: CheckboxFieldProps): JSX.Element;
812
- export function FakeProgressBar(props: ProgressProps): JSX.Element;
813
844
  export interface UseOperationStatusCallback<T> {
814
845
  callback: (...args: any[]) => Promise<T>;
815
846
  operation: DataOperationType;
@@ -929,20 +960,6 @@ interface TimeFieldRef {
929
960
  showPicker: () => void;
930
961
  }
931
962
  export const TimeField: ForwardRefExoticComponent<TimeFieldProps & RefAttributes<TimeFieldRef>>;
932
- export interface TotpSetupProps {
933
- client: MicroMClient;
934
- onConfirmed?: () => void;
935
- setupButtonLabel?: string;
936
- confirmButtonLabel?: string;
937
- qrAlt?: string;
938
- codePlaceholder?: string;
939
- setupTitle?: string;
940
- setupDescription?: string;
941
- successMessage?: string;
942
- errorMessage?: string;
943
- }
944
- export const TotpSetupDefaultProps: Partial<TotpSetupProps>;
945
- export function TotpSetup(props: TotpSetupProps): JSX.Element;
946
963
  export function getInitials(input: string): string;
947
964
  export interface useIsLoggedInProps {
948
965
  client: MicroMClient;
@@ -1170,7 +1187,6 @@ export class MicromUsersDef extends EntityDefinition {
1170
1187
  dt_locked: EntityColumn<Date>;
1171
1188
  dt_last_login: EntityColumn<Date>;
1172
1189
  dt_last_refresh: EntityColumn<Date>;
1173
- vc_totp_secret: EntityColumn<string>;
1174
1190
  bt_totp_enabled: EntityColumn<boolean>;
1175
1191
  vc_recovery_code: EntityColumn<string>;
1176
1192
  dt_last_recovery: EntityColumn<Date>;
@@ -1794,7 +1810,9 @@ export interface TwoFactorLoginResult {
1794
1810
  requires_two_factor: true;
1795
1811
  two_factor_challenge_id: string;
1796
1812
  two_factor_provider?: string;
1813
+ two_factor_flow?: "authenticator" | "email_setup" | "email_recovery" | "support_required" | "sql_admin_setup" | "sql_admin_authenticator";
1797
1814
  two_factor_setup_required?: boolean;
1815
+ authenticator_management_required?: boolean;
1798
1816
  qr_code_data_url?: string;
1799
1817
  username: string;
1800
1818
  email?: string;
@@ -3784,8 +3802,16 @@ export class TokenWebStorage implements TokenStorage {
3784
3802
  deleteToken(app_id: string): Promise<void>;
3785
3803
  }
3786
3804
  export interface TotpSetupStartResponse {
3805
+ setup_challenge_id: string;
3787
3806
  qr_code_data_url: string;
3788
3807
  }
3808
+ export interface TotpAuthenticatorResponse {
3809
+ authenticator_id: string;
3810
+ authenticator_name: string;
3811
+ }
3812
+ export interface TotpAuthenticatorsResponse {
3813
+ authenticators: TotpAuthenticatorResponse[];
3814
+ }
3789
3815
  export type APIAction = "get" | "insert" | "update" | "delete" | "lookup" | "view" | "viewstream" | "action" | "upload" | "proc" | "procstream" | "process" | "import" | "viewtoexcel" | "proctoexcel" | "timezoneoffset";
3790
3816
  export interface FileUploadResponse {
3791
3817
  ErrorMessage?: string;
@@ -3823,13 +3849,16 @@ export class MicroMClient {
3823
3849
  login(username: string, password: string, rememberme?: boolean): Promise<MicroMToken | TwoFactorLoginResult>;
3824
3850
  login2fa(challengeId: string, code: string, rememberme?: boolean, username?: string): Promise<MicroMToken>;
3825
3851
  registerLoginTotp(challengeId: string): Promise<TotpSetupStartResponse>;
3852
+ sendTwoFactorEmailCode(challengeId: string): Promise<void>;
3826
3853
  localLogoff(): Promise<void>;
3827
3854
  logoff(): Promise<void>;
3828
3855
  updateClientClaims(claims: Partial<MicroMClientClaimTypes>): Promise<void>;
3829
3856
  recoveryemail(username: string): Promise<DBStatusResult>;
3830
3857
  recoverpassword(username: string, password: string, recoverycode: string): Promise<DBStatusResult>;
3831
- startTotpSetup(): Promise<TotpSetupStartResponse>;
3832
- confirmTotpSetup(code: string): Promise<void>;
3858
+ startTotpSetup(authenticatorName: string): Promise<TotpSetupStartResponse>;
3859
+ confirmTotpSetup(code: string, setupChallengeId: string): Promise<void>;
3860
+ listTotpAuthenticators(): Promise<TotpAuthenticatorsResponse>;
3861
+ deleteTotpAuthenticator(authenticatorId: string): Promise<void>;
3833
3862
  get TIMEZONE_OFFSET(): number;
3834
3863
  getMenus(): Promise<Set<string>>;
3835
3864
  getDocumentURL(fileGuid: string): string;