@breadstone/archipel-mcp 0.0.21 → 0.0.22
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/data/guides/cryptography-and-otp.md +2 -2
- package/data/guides/database-setup.md +4 -3
- package/data/guides/email-templates.md +3 -3
- package/data/guides/getting-started.md +6 -6
- package/data/guides/resource-management.md +9 -9
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_PROVIDER_OPTIONS.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.AZURE_BLOB_PROVIDER_OPTIONS.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.BLOB_PROVIDER.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.VERCEL_BLOB_PROVIDER_OPTIONS.md +1 -1
- package/data/packages/platform-core/api/Class.ErrorTemplateService.md +1 -1
- package/data/packages/platform-core/api/Class.HostService.md +1 -1
- package/data/packages/platform-core/api/Variable.ID_GENERATOR_TOKEN.md +1 -1
- package/data/packages/platform-core/api/index.md +0 -27
- package/data/packages/platform-core/index.md +7 -4
- package/data/packages/platform-cryptography/api/Class.BcryptService.md +4 -4
- package/data/packages/platform-cryptography/api/Class.OtpService.md +6 -6
- package/data/packages/platform-cryptography/api/Variable.BCRYPT_OPTIONS.md +2 -2
- package/data/packages/platform-cryptography/api/Variable.MAX_BCRYPT_PASSWORD_BYTES.md +1 -1
- package/data/packages/platform-cryptography/api/Variable.MIN_BCRYPT_ROUNDS.md +1 -1
- package/data/packages/platform-cryptography/api/Variable.OTP_OPTIONS.md +2 -2
- package/data/packages/platform-cryptography/api/Variable.OTP_SERVICE_TOKEN.md +2 -2
- package/data/packages/platform-cryptography/api/Variable.TOTP_EPOCH_TOLERANCE.md +1 -1
- package/data/packages/platform-cryptography/api/index.md +3 -3
- package/data/packages/platform-documents/api/Class.BaseDocumentRenderer.md +32 -1
- package/data/packages/platform-documents/api/Class.DocumentEngine.md +4 -4
- package/data/packages/platform-documents/api/Class.DocumentModule.md +2 -2
- package/data/packages/platform-documents/api/Class.DocxDocumentRenderer2.md +333 -0
- package/data/packages/platform-documents/api/Class.PdfDocumentRenderer.md +355 -0
- package/data/packages/platform-documents/api/Interface.IDocumentModuleOptions.md +31 -5
- package/data/packages/platform-documents/api/Variable.DOCUMENT_MODULE_OPTIONS.md +1 -1
- package/data/packages/platform-documents/api/Variable.DOCUMENT_PARSER_TOKEN.md +1 -1
- package/data/packages/platform-documents/api/Variable.DOCUMENT_RENDERER_TOKEN.md +1 -1
- package/data/packages/platform-documents/api/Variable.IMAGE_PROCESSOR_TOKEN.md +1 -1
- package/data/packages/platform-documents/api/index.md +2 -0
- package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +1 -1
- package/data/packages/platform-health/index.md +128 -0
- package/data/packages/platform-mailing/api/Class.DeliveryStrategyBase.md +0 -1
- package/data/packages/platform-mailing/api/Class.MailModule.md +1 -1
- package/data/packages/platform-mailing/api/Class.TemplateFetchStrategyBase.md +0 -5
- package/data/packages/platform-mailing/api/Variable.SMTP_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-mailing/api/Variable.SMTP_HOST.md +14 -0
- package/data/packages/platform-mailing/api/Variable.SMTP_PASSWORD.md +14 -0
- package/data/packages/platform-mailing/api/Variable.SMTP_PORT.md +14 -0
- package/data/packages/platform-mailing/api/Variable.SMTP_SECURE.md +14 -0
- package/data/packages/platform-mailing/api/Variable.SMTP_USER.md +14 -0
- package/data/packages/platform-mailing/api/index.md +6 -3
- package/data/packages/platform-mapping/index.md +121 -0
- package/data/packages/platform-mcp/api/Variable.MCP_MODULE_OPTIONS.md +1 -1
- package/data/packages/platform-openapi/api/Class.SwaggerMultiDocumentService.md +4 -4
- package/data/packages/platform-resources/index.md +135 -0
- package/data/packages/platform-telemetry/api/Variable.TELEMETRY_ENABLED.md +1 -1
- package/data/packages/platform-telemetry/api/Variable.TELEMETRY_FACADE.md +1 -1
- package/data/packages/platform-telemetry/api/Variable.TELEMETRY_OPTIONS.md +1 -1
- package/{src/knowledge/configPattern.js → data/patterns/config-pattern.md} +44 -47
- package/{src/knowledge/dtoPattern.js → data/patterns/dto-pattern.md} +58 -61
- package/{src/knowledge/errorHandlingPattern.js → data/patterns/error-handling-pattern.md} +35 -38
- package/{src/knowledge/guardPattern.js → data/patterns/guard-pattern.md} +35 -38
- package/{src/knowledge/mappingPattern.js → data/patterns/mapping-pattern.md} +43 -144
- package/data/patterns/module-pattern.md +182 -0
- package/data/patterns/query-pattern.md +137 -0
- package/data/patterns/repository-pattern.md +208 -0
- package/{src/knowledge/testingPattern.js → data/patterns/testing-pattern.md} +37 -40
- package/package.json +1 -1
- package/src/PatternsLoader.d.ts +12 -0
- package/src/PatternsLoader.js +65 -0
- package/src/generators/mappingPatternGenerator.d.ts +5 -0
- package/src/generators/mappingPatternGenerator.js +107 -0
- package/src/generators/modulePatternGenerator.d.ts +5 -0
- package/src/generators/modulePatternGenerator.js +107 -0
- package/src/generators/queryPatternGenerator.d.ts +4 -0
- package/src/generators/queryPatternGenerator.js +83 -0
- package/src/generators/repositoryPatternGenerator.d.ts +5 -0
- package/src/generators/repositoryPatternGenerator.js +165 -0
- package/src/main.js +15 -9
- package/src/models/IPatternDoc.d.ts +15 -0
- package/src/models/IPatternDoc.js +3 -0
- package/src/tools/registerGetConfigPatternTool.d.ts +2 -1
- package/src/tools/registerGetConfigPatternTool.js +4 -3
- package/src/tools/registerGetDtoPatternTool.d.ts +2 -1
- package/src/tools/registerGetDtoPatternTool.js +4 -3
- package/src/tools/registerGetErrorHandlingPatternTool.d.ts +2 -1
- package/src/tools/registerGetErrorHandlingPatternTool.js +4 -3
- package/src/tools/registerGetGuardPatternTool.d.ts +2 -1
- package/src/tools/registerGetGuardPatternTool.js +4 -3
- package/src/tools/registerGetMappingPatternTool.d.ts +2 -1
- package/src/tools/registerGetMappingPatternTool.js +5 -4
- package/src/tools/registerGetModulePatternTool.d.ts +2 -1
- package/src/tools/registerGetModulePatternTool.js +5 -4
- package/src/tools/registerGetQueryPatternTool.d.ts +2 -1
- package/src/tools/registerGetQueryPatternTool.js +5 -4
- package/src/tools/registerGetRepositoryPatternTool.d.ts +2 -1
- package/src/tools/registerGetRepositoryPatternTool.js +5 -4
- package/src/tools/registerGetTestingPatternTool.d.ts +2 -1
- package/src/tools/registerGetTestingPatternTool.js +4 -3
- package/data/packages/platform-core/api/Class.BlobResourceStrategy.md +0 -195
- package/data/packages/platform-core/api/Class.EmbeddedResourceStrategy.md +0 -215
- package/data/packages/platform-core/api/Class.FileResourceStrategy.md +0 -192
- package/data/packages/platform-core/api/Class.HealthModule.md +0 -42
- package/data/packages/platform-core/api/Class.HealthOrchestrator.md +0 -64
- package/data/packages/platform-core/api/Class.MappingBuilder.md +0 -110
- package/data/packages/platform-core/api/Class.MappingModule.md +0 -46
- package/data/packages/platform-core/api/Class.MappingNotRegisteredError.md +0 -56
- package/data/packages/platform-core/api/Class.MappingProfileBase.md +0 -52
- package/data/packages/platform-core/api/Class.MappingService.md +0 -284
- package/data/packages/platform-core/api/Class.ResourceManager.md +0 -565
- package/data/packages/platform-core/api/Class.ResourceModule.md +0 -46
- package/data/packages/platform-core/api/Class.TypeMappingNotRegisteredError.md +0 -57
- package/data/packages/platform-core/api/Function.createMappingKey.md +0 -39
- package/data/packages/platform-core/api/Interface.IBlobResourceStrategyConfig.md +0 -28
- package/data/packages/platform-core/api/Interface.IBlobServiceAdapter.md +0 -40
- package/data/packages/platform-core/api/Interface.IFileResourceStrategyConfig.md +0 -72
- package/data/packages/platform-core/api/Interface.IHealthCheckResult.md +0 -46
- package/data/packages/platform-core/api/Interface.IHealthIndicator.md +0 -41
- package/data/packages/platform-core/api/Interface.IMappingBuilder.md +0 -76
- package/data/packages/platform-core/api/Interface.IMappingKey.md +0 -58
- package/data/packages/platform-core/api/Interface.IMappingProfile.md +0 -32
- package/data/packages/platform-core/api/Interface.IResourceManagerConfig.md +0 -89
- package/data/packages/platform-core/api/Interface.IResourceMetadata.md +0 -94
- package/data/packages/platform-core/api/Interface.IResourceResult.md +0 -34
- package/data/packages/platform-core/api/Interface.IResourceStrategy.md +0 -134
- package/data/packages/platform-core/api/Variable.HEALTH_INDICATORS_TOKEN.md +0 -14
- package/data/packages/platform-mailing/api/Class.BlobTemplateFetchStrategy.md +0 -60
- package/data/packages/platform-mailing/api/Class.FileTemplateFetchStrategy.md +0 -58
- package/data/packages/platform-mailing/api/Class.LogDeliveryStrategy.md +0 -71
- package/src/knowledge/configPattern.d.ts +0 -5
- package/src/knowledge/dtoPattern.d.ts +0 -5
- package/src/knowledge/errorHandlingPattern.d.ts +0 -5
- package/src/knowledge/guardPattern.d.ts +0 -5
- package/src/knowledge/mappingPattern.d.ts +0 -6
- package/src/knowledge/modulePattern.d.ts +0 -6
- package/src/knowledge/modulePattern.js +0 -283
- package/src/knowledge/queryPattern.d.ts +0 -6
- package/src/knowledge/queryPattern.js +0 -215
- package/src/knowledge/repositoryPattern.d.ts +0 -6
- package/src/knowledge/repositoryPattern.js +0 -367
- package/src/knowledge/testingPattern.d.ts +0 -5
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: PdfDocumentRenderer'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: PdfDocumentRenderer
|
|
7
|
+
|
|
8
|
+
Defined in: [renderer/PdfDocumentRenderer.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/PdfDocumentRenderer.ts#L16)
|
|
9
|
+
|
|
10
|
+
PDF document renderer using pdf-lib.
|
|
11
|
+
Supports placeholder overlay and table rendering.
|
|
12
|
+
|
|
13
|
+
## Extends
|
|
14
|
+
|
|
15
|
+
- [`BaseDocumentRenderer`](Class.BaseDocumentRenderer)
|
|
16
|
+
|
|
17
|
+
## Constructors
|
|
18
|
+
|
|
19
|
+
### Constructor
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
new PdfDocumentRenderer(
|
|
23
|
+
options,
|
|
24
|
+
resourceManager,
|
|
25
|
+
imageProcessor): PdfDocumentRenderer;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:29](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L29)
|
|
29
|
+
|
|
30
|
+
#### Parameters
|
|
31
|
+
|
|
32
|
+
| Parameter | Type | Description |
|
|
33
|
+
| ------ | ------ | ------ |
|
|
34
|
+
| `options` | \{ `debug`: `boolean`; `delimiters`: \{ `end`: `string`; `start`: `string`; \}; `imageProcessor`: \{ \}; `maxImageHeight`: `number`; `maxImageWidth`: `number`; `renderers`: \{ \}[]; \} | - |
|
|
35
|
+
| `options.debug` | `boolean` | Enable debug logging for document processing pipeline. When enabled, detailed logs will be written for: - Parser strategy selection - Template variable replacements - Data object transformations - Renderer processing steps |
|
|
36
|
+
| `options.delimiters` | \{ `end`: `string`; `start`: `string`; \} | Delimiters for template placeholders. |
|
|
37
|
+
| `options.delimiters.end` | `string` | Ending delimiter. **Default** `']]'` |
|
|
38
|
+
| `options.delimiters.start` | `string` | Starting delimiter. **Default** `'[['` |
|
|
39
|
+
| `options.imageProcessor` | \{ \} | Image processor implementation class. Import from `@breadstone/archipel-platform-documents/sharp` for the default Sharp-based processor. |
|
|
40
|
+
| `options.maxImageHeight` | `number` | Maximum image height in pixels. |
|
|
41
|
+
| `options.maxImageWidth` | `number` | Maximum image width in pixels. |
|
|
42
|
+
| `options.renderers` | \{ \}[] | Document renderer implementation classes. Import from `@breadstone/archipel-platform-documents/docx` and `/pdf` for the built-in renderers. |
|
|
43
|
+
| `resourceManager` | `ResourceManager` | - |
|
|
44
|
+
| `imageProcessor` | [`IImageProcessor`](Interface.IImageProcessor) | - |
|
|
45
|
+
|
|
46
|
+
#### Returns
|
|
47
|
+
|
|
48
|
+
`PdfDocumentRenderer`
|
|
49
|
+
|
|
50
|
+
#### Inherited from
|
|
51
|
+
|
|
52
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`constructor`](Class.BaseDocumentRenderer#constructor)
|
|
53
|
+
|
|
54
|
+
## Properties
|
|
55
|
+
|
|
56
|
+
### \_imageProcessor
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
protected readonly _imageProcessor: IImageProcessor;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:23](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L23)
|
|
63
|
+
|
|
64
|
+
#### Inherited from
|
|
65
|
+
|
|
66
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`_imageProcessor`](Class.BaseDocumentRenderer#_imageprocessor)
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
### \_options
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
protected readonly _options: {
|
|
74
|
+
debug: boolean;
|
|
75
|
+
delimiters: {
|
|
76
|
+
end: string;
|
|
77
|
+
start: string;
|
|
78
|
+
};
|
|
79
|
+
imageProcessor: {
|
|
80
|
+
};
|
|
81
|
+
maxImageHeight: number;
|
|
82
|
+
maxImageWidth: number;
|
|
83
|
+
renderers: {
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:21](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L21)
|
|
89
|
+
|
|
90
|
+
#### debug
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
readonly debug: boolean;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Enable debug logging for document processing pipeline.
|
|
97
|
+
When enabled, detailed logs will be written for:
|
|
98
|
+
- Parser strategy selection
|
|
99
|
+
- Template variable replacements
|
|
100
|
+
- Data object transformations
|
|
101
|
+
- Renderer processing steps
|
|
102
|
+
|
|
103
|
+
#### delimiters
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
readonly delimiters: {
|
|
107
|
+
end: string;
|
|
108
|
+
start: string;
|
|
109
|
+
};
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Delimiters for template placeholders.
|
|
113
|
+
|
|
114
|
+
##### delimiters.end
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
readonly end: string;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Ending delimiter.
|
|
121
|
+
|
|
122
|
+
###### Default
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
']]'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
##### delimiters.start
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
readonly start: string;
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Starting delimiter.
|
|
135
|
+
|
|
136
|
+
###### Default
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
'[['
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### imageProcessor
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
readonly imageProcessor: {
|
|
146
|
+
};
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Image processor implementation class.
|
|
150
|
+
Import from `@breadstone/archipel-platform-documents/sharp` for the default Sharp-based processor.
|
|
151
|
+
|
|
152
|
+
#### maxImageHeight
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
readonly maxImageHeight: number;
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Maximum image height in pixels.
|
|
159
|
+
|
|
160
|
+
#### maxImageWidth
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
readonly maxImageWidth: number;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Maximum image width in pixels.
|
|
167
|
+
|
|
168
|
+
#### renderers
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
readonly renderers: {
|
|
172
|
+
}[];
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Document renderer implementation classes.
|
|
176
|
+
Import from `@breadstone/archipel-platform-documents/docx` and `/pdf` for the built-in renderers.
|
|
177
|
+
|
|
178
|
+
#### Inherited from
|
|
179
|
+
|
|
180
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`_options`](Class.BaseDocumentRenderer#_options)
|
|
181
|
+
|
|
182
|
+
***
|
|
183
|
+
|
|
184
|
+
### \_resourceManager
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
protected readonly _resourceManager: ResourceManager;
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:22](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L22)
|
|
191
|
+
|
|
192
|
+
#### Inherited from
|
|
193
|
+
|
|
194
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`_resourceManager`](Class.BaseDocumentRenderer#_resourcemanager)
|
|
195
|
+
|
|
196
|
+
## Accessors
|
|
197
|
+
|
|
198
|
+
### supportedFormats
|
|
199
|
+
|
|
200
|
+
#### Get Signature
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
get supportedFormats(): readonly DocumentFormat[];
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Defined in: [renderer/PdfDocumentRenderer.ts:28](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/PdfDocumentRenderer.ts#L28)
|
|
207
|
+
|
|
208
|
+
Supported document formats.
|
|
209
|
+
|
|
210
|
+
##### Returns
|
|
211
|
+
|
|
212
|
+
readonly [`DocumentFormat`](TypeAlias.DocumentFormat)[]
|
|
213
|
+
|
|
214
|
+
Supported document formats for this renderer.
|
|
215
|
+
|
|
216
|
+
#### Overrides
|
|
217
|
+
|
|
218
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`supportedFormats`](Class.BaseDocumentRenderer#supportedformats)
|
|
219
|
+
|
|
220
|
+
## Methods
|
|
221
|
+
|
|
222
|
+
### createFromScratch()
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
createFromScratch(data): Promise<IRenderResult>;
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Defined in: [renderer/PdfDocumentRenderer.ts:108](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/PdfDocumentRenderer.ts#L108)
|
|
229
|
+
|
|
230
|
+
Create PDF from scratch (no template).
|
|
231
|
+
|
|
232
|
+
#### Parameters
|
|
233
|
+
|
|
234
|
+
| Parameter | Type | Description |
|
|
235
|
+
| ------ | ------ | ------ |
|
|
236
|
+
| `data` | `Record`\<`string`, `unknown`\> | Document data |
|
|
237
|
+
|
|
238
|
+
#### Returns
|
|
239
|
+
|
|
240
|
+
`Promise`\<[`IRenderResult`](Interface.IRenderResult)\>
|
|
241
|
+
|
|
242
|
+
Render result
|
|
243
|
+
|
|
244
|
+
***
|
|
245
|
+
|
|
246
|
+
### isImagePayload()
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
protected isImagePayload(value): boolean;
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:102](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L102)
|
|
253
|
+
|
|
254
|
+
Check if value is an image payload.
|
|
255
|
+
|
|
256
|
+
#### Parameters
|
|
257
|
+
|
|
258
|
+
| Parameter | Type | Description |
|
|
259
|
+
| ------ | ------ | ------ |
|
|
260
|
+
| `value` | `unknown` | Value to check |
|
|
261
|
+
|
|
262
|
+
#### Returns
|
|
263
|
+
|
|
264
|
+
`boolean`
|
|
265
|
+
|
|
266
|
+
True if image payload
|
|
267
|
+
|
|
268
|
+
#### Inherited from
|
|
269
|
+
|
|
270
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`isImagePayload`](Class.BaseDocumentRenderer#isimagepayload)
|
|
271
|
+
|
|
272
|
+
***
|
|
273
|
+
|
|
274
|
+
### preprocessData()
|
|
275
|
+
|
|
276
|
+
```ts
|
|
277
|
+
protected preprocessData(data): Promise<Record<string, unknown>>;
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:64](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L64)
|
|
281
|
+
|
|
282
|
+
Preprocess template data (process images).
|
|
283
|
+
Template syntax processing is handled later by parser.processXml().
|
|
284
|
+
|
|
285
|
+
#### Parameters
|
|
286
|
+
|
|
287
|
+
| Parameter | Type | Description |
|
|
288
|
+
| ------ | ------ | ------ |
|
|
289
|
+
| `data` | `Record`\<`string`, `unknown`\> | Raw template data |
|
|
290
|
+
|
|
291
|
+
#### Returns
|
|
292
|
+
|
|
293
|
+
`Promise`\<`Record`\<`string`, `unknown`\>\>
|
|
294
|
+
|
|
295
|
+
Processed data
|
|
296
|
+
|
|
297
|
+
#### Inherited from
|
|
298
|
+
|
|
299
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`preprocessData`](Class.BaseDocumentRenderer#preprocessdata)
|
|
300
|
+
|
|
301
|
+
***
|
|
302
|
+
|
|
303
|
+
### processImages()
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
protected processImages(data): Promise<Record<string, unknown>>;
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:75](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/abstracts/BaseDocumentRenderer.ts#L75)
|
|
310
|
+
|
|
311
|
+
Process image payloads in data.
|
|
312
|
+
|
|
313
|
+
#### Parameters
|
|
314
|
+
|
|
315
|
+
| Parameter | Type | Description |
|
|
316
|
+
| ------ | ------ | ------ |
|
|
317
|
+
| `data` | `Record`\<`string`, `unknown`\> | Data object |
|
|
318
|
+
|
|
319
|
+
#### Returns
|
|
320
|
+
|
|
321
|
+
`Promise`\<`Record`\<`string`, `unknown`\>\>
|
|
322
|
+
|
|
323
|
+
Data with processed images
|
|
324
|
+
|
|
325
|
+
#### Inherited from
|
|
326
|
+
|
|
327
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`processImages`](Class.BaseDocumentRenderer#processimages)
|
|
328
|
+
|
|
329
|
+
***
|
|
330
|
+
|
|
331
|
+
### render()
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
render(options): Promise<IRenderResult>;
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Defined in: [renderer/PdfDocumentRenderer.ts:39](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/renderer/PdfDocumentRenderer.ts#L39)
|
|
338
|
+
|
|
339
|
+
Render PDF document from template.
|
|
340
|
+
|
|
341
|
+
#### Parameters
|
|
342
|
+
|
|
343
|
+
| Parameter | Type | Description |
|
|
344
|
+
| ------ | ------ | ------ |
|
|
345
|
+
| `options` | [`IRenderOptions`](Interface.IRenderOptions) | Render options |
|
|
346
|
+
|
|
347
|
+
#### Returns
|
|
348
|
+
|
|
349
|
+
`Promise`\<[`IRenderResult`](Interface.IRenderResult)\>
|
|
350
|
+
|
|
351
|
+
Render result
|
|
352
|
+
|
|
353
|
+
#### Overrides
|
|
354
|
+
|
|
355
|
+
[`BaseDocumentRenderer`](Class.BaseDocumentRenderer).[`render`](Class.BaseDocumentRenderer#render)
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: IDocumentModuleOptions
|
|
7
7
|
|
|
8
|
-
Defined in: [DocumentModule.ts:
|
|
8
|
+
Defined in: [DocumentModule.ts:14](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L14)
|
|
9
9
|
|
|
10
10
|
Configuration options for the DocumentModule.
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ Configuration options for the DocumentModule.
|
|
|
17
17
|
readonly optional debug?: boolean;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Defined in: [DocumentModule.ts:
|
|
20
|
+
Defined in: [DocumentModule.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L49)
|
|
21
21
|
|
|
22
22
|
Enable debug logging for document processing pipeline.
|
|
23
23
|
When enabled, detailed logs will be written for:
|
|
@@ -37,7 +37,7 @@ readonly optional delimiters?: {
|
|
|
37
37
|
};
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Defined in: [DocumentModule.ts:
|
|
40
|
+
Defined in: [DocumentModule.ts:28](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L28)
|
|
41
41
|
|
|
42
42
|
Delimiters for template placeholders.
|
|
43
43
|
|
|
@@ -71,13 +71,26 @@ Starting delimiter.
|
|
|
71
71
|
|
|
72
72
|
***
|
|
73
73
|
|
|
74
|
+
### imageProcessor
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
readonly imageProcessor: Type<IImageProcessor>;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Defined in: [DocumentModule.ts:55](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L55)
|
|
81
|
+
|
|
82
|
+
Image processor implementation class.
|
|
83
|
+
Import from `@breadstone/archipel-platform-documents/sharp` for the default Sharp-based processor.
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
74
87
|
### maxImageHeight?
|
|
75
88
|
|
|
76
89
|
```ts
|
|
77
90
|
readonly optional maxImageHeight?: number;
|
|
78
91
|
```
|
|
79
92
|
|
|
80
|
-
Defined in: [DocumentModule.ts:
|
|
93
|
+
Defined in: [DocumentModule.ts:23](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L23)
|
|
81
94
|
|
|
82
95
|
Maximum image height in pixels.
|
|
83
96
|
|
|
@@ -89,6 +102,19 @@ Maximum image height in pixels.
|
|
|
89
102
|
readonly optional maxImageWidth?: number;
|
|
90
103
|
```
|
|
91
104
|
|
|
92
|
-
Defined in: [DocumentModule.ts:
|
|
105
|
+
Defined in: [DocumentModule.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L18)
|
|
93
106
|
|
|
94
107
|
Maximum image width in pixels.
|
|
108
|
+
|
|
109
|
+
***
|
|
110
|
+
|
|
111
|
+
### renderers
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
readonly renderers: Type<IDocumentRenderer>[];
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Defined in: [DocumentModule.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentModule.ts#L61)
|
|
118
|
+
|
|
119
|
+
Document renderer implementation classes.
|
|
120
|
+
Import from `@breadstone/archipel-platform-documents/docx` and `/pdf` for the built-in renderers.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const DOCUMENT_MODULE_OPTIONS: typeof DOCUMENT_MODULE_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [DocumentTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentTokens.ts#L6)
|
|
12
|
+
Defined in: [tokens/DocumentTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/tokens/DocumentTokens.ts#L6)
|
|
13
13
|
|
|
14
14
|
Injection token for DocumentModule options.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const DOCUMENT_PARSER_TOKEN: typeof DOCUMENT_PARSER_TOKEN;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [DocumentTokens.ts:20](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentTokens.ts#L20)
|
|
12
|
+
Defined in: [tokens/DocumentTokens.ts:20](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/tokens/DocumentTokens.ts#L20)
|
|
13
13
|
|
|
14
14
|
Injection token for IDocumentParser.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const DOCUMENT_RENDERER_TOKEN: typeof DOCUMENT_RENDERER_TOKEN;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [DocumentTokens.ts:27](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentTokens.ts#L27)
|
|
12
|
+
Defined in: [tokens/DocumentTokens.ts:27](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/tokens/DocumentTokens.ts#L27)
|
|
13
13
|
|
|
14
14
|
Injection token for IDocumentRenderer (multi-provider).
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const IMAGE_PROCESSOR_TOKEN: typeof IMAGE_PROCESSOR_TOKEN;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [DocumentTokens.ts:13](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/DocumentTokens.ts#L13)
|
|
12
|
+
Defined in: [tokens/DocumentTokens.ts:13](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/tokens/DocumentTokens.ts#L13)
|
|
13
13
|
|
|
14
14
|
Injection token for IImageProcessor.
|
|
@@ -15,7 +15,9 @@ editUrl: false
|
|
|
15
15
|
| [DocumentModule](Class.DocumentModule) | DocumentModule provides services for document generation and image processing. Uses abstract base classes and interfaces for extensibility. |
|
|
16
16
|
| [DocumentRenderError](Class.DocumentRenderError) | Thrown when document rendering fails. |
|
|
17
17
|
| [DocumentValidationError](Class.DocumentValidationError) | Thrown when document input validation fails. |
|
|
18
|
+
| [DocxDocumentRenderer2](Class.DocxDocumentRenderer2) | DOCX document renderer. Delegates template processing to the configured parser (Encodian, Mustache, etc.). The parser handles all template syntax logic via its processXml() method. |
|
|
18
19
|
| [ImageProcessingError](Class.ImageProcessingError) | Thrown when image processing fails. |
|
|
20
|
+
| [PdfDocumentRenderer](Class.PdfDocumentRenderer) | PDF document renderer using pdf-lib. Supports placeholder overlay and table rendering. |
|
|
19
21
|
| [SharpImageProcessor](Class.SharpImageProcessor) | Sharp-based image processor. Handles image resizing and format conversion. |
|
|
20
22
|
|
|
21
23
|
## Interfaces
|
|
@@ -13,10 +13,10 @@ this contract so that the consuming application can switch providers without cha
|
|
|
13
13
|
|
|
14
14
|
## Extended by
|
|
15
15
|
|
|
16
|
-
- [`InternalEsigningProvider`](Class.InternalEsigningProvider)
|
|
17
16
|
- [`DocuSignEsigningProvider`](Class.DocuSignEsigningProvider)
|
|
18
17
|
- [`AdobeSignEsigningProvider`](Class.AdobeSignEsigningProvider)
|
|
19
18
|
- [`DropboxSignEsigningProvider`](Class.DropboxSignEsigningProvider)
|
|
19
|
+
- [`InternalEsigningProvider`](Class.InternalEsigningProvider)
|
|
20
20
|
|
|
21
21
|
## Constructors
|
|
22
22
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: platform-health
|
|
3
|
+
description: Health check orchestration with indicator-based architecture built on @nestjs/terminus.
|
|
4
|
+
order: 4
|
|
5
|
+
tags: [health, terminus, indicators, monitoring]
|
|
6
|
+
package: '@breadstone/archipel-platform-health'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# platform-health
|
|
10
|
+
|
|
11
|
+
Health check orchestration for NestJS applications built on `@nestjs/terminus`. Register custom health indicators and expose aggregated health status via a single orchestrator. Extracted from `platform-core` to provide a focused, independently versionable health module.
|
|
12
|
+
|
|
13
|
+
**Package:** `@breadstone/archipel-platform-health`
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
HealthModule,
|
|
20
|
+
HealthOrchestrator,
|
|
21
|
+
IHealthIndicator,
|
|
22
|
+
IHealthCheckResult,
|
|
23
|
+
HEALTH_INDICATORS,
|
|
24
|
+
} from '@breadstone/archipel-platform-health';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Module Registration
|
|
30
|
+
|
|
31
|
+
Register the module with one or more health indicators:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { Module } from '@nestjs/common';
|
|
35
|
+
import { HealthModule } from '@breadstone/archipel-platform-health';
|
|
36
|
+
import { DatabaseHealthIndicator } from './health/DatabaseHealthIndicator';
|
|
37
|
+
import { RedisHealthIndicator } from './health/RedisHealthIndicator';
|
|
38
|
+
|
|
39
|
+
@Module({
|
|
40
|
+
imports: [
|
|
41
|
+
HealthModule.withIndicators([DatabaseHealthIndicator, RedisHealthIndicator]),
|
|
42
|
+
],
|
|
43
|
+
})
|
|
44
|
+
export class AppModule {}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Implementing a Health Indicator
|
|
48
|
+
|
|
49
|
+
Each indicator implements the `IHealthIndicator` interface:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { Injectable } from '@nestjs/common';
|
|
53
|
+
import type { IHealthIndicator, IHealthCheckResult } from '@breadstone/archipel-platform-health';
|
|
54
|
+
|
|
55
|
+
@Injectable()
|
|
56
|
+
export class DatabaseHealthIndicator implements IHealthIndicator {
|
|
57
|
+
public readonly name = 'database';
|
|
58
|
+
|
|
59
|
+
public async isHealthy(): Promise<IHealthCheckResult> {
|
|
60
|
+
try {
|
|
61
|
+
await this._prisma.$queryRaw`SELECT 1`;
|
|
62
|
+
return { status: 'up' };
|
|
63
|
+
} catch (error) {
|
|
64
|
+
return { status: 'down', details: { error: (error as Error).message } };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Using the Orchestrator
|
|
71
|
+
|
|
72
|
+
The `HealthOrchestrator` runs all registered indicators and returns aggregated results:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Controller, Get } from '@nestjs/common';
|
|
76
|
+
import { HealthOrchestrator } from '@breadstone/archipel-platform-health';
|
|
77
|
+
|
|
78
|
+
@Controller('health')
|
|
79
|
+
export class HealthController {
|
|
80
|
+
constructor(private readonly _healthOrchestrator: HealthOrchestrator) {}
|
|
81
|
+
|
|
82
|
+
@Get()
|
|
83
|
+
public async check(): Promise<unknown> {
|
|
84
|
+
return this._healthOrchestrator.check();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Built-in Consumers
|
|
92
|
+
|
|
93
|
+
Several Archipel libraries automatically register health indicators when imported alongside `platform-health`:
|
|
94
|
+
|
|
95
|
+
| Library | Indicator | Check |
|
|
96
|
+
| ---------------------- | -------------------------- | ----------------------------- |
|
|
97
|
+
| `platform-database` | `DatabaseHealthIndicator` | `SELECT 1` ping |
|
|
98
|
+
| `platform-blob-storage`| `BlobHealthIndicator` | Blob storage connectivity |
|
|
99
|
+
| `platform-mailing` | `MailHealthIndicator` | Mail server connectivity |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Interfaces
|
|
104
|
+
|
|
105
|
+
| Interface | Description |
|
|
106
|
+
| ---------------------- | ----------------------------------------------------------------- |
|
|
107
|
+
| `IHealthIndicator` | Contract for health check implementations (`name` + `isHealthy`) |
|
|
108
|
+
| `IHealthCheckResult` | Result object with `status` (`'up'` or `'down'`) and optional `details` |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Tokens
|
|
113
|
+
|
|
114
|
+
| Token | Description |
|
|
115
|
+
| -------------------- | -------------------------------------------------------- |
|
|
116
|
+
| `HEALTH_INDICATORS` | Multi-provider token for registering health indicators |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Resource Bounds
|
|
121
|
+
|
|
122
|
+
The `HealthOrchestrator` enforces a maximum of **100** registered indicators. If the limit is exceeded, the indicator is skipped and a warning is logged.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## API Reference
|
|
127
|
+
|
|
128
|
+
See the auto-generated [API Reference](./api/) for full details on all exported classes, interfaces, and types.
|
|
@@ -11,7 +11,6 @@ Represents the base class for all email delivery strategies.
|
|
|
11
11
|
|
|
12
12
|
## Extended by
|
|
13
13
|
|
|
14
|
-
- [`LogDeliveryStrategy`](Class.LogDeliveryStrategy)
|
|
15
14
|
- [`SmtpDeliveryStrategy`](Class.SmtpDeliveryStrategy)
|
|
16
15
|
- [`PostmarkDeliveryStrategy`](Class.PostmarkDeliveryStrategy)
|
|
17
16
|
- [`ResendDeliveryStrategy`](Class.ResendDeliveryStrategy)
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: MailModule
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/MailModule.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/tokens/MailModule.ts:108](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/tokens/MailModule.ts#L108)
|
|
9
9
|
|
|
10
10
|
Represents the mail module.
|
|
11
11
|
|
|
@@ -9,11 +9,6 @@ Defined in: [platform-mailing/src/templating/strategies/abstracts/TemplateFetchS
|
|
|
9
9
|
|
|
10
10
|
Represents the base class for template fetch strategies.
|
|
11
11
|
|
|
12
|
-
## Extended by
|
|
13
|
-
|
|
14
|
-
- [`BlobTemplateFetchStrategy`](Class.BlobTemplateFetchStrategy)
|
|
15
|
-
- [`FileTemplateFetchStrategy`](Class.FileTemplateFetchStrategy)
|
|
16
|
-
|
|
17
12
|
## Constructors
|
|
18
13
|
|
|
19
14
|
### Constructor
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: SMTP\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: SMTP\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const SMTP_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/smtp/env.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/smtp/env.ts#L31)
|
|
13
|
+
|
|
14
|
+
Configuration entries required by the SMTP delivery provider.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: SMTP\_HOST'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: SMTP\_HOST
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const SMTP_HOST: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/smtp/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/smtp/env.ts#L12)
|
|
13
|
+
|
|
14
|
+
SMTP server host.
|