mftsccs-browser 1.1.21 → 1.1.23-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/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +1 -1
- package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +1 -2
- package/dist/types/Api/GetConcept.d.ts +1 -2
- package/dist/types/Api/GetConceptByCharacterAndType.d.ts +1 -2
- package/dist/types/Api/GetConnectionOfTheConcept.d.ts +1 -2
- package/dist/types/Api/RecursiveSearch.d.ts +1 -1
- package/dist/types/DataStructures/BaseUrl.d.ts +3 -1
- package/dist/types/DataStructures/ConceptData.d.ts +2 -2
- package/dist/types/DataStructures/ConnectionData.d.ts +4 -4
- package/dist/types/DataStructures/Local/LocalSyncData.d.ts +12 -1
- package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +0 -1
- package/dist/types/DataStructures/SyncData.d.ts +1 -1
- package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +1 -1
- package/dist/types/Services/CreateTheComposition.d.ts +1 -2
- package/dist/types/Services/DeleteConcept.d.ts +1 -1
- package/dist/types/Services/DeleteConnection.d.ts +1 -1
- package/dist/types/Services/DeleteConnectionByType.d.ts +1 -1
- package/dist/types/Services/FindConnectionsOfCompositionBulkInMemory.d.ts +1 -2
- package/dist/types/Services/GetComposition.d.ts +1 -4
- package/dist/types/Services/GetCompositionBulk.d.ts +1 -1
- package/dist/types/Services/GetCompositionList.d.ts +1 -1
- package/dist/types/Services/GetConceptByCharacter.d.ts +2 -3
- package/dist/types/Services/GetConnectionBetweenTwoConceptsLinker.d.ts +2 -2
- package/dist/types/Services/GetConnections.d.ts +1 -2
- package/dist/types/Services/GetLink.d.ts +1 -1
- package/dist/types/Services/GetRelation.d.ts +2 -3
- package/dist/types/Services/GetTheConcept.d.ts +1 -2
- package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +2 -2
- package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +2 -2
- package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +2 -2
- package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +2 -2
- package/dist/types/Services/Local/DeleteConceptLocal.d.ts +1 -1
- package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +1 -1
- package/dist/types/Services/Local/GetTheConceptLocal.d.ts +1 -2
- package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +2 -2
- package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +3 -2
- package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +3 -1
- package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +3 -2
- package/dist/types/Services/MakeTheInstanceConcept.d.ts +1 -2
- package/dist/types/Services/MakeTheTimestamp.d.ts +1 -2
- package/dist/types/Services/MakeTheTypeConcept.d.ts +1 -2
- package/dist/types/Services/Search/FormatData.d.ts +2 -36
- package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +0 -20
- package/dist/types/Services/UpdateComposition.d.ts +1 -1
- package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +7 -0
- package/dist/types/app.d.ts +18 -1
- package/package.json +9 -4
- package/scripts/postinstall.js +75 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Connection } from '../DataStructures/Connection';
|
|
2
|
-
export declare function GetAllConnectionsOfCompositionBulk(composition_ids?: number[]): Promise<
|
|
2
|
+
export declare function GetAllConnectionsOfCompositionBulk(composition_ids?: number[]): Promise<any>;
|
|
3
3
|
export declare function GetAllConnectionsOfCompositionOnline(composition_ids?: number[]): Promise<Connection[] | undefined>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GetCompositionConnectionsBetweenTwoConcepts(ofConceptId: number, toConcept: number, mainKey: number): Promise<Connection[]>;
|
|
1
|
+
export declare function GetCompositionConnectionsBetweenTwoConcepts(ofConceptId: number, toConcept: number, mainKey: number): Promise<any>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Concept } from "./../DataStructures/Concept";
|
|
2
1
|
/**
|
|
3
2
|
* This function helps you get concept from the id. This can only be positive.
|
|
4
3
|
* @param id The id that you want to get the concept of
|
|
5
4
|
* @returns
|
|
6
5
|
*/
|
|
7
|
-
export declare function GetConcept(id: number): Promise<
|
|
6
|
+
export declare function GetConcept(id: number): Promise<any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GetConceptByCharacterAndType(characterValue: string, typeId: number): Promise<Concept | undefined>;
|
|
1
|
+
export declare function GetConceptByCharacterAndType(characterValue: string, typeId: number): Promise<any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GetConnectionOfTheConcept(typeId: number, ofTheConceptId: number, userId: number, inpage?: number, page?: number): Promise<Connection[] | undefined>;
|
|
1
|
+
export declare function GetConnectionOfTheConcept(typeId: number, ofTheConceptId: number, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function RecursiveSearchApi(composition?: number, listLinkers?: string[], textSearch?: string): Promise<any
|
|
1
|
+
export declare function RecursiveSearchApi(composition?: number, listLinkers?: string[], textSearch?: string): Promise<any>;
|
|
2
2
|
export declare function RecursiveSearchApiRaw(composition?: number, listLinkers?: string[], textSearch?: string): Promise<any>;
|
|
3
3
|
export declare function RecursiveSearchApiRawFullLinker(composition?: number, fullLinkers?: string[], textSearch?: string): Promise<any>;
|
|
4
4
|
export declare function RecursiveSearchApiNewRawFullLinker(composition?: number, fullLinkers?: string[], textSearch?: string): Promise<any>;
|
|
@@ -5,7 +5,9 @@ export declare class BaseUrl {
|
|
|
5
5
|
static NODE_URL: string;
|
|
6
6
|
static MQTT_CONNECTION: any;
|
|
7
7
|
static BASE_APPLICATION: string;
|
|
8
|
-
static BASE_RANDOMIZER
|
|
8
|
+
private static BASE_RANDOMIZER;
|
|
9
|
+
static setRandomizer(id: number): void;
|
|
10
|
+
static getRandomizer(): number;
|
|
9
11
|
static GetConceptUrl(): string;
|
|
10
12
|
static GetConnectionUrl(): string;
|
|
11
13
|
static GetConceptBulkUrl(): string;
|
|
@@ -14,13 +14,13 @@ export declare class ConceptsData {
|
|
|
14
14
|
static AddConceptToMemory(concept: Concept): void;
|
|
15
15
|
static AddConceptTemporary(concept: Concept): void;
|
|
16
16
|
static RemoveConcept(concept: Concept): void;
|
|
17
|
-
static GetConcept(id: number): Promise<
|
|
17
|
+
static GetConcept(id: number): Promise<any>;
|
|
18
18
|
static GetConceptByCharacter(characterValue: string): Promise<Concept>;
|
|
19
19
|
static GetConceptByCharacterUpdated(characterValue: string): Promise<Concept>;
|
|
20
20
|
static GetConceptByCharacterAndTypeLocal(character_value: string, typeId: number): Promise<Concept>;
|
|
21
21
|
static GetConceptByCharacterAndCategoryLocal(character_value: string, categoryId: number): Promise<Concept>;
|
|
22
22
|
static GetConceptsByTypeId(typeId: number): Concept[];
|
|
23
|
-
static GetConceptsByTypeIdAndUser(typeId: number, userId: number): Promise<
|
|
23
|
+
static GetConceptsByTypeIdAndUser(typeId: number, userId: number): Promise<any>;
|
|
24
24
|
static GetBinaryCharacterTree(): import("./Node").Node | null;
|
|
25
25
|
getName(): string;
|
|
26
26
|
}
|
|
@@ -11,13 +11,13 @@ export declare class ConnectionData {
|
|
|
11
11
|
static AddToDictionary(connection: Connection): void;
|
|
12
12
|
static RemoveConnection(connection: Connection): void;
|
|
13
13
|
static GetConnectionTypeOfTree(): void;
|
|
14
|
-
static GetConnectionByOfTheConceptAndType(ofTheConceptId: number, typeId: number): any
|
|
14
|
+
static GetConnectionByOfTheConceptAndType(ofTheConceptId: number, typeId: number): Promise<any>;
|
|
15
15
|
static GetConnectionByOfType(ofTheConceptId: number, typeId: number): any;
|
|
16
16
|
static GetConnectionTree(): import("./ConnectionBinaryTree/ConnectionNode").ConnectionNode | null;
|
|
17
17
|
static GetConnectionTypeTree(): import("./ConnectionBinaryTree/ConnectionTypeNode").ConnectionTypeNode | null;
|
|
18
18
|
static GetConnectionBulkData(ids: number[], connectionArray: Connection[], remainingIds: any): Promise<void>;
|
|
19
|
-
static GetConnection(id: number): Promise<
|
|
20
|
-
static GetConnectionsOfCompositionLocal(id: number): Promise<
|
|
21
|
-
static GetConnectionsOfConcept(id: number): Promise<
|
|
19
|
+
static GetConnection(id: number): Promise<any>;
|
|
20
|
+
static GetConnectionsOfCompositionLocal(id: number): Promise<any>;
|
|
21
|
+
static GetConnectionsOfConcept(id: number): Promise<any>;
|
|
22
22
|
getName(): string;
|
|
23
23
|
}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { Concept } from "./../Concept";
|
|
2
2
|
import { Connection } from "../Connection";
|
|
3
|
+
import { InnerActions } from "../../app";
|
|
4
|
+
type syncContainer = {
|
|
5
|
+
id: string;
|
|
6
|
+
data: InnerActions;
|
|
7
|
+
createdDate: string;
|
|
8
|
+
};
|
|
3
9
|
export declare class LocalSyncData {
|
|
4
10
|
static conceptsSyncArray: Concept[];
|
|
5
11
|
static connectionSyncArray: Connection[];
|
|
6
12
|
static ghostIdMap: Map<any, any>;
|
|
13
|
+
static transactionCollections: syncContainer[];
|
|
7
14
|
static CheckContains(concept: Concept): boolean;
|
|
8
15
|
static SyncDataDelete(id: number): void;
|
|
9
16
|
static CheckContainsConnection(connection: Connection): boolean;
|
|
10
17
|
static AddConcept(concept: Concept): void;
|
|
11
18
|
static RemoveConcept(concept: Concept): void;
|
|
12
|
-
static SyncDataOnline(): Promise<
|
|
19
|
+
static SyncDataOnline(transactionId?: string, actions?: InnerActions): Promise<any>;
|
|
13
20
|
static ConvertGhostIdsInConnections(connectionArray: Connection[]): void;
|
|
14
21
|
static UpdateConceptListToIncludeRelatedConcepts(connectionArray: Connection[], conceptsArray: Concept[]): Promise<void>;
|
|
15
22
|
static AddConceptIfDoesNotExist(concept: Concept, conceptList?: Concept[]): void;
|
|
@@ -18,4 +25,8 @@ export declare class LocalSyncData {
|
|
|
18
25
|
static RemoveConnection(connection: Connection): void;
|
|
19
26
|
static RemoveConnectionById(connectionId: number): void;
|
|
20
27
|
static syncDataLocalDb(): Promise<string>;
|
|
28
|
+
static initializeTransaction(transactionId: string): Promise<any>;
|
|
29
|
+
static markTransactionActions(transactionId: string, actions: InnerActions): Promise<any>;
|
|
30
|
+
static rollbackTransaction(transactionId: string, actions: InnerActions): Promise<any>;
|
|
21
31
|
}
|
|
32
|
+
export {};
|
|
@@ -10,6 +10,6 @@ export declare class SyncData {
|
|
|
10
10
|
static RemoveConcept(concept: Concept): void;
|
|
11
11
|
static AddConnection(connection: Connection): void;
|
|
12
12
|
static RemoveConnection(connection: Connection): void;
|
|
13
|
-
static SyncDataOnline(): Promise<
|
|
13
|
+
static SyncDataOnline(): Promise<any>;
|
|
14
14
|
static syncDataLocalDb(): Promise<string>;
|
|
15
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Concept } from "../DataStructures/Concept";
|
|
2
2
|
import { Connection } from "../DataStructures/Connection";
|
|
3
|
-
export declare function CreateConnectionBetweenTwoConcepts(ofTheConcept: Concept, toTheConcept: Concept, linker: string, both?: boolean, count?: boolean): Promise<
|
|
3
|
+
export declare function CreateConnectionBetweenTwoConcepts(ofTheConcept: Concept, toTheConcept: Concept, linker: string, both?: boolean, count?: boolean): Promise<any>;
|
|
4
4
|
export declare function CountRelationship(linker: string, concept: Concept, passedUserId?: number | null): Promise<void>;
|
|
5
5
|
export declare function CreateConnectionBetweenTwoConceptsGeneral(ofTheConcept: Concept, toTheConcept: Concept, linker: string, both?: boolean, count?: boolean): Promise<Connection>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function CreateTheComposition(json: any, ofTheConceptId?: number | null, ofTheConceptUserId?: number | null, mainKey?: number | null, userId?: number | null, accessId?: number | null, sessionInformationId?: number | null): Promise<Concept>;
|
|
1
|
+
export default function CreateTheComposition(json: any, ofTheConceptId?: number | null, ofTheConceptUserId?: number | null, mainKey?: number | null, userId?: number | null, accessId?: number | null, sessionInformationId?: number | null): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function DeleteConceptById(id: number): Promise<
|
|
1
|
+
export declare function DeleteConceptById(id: number): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function DeleteConnectionById(id: number): Promise<
|
|
1
|
+
export declare function DeleteConnectionById(id: number): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function DeleteConnectionByType(id: number, linker: string): Promise<
|
|
1
|
+
export declare function DeleteConnectionByType(id: number, linker: string): Promise<any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function FindConnectionsOfCompositionsBulkInMemory(composition_ids?: number[]): Promise<Connection[]>;
|
|
1
|
+
export declare function FindConnectionsOfCompositionsBulkInMemory(composition_ids?: number[]): Promise<any>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Concept } from "../DataStructures/Concept";
|
|
2
2
|
import { Connection } from "../DataStructures/Connection";
|
|
3
|
-
export declare function GetCompositionById(id: number): Promise<
|
|
4
|
-
connectionList: Connection[];
|
|
5
|
-
compositionList: number[];
|
|
6
|
-
}>;
|
|
3
|
+
export declare function GetCompositionById(id: number): Promise<any>;
|
|
7
4
|
/**
|
|
8
5
|
* ## format JUSTDATA ##
|
|
9
6
|
* this function builds the composition with the main id as the point of building.
|
|
@@ -21,7 +21,7 @@ export declare function GetCompositionBulkWithDataId(conceptIds?: number[]): Pro
|
|
|
21
21
|
* @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.
|
|
22
22
|
* @returns list of compositions created from the passed conceptIds and connectionIds.
|
|
23
23
|
*/
|
|
24
|
-
export declare function GetCompositionFromConnectionsWithDataId(conceptIds?: number[], connectionIds?: number[]): Promise<any
|
|
24
|
+
export declare function GetCompositionFromConnectionsWithDataId(conceptIds?: number[], connectionIds?: number[]): Promise<any>;
|
|
25
25
|
/**
|
|
26
26
|
* ## Format DATAIDDATE ##
|
|
27
27
|
* This function converts the conceptIds and internal connectionIds to compositions in data-Id format with index(conceptId).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Concept } from "../app";
|
|
2
2
|
export declare function GetCompositionList(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
3
3
|
export declare function GetCompositionListAll(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any[]>;
|
|
4
|
-
export declare function GetCompositionListAllWithId(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any
|
|
4
|
+
export declare function GetCompositionListAllWithId(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
5
5
|
export declare function GetCompositionListWithId(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
6
6
|
export declare function GetCompositionListWithIdUpdated(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
7
7
|
export declare function FormatTheConcepts(conceptList: Concept[], localConceptList: Concept[], inpage?: number, page?: number): Promise<any[]>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare function GetConceptByCharacterUpdated(characterValue: string): Promise<Concept>;
|
|
1
|
+
export default function GetConceptByCharacter(characterValue: string): Promise<any>;
|
|
2
|
+
export declare function GetConceptByCharacterUpdated(characterValue: string): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Concept
|
|
1
|
+
import { Concept } from "../app";
|
|
2
2
|
/**
|
|
3
3
|
* This function will give you all the connections between two concepts by their linker or fullLinker
|
|
4
4
|
* @param ofTheConcept start of the connecction
|
|
@@ -8,4 +8,4 @@ import { Concept, Connection } from "../app";
|
|
|
8
8
|
* @param forward if you want to get the forward relation in the primitive linker put true else for backward linker false.
|
|
9
9
|
* @returns list of connections
|
|
10
10
|
*/
|
|
11
|
-
export declare function GetConnectionBetweenTwoConceptsLinker(ofTheConcept: Concept, toTheConcept: Concept, linker: string, fullLinker: string, forward?: boolean): Promise<
|
|
11
|
+
export declare function GetConnectionBetweenTwoConceptsLinker(ofTheConcept: Concept, toTheConcept: Concept, linker: string, fullLinker: string, forward?: boolean): Promise<any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GetConnectionById(id: number): Promise<Connection>;
|
|
1
|
+
export declare function GetConnectionById(id: number): Promise<any>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Concept } from "./../DataStructures/Concept";
|
|
2
|
-
export declare function GetLink(id: number, linker: string, inpage?: number, page?: number): Promise<any
|
|
2
|
+
export declare function GetLink(id: number, linker: string, inpage?: number, page?: number): Promise<any>;
|
|
3
3
|
export declare function GetLinkRaw(id: number, linker: string, inpage?: number, page?: number): Promise<Concept[]>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function GetRelationRaw(id: number, relation: string, inpage?: number, page?: number): Promise<Concept[]>;
|
|
1
|
+
export declare function GetRelation(id: number, relation: string, inpage?: number, page?: number): Promise<any>;
|
|
2
|
+
export declare function GetRelationRaw(id: number, relation: string, inpage?: number, page?: number): Promise<any>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Concept } from "../DataStructures/Concept";
|
|
2
1
|
/**
|
|
3
2
|
*
|
|
4
3
|
* @param id this is the id that can be used to get the concept.
|
|
5
4
|
* @param userId This is the user that calls the concept
|
|
6
5
|
* @returns Concept if it exists
|
|
7
6
|
*/
|
|
8
|
-
export default function GetTheConcept(id: number, userId?: number): Promise<
|
|
7
|
+
export default function GetTheConcept(id: number, userId?: number): Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Concept } from "../../app";
|
|
2
|
-
export declare function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept: Concept, toTheConcept: Concept, linker: string, both?: boolean): Promise<
|
|
1
|
+
import { Concept, InnerActions } from "../../app";
|
|
2
|
+
export declare function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept: Concept, toTheConcept: Concept, linker: string, both?: boolean, actions?: InnerActions): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InnerActions } from "../../app";
|
|
2
2
|
/**
|
|
3
3
|
* This function converts a json data to concept connection and also preserves its relation.
|
|
4
4
|
* @param json The json data that needs to be converted to the concept connection system
|
|
@@ -11,4 +11,4 @@ import { Concept } from "../../DataStructures/Concept";
|
|
|
11
11
|
* @param automaticSync for future use.
|
|
12
12
|
* @returns the main concept of this composition.
|
|
13
13
|
*/
|
|
14
|
-
export declare function CreateTheCompositionLocal(json: any, ofTheConceptId?: number | null, ofTheConceptUserId?: number | null, mainKey?: number | null, userId?: number | null, accessId?: number | null, sessionInformationId?: number | null, automaticSync?: boolean): Promise<
|
|
14
|
+
export declare function CreateTheCompositionLocal(json: any, ofTheConceptId?: number | null, ofTheConceptUserId?: number | null, mainKey?: number | null, userId?: number | null, accessId?: number | null, sessionInformationId?: number | null, automaticSync?: boolean, actions?: InnerActions): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InnerActions } from "../../app";
|
|
2
2
|
/**
|
|
3
3
|
* This function creates the concept in the local system (Local memory and IndexDb) but not in the backend database
|
|
4
4
|
* To create this concept in the backend database you need to sync the local data to the backend by LocalSyncData class.
|
|
@@ -19,4 +19,4 @@ import { Concept } from "../../DataStructures/Concept";
|
|
|
19
19
|
* @param referentId if this concept refers to any other concept then this needs to be passed.
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
|
-
export default function CreateTheConceptLocal(referent: string, typecharacter: string, userId: number, categoryId: number, typeId: number, accessId: number, isComposition?: boolean, referentId?: number): Promise<
|
|
22
|
+
export default function CreateTheConceptLocal(referent: string, typecharacter: string, userId: number, categoryId: number, typeId: number, accessId: number, isComposition?: boolean, referentId?: number, actions?: InnerActions): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InnerActions } from "../../app";
|
|
2
2
|
/**
|
|
3
3
|
* This function creates a connection for the concept connection system. This connection will only be created in real sense
|
|
4
4
|
* once the data is synced using LocalSyncData.SyncDataOnline()
|
|
@@ -12,4 +12,4 @@ import { Connection } from "../../DataStructures/Connection";
|
|
|
12
12
|
* @param typeString this is the typeString in the case of external connections.
|
|
13
13
|
* @returns a connection that is created and stored in the local system.
|
|
14
14
|
*/
|
|
15
|
-
export declare function CreateTheConnectionLocal(ofTheConceptId: number, toTheConceptId: number, typeId: number, orderId?: number, typeString?: string, userId?: number): Promise<
|
|
15
|
+
export declare function CreateTheConnectionLocal(ofTheConceptId: number, toTheConceptId: number, typeId: number, orderId?: number, typeString?: string, userId?: number, actions?: InnerActions): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function DeleteConceptLocal(id: number): Promise<
|
|
1
|
+
export declare function DeleteConceptLocal(id: number): Promise<any>;
|
|
@@ -5,6 +5,6 @@ export default function GetConceptByCharacterLocal(characterValue: string): Prom
|
|
|
5
5
|
* @param character the character value of the concept we want to find in our local system.
|
|
6
6
|
* @returns LConcept which will be the associated concept with the character Value.
|
|
7
7
|
*/
|
|
8
|
-
export declare function GetConceptByCharacterAndCategoryLocal(character: string): Promise<
|
|
8
|
+
export declare function GetConceptByCharacterAndCategoryLocal(character: string): Promise<any>;
|
|
9
9
|
export declare function GetConceptByCategoryAndCharacterLocalMemory(value: string, categoryId: number): Promise<Concept>;
|
|
10
10
|
export declare function GetConceptByCharacterLocalFull(characterValue: string): Promise<Concept>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Concept } from "../../app";
|
|
2
1
|
/**
|
|
3
2
|
* This function converts any local/ virtual or real concept id to a LConcept.
|
|
4
3
|
* In case that the id is virtual then it tries to find it from the local memory. This will return -ve id.
|
|
@@ -7,4 +6,4 @@ import { Concept } from "../../app";
|
|
|
7
6
|
* @param id the id that you want to find out the concept of. This could be a negative (virtual id ) or a real concept id.
|
|
8
7
|
* @returns LConcept with either (-ve or +ve id)
|
|
9
8
|
*/
|
|
10
|
-
export declare function GetTheConceptLocal(id: number): Promise<
|
|
9
|
+
export declare function GetTheConceptLocal(id: number): Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function MakeTheConceptLocal(referent: string, typeCharacter: string, userId: number, categoryId: number, typeId: number): Promise<
|
|
1
|
+
import { InnerActions } from "../../app";
|
|
2
|
+
export default function MakeTheConceptLocal(referent: string, typeCharacter: string, userId: number, categoryId: number, typeId: number, actions?: InnerActions): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InnerActions } from "../../app";
|
|
2
2
|
/**
|
|
3
3
|
* This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the
|
|
4
4
|
* concept connection system. This function is the building block of the concept connection system.
|
|
@@ -12,6 +12,7 @@ import { Concept } from "../../DataStructures/Concept";
|
|
|
12
12
|
* @param accessId this is the accessId of the creator. By default should be 4.
|
|
13
13
|
* @param sessionInformationId this is the session that is created by the system.
|
|
14
14
|
* @param referentId In case we need this concept to refer to any other concept.
|
|
15
|
+
* @param actions InnerActions Array for capturing concepts and connection
|
|
15
16
|
* @returns a concept which is either newly created or an older concept that already exists.
|
|
16
17
|
*/
|
|
17
|
-
export declare function MakeTheInstanceConceptLocal(type: string, referent: string, composition: boolean | undefined, userId: number, accessId: number, sessionInformationId?: number, referentId?: number): Promise<
|
|
18
|
+
export declare function MakeTheInstanceConceptLocal(type: string, referent: string, composition: boolean | undefined, userId: number, accessId: number, sessionInformationId?: number, referentId?: number, actions?: InnerActions): Promise<any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Concept } from "../../DataStructures/Concept";
|
|
2
|
+
import { InnerActions } from "../../Constants/general.const";
|
|
2
3
|
/**
|
|
3
4
|
* There are two types of concepts. One type of concept is a type concept. These concepts have no actual value and do not mean
|
|
4
5
|
* anything unless they are associated with other values. These are placeholders like first_name, last_name, age etc that are required in the system.
|
|
@@ -9,6 +10,7 @@ import { Concept } from "../../DataStructures/Concept";
|
|
|
9
10
|
* @param sessionId SessionId of the user
|
|
10
11
|
* @param sessionUserId Not required pass 999
|
|
11
12
|
* @param userId UserId of the user creating this concept
|
|
13
|
+
* @param actions InnerActions|undefined actions to collect
|
|
12
14
|
* @returns
|
|
13
15
|
*/
|
|
14
|
-
export declare function MakeTheTypeConceptLocal(typeString: string, sessionId: number, sessionUserId: number, userId: number): Promise<Concept>;
|
|
16
|
+
export declare function MakeTheTypeConceptLocal(typeString: string, sessionId: number, sessionUserId: number, userId: number, actions?: InnerActions): Promise<Concept>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { PatcherStructure } from
|
|
2
|
-
|
|
1
|
+
import { PatcherStructure } from "../../DataStructures/PatcherStructure";
|
|
2
|
+
import { InnerActions } from "../../app";
|
|
3
|
+
export declare function UpdateCompositionLocal(patcherStructure: PatcherStructure, actions?: InnerActions): Promise<any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Concept } from "../DataStructures/Concept";
|
|
2
1
|
/**
|
|
3
2
|
* This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the
|
|
4
3
|
* concept connection system. This function is the building block of the concept connection system.
|
|
@@ -13,4 +12,4 @@ import { Concept } from "../DataStructures/Concept";
|
|
|
13
12
|
* @param referentId In case we need this concept to refer to any other concept.
|
|
14
13
|
* @returns a concept which is either newly created or an older concept that already exists.
|
|
15
14
|
*/
|
|
16
|
-
export default function MakeTheInstanceConcept(type: string, referent: string, composition: boolean | undefined, userId: number, passedAccessId?: number, passedSessionId?: number, referentId?: number): Promise<
|
|
15
|
+
export default function MakeTheInstanceConcept(type: string, referent: string, composition: boolean | undefined, userId: number, passedAccessId?: number, passedSessionId?: number, referentId?: number): Promise<any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function MakeTheTimestamp(type: string, referent: string, userId: number, accessId?: number, sessionInformationId?: number): Promise<Concept>;
|
|
1
|
+
export declare function MakeTheTimestamp(type: string, referent: string, userId: number, accessId?: number, sessionInformationId?: number): Promise<any>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function MakeTheTypeConcept(typeString: string, sessionId: number, sessionUserId: number, userId: number): Promise<Concept>;
|
|
1
|
+
export declare function MakeTheTypeConcept(typeString: string, sessionId: number, sessionUserId: number, userId: number): Promise<any>;
|
|
@@ -9,7 +9,7 @@ import { Connection } from "../../app";
|
|
|
9
9
|
* @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
|
-
export declare function FormatConceptsAndConnectionsNormalList(connections: Connection[], compositionData: any[], mainComposition: number[],
|
|
12
|
+
export declare function FormatConceptsAndConnectionsNormalList(connections: Connection[], compositionData: any[], mainComposition: number[], reverse?: number[]): Promise<any[]>;
|
|
13
13
|
/**
|
|
14
14
|
* ############ Format is data-id and is used for list. ############
|
|
15
15
|
* This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list
|
|
@@ -20,38 +20,4 @@ export declare function FormatConceptsAndConnectionsNormalList(connections: Conn
|
|
|
20
20
|
* @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
|
-
export declare function FormatFromConnectionsAlteredArrayExternal(connections: Connection[], compositionData: any[],
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* ## Format Normal ##
|
|
27
|
-
* This function takes in the connections and then converts the connections to the single level objects for further processing
|
|
28
|
-
* This function is the builder of the arrays/ objects from the connections.
|
|
29
|
-
*/
|
|
30
|
-
export declare function formatFunction(connections: Connection[], compositionData: any, reverse: number[]): Promise<any>;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* ## Format Normal ##
|
|
34
|
-
* This function takes in the connections and then converts the connections to the single level objects for further processing
|
|
35
|
-
* This function is the builder of the arrays/ objects from the connections.
|
|
36
|
-
*/
|
|
37
|
-
export declare function formatFunctionForData(connections: Connection[], compositionData: any, reverse: number[]): Promise<any>;
|
|
38
|
-
/**
|
|
39
|
-
* ## Format DATA-ID ##
|
|
40
|
-
* this function takes in connections and creates a single level objects so that all the data are added to its object/ array.
|
|
41
|
-
* This is then passed on further for stiching.
|
|
42
|
-
* @param connections
|
|
43
|
-
* @param compositionData
|
|
44
|
-
* @param reverse
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
|
-
export declare function FormatFunctionData(connections: Connection[], compositionData: any[], reverse?: number[]): Promise<any[]>;
|
|
48
|
-
/**
|
|
49
|
-
* ## Format DATA-ID ##
|
|
50
|
-
* this function takes in connections and creates a single level objects so that all the data are added to its object/ array.
|
|
51
|
-
* This is then passed on further for stiching.
|
|
52
|
-
* @param connections
|
|
53
|
-
* @param compositionData
|
|
54
|
-
* @param reverse
|
|
55
|
-
* @returns
|
|
56
|
-
*/
|
|
57
|
-
export declare function FormatFunctionDataForData(connections: Connection[], compositionData: any[], reverse?: number[]): Promise<any[]>;
|
|
23
|
+
export declare function FormatFromConnectionsAlteredArrayExternal(connections: Connection[], compositionData: any[], mainComposition: number[], reverse?: number[]): Promise<any[]>;
|
|
@@ -45,25 +45,5 @@ export declare function formatDataArrayNormal(linkers: number[], conceptIds: num
|
|
|
45
45
|
* @returns
|
|
46
46
|
*/
|
|
47
47
|
export declare function formatLinkersNormal(linkers: number[], conceptIds: number[], connections: number[], mainCompositionIds: number[], reverse: number[]): Promise<any>;
|
|
48
|
-
/**
|
|
49
|
-
* ## Format Normal ##
|
|
50
|
-
* This function fetches all the connections and then converts all the connections to the single level connections
|
|
51
|
-
* Then those single level objects are then stiched together to create a complex json/ array.
|
|
52
|
-
* @param linkers
|
|
53
|
-
* @param conceptIds
|
|
54
|
-
* @param mainCompositionIds
|
|
55
|
-
* @param reverse
|
|
56
|
-
* @returns
|
|
57
|
-
*/
|
|
58
48
|
export declare function formatConnections(linkers: number[], conceptIds: number[], mainCompositionIds: number[], reverse: number[]): Promise<any>;
|
|
59
|
-
/**
|
|
60
|
-
* ## Format DATA-ID ##
|
|
61
|
-
* This function fetches all the connections and then converts all the connections to the single level connections
|
|
62
|
-
* Then those single level objects are then stiched together to create a complex json/ array.
|
|
63
|
-
* @param linkers
|
|
64
|
-
* @param conceptIds
|
|
65
|
-
* @param mainCompositionIds
|
|
66
|
-
* @param reverse
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
49
|
export declare function formatConnectionsDataId(linkers: number[], conceptIds: number[], mainCompositionIds: number[], reverse: number[]): Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PatcherStructure } from
|
|
1
|
+
import { PatcherStructure } from "../DataStructures/PatcherStructure";
|
|
2
2
|
export default function UpdateComposition(patcherStructure: PatcherStructure): Promise<any>;
|
|
@@ -15,6 +15,13 @@ declare class RecursiveSearchObservable extends DependencyObserver {
|
|
|
15
15
|
* @param format the format in which the output should be displayed (RAW, undefined)
|
|
16
16
|
*/
|
|
17
17
|
constructor(id: number, linkers: string[], textSearch?: string, format?: number);
|
|
18
|
+
/**
|
|
19
|
+
* This is the of the concept id that needs to be listened . If this is called. All the connections that are
|
|
20
|
+
* created with of the concepts id with this passed id then the event is fired.
|
|
21
|
+
*
|
|
22
|
+
* @param id Of the concept id that needs to be listened.
|
|
23
|
+
*/
|
|
24
|
+
listenToEvent(id: number): void;
|
|
18
25
|
bind(): Promise<any>;
|
|
19
26
|
build(): Promise<any>;
|
|
20
27
|
}
|
package/dist/types/app.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export { UserBinaryTree } from './DataStructures/User/UserBinaryTree';
|
|
|
101
101
|
export { FilterSearch } from './DataStructures/FilterSearch';
|
|
102
102
|
export { SearchStructure } from './DataStructures/Search/SearchStructure';
|
|
103
103
|
export { LocalConceptsData } from './DataStructures/Local/LocalConceptData';
|
|
104
|
+
export { LocalTransaction } from "./Services/Transaction/LocalTransaction";
|
|
105
|
+
export { InnerActions } from "./Constants/general.const";
|
|
104
106
|
export { Anomaly } from './Anomaly/anomaly';
|
|
105
107
|
export { Validator } from './Validator/validator';
|
|
106
108
|
export { createFormFieldData } from './Validator/utils';
|
|
@@ -110,6 +112,13 @@ export { DeleteConnectionByType } from './Services/DeleteConnectionByType';
|
|
|
110
112
|
export { FreeschemaQuery } from './DataStructures/Search/FreeschemaQuery';
|
|
111
113
|
export { FreeschemaQueryApi } from './Api/Search/FreeschemaQueryApi';
|
|
112
114
|
export { SchemaQueryListener } from './WrapperFunctions/SchemaQueryObservable';
|
|
115
|
+
type listeners = {
|
|
116
|
+
listenerId: string | number;
|
|
117
|
+
callback: any;
|
|
118
|
+
createdAt: number;
|
|
119
|
+
};
|
|
120
|
+
export declare var serviceWorker: any;
|
|
121
|
+
export declare let subscribedListeners: listeners[];
|
|
113
122
|
/**
|
|
114
123
|
* This function lets you update the access token that the package uses. If this is not passed you cannot create, update, view or delete
|
|
115
124
|
* Your concepts using this package.
|
|
@@ -125,5 +134,13 @@ declare function updateAccessToken(accessToken?: string): void;
|
|
|
125
134
|
* @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.
|
|
126
135
|
* @param enableAi This flag is used to enable or disable the AI feature that preloads data in the indexdb.
|
|
127
136
|
* @param applicationName This is an unique name that is given to a program. Use this to discern one indexdb from another.
|
|
137
|
+
* @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope
|
|
128
138
|
*/
|
|
129
|
-
declare function init(url?: string, aiurl?: string, accessToken?: string, nodeUrl?: string, enableAi?: boolean, applicationName?: string,
|
|
139
|
+
declare function init(url?: string, aiurl?: string, accessToken?: string, nodeUrl?: string, enableAi?: boolean, applicationName?: string, enableSW?: {
|
|
140
|
+
activate: boolean;
|
|
141
|
+
scope?: string;
|
|
142
|
+
pathToSW?: string;
|
|
143
|
+
manual?: boolean;
|
|
144
|
+
} | undefined, isTest?: boolean): Promise<true | undefined>;
|
|
145
|
+
export declare function sendMessage(type: string, payload: any): Promise<unknown>;
|
|
146
|
+
export declare function dispatchIdEvent(id: number | string, data?: any): void;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mftsccs-browser",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23-beta",
|
|
4
4
|
"environment": "production",
|
|
5
5
|
"description": "Full Pack of concept and connection system",
|
|
6
|
-
"main": "dist/bundle.js",
|
|
6
|
+
"main": "dist/main.bundle.js",
|
|
7
7
|
"types": "dist/types/app.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
+
"scripts",
|
|
10
11
|
"LICENSE",
|
|
11
12
|
"README.md",
|
|
12
13
|
"package.json"
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
"start": "npx webpack",
|
|
16
17
|
"dev": "webpack --env NODE_ENV=development --mode development",
|
|
17
18
|
"build": "webpack --config webpack.config.js",
|
|
19
|
+
"postinstall": "node ./scripts/postinstall.js",
|
|
18
20
|
"test": "jest"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
@@ -24,12 +26,12 @@
|
|
|
24
26
|
"@babel/preset-typescript": "^7.24.7",
|
|
25
27
|
"babel-jest": "^29.7.0",
|
|
26
28
|
"cross-fetch": "^4.0.0",
|
|
29
|
+
"fake-indexeddb": "^6.0.0",
|
|
27
30
|
"jest": "^29.7.0",
|
|
28
31
|
"jest-environment-jsdom": "^29.7.0",
|
|
29
32
|
"ts-loader": "^9.5.1",
|
|
30
33
|
"typescript": "^5.3.2",
|
|
31
34
|
"webpack": "^5.89.0",
|
|
32
|
-
"fake-indexeddb": "^6.0.0",
|
|
33
35
|
"webpack-cli": "^5.1.4"
|
|
34
36
|
},
|
|
35
37
|
"repository": {
|
|
@@ -44,5 +46,8 @@
|
|
|
44
46
|
"bugs": {
|
|
45
47
|
"url": "https://github.com/Mentor-Friends/tsccs-dev/issues"
|
|
46
48
|
},
|
|
47
|
-
"homepage": "https://github.com/Mentor-Friends/tsccs-dev#readme"
|
|
49
|
+
"homepage": "https://github.com/Mentor-Friends/tsccs-dev#readme",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"ncp": "^2.0.0"
|
|
52
|
+
}
|
|
48
53
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const ncp = require("ncp").ncp;
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
// Check if we're in a development environment (i.e., npm link is used in the source package)
|
|
7
|
+
const isLinkingInDevelopment = fs.existsSync(
|
|
8
|
+
path.join(process.cwd(), "node_modules", "mftsccs-browser")
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
// If we're running this script in `your-package` (source) itself, skip the postinstall logic
|
|
12
|
+
if (isLinkingInDevelopment) {
|
|
13
|
+
console.log(
|
|
14
|
+
"Detected local development with npm link. Skipping postinstall."
|
|
15
|
+
);
|
|
16
|
+
process.exit(0); // Exit early, we don't need to run the postinstall here
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
console.log("Running as a project dependency...");
|
|
20
|
+
|
|
21
|
+
// Try to resolve the path to `mftsccs-browser` package in the consuming project
|
|
22
|
+
let sourceDir;
|
|
23
|
+
try {
|
|
24
|
+
const mftsccsBrowserPath = require.resolve("mftsccs-browser");
|
|
25
|
+
// sourceDir = path.join(path.dirname(mftsccsBrowserPath), 'dist');
|
|
26
|
+
sourceDir = path.join(path.dirname(mftsccsBrowserPath), "");
|
|
27
|
+
} catch (err) {
|
|
28
|
+
console.error("Error: mftsccs-browser package not found.");
|
|
29
|
+
console.log(
|
|
30
|
+
"Ensure that your consuming project has installed mftsccs-browser as a dependency."
|
|
31
|
+
);
|
|
32
|
+
// process.exit(1); // Exit if mftsccs-browser is not found
|
|
33
|
+
if (sourceDir == undefined) return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Target destination in the consuming project (public directory)
|
|
37
|
+
const consumingProjectRoot = path.resolve(sourceDir, "../../../"); // Move two levels up from the package to the project root
|
|
38
|
+
const destDir = path.join(consumingProjectRoot, "public");
|
|
39
|
+
|
|
40
|
+
// Ensure the 'public' directory exists. If it doesn't, create it.
|
|
41
|
+
if (!fs.existsSync(destDir)) {
|
|
42
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Path to the specific file we want to copy
|
|
46
|
+
const sourceFile = path.join(sourceDir, "serviceWorker.bundle.js");
|
|
47
|
+
|
|
48
|
+
// Check if the source file exists
|
|
49
|
+
if (!fs.existsSync(sourceFile)) {
|
|
50
|
+
console.error(
|
|
51
|
+
"Error: serviceWorker.bundle.js not found in source directory."
|
|
52
|
+
);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Path to the destination file
|
|
57
|
+
const destFile = path.join(destDir, "serviceWorker.bundle.js");
|
|
58
|
+
|
|
59
|
+
// If the destination file exists, delete it
|
|
60
|
+
if (fs.existsSync(destFile)) {
|
|
61
|
+
fs.unlinkSync(destFile);
|
|
62
|
+
console.log(`Existing file ${destFile} removed.`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Copy the specific bundled file to the public directory
|
|
66
|
+
ncp(sourceFile, destFile, (err) => {
|
|
67
|
+
if (err) {
|
|
68
|
+
console.error("Error copying serviceWorker.bundle.js:", err);
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
71
|
+
console.log("serviceWorker.bundle.js copied to public directory!");
|
|
72
|
+
});
|
|
73
|
+
} catch (err) {
|
|
74
|
+
console.log("Error", err);
|
|
75
|
+
}
|