mftsccs-browser 2.1.230-beta → 2.1.232-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/README.md +17 -17
- package/dist/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/Api/GetInstanceConceptByCharacterType.d.ts +9 -0
- package/dist/types/DataStructures/BaseUrl.d.ts +2 -0
- package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +1 -0
- package/dist/types/DataStructures/Security/TokenStorage.d.ts +1 -0
- package/dist/types/Services/Security/GetRequestHeader.d.ts +6 -3
- package/dist/types/Services/User/UserFromLocalStorage.d.ts +5 -0
- package/dist/types/app.d.ts +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Concept } from "../DataStructures/Concept";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches an instance concept from the backend API by its character value and type.
|
|
4
|
+
*
|
|
5
|
+
* @param characterValue - The character value of the concept, such as a URL or identifier.
|
|
6
|
+
* @param type - The type string that qualifies the character value, such as "the_source_url".
|
|
7
|
+
* @returns The matching Concept object, or a default empty Concept if not found.
|
|
8
|
+
*/
|
|
9
|
+
export declare function GetInstanceConceptByCharacterType(characterValue: string, type: string): Promise<Concept>;
|
|
@@ -25,6 +25,7 @@ export declare class BaseUrl {
|
|
|
25
25
|
static GetConceptByCharacterValueUrl(): string;
|
|
26
26
|
static GetConceptByCharacterAndTypeUrl(): string;
|
|
27
27
|
static GetConceptByCharacterAndCategoryUrl(): string;
|
|
28
|
+
static GetInstanceConceptByCharacterTypeUrl(): string;
|
|
28
29
|
static GetConceptByCharacterAndCategoryDirectUrl(): string;
|
|
29
30
|
static GetCharacterByCharacterUrl(): string;
|
|
30
31
|
static GetAllConceptsByTypeUrl(): string;
|
|
@@ -47,6 +48,7 @@ export declare class BaseUrl {
|
|
|
47
48
|
static MakeTheNameInBackendUrl(): string;
|
|
48
49
|
static SearchAllTypeWithLinker(auth?: boolean): string;
|
|
49
50
|
static LoginUrl(): string;
|
|
51
|
+
static RefreshTokenUrl(): string;
|
|
50
52
|
static SignupUrl(): string;
|
|
51
53
|
static GetCompositionConnectionBetweenTwoConceptsUrl(): string;
|
|
52
54
|
static SearchCompositionsUrl(): string;
|
|
@@ -11,6 +11,7 @@ export declare class TokenStorage {
|
|
|
11
11
|
* Also populates profileCache so getUserDetails() works synchronously.
|
|
12
12
|
*/
|
|
13
13
|
static saveUserProfile(signinResponse: any): Promise<boolean>;
|
|
14
|
+
static updateTokens(accessToken?: string, refreshToken?: string): Promise<void>;
|
|
14
15
|
/**
|
|
15
16
|
* Call once at app startup (e.g. in init()) to decrypt the stored profile
|
|
16
17
|
* into memory so that getUserDetails() can read it synchronously.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
1
|
+
type RequestHeader = Record<string, string>;
|
|
2
|
+
export declare function GetRequestHeader(contentType?: string, Accept?: string): Promise<RequestHeader>;
|
|
3
|
+
export declare function GetRequestHeaderWithAuthorization(contentType?: string, token?: string, Accept?: string): Promise<RequestHeader>;
|
|
4
|
+
export declare function GetOnlyTokenHeader(): Promise<Headers>;
|
|
5
|
+
export declare function getValidAccessToken(token?: string): Promise<string>;
|
|
6
|
+
export {};
|
|
@@ -3,3 +3,8 @@
|
|
|
3
3
|
* Priority: in-memory profileCache (encrypted) → legacy localStorage("profile") fallback.
|
|
4
4
|
*/
|
|
5
5
|
export declare function getUserDetails(): Record<string, any>;
|
|
6
|
+
/**
|
|
7
|
+
* Returns user details after hydrating storage and refreshing an expired token.
|
|
8
|
+
* Use this when callers need a valid token from the user details object.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getUserDetailsWithRefresh(): Promise<Record<string, any>>;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ export { GetConnectionBetweenTwoConceptsLinker } from './Services/GetConnectionB
|
|
|
67
67
|
export { DelayFunctionExecution } from './Services/Common/DelayFunction';
|
|
68
68
|
export { GetCompositionWithIdAndDateFromMemory, GetCompositionFromMemoryWithConnections } from './Services/GetComposition';
|
|
69
69
|
export { GetConceptByCharacterAndType } from './Api/GetConceptByCharacterAndType';
|
|
70
|
+
export { GetInstanceConceptByCharacterType } from './Api/GetInstanceConceptByCharacterType';
|
|
70
71
|
export { GetConnectionDataPrefetch } from './Services/GetCompositionBulk';
|
|
71
72
|
export { FormatFromConnectionsAltered } from './Services/Search/SearchLinkMultiple';
|
|
72
73
|
export { NORMAL, JUSTDATA, DATAID, DATAIDDATE, RAW, ALLID, LISTNORMAL, DATAV2 } from './Constants/FormatConstants';
|
|
@@ -127,7 +128,7 @@ export { CreateConnectionBetweenEntityLocal } from './Services/CreateConnection/
|
|
|
127
128
|
export { BuildWidgetFromId } from './Widgets/WidgetBuild';
|
|
128
129
|
export { clearAllCaches } from './Services/CacheClear';
|
|
129
130
|
export { removeAllChildren } from './Services/Common/RemoveAllChild';
|
|
130
|
-
export { getUserDetails } from './Services/User/UserFromLocalStorage';
|
|
131
|
+
export { getUserDetails, getUserDetailsWithRefresh } from './Services/User/UserFromLocalStorage';
|
|
131
132
|
export { TokenStorage } from './DataStructures/Security/TokenStorage';
|
|
132
133
|
export { CountInfo } from './DataStructures/Count/CountInfo';
|
|
133
134
|
export { LogEvent } from './Services/Logs/LogEvent';
|
|
@@ -211,7 +212,7 @@ export declare function setHasActivatedSW(value: boolean): void;
|
|
|
211
212
|
* @see {@link Signin} for alternative authentication
|
|
212
213
|
* @see {@link init} which can also set initial token
|
|
213
214
|
*/
|
|
214
|
-
declare function updateAccessToken(accessToken?: string, session?: any): void;
|
|
215
|
+
declare function updateAccessToken(accessToken?: string, session?: any, refreshToken?: string): void;
|
|
215
216
|
/**
|
|
216
217
|
* Initializes the mftsccs-browser package and sets up all required subsystems.
|
|
217
218
|
*
|