@carlonicora/nestjs-neo4jsonapi 1.78.0 → 1.79.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/bootstrap/app.module.factory.d.ts.map +1 -1
- package/dist/bootstrap/app.module.factory.js +0 -5
- package/dist/bootstrap/app.module.factory.js.map +1 -1
- package/dist/bootstrap/bootstrap.options.d.ts +0 -9
- package/dist/bootstrap/bootstrap.options.d.ts.map +1 -1
- package/dist/foundations/how-to/controllers/how-to.controller.d.ts +3 -0
- package/dist/foundations/how-to/controllers/how-to.controller.d.ts.map +1 -1
- package/dist/foundations/how-to/controllers/how-to.controller.js +41 -0
- package/dist/foundations/how-to/controllers/how-to.controller.js.map +1 -1
- package/dist/foundations/how-to/controllers/how-to.public.controller.d.ts +14 -0
- package/dist/foundations/how-to/controllers/how-to.public.controller.d.ts.map +1 -0
- package/dist/foundations/how-to/controllers/how-to.public.controller.js +73 -0
- package/dist/foundations/how-to/controllers/how-to.public.controller.js.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.d.ts +7 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.d.ts.map +1 -1
- package/dist/foundations/how-to/dtos/how-to.post.dto.js +38 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.js.map +1 -1
- package/dist/foundations/how-to/dtos/how-to.put.dto.d.ts +7 -0
- package/dist/foundations/how-to/dtos/how-to.put.dto.d.ts.map +1 -1
- package/dist/foundations/how-to/dtos/how-to.put.dto.js +38 -0
- package/dist/foundations/how-to/dtos/how-to.put.dto.js.map +1 -1
- package/dist/foundations/how-to/entities/how-to.d.ts +7 -2
- package/dist/foundations/how-to/entities/how-to.d.ts.map +1 -1
- package/dist/foundations/how-to/entities/how-to.js +7 -2
- package/dist/foundations/how-to/entities/how-to.js.map +1 -1
- package/dist/foundations/how-to/how-to.module.d.ts.map +1 -1
- package/dist/foundations/how-to/how-to.module.js +2 -1
- package/dist/foundations/how-to/how-to.module.js.map +1 -1
- package/dist/foundations/how-to/repositories/how-to.repository.d.ts +40 -4
- package/dist/foundations/how-to/repositories/how-to.repository.d.ts.map +1 -1
- package/dist/foundations/how-to/repositories/how-to.repository.js +80 -5
- package/dist/foundations/how-to/repositories/how-to.repository.js.map +1 -1
- package/dist/foundations/how-to/services/how-to.service.d.ts +28 -7
- package/dist/foundations/how-to/services/how-to.service.d.ts.map +1 -1
- package/dist/foundations/how-to/services/how-to.service.js +60 -9
- package/dist/foundations/how-to/services/how-to.service.js.map +1 -1
- package/dist/foundations/index.d.ts +0 -1
- package/dist/foundations/index.d.ts.map +1 -1
- package/dist/foundations/index.js +0 -1
- package/dist/foundations/index.js.map +1 -1
- package/package.json +1 -5
- package/dist/foundations/help-content-sync/help-content-sync.module.d.ts +0 -6
- package/dist/foundations/help-content-sync/help-content-sync.module.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/help-content-sync.module.js +0 -35
- package/dist/foundations/help-content-sync/help-content-sync.module.js.map +0 -1
- package/dist/foundations/help-content-sync/helpers/create-help-content-reader.d.ts +0 -5
- package/dist/foundations/help-content-sync/helpers/create-help-content-reader.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/helpers/create-help-content-reader.js +0 -9
- package/dist/foundations/help-content-sync/helpers/create-help-content-reader.js.map +0 -1
- package/dist/foundations/help-content-sync/helpers/to-content-id.d.ts +0 -3
- package/dist/foundations/help-content-sync/helpers/to-content-id.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/helpers/to-content-id.js +0 -8
- package/dist/foundations/help-content-sync/helpers/to-content-id.js.map +0 -1
- package/dist/foundations/help-content-sync/index.d.ts +0 -7
- package/dist/foundations/help-content-sync/index.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/index.js +0 -28
- package/dist/foundations/help-content-sync/index.js.map +0 -1
- package/dist/foundations/help-content-sync/interfaces/help-article.interface.d.ts +0 -29
- package/dist/foundations/help-content-sync/interfaces/help-article.interface.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/interfaces/help-article.interface.js +0 -5
- package/dist/foundations/help-content-sync/interfaces/help-article.interface.js.map +0 -1
- package/dist/foundations/help-content-sync/interfaces/help-content-config.interface.d.ts +0 -8
- package/dist/foundations/help-content-sync/interfaces/help-content-config.interface.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/interfaces/help-content-config.interface.js +0 -3
- package/dist/foundations/help-content-sync/interfaces/help-content-config.interface.js.map +0 -1
- package/dist/foundations/help-content-sync/schema/frontmatter.schema.d.ts +0 -19
- package/dist/foundations/help-content-sync/schema/frontmatter.schema.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/schema/frontmatter.schema.js +0 -20
- package/dist/foundations/help-content-sync/schema/frontmatter.schema.js.map +0 -1
- package/dist/foundations/help-content-sync/services/help-content-sync.service.d.ts +0 -21
- package/dist/foundations/help-content-sync/services/help-content-sync.service.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/services/help-content-sync.service.js +0 -111
- package/dist/foundations/help-content-sync/services/help-content-sync.service.js.map +0 -1
- package/dist/foundations/help-content-sync/services/mdx-to-markdown.service.d.ts +0 -13
- package/dist/foundations/help-content-sync/services/mdx-to-markdown.service.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/services/mdx-to-markdown.service.js +0 -104
- package/dist/foundations/help-content-sync/services/mdx-to-markdown.service.js.map +0 -1
- package/dist/foundations/help-content-sync/tokens.d.ts +0 -2
- package/dist/foundations/help-content-sync/tokens.d.ts.map +0 -1
- package/dist/foundations/help-content-sync/tokens.js +0 -5
- package/dist/foundations/help-content-sync/tokens.js.map +0 -1
- package/dist/tools/help-content-build/build-manifest.d.ts +0 -31
- package/dist/tools/help-content-build/build-manifest.d.ts.map +0 -1
- package/dist/tools/help-content-build/build-manifest.js +0 -134
- package/dist/tools/help-content-build/build-manifest.js.map +0 -1
- package/dist/tools/help-content-build/index.d.ts +0 -2
- package/dist/tools/help-content-build/index.d.ts.map +0 -1
- package/dist/tools/help-content-build/index.js +0 -6
- package/dist/tools/help-content-build/index.js.map +0 -1
|
@@ -39,15 +39,90 @@ let HowToRepository = class HowToRepository extends abstract_repository_1.Abstra
|
|
|
39
39
|
await this.neo4j.writeOne(query);
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* Published help articles (draft = false), optionally filtered by type, ordered.
|
|
43
|
+
* Unpaginated by design — the docs corpus is a small bounded set.
|
|
44
|
+
* buildDefaultMatch() + readMany, no access check
|
|
45
|
+
* (HowTo is not company-scoped; public reads have no CLS user).
|
|
45
46
|
*/
|
|
46
|
-
async
|
|
47
|
+
async findPublished(params) {
|
|
48
|
+
const query = this.neo4j.initQuery({ serialiser: how_to_1.HowToDescriptor.model });
|
|
49
|
+
query.queryParams = {
|
|
50
|
+
...query.queryParams,
|
|
51
|
+
...(params.howToType ? { howToType: params.howToType } : {}),
|
|
52
|
+
};
|
|
53
|
+
query.query = `
|
|
54
|
+
${this.buildDefaultMatch()}
|
|
55
|
+
WHERE (${how_to_meta_1.howToMeta.nodeName}.draft IS NULL OR ${how_to_meta_1.howToMeta.nodeName}.draft = false)
|
|
56
|
+
${params.howToType ? `AND ${how_to_meta_1.howToMeta.nodeName}.howToType = $howToType` : ""}
|
|
57
|
+
ORDER BY ${how_to_meta_1.howToMeta.nodeName}.order ASC, ${how_to_meta_1.howToMeta.nodeName}.name ASC
|
|
58
|
+
${this.buildReturnStatement()}
|
|
59
|
+
`;
|
|
60
|
+
return this.neo4j.readMany(query);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Single published article by type + slug.
|
|
64
|
+
*/
|
|
65
|
+
async findPublishedByTypeAndSlug(params) {
|
|
66
|
+
const query = this.neo4j.initQuery({ serialiser: how_to_1.HowToDescriptor.model });
|
|
67
|
+
query.queryParams = { ...query.queryParams, howToType: params.howToType, slug: params.slug };
|
|
68
|
+
query.query = `
|
|
69
|
+
${this.buildDefaultMatch()}
|
|
70
|
+
WHERE ${how_to_meta_1.howToMeta.nodeName}.howToType = $howToType
|
|
71
|
+
AND ${how_to_meta_1.howToMeta.nodeName}.slug = $slug
|
|
72
|
+
AND (${how_to_meta_1.howToMeta.nodeName}.draft IS NULL OR ${how_to_meta_1.howToMeta.nodeName}.draft = false)
|
|
73
|
+
${this.buildReturnStatement()}
|
|
74
|
+
`;
|
|
75
|
+
return this.neo4j.readOne(query);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Published articles RELATED to the given article id (undirected — a single stored
|
|
79
|
+
* directed edge reads symmetrically). Custom multi-hop method; the canonical graph
|
|
80
|
+
* answer to "see also", NOT a self-referential descriptor relationship.
|
|
81
|
+
*/
|
|
82
|
+
async findRelated(params) {
|
|
83
|
+
const query = this.neo4j.initQuery({ serialiser: how_to_1.HowToDescriptor.model });
|
|
84
|
+
query.queryParams = { ...query.queryParams, howToId: params.howToId };
|
|
85
|
+
query.query = `
|
|
86
|
+
${this.buildDefaultMatch()}
|
|
87
|
+
MATCH (${how_to_meta_1.howToMeta.nodeName})-[:RELATED]-(origin:${how_to_meta_1.howToMeta.labelName} {id: $howToId})
|
|
88
|
+
WHERE (${how_to_meta_1.howToMeta.nodeName}.draft IS NULL OR ${how_to_meta_1.howToMeta.nodeName}.draft = false)
|
|
89
|
+
ORDER BY ${how_to_meta_1.howToMeta.nodeName}.order ASC, ${how_to_meta_1.howToMeta.nodeName}.name ASC
|
|
90
|
+
${this.buildReturnStatement()}
|
|
91
|
+
`;
|
|
92
|
+
return this.neo4j.readMany(query);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Store a RELATED edge (single directed; read undirected by findRelated).
|
|
96
|
+
*/
|
|
97
|
+
async addRelated(params) {
|
|
98
|
+
const query = this.neo4j.initQuery();
|
|
99
|
+
query.queryParams = { ...query.queryParams, howToId: params.howToId, relatedId: params.relatedId };
|
|
100
|
+
query.query = `
|
|
101
|
+
MATCH (a:${how_to_meta_1.howToMeta.labelName} {id: $howToId})
|
|
102
|
+
MATCH (b:${how_to_meta_1.howToMeta.labelName} {id: $relatedId})
|
|
103
|
+
MERGE (a)-[:RELATED]->(b)
|
|
104
|
+
`;
|
|
105
|
+
await this.neo4j.writeOne(query);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Remove a RELATED edge regardless of stored direction.
|
|
109
|
+
*/
|
|
110
|
+
async removeRelated(params) {
|
|
111
|
+
const query = this.neo4j.initQuery();
|
|
112
|
+
query.queryParams = { ...query.queryParams, howToId: params.howToId, relatedId: params.relatedId };
|
|
113
|
+
query.query = `
|
|
114
|
+
MATCH (a:${how_to_meta_1.howToMeta.labelName} {id: $howToId})-[r:RELATED]-(b:${how_to_meta_1.howToMeta.labelName} {id: $relatedId})
|
|
115
|
+
DELETE r
|
|
116
|
+
`;
|
|
117
|
+
await this.neo4j.writeOne(query);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Every HowTo, unpaginated — used by the reindex pass.
|
|
121
|
+
*/
|
|
122
|
+
async findAllHowTos() {
|
|
47
123
|
const query = this.neo4j.initQuery({ serialiser: how_to_1.HowToDescriptor.model });
|
|
48
124
|
query.query = `
|
|
49
125
|
${this.buildDefaultMatch()}
|
|
50
|
-
WHERE ${how_to_meta_1.howToMeta.nodeName}.helpContentSlug IS NOT NULL
|
|
51
126
|
${this.buildReturnStatement()}
|
|
52
127
|
`;
|
|
53
128
|
return this.neo4j.readMany(query);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"how-to.repository.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/repositories/how-to.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAAwC;AAExC,2FAAuF;AACvF,8EAA0E;AAC1E,uFAAmF;AACnF,+CAA4D;AAC5D,yDAAoD;AAG7C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,wCAA+D;IAGlG,YAAY,KAAmB,EAAE,eAAgC,EAAE,UAAsB;QACvF,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;QAHzB,eAAU,GAAG,wBAAe,CAAC;IAIhD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0C;QAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAErC,KAAK,CAAC,WAAW,GAAG;YAClB,GAAG,KAAK,CAAC,WAAW;YACpB,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC;QAEF,KAAK,CAAC,KAAK,GAAG;eACH,uBAAS,CAAC,QAAQ,IAAI,uBAAS,CAAC,SAAS;YAC5C,uBAAS,CAAC,QAAQ,0BAA0B,uBAAS,CAAC,QAAQ;KACrE,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"how-to.repository.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/repositories/how-to.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAAwC;AAExC,2FAAuF;AACvF,8EAA0E;AAC1E,uFAAmF;AACnF,+CAA4D;AAC5D,yDAAoD;AAG7C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,wCAA+D;IAGlG,YAAY,KAAmB,EAAE,eAAgC,EAAE,UAAsB;QACvF,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;QAHzB,eAAU,GAAG,wBAAe,CAAC;IAIhD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0C;QAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAErC,KAAK,CAAC,WAAW,GAAG;YAClB,GAAG,KAAK,CAAC,WAAW;YACpB,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,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} from "../../../core/blocknote/services/blocknote.service";
|
|
7
7
|
import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service";
|
|
8
8
|
import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service";
|
|
9
|
+
import { AppLoggingService } from "../../../core/logging/services/logging.service";
|
|
9
10
|
import { WebSocketService } from "../../../core/websocket/services/websocket.service";
|
|
10
11
|
import { ChunkRepository } from "../../chunk/repositories/chunk.repository";
|
|
11
12
|
import { ChunkService } from "../../chunk/services/chunk.service";
|
|
@@ -20,9 +21,10 @@ export declare class HowToService extends AbstractService<HowTo, typeof HowToDes
|
|
|
20
21
|
private readonly webSocketService;
|
|
21
22
|
private readonly chunkRepository;
|
|
22
23
|
private readonly chunkQueue;
|
|
24
|
+
private readonly logger;
|
|
23
25
|
protected readonly descriptor: import("../../..").EntityDescriptor<HowTo, {}>;
|
|
24
26
|
private readonly jobNames;
|
|
25
|
-
constructor(jsonApiService: JsonApiService, howToRepository: HowToRepository, clsService: ClsService, chunkService: ChunkService, chunkerService: ChunkerService, blockNoteService: BlockNoteService, webSocketService: WebSocketService, chunkRepository: ChunkRepository, chunkQueue: Queue, configService: ConfigService<BaseConfigInterface
|
|
27
|
+
constructor(jsonApiService: JsonApiService, howToRepository: HowToRepository, clsService: ClsService, chunkService: ChunkService, chunkerService: ChunkerService, blockNoteService: BlockNoteService, webSocketService: WebSocketService, chunkRepository: ChunkRepository, chunkQueue: Queue, configService: ConfigService<BaseConfigInterface>, logger: AppLoggingService);
|
|
26
28
|
/**
|
|
27
29
|
* Queue a HowTo for AI processing.
|
|
28
30
|
* Converts BlockNote JSON to Markdown, then delegates to _chunkAndQueue.
|
|
@@ -32,17 +34,36 @@ export declare class HowToService extends AbstractService<HowTo, typeof HowToDes
|
|
|
32
34
|
description: string;
|
|
33
35
|
}): Promise<void>;
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
36
|
-
* Used by the help-content sync — bypasses the BlockNote conversion.
|
|
37
|
+
* Private: mark in-progress, delete prior chunks, chunk the markdown, enqueue jobs.
|
|
37
38
|
*/
|
|
38
|
-
|
|
39
|
+
private _chunkAndQueue;
|
|
40
|
+
findPublishedList(params: {
|
|
41
|
+
query: any;
|
|
42
|
+
howToType?: string;
|
|
43
|
+
}): Promise<any>;
|
|
44
|
+
findPublishedArticle(params: {
|
|
45
|
+
howToType: string;
|
|
46
|
+
slug: string;
|
|
47
|
+
}): Promise<any>;
|
|
48
|
+
findRelatedList(params: {
|
|
49
|
+
howToType: string;
|
|
50
|
+
slug: string;
|
|
51
|
+
query: any;
|
|
52
|
+
}): Promise<any>;
|
|
53
|
+
addRelated(params: {
|
|
54
|
+
howToId: string;
|
|
55
|
+
relatedId: string;
|
|
56
|
+
}): Promise<any>;
|
|
57
|
+
removeRelated(params: {
|
|
39
58
|
howToId: string;
|
|
40
|
-
|
|
59
|
+
relatedId: string;
|
|
41
60
|
}): Promise<void>;
|
|
42
61
|
/**
|
|
43
|
-
*
|
|
62
|
+
* Re-chunk every HowTo (seeded nodes get no chunks from a raw-Cypher migration).
|
|
63
|
+
* Per-item failures (e.g. legacy plain-text descriptions that are not BlockNote JSON)
|
|
64
|
+
* are logged and skipped, never silently dropped.
|
|
44
65
|
*/
|
|
45
|
-
|
|
66
|
+
reindexAll(): Promise<void>;
|
|
46
67
|
/**
|
|
47
68
|
* Update AI status and broadcast progress via WebSocket.
|
|
48
69
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"how-to.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/services/how-to.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC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,GAAG,OAAO,CAAC,GAAG,CAAC;IAKxE,aAAa,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlF;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBjC;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA2BhF"}
|
|
@@ -22,7 +22,9 @@ const ai_status_1 = require("../../../common/enums/ai.status");
|
|
|
22
22
|
const queue_id_1 = require("../../../config/enums/queue.id");
|
|
23
23
|
const blocknote_service_1 = require("../../../core/blocknote/services/blocknote.service");
|
|
24
24
|
const jsonapi_service_1 = require("../../../core/jsonapi/services/jsonapi.service");
|
|
25
|
+
const jsonapi_paginator_1 = require("../../../core/jsonapi/serialisers/jsonapi.paginator");
|
|
25
26
|
const abstract_service_1 = require("../../../core/neo4j/abstracts/abstract.service");
|
|
27
|
+
const logging_service_1 = require("../../../core/logging/services/logging.service");
|
|
26
28
|
const websocket_service_1 = require("../../../core/websocket/services/websocket.service");
|
|
27
29
|
const chunk_repository_1 = require("../../chunk/repositories/chunk.repository");
|
|
28
30
|
const chunk_service_1 = require("../../chunk/services/chunk.service");
|
|
@@ -31,7 +33,7 @@ const how_to_1 = require("../entities/how-to");
|
|
|
31
33
|
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
32
34
|
const how_to_repository_1 = require("../repositories/how-to.repository");
|
|
33
35
|
let HowToService = class HowToService extends abstract_service_1.AbstractService {
|
|
34
|
-
constructor(jsonApiService, howToRepository, clsService, chunkService, chunkerService, blockNoteService, webSocketService, chunkRepository, chunkQueue, configService) {
|
|
36
|
+
constructor(jsonApiService, howToRepository, clsService, chunkService, chunkerService, blockNoteService, webSocketService, chunkRepository, chunkQueue, configService, logger) {
|
|
35
37
|
super(jsonApiService, howToRepository, clsService, how_to_1.HowToDescriptor.model);
|
|
36
38
|
this.howToRepository = howToRepository;
|
|
37
39
|
this.chunkService = chunkService;
|
|
@@ -40,6 +42,7 @@ let HowToService = class HowToService extends abstract_service_1.AbstractService
|
|
|
40
42
|
this.webSocketService = webSocketService;
|
|
41
43
|
this.chunkRepository = chunkRepository;
|
|
42
44
|
this.chunkQueue = chunkQueue;
|
|
45
|
+
this.logger = logger;
|
|
43
46
|
this.descriptor = how_to_1.HowToDescriptor;
|
|
44
47
|
this.jobNames = configService.get("jobNames", { infer: true }) ?? { process: {}, notifications: {} };
|
|
45
48
|
}
|
|
@@ -51,13 +54,6 @@ let HowToService = class HowToService extends abstract_service_1.AbstractService
|
|
|
51
54
|
const markdown = this.blockNoteService.convertToMarkdown({ nodes: JSON.parse(params.description) });
|
|
52
55
|
await this._chunkAndQueue({ howToId: params.howToId, markdown });
|
|
53
56
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Queue a HowTo for AI processing from pre-rendered markdown.
|
|
56
|
-
* Used by the help-content sync — bypasses the BlockNote conversion.
|
|
57
|
-
*/
|
|
58
|
-
async queueHowToForProcessingFromMarkdown(params) {
|
|
59
|
-
await this._chunkAndQueue(params);
|
|
60
|
-
}
|
|
61
57
|
/**
|
|
62
58
|
* Private: mark in-progress, delete prior chunks, chunk the markdown, enqueue jobs.
|
|
63
59
|
*/
|
|
@@ -93,6 +89,60 @@ let HowToService = class HowToService extends abstract_service_1.AbstractService
|
|
|
93
89
|
});
|
|
94
90
|
}
|
|
95
91
|
}
|
|
92
|
+
async findPublishedList(params) {
|
|
93
|
+
const paginator = new jsonapi_paginator_1.JsonApiPaginator(params.query);
|
|
94
|
+
const data = await this.howToRepository.findPublished({ howToType: params.howToType });
|
|
95
|
+
return this.jsonApiService.buildList(how_to_1.HowToDescriptor.model, data, paginator);
|
|
96
|
+
}
|
|
97
|
+
async findPublishedArticle(params) {
|
|
98
|
+
const data = await this.howToRepository.findPublishedByTypeAndSlug(params);
|
|
99
|
+
if (!data) {
|
|
100
|
+
throw new common_1.NotFoundException(`HowTo ${params.howToType}/${params.slug} not found`);
|
|
101
|
+
}
|
|
102
|
+
return this.jsonApiService.buildSingle(how_to_1.HowToDescriptor.model, data);
|
|
103
|
+
}
|
|
104
|
+
async findRelatedList(params) {
|
|
105
|
+
const article = await this.howToRepository.findPublishedByTypeAndSlug({
|
|
106
|
+
howToType: params.howToType,
|
|
107
|
+
slug: params.slug,
|
|
108
|
+
});
|
|
109
|
+
if (!article) {
|
|
110
|
+
throw new common_1.NotFoundException(`HowTo ${params.howToType}/${params.slug} not found`);
|
|
111
|
+
}
|
|
112
|
+
const paginator = new jsonapi_paginator_1.JsonApiPaginator(params.query);
|
|
113
|
+
const data = await this.howToRepository.findRelated({ howToId: article.id });
|
|
114
|
+
return this.jsonApiService.buildList(how_to_1.HowToDescriptor.model, data, paginator);
|
|
115
|
+
}
|
|
116
|
+
async addRelated(params) {
|
|
117
|
+
await this.howToRepository.addRelated(params);
|
|
118
|
+
return this.findById({ id: params.howToId });
|
|
119
|
+
}
|
|
120
|
+
async removeRelated(params) {
|
|
121
|
+
await this.howToRepository.removeRelated(params);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Re-chunk every HowTo (seeded nodes get no chunks from a raw-Cypher migration).
|
|
125
|
+
* Per-item failures (e.g. legacy plain-text descriptions that are not BlockNote JSON)
|
|
126
|
+
* are logged and skipped, never silently dropped.
|
|
127
|
+
*/
|
|
128
|
+
async reindexAll() {
|
|
129
|
+
const all = await this.howToRepository.findAllHowTos();
|
|
130
|
+
let queued = 0;
|
|
131
|
+
let failed = 0;
|
|
132
|
+
for (const howTo of all) {
|
|
133
|
+
if (!howTo.description)
|
|
134
|
+
continue;
|
|
135
|
+
try {
|
|
136
|
+
await this.queueHowToForProcessing({ howToId: howTo.id, description: howTo.description });
|
|
137
|
+
queued++;
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
failed++;
|
|
141
|
+
this.logger.warn(`reindexAll: skipped HowTo ${howTo.id}: ${error?.message ?? error}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
this.logger.log(`HowTo reindex done — total=${all.length} queued=${queued} failed=${failed}`);
|
|
145
|
+
}
|
|
96
146
|
/**
|
|
97
147
|
* Update AI status and broadcast progress via WebSocket.
|
|
98
148
|
*/
|
|
@@ -136,6 +186,7 @@ exports.HowToService = HowToService = __decorate([
|
|
|
136
186
|
websocket_service_1.WebSocketService,
|
|
137
187
|
chunk_repository_1.ChunkRepository,
|
|
138
188
|
bullmq_2.Queue,
|
|
139
|
-
config_1.ConfigService
|
|
189
|
+
config_1.ConfigService,
|
|
190
|
+
logging_service_1.AppLoggingService])
|
|
140
191
|
], HowToService);
|
|
141
192
|
//# sourceMappingURL=how-to.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"how-to.service.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/services/how-to.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"how-to.service.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/services/how-to.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6C;AAC7C,2CAA+D;AAC/D,2CAA+C;AAC/C,mCAA+B;AAC/B,2CAAwC;AACxC,+DAA2D;AAG3D,6DAAyD;AACzD,0FAAsF;AACtF,oFAAgF;AAChF,2FAAuF;AACvF,qFAAiF;AACjF,oFAAmF;AACnF,0FAAsF;AAEtF,gFAA4E;AAC5E,sEAAkE;AAClE,4EAAwE;AACxE,+CAA4D;AAC5D,yDAAoD;AACpD,yEAAoE;AAG7D,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,kCAA4D;IAI5F,YACE,cAA8B,EACb,eAAgC,EACjD,UAAsB,EACL,YAA0B,EAC1B,cAA8B,EAC9B,gBAAkC,EACl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":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -47,5 +47,4 @@ __exportStar(require("./tokenusage"), exports);
|
|
|
47
47
|
__exportStar(require("./two-factor"), exports);
|
|
48
48
|
__exportStar(require("./user"), exports);
|
|
49
49
|
__exportStar(require("./rbac"), exports);
|
|
50
|
-
__exportStar(require("./help-content-sync"), exports);
|
|
51
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carlonicora/nestjs-neo4jsonapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.79.0",
|
|
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",
|
|
@@ -47,10 +47,6 @@
|
|
|
47
47
|
"./bootstrap": {
|
|
48
48
|
"types": "./dist/bootstrap/index.d.ts",
|
|
49
49
|
"default": "./dist/bootstrap/index.js"
|
|
50
|
-
},
|
|
51
|
-
"./help-content-build": {
|
|
52
|
-
"types": "./dist/tools/help-content-build/index.d.ts",
|
|
53
|
-
"default": "./dist/tools/help-content-build/index.js"
|
|
54
50
|
}
|
|
55
51
|
},
|
|
56
52
|
"scripts": {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DynamicModule } from "@nestjs/common";
|
|
2
|
-
import { HelpContentConfig } from "./interfaces/help-content-config.interface";
|
|
3
|
-
export declare class HelpContentSyncModule {
|
|
4
|
-
static forRoot(config: HelpContentConfig): DynamicModule;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=help-content-sync.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-content-sync.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/help-content-sync/help-content-sync.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAKvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAI/E,qBACa,qBAAqB;IAChC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,iBAAiB,GAAG,aAAa;CAWzD"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var HelpContentSyncModule_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.HelpContentSyncModule = void 0;
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
const conditional_service_decorator_1 = require("../../common/decorators/conditional-service.decorator");
|
|
13
|
-
const redis_module_1 = require("../../core/redis/redis.module");
|
|
14
|
-
const how_to_module_1 = require("../how-to/how-to.module");
|
|
15
|
-
const tokens_1 = require("./tokens");
|
|
16
|
-
const help_content_sync_service_1 = require("./services/help-content-sync.service");
|
|
17
|
-
const mdx_to_markdown_service_1 = require("./services/mdx-to-markdown.service");
|
|
18
|
-
let HelpContentSyncModule = HelpContentSyncModule_1 = class HelpContentSyncModule {
|
|
19
|
-
static forRoot(config) {
|
|
20
|
-
return {
|
|
21
|
-
module: HelpContentSyncModule_1,
|
|
22
|
-
imports: [redis_module_1.RedisModule, how_to_module_1.HowToModule],
|
|
23
|
-
providers: [
|
|
24
|
-
{ provide: tokens_1.HELP_CONTENT_CONFIG_TOKEN, useValue: config },
|
|
25
|
-
(0, conditional_service_decorator_1.createWorkerProvider)(mdx_to_markdown_service_1.MdxToMarkdownService),
|
|
26
|
-
(0, conditional_service_decorator_1.createWorkerProvider)(help_content_sync_service_1.HelpContentSyncService),
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.HelpContentSyncModule = HelpContentSyncModule;
|
|
32
|
-
exports.HelpContentSyncModule = HelpContentSyncModule = HelpContentSyncModule_1 = __decorate([
|
|
33
|
-
(0, common_1.Module)({})
|
|
34
|
-
], HelpContentSyncModule);
|
|
35
|
-
//# sourceMappingURL=help-content-sync.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-content-sync.module.js","sourceRoot":"","sources":["../../../src/foundations/help-content-sync/help-content-sync.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,yGAA6F;AAC7F,gEAA4D;AAC5D,2DAAsD;AACtD,qCAAqD;AAErD,oFAA8E;AAC9E,gFAA0E;AAGnE,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAChC,MAAM,CAAC,OAAO,CAAC,MAAyB;QACtC,OAAO;YACL,MAAM,EAAE,uBAAqB;YAC7B,OAAO,EAAE,CAAC,0BAAW,EAAE,2BAAW,CAAC;YACnC,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,kCAAyB,EAAE,QAAQ,EAAE,MAAM,EAAE;gBACxD,IAAA,oDAAoB,EAAC,8CAAoB,CAAC;gBAC1C,IAAA,oDAAoB,EAAC,kDAAsB,CAAC;aAC7C;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAZY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,qBAAqB,CAYjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-help-content-reader.d.ts","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/helpers/create-help-content-reader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAE5G"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createHelpContentReader = createHelpContentReader;
|
|
4
|
-
const promises_1 = require("node:fs/promises");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
6
|
-
function createHelpContentReader(opts) {
|
|
7
|
-
return async (article) => (0, promises_1.readFile)((0, node_path_1.join)(opts.srcRoot, article.path), "utf8");
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=create-help-content-reader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-help-content-reader.js","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/helpers/create-help-content-reader.ts"],"names":[],"mappings":";;AAIA,0DAEC;AAND,+CAA4C;AAC5C,yCAAiC;AAGjC,SAAgB,uBAAuB,CAAC,IAAyB;IAC/D,OAAO,KAAK,EAAE,OAAoB,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,IAAA,gBAAI,EAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAC5F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"to-content-id.d.ts","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/helpers/to-content-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAEvF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toContentId = toContentId;
|
|
4
|
-
const uuid_1 = require("uuid");
|
|
5
|
-
function toContentId(mode, slug, namespaceUuid) {
|
|
6
|
-
return (0, uuid_1.v5)(`${mode}/${slug}`, namespaceUuid);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=to-content-id.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"to-content-id.js","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/helpers/to-content-id.ts"],"names":[],"mappings":";;AAGA,kCAEC;AALD,+BAAoC;AAGpC,SAAgB,WAAW,CAAC,IAAc,EAAE,IAAY,EAAE,aAAqB;IAC7E,OAAO,IAAA,SAAM,EAAC,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,aAAa,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./interfaces/help-article.interface";
|
|
2
|
-
export * from "./interfaces/help-content-config.interface";
|
|
3
|
-
export { helpFrontmatterSchema, type HelpFrontmatter } from "./schema/frontmatter.schema";
|
|
4
|
-
export { toContentId } from "./helpers/to-content-id";
|
|
5
|
-
export { createHelpContentReader } from "./helpers/create-help-content-reader";
|
|
6
|
-
export { HelpContentSyncModule } from "./help-content-sync.module";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/help-content-sync/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.HelpContentSyncModule = exports.createHelpContentReader = exports.toContentId = exports.helpFrontmatterSchema = void 0;
|
|
18
|
-
__exportStar(require("./interfaces/help-article.interface"), exports);
|
|
19
|
-
__exportStar(require("./interfaces/help-content-config.interface"), exports);
|
|
20
|
-
var frontmatter_schema_1 = require("./schema/frontmatter.schema");
|
|
21
|
-
Object.defineProperty(exports, "helpFrontmatterSchema", { enumerable: true, get: function () { return frontmatter_schema_1.helpFrontmatterSchema; } });
|
|
22
|
-
var to_content_id_1 = require("./helpers/to-content-id");
|
|
23
|
-
Object.defineProperty(exports, "toContentId", { enumerable: true, get: function () { return to_content_id_1.toContentId; } });
|
|
24
|
-
var create_help_content_reader_1 = require("./helpers/create-help-content-reader");
|
|
25
|
-
Object.defineProperty(exports, "createHelpContentReader", { enumerable: true, get: function () { return create_help_content_reader_1.createHelpContentReader; } });
|
|
26
|
-
var help_content_sync_module_1 = require("./help-content-sync.module");
|
|
27
|
-
Object.defineProperty(exports, "HelpContentSyncModule", { enumerable: true, get: function () { return help_content_sync_module_1.HelpContentSyncModule; } });
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/help-content-sync/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,6EAA2D;AAC3D,kEAA0F;AAAjF,2HAAA,qBAAqB,OAAA;AAC9B,yDAAsD;AAA7C,4GAAA,WAAW,OAAA;AACpB,mFAA+E;AAAtE,qIAAA,uBAAuB,OAAA;AAChC,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare const HELP_MODES: readonly ["tutorial", "how-to", "reference", "explanation"];
|
|
2
|
-
export type HelpMode = (typeof HELP_MODES)[number];
|
|
3
|
-
export interface HelpHeading {
|
|
4
|
-
depth: 2 | 3;
|
|
5
|
-
slug: string;
|
|
6
|
-
text: string;
|
|
7
|
-
}
|
|
8
|
-
export interface HelpArticle {
|
|
9
|
-
id: string;
|
|
10
|
-
slug: string;
|
|
11
|
-
mode: HelpMode;
|
|
12
|
-
title: string;
|
|
13
|
-
summary: string;
|
|
14
|
-
order: number;
|
|
15
|
-
tags: readonly string[];
|
|
16
|
-
contextualKeys: readonly string[];
|
|
17
|
-
aiIndexed: boolean;
|
|
18
|
-
draft: boolean;
|
|
19
|
-
contentHash: string;
|
|
20
|
-
path: string;
|
|
21
|
-
headings: readonly HelpHeading[];
|
|
22
|
-
relatedSlugs: readonly string[];
|
|
23
|
-
lastUpdated: string;
|
|
24
|
-
}
|
|
25
|
-
export interface HelpRedirect {
|
|
26
|
-
from: string;
|
|
27
|
-
to: string;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=help-article.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-article.interface.d.ts","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/interfaces/help-article.interface.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,6DAA8D,CAAC;AACtF,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-article.interface.js","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/interfaces/help-article.interface.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,CAAU,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HelpArticle, HelpRedirect } from "./help-article.interface";
|
|
2
|
-
export interface HelpContentConfig {
|
|
3
|
-
manifest: readonly HelpArticle[];
|
|
4
|
-
readRawMarkdown: (article: HelpArticle) => Promise<string>;
|
|
5
|
-
namespaceUuid: string;
|
|
6
|
-
redirects?: readonly HelpRedirect[];
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=help-content-config.interface.d.ts.map
|
package/dist/foundations/help-content-sync/interfaces/help-content-config.interface.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-content-config.interface.d.ts","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/interfaces/help-content-config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;CACrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-content-config.interface.js","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/interfaces/help-content-config.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const helpFrontmatterSchema: z.ZodObject<{
|
|
3
|
-
title: z.ZodString;
|
|
4
|
-
mode: z.ZodEnum<{
|
|
5
|
-
reference: "reference";
|
|
6
|
-
tutorial: "tutorial";
|
|
7
|
-
"how-to": "how-to";
|
|
8
|
-
explanation: "explanation";
|
|
9
|
-
}>;
|
|
10
|
-
order: z.ZodNumber;
|
|
11
|
-
summary: z.ZodString;
|
|
12
|
-
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
13
|
-
contextual_keys: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
14
|
-
ai_indexed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
15
|
-
draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
16
|
-
related: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export type HelpFrontmatter = z.infer<typeof helpFrontmatterSchema>;
|
|
19
|
-
//# sourceMappingURL=frontmatter.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatter.schema.d.ts","sourceRoot":"","sources":["../../../../src/foundations/help-content-sync/schema/frontmatter.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;iBAahC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|