@carlonicora/nestjs-neo4jsonapi 0.0.1 → 1.0.3
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/tools/migrate-entity/index.js +0 -0
- package/package.json +5 -1
- package/dist/agents/prompts/prompt.interfaces.d.ts +0 -128
- package/dist/agents/prompts/prompt.interfaces.d.ts.map +0 -1
- package/dist/agents/prompts/prompt.interfaces.js +0 -12
- package/dist/agents/prompts/prompt.interfaces.js.map +0 -1
- package/dist/agents/prompts/prompt.tokens.d.ts +0 -16
- package/dist/agents/prompts/prompt.tokens.d.ts.map +0 -1
- package/dist/agents/prompts/prompt.tokens.js +0 -23
- package/dist/agents/prompts/prompt.tokens.js.map +0 -1
- package/dist/common/abstracts/abstract.company.configuration.d.ts +0 -40
- package/dist/common/abstracts/abstract.company.configuration.d.ts.map +0 -1
- package/dist/common/abstracts/abstract.company.configuration.js +0 -44
- package/dist/common/abstracts/abstract.company.configuration.js.map +0 -1
- package/dist/config/company.configurations.d.ts +0 -19
- package/dist/config/company.configurations.d.ts.map +0 -1
- package/dist/config/company.configurations.js +0 -23
- package/dist/config/company.configurations.js.map +0 -1
- package/dist/config/enums/content.types.d.ts +0 -6
- package/dist/config/enums/content.types.d.ts.map +0 -1
- package/dist/config/enums/content.types.js +0 -9
- package/dist/config/enums/content.types.js.map +0 -1
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carlonicora/nestjs-neo4jsonapi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "NestJS foundation package with JSON:API, Neo4j, Redis, LangChain agents, and common utilities",
|
|
5
5
|
"author": "Carlo Nicora",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -115,6 +115,10 @@
|
|
|
115
115
|
"zod-to-json-schema": "^3.25.0"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
119
|
+
"@semantic-release/git": "^10.0.1",
|
|
120
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
121
|
+
"semantic-release": "^25.0.2",
|
|
118
122
|
"@eslint/eslintrc": "^3.3.3",
|
|
119
123
|
"@eslint/js": "^9.39.1",
|
|
120
124
|
"@nestjs/bullmq": "^11.0.4",
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interfaces for agent prompt customization
|
|
3
|
-
*
|
|
4
|
-
* These interfaces define the structure for custom prompts that can be
|
|
5
|
-
* passed to agent modules via forRoot() method.
|
|
6
|
-
*
|
|
7
|
-
* All prompts are OPTIONAL - the library includes default prompts that
|
|
8
|
-
* work out of the box.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Custom prompts for the Contextualiser agent (GraphRAG)
|
|
12
|
-
*
|
|
13
|
-
* The Contextualiser uses multiple nodes to traverse the knowledge graph:
|
|
14
|
-
* - questionRefiner: Refines user questions based on conversation history
|
|
15
|
-
* - rationalPlan: Creates a rational plan to answer the question
|
|
16
|
-
* - keyConcepts: Scores key concepts for relevance
|
|
17
|
-
* - atomicFacts: Evaluates atomic facts for context
|
|
18
|
-
* - chunk: Assesses text chunks for information
|
|
19
|
-
* - chunkVector: (if using vector-based chunk retrieval)
|
|
20
|
-
*/
|
|
21
|
-
export interface ContextualiserPromptsOptions {
|
|
22
|
-
/**
|
|
23
|
-
* Prompt for refining user questions based on conversation history
|
|
24
|
-
*/
|
|
25
|
-
questionRefiner?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Prompt for creating a rational plan to answer the question
|
|
28
|
-
*/
|
|
29
|
-
rationalPlan?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Prompt for scoring key concepts for relevance
|
|
32
|
-
*/
|
|
33
|
-
keyConcepts?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Prompt for evaluating atomic facts for context
|
|
36
|
-
*/
|
|
37
|
-
atomicFacts?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Prompt for assessing text chunks for information
|
|
40
|
-
*/
|
|
41
|
-
chunk?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Prompt for vector-based chunk assessment (optional)
|
|
44
|
-
*/
|
|
45
|
-
chunkVector?: string;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Custom prompts for the Summariser agent
|
|
49
|
-
*
|
|
50
|
-
* The Summariser uses a map-reduce pattern:
|
|
51
|
-
* - map: Summarizes individual chunks
|
|
52
|
-
* - combine: Combines multiple summaries into one
|
|
53
|
-
* - tldr: Creates a very short one-sentence summary
|
|
54
|
-
*/
|
|
55
|
-
export interface SummariserPromptsOptions {
|
|
56
|
-
/**
|
|
57
|
-
* Prompt for summarizing individual chunks (map phase)
|
|
58
|
-
*/
|
|
59
|
-
map?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Prompt for combining multiple summaries (reduce phase)
|
|
62
|
-
*/
|
|
63
|
-
combine?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Prompt for creating a one-sentence TLDR
|
|
66
|
-
*/
|
|
67
|
-
tldr?: string;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Options for GraphCreatorModule.forRoot()
|
|
71
|
-
*/
|
|
72
|
-
export interface GraphCreatorModuleOptions {
|
|
73
|
-
/**
|
|
74
|
-
* Custom prompt for extracting atomic facts and key concepts
|
|
75
|
-
*/
|
|
76
|
-
prompt?: string;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Options for ContextualiserModule.forRoot()
|
|
80
|
-
*/
|
|
81
|
-
export interface ContextualiserModuleOptions {
|
|
82
|
-
/**
|
|
83
|
-
* Custom prompts for Contextualiser nodes
|
|
84
|
-
*/
|
|
85
|
-
prompts?: ContextualiserPromptsOptions;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Options for ResponderModule.forRoot()
|
|
89
|
-
*/
|
|
90
|
-
export interface ResponderModuleOptions {
|
|
91
|
-
/**
|
|
92
|
-
* Custom prompt for generating final answers
|
|
93
|
-
*/
|
|
94
|
-
prompt?: string;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Options for SummariserModule.forRoot()
|
|
98
|
-
*/
|
|
99
|
-
export interface SummariserModuleOptions {
|
|
100
|
-
/**
|
|
101
|
-
* Custom prompts for Summariser operations
|
|
102
|
-
*/
|
|
103
|
-
prompts?: SummariserPromptsOptions;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Combined options for all agent prompts
|
|
107
|
-
*
|
|
108
|
-
* Can be used with AgentsModule.forRoot() for centralized configuration
|
|
109
|
-
*/
|
|
110
|
-
export interface AgentPromptsOptions {
|
|
111
|
-
/**
|
|
112
|
-
* Custom prompt for GraphCreator agent
|
|
113
|
-
*/
|
|
114
|
-
graphCreator?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Custom prompts for Contextualiser agent (GraphRAG)
|
|
117
|
-
*/
|
|
118
|
-
contextualiser?: ContextualiserPromptsOptions;
|
|
119
|
-
/**
|
|
120
|
-
* Custom prompt for Responder agent
|
|
121
|
-
*/
|
|
122
|
-
responder?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Custom prompts for Summariser agent
|
|
125
|
-
*/
|
|
126
|
-
summariser?: SummariserPromptsOptions;
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=prompt.interfaces.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.interfaces.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/prompt.interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE,4BAA4B,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,4BAA4B,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;CACvC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Interfaces for agent prompt customization
|
|
4
|
-
*
|
|
5
|
-
* These interfaces define the structure for custom prompts that can be
|
|
6
|
-
* passed to agent modules via forRoot() method.
|
|
7
|
-
*
|
|
8
|
-
* All prompts are OPTIONAL - the library includes default prompts that
|
|
9
|
-
* work out of the box.
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
//# sourceMappingURL=prompt.interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.interfaces.js","sourceRoot":"","sources":["../../../src/agents/prompts/prompt.interfaces.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Injection tokens for agent prompts
|
|
3
|
-
* These tokens allow consumers to provide custom prompts for each agent
|
|
4
|
-
*/
|
|
5
|
-
export declare const GRAPH_CREATOR_PROMPT: unique symbol;
|
|
6
|
-
export declare const SUMMARISER_MAP_PROMPT: unique symbol;
|
|
7
|
-
export declare const SUMMARISER_COMBINE_PROMPT: unique symbol;
|
|
8
|
-
export declare const SUMMARISER_TLDR_PROMPT: unique symbol;
|
|
9
|
-
export declare const CONTEXTUALISER_QUESTION_REFINER_PROMPT: unique symbol;
|
|
10
|
-
export declare const CONTEXTUALISER_RATIONAL_PROMPT: unique symbol;
|
|
11
|
-
export declare const CONTEXTUALISER_CHUNK_PROMPT: unique symbol;
|
|
12
|
-
export declare const CONTEXTUALISER_CHUNK_VECTOR_PROMPT: unique symbol;
|
|
13
|
-
export declare const CONTEXTUALISER_KEYCONCEPTS_PROMPT: unique symbol;
|
|
14
|
-
export declare const CONTEXTUALISER_ATOMICFACTS_PROMPT: unique symbol;
|
|
15
|
-
export declare const RESPONDER_ANSWER_PROMPT: unique symbol;
|
|
16
|
-
//# sourceMappingURL=prompt.tokens.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.tokens.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/prompt.tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AAGnE,eAAO,MAAM,qBAAqB,eAAkC,CAAC;AACrE,eAAO,MAAM,yBAAyB,eAAsC,CAAC;AAC7E,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAGvE,eAAO,MAAM,sCAAsC,eAAmD,CAAC;AACvG,eAAO,MAAM,8BAA8B,eAA2C,CAAC;AACvF,eAAO,MAAM,2BAA2B,eAAwC,CAAC;AACjF,eAAO,MAAM,kCAAkC,eAA+C,CAAC;AAC/F,eAAO,MAAM,iCAAiC,eAA8C,CAAC;AAC7F,eAAO,MAAM,iCAAiC,eAA8C,CAAC;AAG7F,eAAO,MAAM,uBAAuB,eAAoC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Injection tokens for agent prompts
|
|
4
|
-
* These tokens allow consumers to provide custom prompts for each agent
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.RESPONDER_ANSWER_PROMPT = exports.CONTEXTUALISER_ATOMICFACTS_PROMPT = exports.CONTEXTUALISER_KEYCONCEPTS_PROMPT = exports.CONTEXTUALISER_CHUNK_VECTOR_PROMPT = exports.CONTEXTUALISER_CHUNK_PROMPT = exports.CONTEXTUALISER_RATIONAL_PROMPT = exports.CONTEXTUALISER_QUESTION_REFINER_PROMPT = exports.SUMMARISER_TLDR_PROMPT = exports.SUMMARISER_COMBINE_PROMPT = exports.SUMMARISER_MAP_PROMPT = exports.GRAPH_CREATOR_PROMPT = void 0;
|
|
8
|
-
// Graph Creator prompts
|
|
9
|
-
exports.GRAPH_CREATOR_PROMPT = Symbol("GRAPH_CREATOR_PROMPT");
|
|
10
|
-
// Summariser prompts
|
|
11
|
-
exports.SUMMARISER_MAP_PROMPT = Symbol("SUMMARISER_MAP_PROMPT");
|
|
12
|
-
exports.SUMMARISER_COMBINE_PROMPT = Symbol("SUMMARISER_COMBINE_PROMPT");
|
|
13
|
-
exports.SUMMARISER_TLDR_PROMPT = Symbol("SUMMARISER_TLDR_PROMPT");
|
|
14
|
-
// Contextualiser prompts
|
|
15
|
-
exports.CONTEXTUALISER_QUESTION_REFINER_PROMPT = Symbol("CONTEXTUALISER_QUESTION_REFINER_PROMPT");
|
|
16
|
-
exports.CONTEXTUALISER_RATIONAL_PROMPT = Symbol("CONTEXTUALISER_RATIONAL_PROMPT");
|
|
17
|
-
exports.CONTEXTUALISER_CHUNK_PROMPT = Symbol("CONTEXTUALISER_CHUNK_PROMPT");
|
|
18
|
-
exports.CONTEXTUALISER_CHUNK_VECTOR_PROMPT = Symbol("CONTEXTUALISER_CHUNK_VECTOR_PROMPT");
|
|
19
|
-
exports.CONTEXTUALISER_KEYCONCEPTS_PROMPT = Symbol("CONTEXTUALISER_KEYCONCEPTS_PROMPT");
|
|
20
|
-
exports.CONTEXTUALISER_ATOMICFACTS_PROMPT = Symbol("CONTEXTUALISER_ATOMICFACTS_PROMPT");
|
|
21
|
-
// Responder prompts
|
|
22
|
-
exports.RESPONDER_ANSWER_PROMPT = Symbol("RESPONDER_ANSWER_PROMPT");
|
|
23
|
-
//# sourceMappingURL=prompt.tokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.tokens.js","sourceRoot":"","sources":["../../../src/agents/prompts/prompt.tokens.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wBAAwB;AACX,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAEnE,qBAAqB;AACR,QAAA,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AACxD,QAAA,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAChE,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAEvE,yBAAyB;AACZ,QAAA,sCAAsC,GAAG,MAAM,CAAC,wCAAwC,CAAC,CAAC;AAC1F,QAAA,8BAA8B,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AAC1E,QAAA,2BAA2B,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC;AACpE,QAAA,kCAAkC,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;AAClF,QAAA,iCAAiC,GAAG,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAChF,QAAA,iCAAiC,GAAG,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAE7F,oBAAoB;AACP,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstract base class for company configurations.
|
|
3
|
-
* Consuming applications should extend this class and implement
|
|
4
|
-
* the loadConfigurations method to load app-specific configuration data.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class AbstractCompanyConfigurations {
|
|
7
|
-
protected _companyId: string;
|
|
8
|
-
private _userId;
|
|
9
|
-
private _roles;
|
|
10
|
-
private _modules;
|
|
11
|
-
private _language?;
|
|
12
|
-
constructor(params: {
|
|
13
|
-
companyId: string;
|
|
14
|
-
userId: string;
|
|
15
|
-
language?: string;
|
|
16
|
-
roles?: string[];
|
|
17
|
-
});
|
|
18
|
-
/**
|
|
19
|
-
* Abstract method to load configurations from the database.
|
|
20
|
-
* Implement this in your consuming application.
|
|
21
|
-
*/
|
|
22
|
-
abstract loadConfigurations(params: {
|
|
23
|
-
neo4j: any;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
protected setModules(modules: Array<{
|
|
26
|
-
id: string;
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}>): void;
|
|
29
|
-
get companyId(): string;
|
|
30
|
-
get userId(): string;
|
|
31
|
-
get language(): string | undefined;
|
|
32
|
-
get roles(): string[];
|
|
33
|
-
get modules(): Array<{
|
|
34
|
-
id: string;
|
|
35
|
-
[key: string]: any;
|
|
36
|
-
}>;
|
|
37
|
-
hasModule(moduleId: string): boolean;
|
|
38
|
-
hasRole(role: string): boolean;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=abstract.company.configuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.company.configuration.d.ts","sourceRoot":"","sources":["../../../src/common/abstracts/abstract.company.configuration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,8BAAsB,6BAA6B;IACjD,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,QAAQ,CAAiD;IACjE,OAAO,CAAC,SAAS,CAAC,CAAS;gBAEf,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;IAO9F;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAElE,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,GAAG,IAAI;IAI9E,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED,IAAI,KAAK,IAAI,MAAM,EAAE,CAEpB;IAED,IAAI,OAAO,IAAI,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAEvD;IAED,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIpC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG/B"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractCompanyConfigurations = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Abstract base class for company configurations.
|
|
6
|
-
* Consuming applications should extend this class and implement
|
|
7
|
-
* the loadConfigurations method to load app-specific configuration data.
|
|
8
|
-
*/
|
|
9
|
-
class AbstractCompanyConfigurations {
|
|
10
|
-
constructor(params) {
|
|
11
|
-
this._roles = [];
|
|
12
|
-
this._modules = [];
|
|
13
|
-
this._companyId = params.companyId;
|
|
14
|
-
this._userId = params.userId;
|
|
15
|
-
this._language = params.language;
|
|
16
|
-
this._roles = params.roles ?? [];
|
|
17
|
-
}
|
|
18
|
-
setModules(modules) {
|
|
19
|
-
this._modules = modules;
|
|
20
|
-
}
|
|
21
|
-
get companyId() {
|
|
22
|
-
return this._companyId;
|
|
23
|
-
}
|
|
24
|
-
get userId() {
|
|
25
|
-
return this._userId;
|
|
26
|
-
}
|
|
27
|
-
get language() {
|
|
28
|
-
return this._language ?? "en";
|
|
29
|
-
}
|
|
30
|
-
get roles() {
|
|
31
|
-
return this._roles;
|
|
32
|
-
}
|
|
33
|
-
get modules() {
|
|
34
|
-
return this._modules;
|
|
35
|
-
}
|
|
36
|
-
hasModule(moduleId) {
|
|
37
|
-
return !!this._modules.find((m) => m.id === moduleId);
|
|
38
|
-
}
|
|
39
|
-
hasRole(role) {
|
|
40
|
-
return this._roles.includes(role);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.AbstractCompanyConfigurations = AbstractCompanyConfigurations;
|
|
44
|
-
//# sourceMappingURL=abstract.company.configuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.company.configuration.js","sourceRoot":"","sources":["../../../src/common/abstracts/abstract.company.configuration.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAsB,6BAA6B;IAOjD,YAAY,MAAkF;QAJtF,WAAM,GAAa,EAAE,CAAC;QACtB,aAAQ,GAA8C,EAAE,CAAC;QAI/D,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;IACnC,CAAC;IAQS,UAAU,CAAC,OAAkD;QACrE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;IAChC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,QAAgB;QACxB,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AAnDD,sEAmDC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Company configurations re-export.
|
|
3
|
-
* Applications should extend AbstractCompanyConfigurations with their own implementation.
|
|
4
|
-
*/
|
|
5
|
-
import { AbstractCompanyConfigurations } from "../common/abstracts/abstract.company.configuration";
|
|
6
|
-
export { AbstractCompanyConfigurations };
|
|
7
|
-
/**
|
|
8
|
-
* CompanyConfigurations class - applications should provide their own implementation
|
|
9
|
-
* that extends AbstractCompanyConfigurations.
|
|
10
|
-
*
|
|
11
|
-
* This class exists for backwards compatibility.
|
|
12
|
-
* Use COMPANY_CONFIGURATIONS_FACTORY token to inject your implementation.
|
|
13
|
-
*/
|
|
14
|
-
export declare class CompanyConfigurations extends AbstractCompanyConfigurations {
|
|
15
|
-
loadConfigurations(_params: {
|
|
16
|
-
neo4j: any;
|
|
17
|
-
}): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=company.configurations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"company.configurations.d.ts","sourceRoot":"","sources":["../../src/config/company.configurations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAEzC;;;;;;GAMG;AACH,qBAAa,qBAAsB,SAAQ,6BAA6B;IACtE,kBAAkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompanyConfigurations = exports.AbstractCompanyConfigurations = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Company configurations re-export.
|
|
6
|
-
* Applications should extend AbstractCompanyConfigurations with their own implementation.
|
|
7
|
-
*/
|
|
8
|
-
const abstract_company_configuration_1 = require("../common/abstracts/abstract.company.configuration");
|
|
9
|
-
Object.defineProperty(exports, "AbstractCompanyConfigurations", { enumerable: true, get: function () { return abstract_company_configuration_1.AbstractCompanyConfigurations; } });
|
|
10
|
-
/**
|
|
11
|
-
* CompanyConfigurations class - applications should provide their own implementation
|
|
12
|
-
* that extends AbstractCompanyConfigurations.
|
|
13
|
-
*
|
|
14
|
-
* This class exists for backwards compatibility.
|
|
15
|
-
* Use COMPANY_CONFIGURATIONS_FACTORY token to inject your implementation.
|
|
16
|
-
*/
|
|
17
|
-
class CompanyConfigurations extends abstract_company_configuration_1.AbstractCompanyConfigurations {
|
|
18
|
-
loadConfigurations(_params) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.CompanyConfigurations = CompanyConfigurations;
|
|
23
|
-
//# sourceMappingURL=company.configurations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"company.configurations.js","sourceRoot":"","sources":["../../src/config/company.configurations.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uGAAmG;AAE1F,8GAFA,8DAA6B,OAEA;AAEtC;;;;;;GAMG;AACH,MAAa,qBAAsB,SAAQ,8DAA6B;IACtE,kBAAkB,CAAC,OAAuB;QACxC,OAAO;IACT,CAAC;CACF;AAJD,sDAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.types.d.ts","sourceRoot":"","sources":["../../../src/config/enums/content.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,EAAO,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.contentTypes = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Content types configuration
|
|
6
|
-
* Consumers should provide their own content types array
|
|
7
|
-
*/
|
|
8
|
-
exports.contentTypes = [];
|
|
9
|
-
//# sourceMappingURL=content.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.types.js","sourceRoot":"","sources":["../../../src/config/enums/content.types.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,YAAY,GAAa,EAAE,CAAC"}
|