mftsccs-browser 2.2.20-beta → 2.2.22-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 +1073 -11
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +1 -0
- package/dist/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/Api/Create/CreateTheCharacter.d.ts +21 -0
- package/dist/types/Api/Create/CreateTheConceptApi.d.ts +18 -0
- package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +16 -0
- package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +25 -0
- package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +16 -0
- package/dist/types/Api/Create/CreateTheTextData.d.ts +16 -0
- package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +13 -0
- package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +18 -0
- package/dist/types/Api/DeleteConnectionApiBulk.d.ts +1 -0
- package/dist/types/Api/DeleteConnectionBulkApi.d.ts +19 -0
- package/dist/types/Api/DeleteTheConcept.d.ts +19 -0
- package/dist/types/Api/DeleteTheConnection.d.ts +19 -0
- package/dist/types/Api/GetAiData.d.ts +9 -0
- package/dist/types/Api/GetAllConcepts.d.ts +10 -0
- package/dist/types/Api/GetAllConceptsByType.d.ts +11 -0
- package/dist/types/Api/GetAllConnections.d.ts +10 -0
- package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +20 -0
- package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +20 -0
- package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +10 -0
- package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +10 -0
- package/dist/types/Api/GetAllPrefetchConnections.d.ts +11 -0
- package/dist/types/Api/GetCharacterDataByCharacter.d.ts +10 -0
- package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +12 -0
- package/dist/types/Api/GetConceptBulk.d.ts +10 -0
- package/dist/types/Api/GetConceptByCharacterAndType.d.ts +14 -0
- package/dist/types/Api/GetConceptByCharacterValue.d.ts +10 -0
- package/dist/types/Api/GetConnection.d.ts +13 -0
- package/dist/types/Api/GetConnectionOfTheConcept.d.ts +14 -0
- package/dist/types/Api/GetConnectionToTheConcept.d.ts +15 -0
- package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +12 -0
- package/dist/types/Api/GetReservedConnectionIds.d.ts +9 -0
- package/dist/types/Api/GetReservedIds.d.ts +9 -0
- package/dist/types/Api/Images/GetImages.d.ts +14 -0
- package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +11 -0
- package/dist/types/Api/Login.d.ts +77 -0
- package/dist/types/Api/MakeTheNameInBackend.d.ts +13 -0
- package/dist/types/Api/Prototype/CreatePrototype.d.ts +12 -0
- package/dist/types/Api/Prototype/Selector.d.ts +11 -0
- package/dist/types/Api/RecursiveSearch.d.ts +61 -0
- package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +16 -0
- package/dist/types/Api/Search/Search.d.ts +72 -0
- package/dist/types/Api/Search/SearchInternalApi.d.ts +25 -0
- package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +13 -0
- package/dist/types/Api/Search/SearchWithLinker.d.ts +14 -0
- package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +12 -0
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +10 -0
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +11 -0
- package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +13 -0
- package/dist/types/Api/Session/CreateSession.d.ts +14 -0
- package/dist/types/Api/Session/CreateSessionVisit.d.ts +11 -0
- package/dist/types/Api/Signin.d.ts +21 -0
- package/dist/types/Api/Signup.d.ts +53 -11
- package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +10 -0
- package/dist/types/Api/View/ViewInternalDataApi.d.ts +14 -0
- package/dist/types/DataStructures/BaseUrl.d.ts +1 -0
- package/dist/types/DataStructures/Transaction/Transaction.d.ts +30 -0
- package/dist/types/Services/AccessControl/AccessControlCacheService.d.ts +19 -0
- package/dist/types/Services/AccessControl/AccessControlService.d.ts +267 -0
- package/dist/types/Services/AccessControl/PermissionSet.d.ts +8 -0
- package/dist/types/Services/CreateTheConcept.d.ts +118 -0
- package/dist/types/Services/CreateTheConnection.d.ts +59 -6
- package/dist/types/Services/Delete/DeleteConnectionByType.d.ts +13 -0
- package/dist/types/Services/Delete/GetAllConnectionByType.d.ts +16 -0
- package/dist/types/Services/GetComposition.d.ts +64 -7
- package/dist/types/Services/GetTheConcept.d.ts +91 -4
- package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +39 -0
- package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +45 -0
- package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +41 -0
- package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +44 -0
- package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +6 -1
- package/dist/types/Services/Local/CreateLocalBinaryTypeTreeFromData.d.ts +8 -0
- package/dist/types/Services/Local/CreateLocalCharacterBinaryTree.d.ts +8 -0
- package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +100 -10
- package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +80 -18
- package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +135 -11
- package/dist/types/Services/Local/DeleteConceptLocal.d.ts +46 -0
- package/dist/types/Services/Local/GetCompositionListLocal.d.ts +31 -8
- package/dist/types/Services/Local/GetCompositionLocal.d.ts +95 -0
- package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +48 -2
- package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +17 -0
- package/dist/types/Services/Local/GetRelationLocal.d.ts +20 -0
- package/dist/types/Services/Local/GetTheConceptLocal.d.ts +60 -6
- package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +20 -0
- package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +160 -14
- package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +29 -9
- package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +39 -0
- package/dist/types/Services/MakeTheLocalConcept.d.ts +0 -0
- package/dist/types/Services/MakeTheName.d.ts +2 -0
- package/dist/types/Services/auth/AuthService.d.ts +1 -0
- package/dist/types/Widgets/BaseObserver.d.ts +14 -11
- package/dist/types/Widgets/BaseWidget.d.ts +24 -11
- package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +9 -0
- package/dist/types/Widgets/BuilderStatefulWidget.d.ts +352 -2
- package/dist/types/Widgets/CacheWidget.service.d.ts +60 -0
- package/dist/types/Widgets/NormalizeStyles.service.d.ts +9 -0
- package/dist/types/Widgets/RenderPage.service.d.ts +9 -4
- package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +12 -4
- package/dist/types/Widgets/RenderWidgetService.d.ts +158 -21
- package/dist/types/Widgets/StatefulWidget.d.ts +94 -29
- package/dist/types/Widgets/WidgetBuild.d.ts +41 -0
- package/dist/types/Widgets/WidgetTree.d.ts +31 -0
- package/dist/types/Widgets/mainView.class.d.ts +21 -0
- package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +48 -27
- package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +34 -2
- package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +24 -2
- package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +38 -9
- package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +30 -12
- package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +34 -16
- package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +41 -5
- package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +24 -3
- package/dist/types/app.d.ts +183 -12
- package/package.json +1 -1
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
import { DependencyObserver } from "./DepenedencyObserver";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Observable wrapper for retrieving a paginated list of compositions by type with automatic updates.
|
|
4
4
|
*/
|
|
5
5
|
export declare class GetCompositionListObservable extends DependencyObserver {
|
|
6
|
+
/** The composition type character name */
|
|
6
7
|
compositionName: string;
|
|
8
|
+
/** The user ID who owns the compositions */
|
|
7
9
|
userId: number;
|
|
10
|
+
/** Number of items per page */
|
|
8
11
|
inpage: number;
|
|
12
|
+
/** Current page number */
|
|
9
13
|
page: number;
|
|
14
|
+
/** List of composition data */
|
|
10
15
|
data: any;
|
|
16
|
+
/** Starting page index */
|
|
11
17
|
startPage: number;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new composition list observable.
|
|
20
|
+
* @param compositionName - The composition type name
|
|
21
|
+
* @param userId - The user ID who owns the compositions
|
|
22
|
+
* @param inpage - Number of items per page
|
|
23
|
+
* @param page - Page number (1-indexed)
|
|
24
|
+
* @param format - Output format (JUSTDATA, DATAID, NORMAL)
|
|
25
|
+
*/
|
|
12
26
|
constructor(compositionName: string, userId: number, inpage: number, page: number, format: number);
|
|
27
|
+
/**
|
|
28
|
+
* Fetches paginated composition list and sets up change listeners.
|
|
29
|
+
* @returns Array of formatted composition data
|
|
30
|
+
*/
|
|
13
31
|
bind(): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Builds the list of compositions in the specified format.
|
|
34
|
+
* @returns Array of formatted composition data
|
|
35
|
+
*/
|
|
14
36
|
build(): Promise<any>;
|
|
15
37
|
}
|
|
16
38
|
/**
|
|
17
|
-
*
|
|
39
|
+
* Creates an observable that tracks a paginated list of compositions and updates subscribers when they change.
|
|
40
|
+
* @param compositionName - The composition type name
|
|
41
|
+
* @param userId - The user ID who owns the compositions
|
|
42
|
+
* @param inpage - Number of items per page
|
|
43
|
+
* @param page - Page number (1-indexed)
|
|
44
|
+
* @param format - Output format (JUSTDATA, DATAID, NORMAL)
|
|
45
|
+
* @returns Observable instance for the composition list
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* const observer = GetCompositionListListener("BlogPost", 123, 10, 1, JUSTDATA);
|
|
49
|
+
* observer.subscribe((data) => console.log(data));
|
|
18
50
|
*/
|
|
19
51
|
export declare function GetCompositionListListener(compositionName: string, userId: number, inpage: number, page: number, format?: number): GetCompositionListObservable;
|
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
import { DependencyObserver } from "./DepenedencyObserver";
|
|
2
|
+
/**
|
|
3
|
+
* Observable wrapper for retrieving a composition with automatic updates when the composition changes.
|
|
4
|
+
*/
|
|
2
5
|
export declare class GetCompositionObservable extends DependencyObserver {
|
|
6
|
+
/** The composition ID to observe */
|
|
3
7
|
id: number;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new composition observable.
|
|
10
|
+
* @param id - The composition concept ID
|
|
11
|
+
* @param format - Output format (JUSTDATA, DATAID, NORMAL)
|
|
12
|
+
*/
|
|
4
13
|
constructor(id: number, format?: number);
|
|
14
|
+
/**
|
|
15
|
+
* Fetches composition data and sets up change listeners.
|
|
16
|
+
* @returns The formatted composition data
|
|
17
|
+
*/
|
|
5
18
|
bind(): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Builds the composition data in the specified format.
|
|
21
|
+
* @returns The formatted composition data
|
|
22
|
+
*/
|
|
6
23
|
build(): Promise<any>;
|
|
7
24
|
}
|
|
8
25
|
/**
|
|
26
|
+
* Creates an observable that tracks a composition and updates subscribers when it changes.
|
|
27
|
+
* @param id - The composition concept ID to observe
|
|
28
|
+
* @param format - Output format (JUSTDATA, DATAID, NORMAL)
|
|
29
|
+
* @returns Observable instance for the composition
|
|
9
30
|
*
|
|
10
|
-
* @
|
|
11
|
-
*
|
|
31
|
+
* @example
|
|
32
|
+
* const observer = GetCompositionListener(123, JUSTDATA);
|
|
33
|
+
* observer.subscribe((data) => console.log(data));
|
|
12
34
|
*/
|
|
13
35
|
export declare function GetCompositionListener(id: number, format?: number): GetCompositionObservable;
|
|
@@ -1,28 +1,57 @@
|
|
|
1
1
|
import { SearchQuery, SearchStructure } from "../app";
|
|
2
2
|
import { DependencyObserver } from "./DepenedencyObserver";
|
|
3
|
+
/**
|
|
4
|
+
* Observable wrapper for searching linked concepts with complex query structures and automatic updates.
|
|
5
|
+
*/
|
|
3
6
|
export declare class GetLinkListObservable extends DependencyObserver {
|
|
7
|
+
/** Array of search query conditions */
|
|
4
8
|
searchQuery: SearchQuery[];
|
|
9
|
+
/** Search structure defining composition and linker types */
|
|
5
10
|
searchStructure: SearchStructure;
|
|
11
|
+
/** Output format */
|
|
6
12
|
format: number;
|
|
13
|
+
/** List of main composition IDs */
|
|
7
14
|
mainCompositionIds: number[];
|
|
15
|
+
/** Character value of the search composition */
|
|
8
16
|
searchCharacter: string;
|
|
17
|
+
/** Authentication token */
|
|
9
18
|
token: string;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new link list observable.
|
|
21
|
+
* @param searchStructure - Defines composition and linker types for the search
|
|
22
|
+
* @param searchQuery - Array of query conditions to filter results
|
|
23
|
+
* @param token - Authentication token
|
|
24
|
+
* @param format - Output format (DATAID, NORMAL)
|
|
25
|
+
*/
|
|
10
26
|
constructor(searchStructure: SearchStructure, searchQuery: SearchQuery[], token: string, format?: number);
|
|
11
27
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
28
|
+
* Overrides base method to handle new compositions of the searched type being created.
|
|
29
|
+
* @param id - The type concept ID to track
|
|
30
|
+
*/
|
|
16
31
|
listenToEventType(id: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Executes the search query and sets up change listeners.
|
|
34
|
+
* @returns Array of formatted search results
|
|
35
|
+
*/
|
|
17
36
|
bind(): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Builds the search results in the specified format.
|
|
39
|
+
* @returns Array of formatted search results
|
|
40
|
+
*/
|
|
18
41
|
build(): Promise<any>;
|
|
19
42
|
}
|
|
20
43
|
/**
|
|
44
|
+
* Creates an observable that tracks search results with complex query conditions and updates subscribers when results change.
|
|
45
|
+
* @param searchStructure - Defines composition and linker types for the search
|
|
46
|
+
* @param searchQuery - Array of query conditions to filter results
|
|
47
|
+
* @param token - Authentication token
|
|
48
|
+
* @param format - Output format (DATAID, NORMAL)
|
|
49
|
+
* @returns Observable instance for the search results
|
|
21
50
|
*
|
|
22
|
-
* @
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
51
|
+
* @example
|
|
52
|
+
* const structure = { composition: "BlogPost", linker: ["Author", "Category"] };
|
|
53
|
+
* const queries = [{ type: "BlogPost", searchField: "title", searchText: "tutorial" }];
|
|
54
|
+
* const observer = GetLinkListListener(structure, queries, token, DATAID);
|
|
55
|
+
* observer.subscribe((results) => console.log(results));
|
|
27
56
|
*/
|
|
28
57
|
export declare function GetLinkListListener(searchStructure: SearchStructure, searchQuery: SearchQuery[], token: string, format?: number): GetLinkListObservable;
|
|
@@ -1,32 +1,50 @@
|
|
|
1
1
|
import { Connection } from "../app";
|
|
2
2
|
import { DependencyObserver } from "./DepenedencyObserver";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Observable wrapper for retrieving linked concepts from a source concept with automatic updates.
|
|
5
5
|
*/
|
|
6
6
|
export declare class GetLinkObservable extends DependencyObserver {
|
|
7
|
+
/** The linker type name defining the relationship */
|
|
7
8
|
linker: string;
|
|
9
|
+
/** Number of items per page */
|
|
8
10
|
inpage: number;
|
|
11
|
+
/** Current page number */
|
|
9
12
|
page: number;
|
|
13
|
+
/** List of connection objects */
|
|
10
14
|
connections: Connection[];
|
|
15
|
+
/** Array of linked composition data */
|
|
11
16
|
data: any;
|
|
12
17
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @param id
|
|
15
|
-
* @param linker
|
|
16
|
-
* @param inpage
|
|
17
|
-
* @param page
|
|
18
|
-
* @param format
|
|
18
|
+
* Creates a new link observable.
|
|
19
|
+
* @param id - The source concept ID whose links to retrieve
|
|
20
|
+
* @param linker - The linker type name defining the relationship
|
|
21
|
+
* @param inpage - Number of items per page
|
|
22
|
+
* @param page - Page number (1-indexed)
|
|
23
|
+
* @param format - Output format (NORMAL, DATAID, JUSTDATA, DATAIDDATE)
|
|
19
24
|
*/
|
|
20
25
|
constructor(id: number, linker: string, inpage: number, page: number, format: number);
|
|
26
|
+
/**
|
|
27
|
+
* Fetches linked concepts and sets up change listeners.
|
|
28
|
+
* @returns Array of linked composition data
|
|
29
|
+
*/
|
|
21
30
|
bind(): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Builds the array of linked compositions in the specified format.
|
|
33
|
+
* @returns Array of formatted linked composition data
|
|
34
|
+
*/
|
|
22
35
|
build(): Promise<any>;
|
|
23
36
|
}
|
|
24
37
|
/**
|
|
38
|
+
* Creates an observable that tracks linked concepts and updates subscribers when links change.
|
|
39
|
+
* @param id - The source concept ID whose links to retrieve
|
|
40
|
+
* @param linker - The linker type name defining the relationship
|
|
41
|
+
* @param inpage - Number of items per page
|
|
42
|
+
* @param page - Page number (1-indexed)
|
|
43
|
+
* @param format - Output format (NORMAL, DATAID, JUSTDATA, DATAIDDATE)
|
|
44
|
+
* @returns Observable instance for the linked concepts
|
|
25
45
|
*
|
|
26
|
-
* @
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @param page the page which needs to be displayed as per the inpage parameter
|
|
30
|
-
* @param format the format in which the output should be displayed (NORMAL, DATAID,JUSTDATA,DATAIDDATE)
|
|
46
|
+
* @example
|
|
47
|
+
* const observer = GetLinkListener(123, "Author", 10, 1, NORMAL);
|
|
48
|
+
* observer.subscribe((linkedData) => console.log(linkedData));
|
|
31
49
|
*/
|
|
32
50
|
export declare function GetLinkListener(id: number, linker: string, inpage: number, page: number, format?: number): GetLinkObservable;
|
|
@@ -1,37 +1,55 @@
|
|
|
1
1
|
import { Connection, DependencyObserver } from "../app";
|
|
2
|
+
/**
|
|
3
|
+
* Observable wrapper for recursive multi-level searches following linker paths with automatic updates.
|
|
4
|
+
*/
|
|
2
5
|
declare class RecursiveSearchObservable extends DependencyObserver {
|
|
6
|
+
/** Array of linker type names defining the search path */
|
|
3
7
|
searchLinkers: string[];
|
|
8
|
+
/** Search text placeholder */
|
|
4
9
|
searchText: string;
|
|
10
|
+
/** Text to search for in linked concepts */
|
|
5
11
|
textSearch: string;
|
|
12
|
+
/** List of connection objects */
|
|
6
13
|
connections: Connection[];
|
|
14
|
+
/** List of external (linker) connection IDs */
|
|
7
15
|
externalConnectionIds: number[];
|
|
16
|
+
/** Search result data */
|
|
8
17
|
data: any;
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @param id
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param format the format in which the output should be displayed (RAW, undefined)
|
|
19
|
+
* Creates a new recursive search observable.
|
|
20
|
+
* @param id - The starting concept ID for the recursive search
|
|
21
|
+
* @param linkers - Array of linker type names defining the traversal path
|
|
22
|
+
* @param textSearch - Optional text to search for in linked concepts
|
|
23
|
+
* @param format - Output format (RAW for raw IDs, undefined for formatted compositions)
|
|
16
24
|
*/
|
|
17
25
|
constructor(id: number, linkers: string[], textSearch?: string, format?: number);
|
|
18
26
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @param id Of the concept id that needs to be listened.
|
|
27
|
+
* Overrides base method to track connection changes for concepts in the search results.
|
|
28
|
+
* @param id - The concept ID to track
|
|
23
29
|
*/
|
|
24
30
|
listenToEvent(id: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Executes recursive search and sets up change listeners for all found compositions.
|
|
33
|
+
* @returns Formatted search results or raw ID structure
|
|
34
|
+
*/
|
|
25
35
|
bind(): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Builds the search results in the specified format.
|
|
38
|
+
* @returns Formatted composition data or raw ID structure
|
|
39
|
+
*/
|
|
26
40
|
build(): Promise<any>;
|
|
27
41
|
}
|
|
28
42
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @param id
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @
|
|
43
|
+
* Creates an observable that performs recursive multi-level searches and updates subscribers when results change.
|
|
44
|
+
* @param id - The starting concept ID for the recursive search
|
|
45
|
+
* @param linkers - Array of linker type names defining the traversal path
|
|
46
|
+
* @param searchText - Optional text to search for in linked concepts
|
|
47
|
+
* @param format - Output format (RAW for raw IDs, undefined for formatted compositions)
|
|
48
|
+
* @returns Observable instance for the recursive search
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const observer = RecursiveSearchListener(123, ["Author", "Category"], "tutorial", RAW);
|
|
52
|
+
* observer.subscribe((results) => console.log(results));
|
|
35
53
|
*/
|
|
36
54
|
export declare function RecursiveSearchListener(id: number, linkers: string[], searchText?: string, format?: number): RecursiveSearchObservable;
|
|
37
55
|
export {};
|
|
@@ -1,22 +1,58 @@
|
|
|
1
1
|
import { FreeschemaQuery } from "../app";
|
|
2
2
|
import { DependencyObserver } from "./DepenedencyObserver";
|
|
3
|
+
/**
|
|
4
|
+
* Observable wrapper for executing free-schema queries with automatic updates.
|
|
5
|
+
* Supports complex filtering, sorting, and pagination with multiple output formats.
|
|
6
|
+
*/
|
|
3
7
|
export declare class SearchLinkMultipleAllObservable extends DependencyObserver {
|
|
8
|
+
/** The free-schema query object containing all search parameters */
|
|
4
9
|
query: FreeschemaQuery;
|
|
10
|
+
/** Encoded count information strings */
|
|
5
11
|
countInfoStrings: string[];
|
|
12
|
+
/** Sort order for results */
|
|
6
13
|
order: string;
|
|
14
|
+
/** Total count of matching results */
|
|
7
15
|
totalCount: number;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new schema query observable.
|
|
18
|
+
* @param query - FreeschemaQuery object with search parameters
|
|
19
|
+
* @param token - Authentication token
|
|
20
|
+
*/
|
|
8
21
|
constructor(query: FreeschemaQuery, token: string);
|
|
22
|
+
/**
|
|
23
|
+
* Executes the query once without subscribing to updates.
|
|
24
|
+
* @returns Formatted query results
|
|
25
|
+
*/
|
|
9
26
|
run(): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Executes the query and sets up change listeners for all matching compositions.
|
|
29
|
+
* @returns Formatted query results
|
|
30
|
+
*/
|
|
10
31
|
bind(): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Builds the query results in the specified format.
|
|
34
|
+
* @returns Formatted query results based on the output format
|
|
35
|
+
*/
|
|
11
36
|
build(): Promise<any>;
|
|
12
37
|
}
|
|
13
38
|
/**
|
|
39
|
+
* Creates an observable that executes a free-schema query and updates subscribers when results change.
|
|
40
|
+
* @param query - FreeschemaQuery object with search, filter, sort, and pagination parameters
|
|
41
|
+
* @param token - Authentication token
|
|
42
|
+
* @returns Observable instance for the query results
|
|
14
43
|
*
|
|
15
|
-
* @
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
44
|
+
* @example
|
|
45
|
+
* const query = new FreeschemaQuery();
|
|
46
|
+
* query.type = "BlogPost";
|
|
47
|
+
* query.outputFormat = DATAID;
|
|
48
|
+
* const observer = SchemaQueryListener(query, token);
|
|
49
|
+
* observer.subscribe((results) => console.log(results));
|
|
20
50
|
*/
|
|
21
51
|
export declare function SchemaQueryListener(query: FreeschemaQuery, token: string): SearchLinkMultipleAllObservable;
|
|
52
|
+
/**
|
|
53
|
+
* Executes a free-schema query once without creating a subscription.
|
|
54
|
+
* @param query - FreeschemaQuery object with search parameters
|
|
55
|
+
* @param token - Authentication token
|
|
56
|
+
* @returns Promise resolving to formatted query results
|
|
57
|
+
*/
|
|
22
58
|
export declare function SchemaQuery(query: FreeschemaQuery, token: string): Promise<void>;
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import { SearchQuery } from "../app";
|
|
2
2
|
import { DependencyObserver } from "./DepenedencyObserver";
|
|
3
|
+
/**
|
|
4
|
+
* Observable wrapper for executing multiple search queries with automatic updates.
|
|
5
|
+
*/
|
|
3
6
|
export declare class SearchLinkMultipleAllObservable extends DependencyObserver {
|
|
7
|
+
/** Array of search query conditions */
|
|
4
8
|
searchQuery: SearchQuery[];
|
|
9
|
+
/** Output format */
|
|
5
10
|
format: number;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new multi-search observable.
|
|
13
|
+
* @param searchQuery - Array of SearchQuery objects defining search conditions
|
|
14
|
+
* @param token - Authentication token
|
|
15
|
+
* @param format - Output format (DATAID by default)
|
|
16
|
+
*/
|
|
6
17
|
constructor(searchQuery: SearchQuery[], token: string, format?: number);
|
|
18
|
+
/**
|
|
19
|
+
* Executes the search queries and sets up change listeners.
|
|
20
|
+
* @returns Formatted search results
|
|
21
|
+
*/
|
|
7
22
|
bind(): Promise<any>;
|
|
8
23
|
}
|
|
9
24
|
/**
|
|
25
|
+
* Creates an observable that executes multiple search queries and updates subscribers when results change.
|
|
26
|
+
* @param searchQueries - Array of SearchQuery objects defining search conditions
|
|
27
|
+
* @param token - Authentication token
|
|
28
|
+
* @param format - Output format (DATAID by default)
|
|
29
|
+
* @returns Observable instance for the search results
|
|
10
30
|
*
|
|
11
|
-
* @
|
|
12
|
-
*
|
|
13
|
-
*
|
|
31
|
+
* @example
|
|
32
|
+
* const queries = [{ composition: 123, type: "BlogPost", searchField: "title", searchText: "tutorial" }];
|
|
33
|
+
* const observer = searchLinkMultipleListener(queries, token, DATAID);
|
|
34
|
+
* observer.subscribe((results) => console.log(results));
|
|
14
35
|
*/
|
|
15
36
|
export declare function searchLinkMultipleListener(searchQueries: SearchQuery[], token?: string, format?: number): SearchLinkMultipleAllObservable;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ export { CountInfo } from './DataStructures/Count/CountInfo';
|
|
|
129
129
|
export { LogEvent } from './Services/Logs/LogEvent';
|
|
130
130
|
export { Selector } from './Api/Prototype/Selector';
|
|
131
131
|
export { AccessControlService } from './Services/AccessControl/AccessControl';
|
|
132
|
-
export { importLatestWidget, renderImportedWidget, renderLatestWidget, renderPage, renderWidget, convertWidgetTreeToWidgetWithWrapper, getWidgetFromId, convertWidgetTreeToWidget, unwrapContainers, getWidgetBulkFromId } from './Widgets/RenderWidgetService';
|
|
132
|
+
export { importLatestWidget, importRecentWidget, renderImportedWidget, renderLatestWidget, renderPage, renderWidget, convertWidgetTreeToWidgetWithWrapper, getWidgetFromId, convertWidgetTreeToWidget, unwrapContainers, getWidgetBulkFromId } from './Widgets/RenderWidgetService';
|
|
133
133
|
export { CreateData } from './Services/automated/automated-concept-connection';
|
|
134
134
|
export { Prototype } from './DataStructures/Prototype/Prototype';
|
|
135
135
|
export { createPrototypeLocal } from './prototype/prototype.service';
|
|
@@ -146,22 +146,193 @@ export declare let subscribedListeners: listeners[];
|
|
|
146
146
|
export declare let hasActivatedSW: boolean;
|
|
147
147
|
export declare function setHasActivatedSW(value: boolean): void;
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
149
|
+
* Updates the JWT access token used for authenticated API requests.
|
|
150
|
+
*
|
|
151
|
+
* This function should be called after user authentication to set or update the bearer token
|
|
152
|
+
* that will be used for all subsequent authenticated operations. The token is stored in
|
|
153
|
+
* TokenStorage and automatically included in API request headers.
|
|
154
|
+
*
|
|
155
|
+
* **When to Use:**
|
|
156
|
+
* - After successful login (LoginToBackend or Signin)
|
|
157
|
+
* - When refreshing an expired token
|
|
158
|
+
* - When switching between user sessions
|
|
159
|
+
* - When restoring a saved session on app reload
|
|
160
|
+
*
|
|
161
|
+
* **Token Flow:**
|
|
162
|
+
* 1. User logs in via LoginToBackend() or Signin()
|
|
163
|
+
* 2. Backend returns JWT token
|
|
164
|
+
* 3. Call updateAccessToken() with the token
|
|
165
|
+
* 4. Token is stored in memory (TokenStorage.BearerAccessToken)
|
|
166
|
+
* 5. All API calls automatically use this token
|
|
167
|
+
* 6. If service worker enabled, token is synced to service worker
|
|
168
|
+
*
|
|
169
|
+
* **Security Notes:**
|
|
170
|
+
* - Token is stored in memory only (not persisted to disk)
|
|
171
|
+
* - Token is cleared on page refresh (unless you save/restore it)
|
|
172
|
+
* - Never expose token in logs or client-side code
|
|
173
|
+
* - Token should be refreshed before expiration
|
|
174
|
+
*
|
|
175
|
+
* @param accessToken - The JWT bearer token obtained from authentication.
|
|
176
|
+
* Format: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
177
|
+
* Pass empty string to clear the token (logout).
|
|
178
|
+
*
|
|
179
|
+
* @param session - Optional session information to sync with token.
|
|
180
|
+
* Reserved for future use. Currently not fully implemented.
|
|
181
|
+
*
|
|
182
|
+
* @returns void
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* // After login, update token
|
|
186
|
+
* const loginResult = await LoginToBackend("user@example.com", "password");
|
|
187
|
+
* updateAccessToken(loginResult.data.token);
|
|
188
|
+
* console.log("Token updated - now authenticated");
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* // Restore token from localStorage on app reload
|
|
192
|
+
* const savedToken = localStorage.getItem("authToken");
|
|
193
|
+
* if (savedToken) {
|
|
194
|
+
* updateAccessToken(savedToken);
|
|
195
|
+
* }
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* // Clear token on logout
|
|
199
|
+
* updateAccessToken("");
|
|
200
|
+
* console.log("Token cleared - logged out");
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* // Refresh expired token
|
|
204
|
+
* const newToken = await refreshTokenFromBackend();
|
|
205
|
+
* updateAccessToken(newToken);
|
|
206
|
+
*
|
|
207
|
+
* @see {@link LoginToBackend} for obtaining initial token
|
|
208
|
+
* @see {@link Signin} for alternative authentication
|
|
209
|
+
* @see {@link init} which can also set initial token
|
|
152
210
|
*/
|
|
153
211
|
declare function updateAccessToken(accessToken?: string, session?: any): void;
|
|
154
212
|
/**
|
|
213
|
+
* Initializes the mftsccs-browser package and sets up all required subsystems.
|
|
214
|
+
*
|
|
215
|
+
* This is the FIRST function you must call before using any other functionality in the package.
|
|
216
|
+
* It configures the backend connections, initializes local databases, sets up service workers,
|
|
217
|
+
* and prepares the system for concept and connection operations.
|
|
218
|
+
*
|
|
219
|
+
* **Initialization Process:**
|
|
220
|
+
* 1. Configures Base URLs for backend, AI, and node servers
|
|
221
|
+
* 2. Sets up access token for authenticated requests
|
|
222
|
+
* 3. Generates unique application randomizer for IndexedDB identification
|
|
223
|
+
* 4. Initializes feature flags (logging, access tracking, etc.)
|
|
224
|
+
* 5. Checks for service worker support
|
|
225
|
+
* 6. Initializes local IndexedDB databases for caching
|
|
226
|
+
* 7. Sets up message listeners for service worker communication
|
|
227
|
+
* 8. Optionally registers and activates service worker
|
|
228
|
+
* 9. Falls back to main thread if service worker unavailable
|
|
229
|
+
*
|
|
230
|
+
* **Subsystems Initialized:**
|
|
231
|
+
* - IndexedDB databases (concepts, connections, settings)
|
|
232
|
+
* - Service worker (if enabled and supported)
|
|
233
|
+
* - Message passing between main thread and service worker
|
|
234
|
+
* - Broadcast channel for cross-tab communication
|
|
235
|
+
* - Access token storage
|
|
236
|
+
* - Logging and monitoring systems
|
|
237
|
+
* - Access tracking (if enabled)
|
|
155
238
|
*
|
|
156
|
-
* @param url
|
|
157
|
-
*
|
|
239
|
+
* @param url - The backend API base URL (C# data fabric server).
|
|
240
|
+
* This is the primary server for concept and connection data.
|
|
241
|
+
* Example: "https://api.example.com" or "https://backend.yourdomain.com"
|
|
242
|
+
* **Required** for most operations.
|
|
243
|
+
*
|
|
244
|
+
* @param aiurl - The AI service URL for AI-powered features and data preloading.
|
|
245
|
+
* If not using AI features, pass empty string and set enableAi to false.
|
|
246
|
+
* Example: "https://ai.example.com"
|
|
247
|
+
*
|
|
248
|
+
* @param accessToken - JWT bearer token for authenticated API requests.
|
|
249
|
+
* Can be empty string on initialization - set later with updateAccessToken().
|
|
250
|
+
* Token is obtained through LoginToBackend() or Signin().
|
|
251
|
+
* Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
252
|
+
*
|
|
253
|
+
* @param nodeUrl - The Node.js server URL for business logic and security features.
|
|
254
|
+
* Used for additional server-side operations.
|
|
255
|
+
* Example: "https://node.example.com"
|
|
256
|
+
*
|
|
257
|
+
* @param enableAi - Flag to enable/disable AI features and AI data preloading to IndexedDB.
|
|
258
|
+
* Set to false if not using AI features or if aiurl is not provided.
|
|
259
|
+
* Default: true
|
|
260
|
+
*
|
|
261
|
+
* @param applicationName - Unique identifier for your application.
|
|
262
|
+
* Used to create separate IndexedDB instances for different apps.
|
|
263
|
+
* Example: "my-app-v1", "project-manager", "knowledge-base"
|
|
264
|
+
* Useful when multiple applications share the same domain.
|
|
265
|
+
*
|
|
266
|
+
* @param enableSW - Service worker configuration object. Service worker enables background
|
|
267
|
+
* processing for better performance and offline capabilities.
|
|
268
|
+
* - activate: boolean - Enable/disable service worker
|
|
269
|
+
* - scope: string (optional) - Service worker scope path (default: "/")
|
|
270
|
+
* - pathToSW: string (optional) - Path to service worker file (default: "/service-worker.js")
|
|
271
|
+
* - manual: boolean (optional) - If true, assumes SW already registered manually
|
|
272
|
+
* Example: {activate: true, scope: "/", pathToSW: "/sw.js"}
|
|
273
|
+
*
|
|
274
|
+
* @param flags - Feature flags object for enabling/disabling various features:
|
|
275
|
+
* - logApplication: boolean - Enable application-level logging
|
|
276
|
+
* - logPackage: boolean - Enable package-level logging
|
|
277
|
+
* - accessTracker: boolean - Enable access tracking/analytics
|
|
278
|
+
* - isTest: boolean - Mark as test environment
|
|
279
|
+
* All default to false if not specified.
|
|
280
|
+
*
|
|
281
|
+
* @param parameters - Additional configuration parameters:
|
|
282
|
+
* - logserver: string - Custom log server URL (default: "https://logdev.freeschema.com")
|
|
283
|
+
*
|
|
284
|
+
* @returns Promise<boolean> - Returns true if initialization succeeds, undefined if it fails.
|
|
285
|
+
* On failure, falls back to main thread operation and logs warnings.
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* // Basic initialization (minimum required)
|
|
289
|
+
* await init(
|
|
290
|
+
* "https://api.myapp.com", // backend URL
|
|
291
|
+
* "", // no AI
|
|
292
|
+
* "", // no token yet
|
|
293
|
+
* "", // no node server
|
|
294
|
+
* false, // disable AI
|
|
295
|
+
* "my-app" // app name
|
|
296
|
+
* );
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* // Full initialization with service worker
|
|
300
|
+
* await init(
|
|
301
|
+
* "https://api.myapp.com",
|
|
302
|
+
* "https://ai.myapp.com",
|
|
303
|
+
* "",
|
|
304
|
+
* "https://node.myapp.com",
|
|
305
|
+
* true,
|
|
306
|
+
* "my-app-v2",
|
|
307
|
+
* {
|
|
308
|
+
* activate: true,
|
|
309
|
+
* scope: "/",
|
|
310
|
+
* pathToSW: "/service-worker.js"
|
|
311
|
+
* },
|
|
312
|
+
* {
|
|
313
|
+
* logApplication: true,
|
|
314
|
+
* accessTracker: true
|
|
315
|
+
* },
|
|
316
|
+
* {
|
|
317
|
+
* logserver: "https://logs.myapp.com"
|
|
318
|
+
* }
|
|
319
|
+
* );
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* // Initialize then login
|
|
323
|
+
* await init("https://api.example.com", "", "", "", false, "my-app");
|
|
324
|
+
* const loginResult = await LoginToBackend("user@example.com", "password");
|
|
325
|
+
* updateAccessToken(loginResult.data.token);
|
|
326
|
+
* // Now ready to use all authenticated operations
|
|
327
|
+
*
|
|
328
|
+
* @throws Does not throw - logs warnings and falls back to main thread on errors.
|
|
329
|
+
* Common issues: Service worker registration failures, IndexedDB access denied.
|
|
330
|
+
*
|
|
331
|
+
* @see {@link updateAccessToken} for updating the access token after initialization
|
|
332
|
+
* @see {@link LoginToBackend} for obtaining an access token
|
|
333
|
+
* @see {@link sendMessage} for communicating with service worker after initialization
|
|
158
334
|
* @param accessControlUrl This is the url for the access control system. This is another server in the data fabric that is used as server for business logic and security features.
|
|
159
|
-
*
|
|
160
|
-
* So this access token can be empty string. You can set it afterwards with another function UpdateAccessToken();
|
|
161
|
-
* @param nodeUrl This is the url for the node server. This is another server in the data fabric that is used as server for business logic and security features.
|
|
162
|
-
* @param enableAi This flag is used to enable or disable the AI feature that preloads data in the indexdb.
|
|
163
|
-
* @param applicationName This is an unique name that is given to a program. Use this to discern one indexdb from another.
|
|
164
|
-
* @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope
|
|
335
|
+
*
|
|
165
336
|
*/
|
|
166
337
|
declare function init(url?: string, aiurl?: string, accessToken?: string, nodeUrl?: string, enableAi?: boolean, applicationName?: string, enableSW?: {
|
|
167
338
|
activate: boolean;
|