@mcurros2/microm 1.1.286-0 → 1.1.288-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 +55 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +581 -50
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ export interface ColorConfigurationProps {
|
|
|
82
82
|
export function ColorConfiguration({ onChange, value }: ColorConfigurationProps): JSX.Element;
|
|
83
83
|
export interface LoginOptions {
|
|
84
84
|
client: MicroMClient;
|
|
85
|
-
onStatusCompleted: StatusCompletedHandler<MicroMToken>;
|
|
85
|
+
onStatusCompleted: StatusCompletedHandler<MicroMToken | TwoFactorLoginResult>;
|
|
86
86
|
userLabel?: string;
|
|
87
87
|
userPlaceholder?: string;
|
|
88
88
|
passwordLabel?: string;
|
|
@@ -92,11 +92,19 @@ export interface LoginOptions {
|
|
|
92
92
|
signInButtonLabel?: string;
|
|
93
93
|
loginErrorMessage?: string;
|
|
94
94
|
confirmRecoveryEmailTitle?: string;
|
|
95
|
+
codeLabel?: string;
|
|
96
|
+
codePlaceholder?: string;
|
|
97
|
+
verifyCodeButtonLabel?: string;
|
|
98
|
+
twoFactorTitle?: string;
|
|
99
|
+
twoFactorDescription?: string;
|
|
100
|
+
twoFactorProviderLabel?: string;
|
|
101
|
+
cancelTwoFactorButtonLabel?: string;
|
|
95
102
|
}
|
|
96
103
|
export const LoginDefaultProps: Partial<LoginOptions>;
|
|
97
104
|
export interface LoginValues {
|
|
98
105
|
user: string;
|
|
99
106
|
password: string;
|
|
107
|
+
code: string;
|
|
100
108
|
server: string;
|
|
101
109
|
rememberme: boolean;
|
|
102
110
|
}
|
|
@@ -921,6 +929,20 @@ interface TimeFieldRef {
|
|
|
921
929
|
showPicker: () => void;
|
|
922
930
|
}
|
|
923
931
|
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;
|
|
924
946
|
export function getInitials(input: string): string;
|
|
925
947
|
export interface useIsLoggedInProps {
|
|
926
948
|
client: MicroMClient;
|
|
@@ -1143,14 +1165,13 @@ export class MicromUsersDef extends EntityDefinition {
|
|
|
1143
1165
|
vc_email: EntityColumn<string>;
|
|
1144
1166
|
vc_pwhash: EntityColumn<string>;
|
|
1145
1167
|
vb_sid: EntityColumn<string>;
|
|
1146
|
-
vc_refreshtoken: EntityColumn<string>;
|
|
1147
|
-
dt_refresh_expiration: EntityColumn<boolean>;
|
|
1148
1168
|
i_badlogonattempts: EntityColumn<number>;
|
|
1149
|
-
i_refreshcount: EntityColumn<number>;
|
|
1150
1169
|
bt_disabled: EntityColumn<boolean>;
|
|
1151
1170
|
dt_locked: EntityColumn<Date>;
|
|
1152
1171
|
dt_last_login: EntityColumn<Date>;
|
|
1153
1172
|
dt_last_refresh: EntityColumn<Date>;
|
|
1173
|
+
vc_totp_secret: EntityColumn<string>;
|
|
1174
|
+
bt_totp_enabled: EntityColumn<boolean>;
|
|
1154
1175
|
vc_recovery_code: EntityColumn<string>;
|
|
1155
1176
|
dt_last_recovery: EntityColumn<Date>;
|
|
1156
1177
|
c_usertype_id: EntityColumn<string>;
|
|
@@ -1159,6 +1180,11 @@ export class MicromUsersDef extends EntityDefinition {
|
|
|
1159
1180
|
i_locked_minutes_remaining: EntityColumn<number>;
|
|
1160
1181
|
vc_password: EntityColumn<string>;
|
|
1161
1182
|
};
|
|
1183
|
+
procs: {
|
|
1184
|
+
usr_resetTotp: {
|
|
1185
|
+
name: string;
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1162
1188
|
views: {
|
|
1163
1189
|
usr_brwStandard: {
|
|
1164
1190
|
name: string;
|
|
@@ -1198,6 +1224,13 @@ export interface MicromUsersFormProps extends FormOptions<MicromUsers> {
|
|
|
1198
1224
|
lockedTitleLabel?: string;
|
|
1199
1225
|
minutesLabel?: string;
|
|
1200
1226
|
willUnlockInNextLogonLabel?: string;
|
|
1227
|
+
authenticatorEnabledLabel?: string;
|
|
1228
|
+
authenticatorDisabledLabel?: string;
|
|
1229
|
+
authenticatorStatusTitle?: string;
|
|
1230
|
+
resetAuthenticatorButtonLabel?: string;
|
|
1231
|
+
resetAuthenticatorTitle?: string;
|
|
1232
|
+
resetAuthenticatorConfirmation?: string;
|
|
1233
|
+
resetAuthenticatorOKLabel?: string;
|
|
1201
1234
|
}
|
|
1202
1235
|
export const MicromUsersFormDefaultProps: Partial<MicromUsersFormProps>;
|
|
1203
1236
|
export function MicromUsersForm(props: MicromUsersFormProps): JSX.Element;
|
|
@@ -1757,6 +1790,15 @@ export class MicroMToken {
|
|
|
1757
1790
|
constructor(access_token?: string, expires_in?: number, refresh_token?: string, token_type?: string, claims?: {});
|
|
1758
1791
|
className(): string;
|
|
1759
1792
|
}
|
|
1793
|
+
export interface TwoFactorLoginResult {
|
|
1794
|
+
requires_two_factor: true;
|
|
1795
|
+
two_factor_challenge_id: string;
|
|
1796
|
+
two_factor_provider?: string;
|
|
1797
|
+
two_factor_setup_required?: boolean;
|
|
1798
|
+
qr_code_data_url?: string;
|
|
1799
|
+
username: string;
|
|
1800
|
+
email?: string;
|
|
1801
|
+
}
|
|
1760
1802
|
export type DataOperationType = "add" | "edit" | "delete" | "get" | "lookup" | "view" | "action" | "login" | "refresh" | "proc" | "import" | "export" | "other";
|
|
1761
1803
|
export interface OperationStatus<T> {
|
|
1762
1804
|
loading?: boolean;
|
|
@@ -1764,7 +1806,7 @@ export interface OperationStatus<T> {
|
|
|
1764
1806
|
operationType?: DataOperationType;
|
|
1765
1807
|
data?: T;
|
|
1766
1808
|
}
|
|
1767
|
-
export type StatusCompletedHandler<T extends MicroMToken | DBStatusResult | DataResult | ValuesObject | null> = (status: OperationStatus<T>) => void;
|
|
1809
|
+
export type StatusCompletedHandler<T extends MicroMToken | TwoFactorLoginResult | DBStatusResult | DataResult | ValuesObject | null> = (status: OperationStatus<T>) => void;
|
|
1768
1810
|
export interface UseImportDataProps {
|
|
1769
1811
|
initialFormMode: FormMode;
|
|
1770
1812
|
title?: string;
|
|
@@ -3741,6 +3783,9 @@ export class TokenWebStorage implements TokenStorage {
|
|
|
3741
3783
|
readToken(app_id: string): Promise<MicroMToken | null>;
|
|
3742
3784
|
deleteToken(app_id: string): Promise<void>;
|
|
3743
3785
|
}
|
|
3786
|
+
export interface TotpSetupStartResponse {
|
|
3787
|
+
qr_code_data_url: string;
|
|
3788
|
+
}
|
|
3744
3789
|
export type APIAction = "get" | "insert" | "update" | "delete" | "lookup" | "view" | "viewstream" | "action" | "upload" | "proc" | "procstream" | "process" | "import" | "viewtoexcel" | "proctoexcel" | "timezoneoffset";
|
|
3745
3790
|
export interface FileUploadResponse {
|
|
3746
3791
|
ErrorMessage?: string;
|
|
@@ -3775,12 +3820,16 @@ export class MicroMClient {
|
|
|
3775
3820
|
getRememberUser(): Promise<string | null>;
|
|
3776
3821
|
isLoggedIn(): Promise<boolean>;
|
|
3777
3822
|
isLoggedInLocal(): Promise<boolean>;
|
|
3778
|
-
login(username: string, password: string, rememberme?: boolean): Promise<MicroMToken>;
|
|
3823
|
+
login(username: string, password: string, rememberme?: boolean): Promise<MicroMToken | TwoFactorLoginResult>;
|
|
3824
|
+
login2fa(challengeId: string, code: string, rememberme?: boolean, username?: string): Promise<MicroMToken>;
|
|
3825
|
+
registerLoginTotp(challengeId: string): Promise<TotpSetupStartResponse>;
|
|
3779
3826
|
localLogoff(): Promise<void>;
|
|
3780
3827
|
logoff(): Promise<void>;
|
|
3781
3828
|
updateClientClaims(claims: Partial<MicroMClientClaimTypes>): Promise<void>;
|
|
3782
3829
|
recoveryemail(username: string): Promise<DBStatusResult>;
|
|
3783
3830
|
recoverpassword(username: string, password: string, recoverycode: string): Promise<DBStatusResult>;
|
|
3831
|
+
startTotpSetup(): Promise<TotpSetupStartResponse>;
|
|
3832
|
+
confirmTotpSetup(code: string): Promise<void>;
|
|
3784
3833
|
get TIMEZONE_OFFSET(): number;
|
|
3785
3834
|
getMenus(): Promise<Set<string>>;
|
|
3786
3835
|
getDocumentURL(fileGuid: string): string;
|