@breadstone/archipel-mcp 0.0.21 → 0.0.23
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/README.md +32 -13
- package/data/guides/ai-text-generation.md +16 -24
- package/data/guides/cryptography-and-otp.md +2 -2
- package/data/guides/database-setup.md +4 -3
- package/data/guides/email-templates.md +52 -42
- package/data/guides/getting-started.md +6 -6
- package/data/guides/resource-management.md +9 -9
- package/data/packages/platform-authentication/api/Interface.IMfaSubjectUpdate.md +1 -1
- package/data/packages/platform-authentication/api/index.md +1 -1
- 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-caching/api/Class.RedisLayeredCache.md +3 -3
- 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.MailVerificationService.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 +7 -4
- 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/Class.OtelSdkHolder.md +1 -1
- 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} +46 -49
- 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 +2 -2
- 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 +5 -4
- package/src/tools/registerGetDtoPatternTool.d.ts +2 -1
- package/src/tools/registerGetDtoPatternTool.js +5 -4
- package/src/tools/registerGetErrorHandlingPatternTool.d.ts +2 -1
- package/src/tools/registerGetErrorHandlingPatternTool.js +5 -4
- package/src/tools/registerGetGuardPatternTool.d.ts +2 -1
- package/src/tools/registerGetGuardPatternTool.js +5 -4
- package/src/tools/registerGetMappingPatternTool.d.ts +2 -1
- package/src/tools/registerGetMappingPatternTool.js +6 -5
- package/src/tools/registerGetModulePatternTool.d.ts +2 -1
- package/src/tools/registerGetModulePatternTool.js +6 -5
- package/src/tools/registerGetQueryPatternTool.d.ts +2 -1
- package/src/tools/registerGetQueryPatternTool.js +6 -5
- package/src/tools/registerGetRepositoryPatternTool.d.ts +2 -1
- package/src/tools/registerGetRepositoryPatternTool.js +6 -5
- package/src/tools/registerGetTestingPatternTool.d.ts +2 -1
- package/src/tools/registerGetTestingPatternTool.js +5 -4
- 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
|
@@ -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
|
+
The auto-generated API reference is published when API docs are generated for this package.
|
|
@@ -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
|
|
|
@@ -8,7 +8,7 @@ editUrl: false
|
|
|
8
8
|
Defined in: [platform-mailing/src/services/MailVerificationService.ts:20](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/MailVerificationService.ts#L20)
|
|
9
9
|
|
|
10
10
|
Verifies SMTP server connectivity. Does **not** validate individual email
|
|
11
|
-
addresses
|
|
11
|
+
addresses - only checks whether the configured SMTP transport is reachable.
|
|
12
12
|
|
|
13
13
|
## Deprecated
|
|
14
14
|
|
|
@@ -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.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: SMTP\_PASSWORD'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: SMTP\_PASSWORD
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const SMTP_PASSWORD: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/smtp/env.ts:24](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/smtp/env.ts#L24)
|
|
13
|
+
|
|
14
|
+
SMTP authentication password.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: SMTP\_PORT'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: SMTP\_PORT
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const SMTP_PORT: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/smtp/env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/smtp/env.ts#L15)
|
|
13
|
+
|
|
14
|
+
SMTP server port.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: SMTP\_SECURE'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: SMTP\_SECURE
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const SMTP_SECURE: IConfigKey<boolean>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/smtp/env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/smtp/env.ts#L18)
|
|
13
|
+
|
|
14
|
+
Whether the SMTP connection uses TLS.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: SMTP\_USER'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: SMTP\_USER
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const SMTP_USER: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [platform-mailing/src/smtp/env.ts:21](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/smtp/env.ts#L21)
|
|
13
|
+
|
|
14
|
+
SMTP authentication username.
|
|
@@ -9,17 +9,14 @@ editUrl: false
|
|
|
9
9
|
|
|
10
10
|
| Class | Description |
|
|
11
11
|
| ------ | ------ |
|
|
12
|
-
| [BlobTemplateFetchStrategy](Class.BlobTemplateFetchStrategy) | The `BlobTemplateFetchStrategy` class. |
|
|
13
12
|
| [DeliveryStrategyBase](Class.DeliveryStrategyBase) | Represents the base class for all email delivery strategies. |
|
|
14
|
-
| [FileTemplateFetchStrategy](Class.FileTemplateFetchStrategy) | The `FileTemplateFetchStrategy` class. |
|
|
15
|
-
| [LogDeliveryStrategy](Class.LogDeliveryStrategy) | The `LogDeliveryStrategy` class. |
|
|
16
13
|
| [MailDeliveryError](Class.MailDeliveryError) | Domain error thrown when email delivery fails. |
|
|
17
14
|
| [MailgunDeliveryStrategy](Class.MailgunDeliveryStrategy) | Delivers emails via the Mailgun API. |
|
|
18
15
|
| [MailHealthIndicator](Class.MailHealthIndicator) | Health indicator for mail service. |
|
|
19
16
|
| [MailModule](Class.MailModule) | Represents the mail module. |
|
|
20
17
|
| [MailService](Class.MailService) | Represents the `MailService` class. |
|
|
21
18
|
| [MailTemplateEngine](Class.MailTemplateEngine) | The `MailTemplateEngine` class. |
|
|
22
|
-
| [~~MailVerificationService~~](Class.MailVerificationService) | Verifies SMTP server connectivity. Does **not** validate individual email addresses
|
|
19
|
+
| [~~MailVerificationService~~](Class.MailVerificationService) | Verifies SMTP server connectivity. Does **not** validate individual email addresses - only checks whether the configured SMTP transport is reachable. |
|
|
23
20
|
| [PostmarkDeliveryStrategy](Class.PostmarkDeliveryStrategy) | The `PostmarkDeliveryStrategy` class. |
|
|
24
21
|
| [ResendDeliveryStrategy](Class.ResendDeliveryStrategy) | Delivers emails via the Resend API. |
|
|
25
22
|
| [SendGridDeliveryStrategy](Class.SendGridDeliveryStrategy) | Delivers emails via the SendGrid API. |
|
|
@@ -76,3 +73,9 @@ editUrl: false
|
|
|
76
73
|
| [SEND\_MAIL\_EVENT\_KEY](Variable.SEND_MAIL_EVENT_KEY) | Event key registry for the mail domain events. |
|
|
77
74
|
| [SENDGRID\_API\_KEY](Variable.SENDGRID_API_KEY) | API key for the SendGrid delivery service. |
|
|
78
75
|
| [SENDGRID\_CONFIG\_ENTRIES](Variable.SENDGRID_CONFIG_ENTRIES) | Configuration entries required by the SendGrid delivery provider. |
|
|
76
|
+
| [SMTP\_CONFIG\_ENTRIES](Variable.SMTP_CONFIG_ENTRIES) | Configuration entries required by the SMTP delivery provider. |
|
|
77
|
+
| [SMTP\_HOST](Variable.SMTP_HOST) | SMTP server host. |
|
|
78
|
+
| [SMTP\_PASSWORD](Variable.SMTP_PASSWORD) | SMTP authentication password. |
|
|
79
|
+
| [SMTP\_PORT](Variable.SMTP_PORT) | SMTP server port. |
|
|
80
|
+
| [SMTP\_SECURE](Variable.SMTP_SECURE) | Whether the SMTP connection uses TLS. |
|
|
81
|
+
| [SMTP\_USER](Variable.SMTP_USER) | SMTP authentication username. |
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: platform-mapping
|
|
3
|
+
description: Type-safe object-to-object mapping framework with profile-based configuration.
|
|
4
|
+
order: 2
|
|
5
|
+
tags: [mapping, dto, profiles, type-safe]
|
|
6
|
+
package: '@breadstone/archipel-platform-mapping'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# platform-mapping
|
|
10
|
+
|
|
11
|
+
Type-safe object-to-object mapping framework for transforming domain entities into response DTOs. Extracted from `platform-core` to provide a focused, independently versionable mapping module.
|
|
12
|
+
|
|
13
|
+
**Package:** `@breadstone/archipel-platform-mapping`
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
MappingModule,
|
|
20
|
+
MappingService,
|
|
21
|
+
MappingProfileBase,
|
|
22
|
+
MappingKey,
|
|
23
|
+
MappingError,
|
|
24
|
+
MappingNotRegisteredError,
|
|
25
|
+
TypeMappingNotRegisteredError,
|
|
26
|
+
} from '@breadstone/archipel-platform-mapping';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Defining Mapping Keys
|
|
32
|
+
|
|
33
|
+
Mapping keys are branded constants that provide compile-time safety for source → destination pairs:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { MappingKey } from '@breadstone/archipel-platform-mapping';
|
|
37
|
+
import type { IUserEntity } from './entities';
|
|
38
|
+
import type { UserResponse } from './responses';
|
|
39
|
+
|
|
40
|
+
export const USER_TO_RESPONSE = new MappingKey<IUserEntity, UserResponse>('UserEntity→UserResponse');
|
|
41
|
+
export const USER_TO_SUMMARY = new MappingKey<IUserEntity, UserSummary>('UserEntity→UserSummary');
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Creating a Mapping Profile
|
|
45
|
+
|
|
46
|
+
Profiles group related mappings into cohesive, injectable classes:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { Injectable } from '@nestjs/common';
|
|
50
|
+
import { MappingProfileBase, type IMappingBuilder } from '@breadstone/archipel-platform-mapping';
|
|
51
|
+
import { USER_TO_RESPONSE, USER_TO_SUMMARY } from './mapping-keys';
|
|
52
|
+
|
|
53
|
+
@Injectable()
|
|
54
|
+
export class UserMappingProfile extends MappingProfileBase {
|
|
55
|
+
public override configure(builder: IMappingBuilder): void {
|
|
56
|
+
builder.createKeyedMap(USER_TO_RESPONSE, (source) => ({
|
|
57
|
+
id: source.id,
|
|
58
|
+
name: source.userName,
|
|
59
|
+
email: source.email,
|
|
60
|
+
verified: source.isVerified,
|
|
61
|
+
roles: [...source.roles],
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
builder.createKeyedMap(USER_TO_SUMMARY, (source) => ({
|
|
65
|
+
id: source.id,
|
|
66
|
+
displayName: source.userName ?? source.email ?? 'Anonymous',
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Registering Profiles in a Module
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Module } from '@nestjs/common';
|
|
76
|
+
import { MappingModule } from '@breadstone/archipel-platform-mapping';
|
|
77
|
+
import { UserMappingProfile } from './mappers/UserMappingProfile';
|
|
78
|
+
|
|
79
|
+
@Module({
|
|
80
|
+
imports: [MappingModule.withProfiles([UserMappingProfile])],
|
|
81
|
+
})
|
|
82
|
+
export class AppModule {}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Using in a Controller
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import { Controller, Get, Param } from '@nestjs/common';
|
|
89
|
+
import { MappingService } from '@breadstone/archipel-platform-mapping';
|
|
90
|
+
import { USER_TO_RESPONSE } from './mapping-keys';
|
|
91
|
+
|
|
92
|
+
@Controller('users')
|
|
93
|
+
export class UserController {
|
|
94
|
+
constructor(
|
|
95
|
+
private readonly _userService: UserService,
|
|
96
|
+
private readonly _mappingService: MappingService,
|
|
97
|
+
) {}
|
|
98
|
+
|
|
99
|
+
@Get(':id')
|
|
100
|
+
public async getUser(@Param('id') id: string): Promise<UserResponse> {
|
|
101
|
+
const entity = await this._userService.findById(id);
|
|
102
|
+
return this._mappingService.map(USER_TO_RESPONSE, entity);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Error Classes
|
|
110
|
+
|
|
111
|
+
| Error | Description |
|
|
112
|
+
| ------------------------------ | ----------------------------------------------- |
|
|
113
|
+
| `MappingError` | Base error for all mapping failures |
|
|
114
|
+
| `MappingNotRegisteredError` | Thrown when a mapping key has no registered map |
|
|
115
|
+
| `TypeMappingNotRegisteredError`| Thrown when a type-based mapping is not found |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## API Reference
|
|
120
|
+
|
|
121
|
+
The auto-generated API reference is published when API docs are generated for this package.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MCP_MODULE_OPTIONS: typeof MCP_MODULE_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [
|
|
12
|
+
Defined in: [tokens/McpTokens.ts:4](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mcp/src/tokens/McpTokens.ts#L4)
|
|
13
13
|
|
|
14
14
|
Injection tokens used by the MCP module.
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: SwaggerMultiDocumentService
|
|
7
7
|
|
|
8
|
-
Defined in: [services/SwaggerMultiDocumentService.ts:
|
|
8
|
+
Defined in: [services/SwaggerMultiDocumentService.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-openapi/src/services/SwaggerMultiDocumentService.ts#L15)
|
|
9
9
|
|
|
10
10
|
## Constructors
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ new SwaggerMultiDocumentService(
|
|
|
21
21
|
contentTemplateEngine): SwaggerMultiDocumentService;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [services/SwaggerMultiDocumentService.ts:
|
|
24
|
+
Defined in: [services/SwaggerMultiDocumentService.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-openapi/src/services/SwaggerMultiDocumentService.ts#L31)
|
|
25
25
|
|
|
26
26
|
#### Parameters
|
|
27
27
|
|
|
@@ -49,7 +49,7 @@ generateOpenApiDocuments(): {
|
|
|
49
49
|
}[];
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Defined in: [services/SwaggerMultiDocumentService.ts:
|
|
52
|
+
Defined in: [services/SwaggerMultiDocumentService.ts:79](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-openapi/src/services/SwaggerMultiDocumentService.ts#L79)
|
|
53
53
|
|
|
54
54
|
Generates OpenAPI documents for every registered feature without wiring HTTP routes.
|
|
55
55
|
|
|
@@ -68,7 +68,7 @@ Generates OpenAPI documents for every registered feature without wiring HTTP rou
|
|
|
68
68
|
setupMultipleSwaggerDocuments(): Promise<void>;
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
Defined in: [services/SwaggerMultiDocumentService.ts:
|
|
71
|
+
Defined in: [services/SwaggerMultiDocumentService.ts:55](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-openapi/src/services/SwaggerMultiDocumentService.ts#L55)
|
|
72
72
|
|
|
73
73
|
Setup multiple Swagger documents for different features
|
|
74
74
|
|