mftsccs-browser 2.2.40-beta → 2.2.42-beta
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/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/DataStructures/Security/SecureStorage.d.ts +1 -1
- package/dist/types/DataStructures/Security/TokenStorage.d.ts +6 -3
- package/dist/types/Services/User/UserFromLocalStorage.d.ts +3 -27
- package/dist/types/Widgets/BuilderStatefulWidget.d.ts +1 -1
- package/dist/types/app.d.ts +1 -1
- package/package.json +1 -2
|
@@ -2,17 +2,20 @@ export declare class TokenStorage {
|
|
|
2
2
|
static BearerAccessToken: string;
|
|
3
3
|
static refreshToken: string;
|
|
4
4
|
static sessionId: number;
|
|
5
|
+
/** In-memory cache of the decrypted profile — populated by saveUserProfile or hydrateProfile */
|
|
6
|
+
static profileCache: Record<string, any> | null;
|
|
5
7
|
static setSession(sessionId: any): void;
|
|
6
8
|
/**
|
|
7
9
|
* Stores user profile securely (encrypted in sessionStorage)
|
|
8
10
|
* and keeps the token in memory for API calls.
|
|
11
|
+
* Also populates profileCache so getUserDetails() works synchronously.
|
|
9
12
|
*/
|
|
10
13
|
static saveUserProfile(signinResponse: any): Promise<boolean>;
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
15
|
+
* Call once at app startup (e.g. in init()) to decrypt the stored profile
|
|
16
|
+
* into memory so that getUserDetails() can read it synchronously.
|
|
14
17
|
*/
|
|
15
|
-
static
|
|
18
|
+
static hydrateProfile(): Promise<void>;
|
|
16
19
|
/**
|
|
17
20
|
* Clears all stored credentials and profile data.
|
|
18
21
|
*/
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* localStorage("profile")
|
|
4
|
-
* @deprecated Migrate callers to getUserDetailsAsync() which uses encrypted storage.
|
|
2
|
+
* Returns user details synchronously.
|
|
3
|
+
* Priority: in-memory profileCache (encrypted) → legacy localStorage("profile") fallback.
|
|
5
4
|
*/
|
|
6
|
-
export declare function getUserDetails():
|
|
7
|
-
entity: number;
|
|
8
|
-
userConcept: number;
|
|
9
|
-
userId: number;
|
|
10
|
-
token: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Async version — prefers encrypted sessionStorage, falls back to
|
|
14
|
-
* plain-text localStorage for backward compatibility.
|
|
15
|
-
* This is the recommended replacement for getUserDetails().
|
|
16
|
-
*/
|
|
17
|
-
export declare function getUserDetailsAsync(): Promise<{
|
|
18
|
-
entity: any;
|
|
19
|
-
userConcept: any;
|
|
20
|
-
userId: any;
|
|
21
|
-
token: string;
|
|
22
|
-
roles: any;
|
|
23
|
-
} | {
|
|
24
|
-
entity: any;
|
|
25
|
-
userConcept: any;
|
|
26
|
-
userId: any;
|
|
27
|
-
token: any;
|
|
28
|
-
roles: never[];
|
|
29
|
-
}>;
|
|
5
|
+
export declare function getUserDetails(): Record<string, any>;
|
|
@@ -108,7 +108,7 @@ export declare class BuilderStatefulWidget extends StatefulWidget {
|
|
|
108
108
|
* const userId = await widget.getUserId();
|
|
109
109
|
* console.log('Current user:', userId);
|
|
110
110
|
*/
|
|
111
|
-
getUserId():
|
|
111
|
+
getUserId(): any;
|
|
112
112
|
/**
|
|
113
113
|
* Fetches a list of type values from the backend based on the widget's type.
|
|
114
114
|
*
|
package/dist/types/app.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ export { CreateConnectionBetweenEntityLocal } from './Services/CreateConnection/
|
|
|
125
125
|
export { BuildWidgetFromId } from './Widgets/WidgetBuild';
|
|
126
126
|
export { clearAllCaches } from './Services/CacheClear';
|
|
127
127
|
export { removeAllChildren } from './Services/Common/RemoveAllChild';
|
|
128
|
-
export { getUserDetails
|
|
128
|
+
export { getUserDetails } from './Services/User/UserFromLocalStorage';
|
|
129
129
|
export { TokenStorage } from './DataStructures/Security/TokenStorage';
|
|
130
130
|
export { CountInfo } from './DataStructures/Count/CountInfo';
|
|
131
131
|
export { LogEvent } from './Services/Logs/LogEvent';
|