@carlonicora/nestjs-neo4jsonapi 8.11.1 → 8.12.0
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/agents/community.detector/services/community.detector.service.d.ts +10 -7
- package/dist/agents/community.detector/services/community.detector.service.d.ts.map +1 -1
- package/dist/agents/community.detector/services/community.detector.service.js +26 -31
- package/dist/agents/community.detector/services/community.detector.service.js.map +1 -1
- package/dist/agents/community.summariser/community.summariser.module.d.ts.map +1 -1
- package/dist/agents/community.summariser/community.summariser.module.js +5 -1
- package/dist/agents/community.summariser/community.summariser.module.js.map +1 -1
- package/dist/agents/community.summariser/cron/community.summariser.cron.d.ts +1 -6
- package/dist/agents/community.summariser/cron/community.summariser.cron.d.ts.map +1 -1
- package/dist/agents/community.summariser/cron/community.summariser.cron.js +2 -6
- package/dist/agents/community.summariser/cron/community.summariser.cron.js.map +1 -1
- package/dist/agents/community.summariser/helpers/community-scope-filter.d.ts +3 -5
- package/dist/agents/community.summariser/helpers/community-scope-filter.d.ts.map +1 -1
- package/dist/agents/community.summariser/helpers/community-scope-filter.js +3 -7
- package/dist/agents/community.summariser/helpers/community-scope-filter.js.map +1 -1
- package/dist/agents/community.summariser/processors/community.summariser.processor.d.ts +1 -6
- package/dist/agents/community.summariser/processors/community.summariser.processor.d.ts.map +1 -1
- package/dist/agents/community.summariser/processors/community.summariser.processor.js +2 -6
- package/dist/agents/community.summariser/processors/community.summariser.processor.js.map +1 -1
- package/dist/agents/community.summariser/services/community.summariser.service.js +1 -1
- package/dist/agents/community.summariser/services/community.summariser.service.js.map +1 -1
- package/dist/agents/drift/nodes/followup.node.service.js +1 -1
- package/dist/agents/drift/nodes/followup.node.service.js.map +1 -1
- package/dist/agents/graph/prompts/graph.node.system.prompt.d.ts +19 -2
- package/dist/agents/graph/prompts/graph.node.system.prompt.d.ts.map +1 -1
- package/dist/agents/graph/prompts/graph.node.system.prompt.js +57 -4
- package/dist/agents/graph/prompts/graph.node.system.prompt.js.map +1 -1
- package/dist/agents/graph/services/compact-description.d.ts +76 -0
- package/dist/agents/graph/services/compact-description.d.ts.map +1 -0
- package/dist/agents/graph/services/compact-description.js +178 -0
- package/dist/agents/graph/services/compact-description.js.map +1 -0
- package/dist/agents/graph/services/filter-operators.d.ts +16 -0
- package/dist/agents/graph/services/filter-operators.d.ts.map +1 -0
- package/dist/agents/graph/services/filter-operators.js +35 -0
- package/dist/agents/graph/services/filter-operators.js.map +1 -0
- package/dist/agents/graph/tools/describe-entity.tool.d.ts +57 -1
- package/dist/agents/graph/tools/describe-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/describe-entity.tool.js +121 -59
- package/dist/agents/graph/tools/describe-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/read-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/read-entity.tool.js +11 -2
- package/dist/agents/graph/tools/read-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.js +7 -2
- package/dist/agents/graph/tools/search-entities.tool.js.map +1 -1
- package/dist/agents/graph/tools/tool.factory.d.ts +35 -0
- package/dist/agents/graph/tools/tool.factory.d.ts.map +1 -1
- package/dist/agents/graph/tools/tool.factory.js +34 -0
- package/dist/agents/graph/tools/tool.factory.js.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.d.ts +1 -13
- package/dist/agents/graph/tools/traverse.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.js +13 -33
- package/dist/agents/graph/tools/traverse.tool.js.map +1 -1
- package/dist/agents/index.d.ts +6 -2
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +10 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/responder/nodes/graph.node.service.d.ts +48 -1
- package/dist/agents/responder/nodes/graph.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/graph.node.service.js +158 -41
- package/dist/agents/responder/nodes/graph.node.service.js.map +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.d.ts +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.js +14 -0
- package/dist/agents/responder/nodes/responder.answer.node.service.js.map +1 -1
- package/dist/config/base.config.d.ts +6 -0
- package/dist/config/base.config.d.ts.map +1 -1
- package/dist/config/base.config.js +1 -0
- package/dist/config/base.config.js.map +1 -1
- package/dist/config/interfaces/base.config.interface.d.ts +2 -0
- package/dist/config/interfaces/base.config.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.community.interface.d.ts +8 -0
- package/dist/config/interfaces/config.community.interface.d.ts.map +1 -0
- package/dist/config/interfaces/config.community.interface.js +3 -0
- package/dist/config/interfaces/config.community.interface.js.map +1 -0
- package/dist/config/interfaces/config.prompts.interface.d.ts +4 -4
- package/dist/config/interfaces/config.responder.interface.d.ts +7 -6
- package/dist/config/interfaces/config.responder.interface.d.ts.map +1 -1
- package/dist/config/interfaces/index.d.ts +1 -0
- package/dist/config/interfaces/index.d.ts.map +1 -1
- package/dist/config/interfaces/index.js +1 -0
- package/dist/config/interfaces/index.js.map +1 -1
- package/dist/core/llm/services/llm.service.d.ts +26 -0
- package/dist/core/llm/services/llm.service.d.ts.map +1 -1
- package/dist/core/llm/services/llm.service.js +146 -14
- package/dist/core/llm/services/llm.service.js.map +1 -1
- package/dist/foundations/analytics/index.d.ts +1 -0
- package/dist/foundations/analytics/index.d.ts.map +1 -1
- package/dist/foundations/analytics/index.js +3 -1
- package/dist/foundations/analytics/index.js.map +1 -1
- package/dist/foundations/analytics/interfaces/analytics.purge-visitor.input.d.ts +19 -0
- package/dist/foundations/analytics/interfaces/analytics.purge-visitor.input.d.ts.map +1 -0
- package/dist/foundations/analytics/interfaces/analytics.purge-visitor.input.js +6 -0
- package/dist/foundations/analytics/interfaces/analytics.purge-visitor.input.js.map +1 -0
- package/dist/foundations/analytics/processors/analytics.processor.d.ts +10 -1
- package/dist/foundations/analytics/processors/analytics.processor.d.ts.map +1 -1
- package/dist/foundations/analytics/processors/analytics.processor.js +29 -0
- package/dist/foundations/analytics/processors/analytics.processor.js.map +1 -1
- package/dist/foundations/analytics/repositories/analytics-session.repository.d.ts +11 -0
- package/dist/foundations/analytics/repositories/analytics-session.repository.d.ts.map +1 -1
- package/dist/foundations/analytics/repositories/analytics-session.repository.js +37 -0
- package/dist/foundations/analytics/repositories/analytics-session.repository.js.map +1 -1
- package/dist/foundations/analytics/services/analytics.service.d.ts +3 -1
- package/dist/foundations/analytics/services/analytics.service.d.ts.map +1 -1
- package/dist/foundations/analytics/services/analytics.service.js +18 -3
- package/dist/foundations/analytics/services/analytics.service.js.map +1 -1
- package/dist/foundations/community/community.module.d.ts.map +1 -1
- package/dist/foundations/community/community.module.js +5 -4
- package/dist/foundations/community/community.module.js.map +1 -1
- package/dist/foundations/community/entities/community.entity.d.ts +30 -4
- package/dist/foundations/community/entities/community.entity.d.ts.map +1 -1
- package/dist/foundations/community/entities/community.entity.js +51 -0
- package/dist/foundations/community/entities/community.entity.js.map +1 -1
- package/dist/foundations/community/index.d.ts +4 -2
- package/dist/foundations/community/index.d.ts.map +1 -1
- package/dist/foundations/community/index.js +8 -3
- package/dist/foundations/community/index.js.map +1 -1
- package/dist/foundations/community/repositories/community.repository.d.ts +93 -103
- package/dist/foundations/community/repositories/community.repository.d.ts.map +1 -1
- package/dist/foundations/community/repositories/community.repository.js +330 -328
- package/dist/foundations/community/repositories/community.repository.js.map +1 -1
- package/dist/foundations/community/services/community-layer.service.d.ts +38 -0
- package/dist/foundations/community/services/community-layer.service.d.ts.map +1 -0
- package/dist/foundations/community/services/community-layer.service.js +89 -0
- package/dist/foundations/community/services/community-layer.service.js.map +1 -0
- package/dist/foundations/community/services/community.service.d.ts +22 -4
- package/dist/foundations/community/services/community.service.d.ts.map +1 -1
- package/dist/foundations/community/services/community.service.js +9 -6
- package/dist/foundations/community/services/community.service.js.map +1 -1
- package/package.json +1 -1
- package/dist/foundations/community/entities/community.map.d.ts +0 -8
- package/dist/foundations/community/entities/community.map.d.ts.map +0 -1
- package/dist/foundations/community/entities/community.map.js +0 -24
- package/dist/foundations/community/entities/community.map.js.map +0 -1
- package/dist/foundations/community/entities/community.model.d.ts +0 -4
- package/dist/foundations/community/entities/community.model.d.ts.map +0 -1
- package/dist/foundations/community/entities/community.model.js +0 -15
- package/dist/foundations/community/entities/community.model.js.map +0 -1
|
@@ -1,34 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClsService } from "nestjs-cls";
|
|
2
2
|
import { AgentScopeFilterService } from "../../../common/repositories/agent-scope.filter";
|
|
3
3
|
import { AgentScope } from "../../../common/types/agent.scope";
|
|
4
|
-
import { EmbedderService
|
|
4
|
+
import { EmbedderService } from "../../../core/llm/services/embedder.service";
|
|
5
|
+
import { ModelService } from "../../../core/llm/services/model.service";
|
|
6
|
+
import { AbstractRepository } from "../../../core/neo4j/abstracts/abstract.repository";
|
|
5
7
|
import { Neo4jService } from "../../../core/neo4j/services/neo4j.service";
|
|
6
8
|
import { SecurityService } from "../../../core/security/services/security.service";
|
|
7
|
-
import { Community } from "../entities/community.entity";
|
|
9
|
+
import { Community, CommunityDescriptor } from "../entities/community.entity";
|
|
10
|
+
import { CommunityLayerService } from "../services/community-layer.service";
|
|
8
11
|
/**
|
|
9
12
|
* Up to this many company/scope communities, `findByVector` ranks them by
|
|
10
13
|
* exact cosine (no recall cliff). Above it, it falls back to the vector-index
|
|
11
14
|
* over-fetch, which ranks globally and filters afterwards.
|
|
12
15
|
*/
|
|
13
16
|
export declare const COMMUNITY_EXACT_SCAN_MAX_SCOPED_NODES = 5000;
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Topic groups of key concepts, one set per company or per layer root (`CommunityLayerService`).
|
|
19
|
+
*
|
|
20
|
+
* Every match on a Community starts from `buildDefaultMatch()`, so the company predicate is the
|
|
21
|
+
* framework's. With no company in CLS that predicate matches every company: only
|
|
22
|
+
* `findAllStaleCommunities` (the cron) relies on it; every write throws instead.
|
|
23
|
+
*/
|
|
24
|
+
export declare class CommunityRepository extends AbstractRepository<Community, typeof CommunityDescriptor.relationships> {
|
|
16
25
|
private readonly embedderService;
|
|
17
26
|
private readonly modelService;
|
|
18
|
-
private readonly securityService;
|
|
19
27
|
private readonly agentScope;
|
|
20
|
-
|
|
28
|
+
private readonly layer;
|
|
29
|
+
protected readonly descriptor: import("../../..").EntityDescriptor<Community, {
|
|
30
|
+
keyconcept: {
|
|
31
|
+
model: import("../../..").DataMeta;
|
|
32
|
+
direction: "out";
|
|
33
|
+
relationship: string;
|
|
34
|
+
cardinality: "many";
|
|
35
|
+
required: false;
|
|
36
|
+
};
|
|
37
|
+
community: {
|
|
38
|
+
model: import("../../..").DataMeta;
|
|
39
|
+
direction: "out";
|
|
40
|
+
relationship: string;
|
|
41
|
+
cardinality: "many";
|
|
42
|
+
required: false;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService, embedderService: EmbedderService, modelService: ModelService, agentScope: AgentScopeFilterService, layer: CommunityLayerService);
|
|
21
46
|
onModuleInit(): Promise<void>;
|
|
47
|
+
/** A query on the Community serialiser, refused when no company is in context (writes). */
|
|
48
|
+
private writeQuery;
|
|
49
|
+
private readQuery;
|
|
22
50
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* `scopeRoot` ties the community to the scope root its members were detected
|
|
28
|
-
* within. Communities are built per scope root precisely so a scoped run can
|
|
29
|
-
* be answered from communities that contain nothing from a sibling root;
|
|
30
|
-
* without the edge, `findByVector` has no way to tell them apart and the
|
|
31
|
-
* whole partition is decorative.
|
|
51
|
+
* `scopeRoot` ties the group to the layer root its members were detected within. Its `label`
|
|
52
|
+
* is ignored: the label comes from the layer. A `scopeRoot` with no layer configured throws.
|
|
32
53
|
*/
|
|
33
54
|
createCommunity(params: {
|
|
34
55
|
name: string;
|
|
@@ -40,74 +61,55 @@ export declare class CommunityRepository implements OnModuleInit {
|
|
|
40
61
|
label: string;
|
|
41
62
|
};
|
|
42
63
|
}): Promise<Community>;
|
|
43
|
-
/**
|
|
44
|
-
* Update community members (HAS_MEMBER relationships to KeyConcepts)
|
|
45
|
-
*/
|
|
64
|
+
/** Replaces the group's HAS_MEMBER edges. */
|
|
46
65
|
updateCommunityMembers(params: {
|
|
47
66
|
communityId: string;
|
|
48
67
|
keyConceptIds: string[];
|
|
49
68
|
}): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Set PARENT_OF relationship between communities (hierarchy)
|
|
52
|
-
*/
|
|
69
|
+
/** PARENT_OF between two groups of the same company. */
|
|
53
70
|
setParentCommunity(params: {
|
|
54
71
|
childCommunityId: string;
|
|
55
72
|
parentCommunityId: string;
|
|
56
73
|
}): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Mark communities as stale (needs reprocessing)
|
|
59
|
-
*/
|
|
74
|
+
/** Marks groups as stale (needs reprocessing). */
|
|
60
75
|
markAsStale(communityIds: string[]): Promise<void>;
|
|
61
76
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* clears the flag (spec §2: a fresh top-up must not be silently eaten).
|
|
77
|
+
* Defers a group for lack of credits: the summariser cron skips it (`findAllStaleCommunities`)
|
|
78
|
+
* until approval clears the flag (spec §2: a fresh top-up must not be silently eaten).
|
|
65
79
|
*/
|
|
66
80
|
markPendingCredits(communityId: string): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Approval: clear the flag for the current company (from CLS); returns the
|
|
69
|
-
* cleared community ids so the caller can re-enqueue them.
|
|
70
|
-
*/
|
|
81
|
+
/** Approval: clears the flag for the current company; returns the cleared ids so the caller can re-enqueue them. */
|
|
71
82
|
clearPendingCredits(): Promise<string[]>;
|
|
72
|
-
/**
|
|
73
|
-
* Backlog count for the current company (from CLS) — mirrors countStaleCommunities.
|
|
74
|
-
*/
|
|
83
|
+
/** Backlog count for the current company (mirrors countStaleCommunities). */
|
|
75
84
|
countPendingCredits(): Promise<number>;
|
|
76
|
-
/**
|
|
77
|
-
* Count stale communities for the current company (from CLS)
|
|
78
|
-
*/
|
|
85
|
+
/** Stale groups of the current company. */
|
|
79
86
|
countStaleCommunities(): Promise<number>;
|
|
80
87
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
88
|
+
* Stale groups with their company ids, for the cron. Runs with no company in CLS, so the
|
|
89
|
+
* default match spans every company (spec D5: no admin repository).
|
|
83
90
|
*/
|
|
84
91
|
findAllStaleCommunities(): Promise<{
|
|
85
92
|
communityId: string;
|
|
86
93
|
companyId: string;
|
|
87
94
|
}[]>;
|
|
88
95
|
/**
|
|
89
|
-
* The
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* scope root among them, or no company is in CLS. Both the community and the
|
|
94
|
-
* root must belong to the CLS company.
|
|
96
|
+
* The layer root a group was detected under (its SCOPED_TO target), for the current company.
|
|
97
|
+
* `null` on the company layer, with no company in CLS, or when the group has no root.
|
|
98
|
+
*
|
|
99
|
+
* @deprecated rootLabels — accepted and ignored: the layer comes from CommunityLayerService.
|
|
95
100
|
*/
|
|
96
101
|
findScopeRootForCommunity(params: {
|
|
97
102
|
communityId: string;
|
|
98
|
-
rootLabels
|
|
103
|
+
rootLabels?: string[];
|
|
99
104
|
}): Promise<AgentScope | null>;
|
|
100
105
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* are left alone. Does nothing when no company is in CLS.
|
|
106
|
+
* Deletes every group detected under one layer root, for the current company. A scope of
|
|
107
|
+
* another type than the layer (or no layer) does nothing; the label comes from the layer.
|
|
104
108
|
*/
|
|
105
109
|
deleteCommunitiesForScope(params: {
|
|
106
110
|
scope: AgentScope;
|
|
107
111
|
}): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* Update community summary, embedding, and mark as not stale
|
|
110
|
-
*/
|
|
112
|
+
/** Writes the summary and embedding and clears the stale flag. */
|
|
111
113
|
updateSummary(params: {
|
|
112
114
|
communityId: string;
|
|
113
115
|
name: string;
|
|
@@ -115,87 +117,76 @@ export declare class CommunityRepository implements OnModuleInit {
|
|
|
115
117
|
embedding: number[];
|
|
116
118
|
rating: number;
|
|
117
119
|
}): Promise<void>;
|
|
120
|
+
/** Clears the stale flag without summarising (credit backlog discard). */
|
|
121
|
+
clearStaleness(params: {
|
|
122
|
+
communityIds: string[];
|
|
123
|
+
}): Promise<void>;
|
|
118
124
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*
|
|
124
|
-
* single unscoped hit hands the answer content from every scope root it drew
|
|
125
|
-
* on. In a scoped run only communities detected within that exact root are
|
|
126
|
-
* eligible; a community with no `SCOPED_TO` edge predates the partition and
|
|
127
|
-
* is therefore assumed to mix roots.
|
|
125
|
+
* Vector search over the current company's groups.
|
|
126
|
+
*
|
|
127
|
+
* FAIL CLOSED on scope. A group summarises many members at once, so in a scoped chat only
|
|
128
|
+
* groups detected within that exact root are eligible. A chat scoped to a type other than the
|
|
129
|
+
* layer (or any scoped chat on the company layer) gets nothing: its groups mix roots.
|
|
128
130
|
*/
|
|
129
131
|
findByVector(params: {
|
|
130
132
|
embedding: number[];
|
|
131
133
|
topK: number;
|
|
132
134
|
level?: number;
|
|
133
135
|
}): Promise<Community[]>;
|
|
134
|
-
/**
|
|
135
|
-
* Find communities by hierarchy level
|
|
136
|
-
* Filters by company from CLS context
|
|
137
|
-
*/
|
|
136
|
+
/** Groups of one hierarchy level, for the current company. */
|
|
138
137
|
findByLevel(params: {
|
|
139
138
|
level: number;
|
|
140
139
|
}): Promise<Community[]>;
|
|
141
|
-
/**
|
|
142
|
-
* Find member KeyConcepts for a community
|
|
143
|
-
*/
|
|
140
|
+
/** Member key concepts of a group. */
|
|
144
141
|
findMemberKeyConcepts(communityId: string): Promise<{
|
|
145
142
|
id: string;
|
|
146
143
|
value: string;
|
|
147
144
|
description?: string;
|
|
148
145
|
}[]>;
|
|
149
|
-
/**
|
|
150
|
-
* Get KeyConceptRelationships between community members
|
|
151
|
-
*/
|
|
146
|
+
/** KeyConceptRelationships between a group's members. */
|
|
152
147
|
findMemberRelationships(communityId: string): Promise<{
|
|
153
148
|
keyConcept1: string;
|
|
154
149
|
keyConcept2: string;
|
|
155
150
|
weight: number;
|
|
156
151
|
}[]>;
|
|
157
|
-
/**
|
|
158
|
-
* Get parent community chain (hierarchy)
|
|
159
|
-
*/
|
|
152
|
+
/** The group and its parent chain, top level first. */
|
|
160
153
|
getHierarchy(communityId: string): Promise<Community[]>;
|
|
161
|
-
/**
|
|
162
|
-
* Get child communities
|
|
163
|
-
*/
|
|
154
|
+
/** Child groups of a group. */
|
|
164
155
|
getChildren(communityId: string): Promise<Community[]>;
|
|
165
|
-
/**
|
|
166
|
-
* Delete a community and its relationships
|
|
167
|
-
*/
|
|
156
|
+
/** Deletes one group of the current company. */
|
|
168
157
|
deleteCommunity(communityId: string): Promise<void>;
|
|
169
|
-
/**
|
|
170
|
-
* Delete all communities for the current company (from CLS)
|
|
171
|
-
*/
|
|
158
|
+
/** Deletes every group of the current company. */
|
|
172
159
|
deleteAllCommunities(): Promise<void>;
|
|
173
|
-
/**
|
|
174
|
-
* Find communities that contain a specific KeyConcept
|
|
175
|
-
*/
|
|
160
|
+
/** Groups of the current company that contain a key concept. */
|
|
176
161
|
findCommunitiesByKeyConcept(keyConceptId: string): Promise<Community[]>;
|
|
177
|
-
/**
|
|
178
|
-
* Count communities by level for the current company (from CLS)
|
|
179
|
-
*/
|
|
162
|
+
/** Group counts per level for the current company. */
|
|
180
163
|
countByLevel(): Promise<{
|
|
181
164
|
level: number;
|
|
182
165
|
count: number;
|
|
183
166
|
}[]>;
|
|
184
167
|
/**
|
|
185
|
-
*
|
|
168
|
+
* `findById({ id })` is the inherited read. A bare id string is the pre-descriptor signature,
|
|
169
|
+
* kept so existing callers do not break.
|
|
170
|
+
*
|
|
171
|
+
* @deprecated Passing a bare id string: use `findCommunityById(id)` (returns `null` when missing).
|
|
186
172
|
*/
|
|
187
|
-
findById(
|
|
173
|
+
findById(params: string): Promise<Community | null>;
|
|
174
|
+
findById(params: {
|
|
175
|
+
id: string;
|
|
176
|
+
}): Promise<Community>;
|
|
188
177
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
178
|
+
* Ids of the layer's root nodes the current company owns. `[]` on the company layer
|
|
179
|
+
* or with no company in CLS. The label comes from the layer, never from a caller.
|
|
191
180
|
*/
|
|
181
|
+
findLayerRootIds(): Promise<string[]>;
|
|
182
|
+
/** One group of the current company, or `null`. */
|
|
183
|
+
findCommunityById(communityId: string): Promise<Community | null>;
|
|
192
184
|
/**
|
|
193
|
-
*
|
|
185
|
+
* Groups holding key concepts related to a given one, with affinity totals.
|
|
194
186
|
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* partitioned, and the mixing compounds on every ingest.
|
|
187
|
+
* `scopeRoot` keeps incremental assignment inside its partition: key concepts are shared by
|
|
188
|
+
* value, so a concept two roots share relates to members of both their groups. Its `label` is
|
|
189
|
+
* ignored (the layer's is used); with no layer no scope filter applies.
|
|
199
190
|
*/
|
|
200
191
|
findCommunitiesByRelatedKeyConcepts(keyConceptId: string, scopeRoot?: {
|
|
201
192
|
id: string;
|
|
@@ -206,12 +197,11 @@ export declare class CommunityRepository implements OnModuleInit {
|
|
|
206
197
|
relationshipCount: number;
|
|
207
198
|
totalWeight: number;
|
|
208
199
|
}[]>;
|
|
209
|
-
/**
|
|
210
|
-
* Add a single KeyConcept to an existing community
|
|
211
|
-
*/
|
|
200
|
+
/** Adds one key concept to a group. */
|
|
212
201
|
addMemberToCommunity(communityId: string, keyConceptId: string): Promise<void>;
|
|
213
202
|
/**
|
|
214
|
-
*
|
|
203
|
+
* Key concepts of one content that are in no group of THIS company. `label` must be a
|
|
204
|
+
* registered model's: an unknown label returns `[]` and never reaches the query text.
|
|
215
205
|
*/
|
|
216
206
|
findOrphanKeyConceptsForContent(contentId: string, label: string): Promise<string[]>;
|
|
217
207
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"community.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/community/repositories/community.repository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"community.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/community/repositories/community.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAKnF,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,OAAO,CAAC;AAK1D;;;;;;GAMG;AACH,qBACa,mBAAoB,SAAQ,kBAAkB,CAAC,SAAS,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC;IAO5G,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,KAAK;IATxB,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;OAAuB;gBA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