@carlonicora/nestjs-neo4jsonapi 1.73.0 → 1.74.1
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/core/blocknote/blocknote.module.d.ts +1 -0
- package/dist/core/blocknote/blocknote.module.d.ts.map +1 -1
- package/dist/core/blocknote/blocknote.module.js +4 -2
- package/dist/core/blocknote/blocknote.module.js.map +1 -1
- package/dist/core/blocknote/index.d.ts +1 -0
- package/dist/core/blocknote/index.d.ts.map +1 -1
- package/dist/core/blocknote/index.js +1 -0
- package/dist/core/blocknote/index.js.map +1 -1
- package/dist/core/blocknote/services/blocknote-to-docx.service.d.ts +55 -0
- package/dist/core/blocknote/services/blocknote-to-docx.service.d.ts.map +1 -0
- package/dist/core/blocknote/services/blocknote-to-docx.service.js +903 -0
- package/dist/core/blocknote/services/blocknote-to-docx.service.js.map +1 -0
- package/dist/core/document/document.module.d.ts +25 -0
- package/dist/core/document/document.module.d.ts.map +1 -0
- package/dist/core/document/document.module.js +46 -0
- package/dist/core/document/document.module.js.map +1 -0
- package/dist/core/document/index.d.ts +6 -0
- package/dist/core/document/index.d.ts.map +1 -0
- package/dist/core/document/index.js +22 -0
- package/dist/core/document/index.js.map +1 -0
- package/dist/core/document/services/abstract-document-generator.service.d.ts +90 -0
- package/dist/core/document/services/abstract-document-generator.service.d.ts.map +1 -0
- package/dist/core/document/services/abstract-document-generator.service.js +120 -0
- package/dist/core/document/services/abstract-document-generator.service.js.map +1 -0
- package/dist/core/document/services/docx-template.service.d.ts +36 -0
- package/dist/core/document/services/docx-template.service.d.ts.map +1 -0
- package/dist/core/document/services/docx-template.service.js +58 -0
- package/dist/core/document/services/docx-template.service.js.map +1 -0
- package/dist/core/document/utils/inject-draft-watermark.d.ts +24 -0
- package/dist/core/document/utils/inject-draft-watermark.d.ts.map +1 -0
- package/dist/core/document/utils/inject-draft-watermark.js +182 -0
- package/dist/core/document/utils/inject-draft-watermark.js.map +1 -0
- package/dist/core/document/utils/inject-xml.d.ts +15 -0
- package/dist/core/document/utils/inject-xml.d.ts.map +1 -0
- package/dist/core/document/utils/inject-xml.js +35 -0
- package/dist/core/document/utils/inject-xml.js.map +1 -0
- package/dist/core/pdf/index.d.ts +3 -0
- package/dist/core/pdf/index.d.ts.map +1 -0
- package/dist/core/pdf/index.js +19 -0
- package/dist/core/pdf/index.js.map +1 -0
- package/dist/core/pdf/pdf.module.d.ts +21 -0
- package/dist/core/pdf/pdf.module.d.ts.map +1 -0
- package/dist/core/pdf/pdf.module.js +39 -0
- package/dist/core/pdf/pdf.module.js.map +1 -0
- package/dist/core/pdf/services/docx-to-pdf.service.d.ts +28 -0
- package/dist/core/pdf/services/docx-to-pdf.service.d.ts.map +1 -0
- package/dist/core/pdf/services/docx-to-pdf.service.js +86 -0
- package/dist/core/pdf/services/docx-to-pdf.service.js.map +1 -0
- package/dist/foundations/stripe/__tests__/mocks/stripe.mock.d.ts +62 -62
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +23 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocknote.module.d.ts","sourceRoot":"","sources":["../../../src/core/blocknote/blocknote.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blocknote.module.d.ts","sourceRoot":"","sources":["../../../src/core/blocknote/blocknote.module.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAIa,eAAe;CAAG"}
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.BlockNoteModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const blocknote_service_1 = require("./services/blocknote.service");
|
|
12
|
+
const blocknote_to_docx_service_1 = require("./services/blocknote-to-docx.service");
|
|
12
13
|
/**
|
|
13
14
|
* BlockNote Module
|
|
14
15
|
*
|
|
@@ -19,6 +20,7 @@ const blocknote_service_1 = require("./services/blocknote.service");
|
|
|
19
20
|
* - Convert Markdown to BlockNote JSON
|
|
20
21
|
* - Support for rich text formatting
|
|
21
22
|
* - Support for lists and code blocks
|
|
23
|
+
* - Convert BlockNote templates to DOCX buffers (Node-side)
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
26
|
* ```typescript
|
|
@@ -33,8 +35,8 @@ let BlockNoteModule = class BlockNoteModule {
|
|
|
33
35
|
exports.BlockNoteModule = BlockNoteModule;
|
|
34
36
|
exports.BlockNoteModule = BlockNoteModule = __decorate([
|
|
35
37
|
(0, common_1.Module)({
|
|
36
|
-
providers: [blocknote_service_1.BlockNoteService],
|
|
37
|
-
exports: [blocknote_service_1.BlockNoteService],
|
|
38
|
+
providers: [blocknote_service_1.BlockNoteService, blocknote_to_docx_service_1.BlockNoteToDocxService],
|
|
39
|
+
exports: [blocknote_service_1.BlockNoteService, blocknote_to_docx_service_1.BlockNoteToDocxService],
|
|
38
40
|
})
|
|
39
41
|
], BlockNoteModule);
|
|
40
42
|
//# sourceMappingURL=blocknote.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocknote.module.js","sourceRoot":"","sources":["../../../src/core/blocknote/blocknote.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oEAAgE;
|
|
1
|
+
{"version":3,"file":"blocknote.module.js","sourceRoot":"","sources":["../../../src/core/blocknote/blocknote.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oEAAgE;AAChE,oFAA8E;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AAKI,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,oCAAgB,EAAE,kDAAsB,CAAC;QACrD,OAAO,EAAE,CAAC,oCAAgB,EAAE,kDAAsB,CAAC;KACpD,CAAC;GACW,eAAe,CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/blocknote/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/blocknote/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC"}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./blocknote.module"), exports);
|
|
18
18
|
__exportStar(require("./services/blocknote.service"), exports);
|
|
19
|
+
__exportStar(require("./services/blocknote-to-docx.service"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/blocknote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,+DAA6C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/blocknote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,+DAA6C;AAC7C,uEAAqD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface BlockNoteCompanyInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
legal_address?: string;
|
|
4
|
+
fiscal_data?: string;
|
|
5
|
+
/** Preferred logo URL (S3 signed URL or absolute HTTP URL). */
|
|
6
|
+
logoUrl?: string;
|
|
7
|
+
/** Fallback logo field. */
|
|
8
|
+
logo?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface BlockNoteRenderContext {
|
|
11
|
+
/** Document title (rendered as H1). */
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Sections to render. Each section gets an H2 title followed by
|
|
15
|
+
* markdown-parsed content.
|
|
16
|
+
*/
|
|
17
|
+
sections: Array<{
|
|
18
|
+
title: string;
|
|
19
|
+
content: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** Company information for the page header. */
|
|
22
|
+
company: BlockNoteCompanyInfo;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Converts a BlockNote template (JSON-serialized blocks buffer) into a DOCX
|
|
26
|
+
* buffer by:
|
|
27
|
+
* 1. Parsing the BlockNote JSON.
|
|
28
|
+
* 2. Replacing `templateField` inline nodes with values from fieldContext.
|
|
29
|
+
* 3. Converting the resulting blocks to markdown.
|
|
30
|
+
* 4. Rendering markdown into a `docx` Document with company header/footer.
|
|
31
|
+
* 5. Returning the document as a Node.js Buffer.
|
|
32
|
+
*
|
|
33
|
+
* This service is the Node.js equivalent of the browser-side
|
|
34
|
+
* `generateDocxBlob` function in `apps/web/src/lib/export-markdown-to-docx.ts`.
|
|
35
|
+
*/
|
|
36
|
+
export declare class BlockNoteToDocxService {
|
|
37
|
+
/**
|
|
38
|
+
* Render a BlockNote template buffer against a field context and return a
|
|
39
|
+
* DOCX buffer.
|
|
40
|
+
*
|
|
41
|
+
* @param templateBuffer UTF-8 JSON-encoded BlockNote blocks array, OR
|
|
42
|
+
* a pre-rendered markdown string (UTF-8 encoded).
|
|
43
|
+
* When the buffer's content starts with `[` the
|
|
44
|
+
* service treats it as BlockNote JSON; otherwise it
|
|
45
|
+
* is treated as raw markdown.
|
|
46
|
+
* @param fieldContext Must include `title` (string), `company`
|
|
47
|
+
* (BlockNoteCompanyInfo), and any template field
|
|
48
|
+
* values whose keys match the `templateField`
|
|
49
|
+
* `fieldId` / `alias` props in the template blocks.
|
|
50
|
+
* Additional keys are ignored.
|
|
51
|
+
*/
|
|
52
|
+
render(templateBuffer: Buffer, fieldContext: Record<string, unknown>): Promise<Buffer>;
|
|
53
|
+
private _buildDocx;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=blocknote-to-docx.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocknote-to-docx.service.d.ts","sourceRoot":"","sources":["../../../../src/core/blocknote/services/blocknote-to-docx.service.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAKD,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,+CAA+C;IAC/C,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAg3BD;;;;;;;;;;;GAWG;AACH,qBACa,sBAAsB;IACjC;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;YAkC9E,UAAU;CA8EzB"}
|