@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
|
@@ -105,7 +105,7 @@ The prefix is required and must be a non-empty string. Use short, descriptive pr
|
|
|
105
105
|
|
|
106
106
|
```typescript
|
|
107
107
|
import { Module } from '@nestjs/common';
|
|
108
|
-
import { OtpService, OTP_SERVICE_TOKEN } from '@breadstone/archipel-platform-cryptography';
|
|
108
|
+
import { OtpService, OTP_SERVICE_TOKEN } from '@breadstone/archipel-platform-cryptography/otp';
|
|
109
109
|
|
|
110
110
|
@Module({
|
|
111
111
|
providers: [
|
|
@@ -125,7 +125,7 @@ Generate a secret and a QR code URI for the user's authenticator app:
|
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
127
|
import { Inject, Injectable } from '@nestjs/common';
|
|
128
|
-
import { OTP_SERVICE_TOKEN, type IOtpService } from '@breadstone/archipel-platform-cryptography';
|
|
128
|
+
import { OTP_SERVICE_TOKEN, type IOtpService } from '@breadstone/archipel-platform-cryptography/otp';
|
|
129
129
|
|
|
130
130
|
@Injectable()
|
|
131
131
|
export class MfaService {
|
|
@@ -362,7 +362,7 @@ const result = await this._db.transactionCallback(async (tx) => {
|
|
|
362
362
|
|
|
363
363
|
## Health Checks
|
|
364
364
|
|
|
365
|
-
`DatabaseModule` automatically registers a `DatabaseHealthIndicator` with the health orchestrator from `platform-
|
|
365
|
+
`DatabaseModule` automatically registers a `DatabaseHealthIndicator` with the health orchestrator from `platform-health`. Once your application exposes a `/health` endpoint, database connectivity is checked via a `SELECT 1` ping. No additional configuration is needed.
|
|
366
366
|
|
|
367
367
|
If the health check fails, the indicator reports `database: down` with the error details.
|
|
368
368
|
|
|
@@ -484,7 +484,7 @@ export class UserService {
|
|
|
484
484
|
// src/users/UserController.ts
|
|
485
485
|
import { Controller, Get, Param, NotFoundException } from '@nestjs/common';
|
|
486
486
|
import { UserService } from './UserService';
|
|
487
|
-
import { MappingService } from '@breadstone/archipel-platform-
|
|
487
|
+
import { MappingService } from '@breadstone/archipel-platform-mapping';
|
|
488
488
|
import { USER_TO_RESPONSE } from './mapping-keys';
|
|
489
489
|
|
|
490
490
|
@Controller('users')
|
|
@@ -514,7 +514,8 @@ And the root module wiring everything together:
|
|
|
514
514
|
```typescript
|
|
515
515
|
// src/app.module.ts
|
|
516
516
|
import { Module } from '@nestjs/common';
|
|
517
|
-
import { ConfigModule
|
|
517
|
+
import { ConfigModule } from '@breadstone/archipel-platform-configuration';
|
|
518
|
+
import { MappingModule } from '@breadstone/archipel-platform-mapping';
|
|
518
519
|
import { DatabaseModule, PLATFORM_DATABASE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-database';
|
|
519
520
|
import { UserModule } from './users/UserModule';
|
|
520
521
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Email Templates
|
|
3
|
-
description: Create, register, and override email templates using the ResourceManager from platform-
|
|
3
|
+
description: Create, register, and override email templates using the ResourceManager from platform-resources and the template engine from platform-mailing.
|
|
4
4
|
order: 8
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Email Templates
|
|
8
8
|
|
|
9
|
-
This guide explains how to create email templates for `platform-mailing` and register them with `ResourceManager` from `platform-
|
|
9
|
+
This guide explains how to create email templates for `platform-mailing` and register them with `ResourceManager` from `platform-resources`. It covers the template syntax, the built-in template names, how to provide your own HTML/TXT files, and how to override library defaults.
|
|
10
10
|
|
|
11
11
|
> **Prerequisite:** You should be familiar with [Email Delivery](/guides/email-delivery) for general mail setup and [Resource Management](/guides/resource-management) for how `ResourceManager` strategies work.
|
|
12
12
|
|
|
@@ -134,7 +134,7 @@ my-app/
|
|
|
134
134
|
```typescript
|
|
135
135
|
import { Module } from '@nestjs/common';
|
|
136
136
|
import { join } from 'node:path';
|
|
137
|
-
import { ResourceModule, FileResourceStrategy } from '@breadstone/archipel-platform-
|
|
137
|
+
import { ResourceModule, FileResourceStrategy } from '@breadstone/archipel-platform-resources';
|
|
138
138
|
import { MailModule } from '@breadstone/archipel-platform-mailing';
|
|
139
139
|
|
|
140
140
|
@Module({
|
|
@@ -17,10 +17,10 @@ This guide walks you through adding Archipel packages to a NestJS application. B
|
|
|
17
17
|
|
|
18
18
|
## Install the Foundation
|
|
19
19
|
|
|
20
|
-
Every Archipel application starts with `platform-core` and `platform-
|
|
20
|
+
Every Archipel application starts with `platform-core`, `platform-configuration`, and `platform-mapping`. Core provides templates, events, and cryptographic utilities. Mapping provides the object-to-object mapping system. Configuration provides the type-safe config system that all other packages depend on.
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
yarn add @breadstone/archipel-platform-core @breadstone/archipel-platform-configuration
|
|
23
|
+
yarn add @breadstone/archipel-platform-core @breadstone/archipel-platform-configuration @breadstone/archipel-platform-mapping
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### Set Up Configuration
|
|
@@ -85,7 +85,7 @@ The `MappingModule` provides a centralized service for transforming domain entit
|
|
|
85
85
|
```typescript
|
|
86
86
|
import { Module } from '@nestjs/common';
|
|
87
87
|
import { ConfigModule } from '@breadstone/archipel-platform-configuration';
|
|
88
|
-
import { MappingModule } from '@breadstone/archipel-platform-
|
|
88
|
+
import { MappingModule } from '@breadstone/archipel-platform-mapping';
|
|
89
89
|
import { APP_CONFIG_ENTRIES } from './env';
|
|
90
90
|
import { UserMappingProfile } from './mapping/UserMappingProfile';
|
|
91
91
|
|
|
@@ -100,7 +100,7 @@ You define mapping profiles that register transformations:
|
|
|
100
100
|
|
|
101
101
|
```typescript
|
|
102
102
|
import { Injectable } from '@nestjs/common';
|
|
103
|
-
import { MappingProfileBase, type MappingRegistry } from '@breadstone/archipel-platform-
|
|
103
|
+
import { MappingProfileBase, type MappingRegistry } from '@breadstone/archipel-platform-mapping';
|
|
104
104
|
import { USER_TO_RESPONSE } from './mapping-keys';
|
|
105
105
|
|
|
106
106
|
@Injectable()
|
|
@@ -135,7 +135,7 @@ Register the module:
|
|
|
135
135
|
// src/app.module.ts
|
|
136
136
|
import { Module } from '@nestjs/common';
|
|
137
137
|
import { ConfigModule } from '@breadstone/archipel-platform-configuration';
|
|
138
|
-
import { MappingModule } from '@breadstone/archipel-platform-
|
|
138
|
+
import { MappingModule } from '@breadstone/archipel-platform-mapping';
|
|
139
139
|
import { DatabaseModule } from '@breadstone/archipel-platform-database';
|
|
140
140
|
import { APP_CONFIG_ENTRIES } from './env';
|
|
141
141
|
|
|
@@ -286,7 +286,7 @@ Pass your adapter classes to `AuthModule.register()`:
|
|
|
286
286
|
// src/app.module.ts
|
|
287
287
|
import { Module } from '@nestjs/common';
|
|
288
288
|
import { ConfigModule } from '@breadstone/archipel-platform-configuration';
|
|
289
|
-
import { MappingModule } from '@breadstone/archipel-platform-
|
|
289
|
+
import { MappingModule } from '@breadstone/archipel-platform-mapping';
|
|
290
290
|
import { DatabaseModule } from '@breadstone/archipel-platform-database';
|
|
291
291
|
import { AuthModule } from '@breadstone/archipel-platform-authentication';
|
|
292
292
|
import { APP_CONFIG_ENTRIES } from './env';
|
|
@@ -6,16 +6,16 @@ order: 17
|
|
|
6
6
|
|
|
7
7
|
# Resource Management
|
|
8
8
|
|
|
9
|
-
This guide covers working with `ResourceManager` from `platform-
|
|
9
|
+
This guide covers working with `ResourceManager` from `platform-resources`: registering file strategies, loading resources at runtime, and using the built-in caching layer. If your application ships email templates, HTML pages, CSS/JS assets, or any other file-based content, this is how you make it available to services.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
-
`ResourceManager` is part of `platform-
|
|
15
|
+
`ResourceManager` is part of `platform-resources`.
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
yarn add @breadstone/archipel-platform-
|
|
18
|
+
yarn add @breadstone/archipel-platform-resources
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
---
|
|
@@ -47,7 +47,7 @@ If the file exists on disk, it's served immediately. If not, blob storage is che
|
|
|
47
47
|
```typescript
|
|
48
48
|
import { Module } from '@nestjs/common';
|
|
49
49
|
import { join } from 'node:path';
|
|
50
|
-
import { ResourceModule, FileResourceStrategy, EmbeddedResourceStrategy } from '@breadstone/archipel-platform-
|
|
50
|
+
import { ResourceModule, FileResourceStrategy, EmbeddedResourceStrategy } from '@breadstone/archipel-platform-resources';
|
|
51
51
|
|
|
52
52
|
@Module({
|
|
53
53
|
imports: [
|
|
@@ -56,7 +56,7 @@ import { ResourceModule, FileResourceStrategy, EmbeddedResourceStrategy } from '
|
|
|
56
56
|
new FileResourceStrategy({
|
|
57
57
|
basePaths: [
|
|
58
58
|
join(__dirname, 'assets'),
|
|
59
|
-
join(__dirname, '..', 'node_modules', '@breadstone', 'archipel-platform-
|
|
59
|
+
join(__dirname, '..', 'node_modules', '@breadstone', 'archipel-platform-resources', 'assets'),
|
|
60
60
|
join(__dirname, '..', 'node_modules', '@breadstone', 'archipel-platform-openapi', 'assets'),
|
|
61
61
|
join(__dirname, '..', 'node_modules', '@breadstone', 'archipel-platform-mailing', 'assets'),
|
|
62
62
|
],
|
|
@@ -90,7 +90,7 @@ Inject `ResourceManager` and call its load methods. Every method has a `try*` va
|
|
|
90
90
|
|
|
91
91
|
```typescript
|
|
92
92
|
import { Injectable } from '@nestjs/common';
|
|
93
|
-
import { ResourceManager } from '@breadstone/archipel-platform-
|
|
93
|
+
import { ResourceManager } from '@breadstone/archipel-platform-resources';
|
|
94
94
|
|
|
95
95
|
@Injectable()
|
|
96
96
|
export class InvoiceService {
|
|
@@ -172,7 +172,7 @@ The key you pass to `load()` is the **filename** (e.g. `'invoice-template.html'`
|
|
|
172
172
|
Loads from cloud blob storage via a minimal `IBlobServiceAdapter` interface. This is **async-only** — calling `load()` (sync) will throw.
|
|
173
173
|
|
|
174
174
|
```typescript
|
|
175
|
-
import { BlobResourceStrategy, IBlobServiceAdapter } from '@breadstone/archipel-platform-
|
|
175
|
+
import { BlobResourceStrategy, IBlobServiceAdapter } from '@breadstone/archipel-platform-resources';
|
|
176
176
|
|
|
177
177
|
const blobAdapter: IBlobServiceAdapter = {
|
|
178
178
|
async downloadFile(key: string) {
|
|
@@ -247,7 +247,7 @@ const js = this._resourceManager.loadAsString('swagger.js');
|
|
|
247
247
|
|
|
248
248
|
### Application Index Page
|
|
249
249
|
|
|
250
|
-
`platform-core`'s `HostService` loads `index.html` as a template for the root route:
|
|
250
|
+
`platform-core`'s `HostService` loads `index.html` as a template for the root route (the `ResourceManager` itself comes from `platform-resources`):
|
|
251
251
|
|
|
252
252
|
```typescript
|
|
253
253
|
const html = await this._resourceManager.loadAsStringAsync('index.html');
|
|
@@ -300,7 +300,7 @@ Enable `debug: true` in the module config to have `ResourceManager` call `whatDo
|
|
|
300
300
|
Implement `IResourceStrategy` to support a new source (e.g. a database, S3 directly, or a remote API):
|
|
301
301
|
|
|
302
302
|
```typescript
|
|
303
|
-
import { IResourceStrategy, IResourceResult } from '@breadstone/archipel-platform-
|
|
303
|
+
import { IResourceStrategy, IResourceResult } from '@breadstone/archipel-platform-resources';
|
|
304
304
|
|
|
305
305
|
export class DatabaseResourceStrategy implements IResourceStrategy {
|
|
306
306
|
public get name(): string {
|
|
@@ -9,4 +9,4 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_PROVIDER_OPTIONS: typeof AWS_S3_PROVIDER_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [
|
|
12
|
+
Defined in: [BlobStorageTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/BlobStorageTokens.ts#L6)
|
|
@@ -9,4 +9,4 @@ editUrl: false
|
|
|
9
9
|
const AZURE_BLOB_PROVIDER_OPTIONS: typeof AZURE_BLOB_PROVIDER_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [
|
|
12
|
+
Defined in: [BlobStorageTokens.ts:5](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/BlobStorageTokens.ts#L5)
|
|
@@ -9,4 +9,4 @@ editUrl: false
|
|
|
9
9
|
const BLOB_PROVIDER: typeof BLOB_PROVIDER;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [
|
|
12
|
+
Defined in: [BlobStorageTokens.ts:3](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/BlobStorageTokens.ts#L3)
|
|
@@ -9,4 +9,4 @@ editUrl: false
|
|
|
9
9
|
const VERCEL_BLOB_PROVIDER_OPTIONS: typeof VERCEL_BLOB_PROVIDER_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [
|
|
12
|
+
Defined in: [BlobStorageTokens.ts:4](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/BlobStorageTokens.ts#L4)
|
|
@@ -30,7 +30,7 @@ Constructs a new instance of the `ErrorTemplateService` class.
|
|
|
30
30
|
| ------ | ------ |
|
|
31
31
|
| `configService` | `ConfigService` |
|
|
32
32
|
| `contentTemplateEngine` | [`ContentTemplateEngine`](Class.ContentTemplateEngine) |
|
|
33
|
-
| `resourceManager` |
|
|
33
|
+
| `resourceManager` | `ResourceManager` |
|
|
34
34
|
|
|
35
35
|
#### Returns
|
|
36
36
|
|
|
@@ -30,7 +30,7 @@ Constructs a new instance of the `HostService` class.
|
|
|
30
30
|
| ------ | ------ |
|
|
31
31
|
| `configService` | `ConfigService` |
|
|
32
32
|
| `contentTemplateEngine` | [`ContentTemplateEngine`](Class.ContentTemplateEngine) |
|
|
33
|
-
| `resourceManager` |
|
|
33
|
+
| `resourceManager` | `ResourceManager` |
|
|
34
34
|
|
|
35
35
|
#### Returns
|
|
36
36
|
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const ID_GENERATOR_TOKEN: typeof ID_GENERATOR_TOKEN;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [identifiers/IdentifierTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/identifiers/IdentifierTokens.ts#L6)
|
|
12
|
+
Defined in: [identifiers/tokens/IdentifierTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/identifiers/tokens/IdentifierTokens.ts#L6)
|
|
13
13
|
|
|
14
14
|
Interface for ID generators
|
|
@@ -16,7 +16,6 @@ editUrl: false
|
|
|
16
16
|
| Class | Description |
|
|
17
17
|
| ------ | ------ |
|
|
18
18
|
| [AppHealthIndicator](Class.AppHealthIndicator) | Health indicator for the application. |
|
|
19
|
-
| [BlobResourceStrategy](Class.BlobResourceStrategy) | Strategy for loading resources from blob storage. |
|
|
20
19
|
| [BooleanUtils](Class.BooleanUtils) | Boolean Utility Class. This class provides static methods to parse and format boolean values. |
|
|
21
20
|
| [CasingInterceptor](Class.CasingInterceptor) | Global NestJS interceptor that normalizes property casing across the HTTP boundary. |
|
|
22
21
|
| [CatchUtils](Class.CatchUtils) | - |
|
|
@@ -24,15 +23,11 @@ editUrl: false
|
|
|
24
23
|
| [CUIDGenerator](Class.CUIDGenerator) | CUID Generator class |
|
|
25
24
|
| [DateTimeUtils](Class.DateTimeUtils) | TimeSpan Utility Class. Provides methods to parse and format time span values. |
|
|
26
25
|
| [DeviceParserService](Class.DeviceParserService) | The `DeviceParserService` class. |
|
|
27
|
-
| [EmbeddedResourceStrategy](Class.EmbeddedResourceStrategy) | Strategy for loading embedded resources from memory. |
|
|
28
26
|
| [ErrorTemplateService](Class.ErrorTemplateService) | Service for rendering error page templates. |
|
|
29
27
|
| [EventHub](Class.EventHub) | Provides a strongly typed event hub that can publish and subscribe to events. |
|
|
30
28
|
| [EventModule](Class.EventModule) | Module that provides event hub services. |
|
|
31
|
-
| [FileResourceStrategy](Class.FileResourceStrategy) | Strategy for loading resources from the local file system. |
|
|
32
29
|
| [GlobalExceptionFilter](Class.GlobalExceptionFilter) | A global exception filter that handles all uncaught exceptions in the application. Returns HTML error pages for browser requests and JSON for API requests. |
|
|
33
30
|
| [GUIDGenerator](Class.GUIDGenerator) | GUID Generator class |
|
|
34
|
-
| [HealthModule](Class.HealthModule) | - |
|
|
35
|
-
| [HealthOrchestrator](Class.HealthOrchestrator) | Orchestrates execution of all registered health indicators and aggregates their results. |
|
|
36
31
|
| [HostModule](Class.HostModule) | The `HostModule` provides host-related services globally. |
|
|
37
32
|
| [HostService](Class.HostService) | The `HostService` class. |
|
|
38
33
|
| [HttpLoggerMiddleware](Class.HttpLoggerMiddleware) | - |
|
|
@@ -41,24 +36,16 @@ editUrl: false
|
|
|
41
36
|
| [LimitRequestSizeMiddleware](Class.LimitRequestSizeMiddleware) | - |
|
|
42
37
|
| [LocalizedTextRequest](Class.LocalizedTextRequest) | Request DTO for a single localized text entry. |
|
|
43
38
|
| [LocalizedTextResponse](Class.LocalizedTextResponse) | Base class for localized text responses. |
|
|
44
|
-
| [MappingBuilder](Class.MappingBuilder) | A mapping builder that uses the mapping service to register maps. |
|
|
45
|
-
| [MappingModule](Class.MappingModule) | Module that provides mapping services and allows registration of mapping profiles. |
|
|
46
|
-
| [MappingNotRegisteredError](Class.MappingNotRegisteredError) | Thrown when a keyed mapping is requested but not registered. |
|
|
47
|
-
| [MappingProfileBase](Class.MappingProfileBase) | Base class for mapping profiles to simplify implementation. |
|
|
48
|
-
| [MappingService](Class.MappingService) | Central mapping registry supporting keyed & type-based mappings. |
|
|
49
39
|
| [NormalizedUtils](Class.NormalizedUtils) | Utility functions for normalizing data. |
|
|
50
40
|
| [PageableRequest](Class.PageableRequest) | Base class describing pagination query parameters shared across endpoints. |
|
|
51
41
|
| [PageableResponse](Class.PageableResponse) | Base class describing pagination metadata returned alongside list payloads. |
|
|
52
42
|
| [ProblemDetailException](Class.ProblemDetailException) | A NestJS HttpException that represents a Problem Detail as per RFC 7807. |
|
|
53
43
|
| [ProblemDetailExceptionFilter](Class.ProblemDetailExceptionFilter) | A NestJS exception filter that transforms exceptions into Problem Details compliant responses as per RFC 7807. |
|
|
54
44
|
| [QuantityResponse](Class.QuantityResponse) | Base class for quantity responses. |
|
|
55
|
-
| [ResourceManager](Class.ResourceManager) | Central manager for loading resources from various sources. Supports multiple strategies (file, blob, embedded) with caching. |
|
|
56
|
-
| [ResourceModule](Class.ResourceModule) | Module providing the ResourceManager. |
|
|
57
45
|
| [ResponseReturn](Class.ResponseReturn) | - |
|
|
58
46
|
| [SseHub](Class.SseHub) | Represents a server-sent event service. |
|
|
59
47
|
| [SseModule](Class.SseModule) | Represents the `SseModule` class. |
|
|
60
48
|
| [TimeStampResponse](Class.TimeStampResponse) | The base class for all time stamp responses. |
|
|
61
|
-
| [TypeMappingNotRegisteredError](Class.TypeMappingNotRegisteredError) | Thrown when a type mapping is requested but not registered. |
|
|
62
49
|
| [UserAvatarGeneratorService](Class.UserAvatarGeneratorService) | Service for generating GitHub-style identicon avatars. |
|
|
63
50
|
| [UserNameGeneratorService](Class.UserNameGeneratorService) | Random user name generator class |
|
|
64
51
|
| [UUIDGenerator](Class.UUIDGenerator) | UUID Generator class |
|
|
@@ -67,24 +54,12 @@ editUrl: false
|
|
|
67
54
|
|
|
68
55
|
| Interface | Description |
|
|
69
56
|
| ------ | ------ |
|
|
70
|
-
| [IBlobResourceStrategyConfig](Interface.IBlobResourceStrategyConfig) | Configuration for the blob resource strategy. |
|
|
71
|
-
| [IBlobServiceAdapter](Interface.IBlobServiceAdapter) | Minimal blob service interface to avoid circular dependencies. |
|
|
72
57
|
| [IDeviceInfo](Interface.IDeviceInfo) | Interface for parsed device information |
|
|
73
58
|
| [IErrorPageParams](Interface.IErrorPageParams) | Parameters for generating error page content. |
|
|
74
59
|
| [IEventKey](Interface.IEventKey) | Represents a strongly typed event key that encodes the payload type. |
|
|
75
60
|
| [IEventMap](Interface.IEventMap) | Represents the shape of the event map used by the [EventHub](Class.EventHub). |
|
|
76
|
-
| [IFileResourceStrategyConfig](Interface.IFileResourceStrategyConfig) | Configuration for the file resource strategy. |
|
|
77
|
-
| [IHealthCheckResult](Interface.IHealthCheckResult) | Represents the result of a health check indicator. |
|
|
78
|
-
| [IHealthIndicator](Interface.IHealthIndicator) | Defines the contract for a health indicator that can be orchestrated. |
|
|
79
61
|
| [IHostContentParams](Interface.IHostContentParams) | Parameters for generating host content. |
|
|
80
62
|
| [IIdGenerator](Interface.IIdGenerator) | Interface for ID generators |
|
|
81
|
-
| [IMappingBuilder](Interface.IMappingBuilder) | Defines the interface for a mapping builder. |
|
|
82
|
-
| [IMappingKey](Interface.IMappingKey) | Type-safe mapping key that encodes both input and output types. This ensures compile-time type safety when using the mapping service. |
|
|
83
|
-
| [IMappingProfile](Interface.IMappingProfile) | Defines the interface for a mapping profile. |
|
|
84
|
-
| [IResourceManagerConfig](Interface.IResourceManagerConfig) | Configuration for the ResourceManager. |
|
|
85
|
-
| [IResourceMetadata](Interface.IResourceMetadata) | Metadata about a resource. |
|
|
86
|
-
| [IResourceResult](Interface.IResourceResult) | Result of loading a resource. |
|
|
87
|
-
| [IResourceStrategy](Interface.IResourceStrategy) | Strategy for loading resources from a specific source. |
|
|
88
63
|
| [ISseEventData](Interface.ISseEventData) | Represents the data of a Server-Sent Event. |
|
|
89
64
|
| [ISseHub](Interface.ISseHub) | Represents a server-sent event service. |
|
|
90
65
|
|
|
@@ -107,7 +82,6 @@ editUrl: false
|
|
|
107
82
|
| [APP\_URL](Variable.APP_URL) | Base URL the application is served from (e.g. `https://example.com`). |
|
|
108
83
|
| [APP\_VERSION](Variable.APP_VERSION) | Semantic version of the running application (e.g. `1.2.3`). |
|
|
109
84
|
| [GIT\_COMMIT](Variable.GIT_COMMIT) | Git commit SHA of the current build. |
|
|
110
|
-
| [HEALTH\_INDICATORS\_TOKEN](Variable.HEALTH_INDICATORS_TOKEN) | Injection token for registered health indicators |
|
|
111
85
|
| [ID\_GENERATOR\_TOKEN](Variable.ID_GENERATOR_TOKEN) | Interface for ID generators |
|
|
112
86
|
| [IpAddress](Variable.IpAddress) | Extracts the client IP address from the current HTTP request. Handles IPv6 (::1), proxy headers (X-Forwarded-For), and normalizes the output. |
|
|
113
87
|
| [IS\_PUBLIC\_KEY](Variable.IS_PUBLIC_KEY) | - |
|
|
@@ -121,7 +95,6 @@ editUrl: false
|
|
|
121
95
|
| Function | Description |
|
|
122
96
|
| ------ | ------ |
|
|
123
97
|
| [createEventKey](Function.createEventKey) | Creates a branded event key for the [EventHub](Class.EventHub). |
|
|
124
|
-
| [createMappingKey](Function.createMappingKey) | Creates a type-safe mapping key. |
|
|
125
98
|
| [env](Function.env) | Marker function for environment strings. |
|
|
126
99
|
| [getMimeTypeByFileNameOrExtension](Function.getMimeTypeByFileNameOrExtension) | Get MIME type by file name or extension. |
|
|
127
100
|
| [Public](Function.Public) | The `Public` decorator. |
|
|
@@ -10,7 +10,7 @@ package: '@breadstone/archipel-platform-core'
|
|
|
10
10
|
|
|
11
11
|
The foundation library that every other Archipel package depends on. Provides object mapping, template engines, event pub/sub, and shared utilities.
|
|
12
12
|
|
|
13
|
-
> **Note:** Configuration has moved to [`platform-configuration`](../platform-configuration/), caching to [`platform-caching`](../platform-caching/),
|
|
13
|
+
> **Note:** Configuration has moved to [`platform-configuration`](../platform-configuration/), caching to [`platform-caching`](../platform-caching/), cryptography/OTP to [`platform-cryptography`](../platform-cryptography/), mapping to [`platform-mapping`](../platform-mapping/), resource management to [`platform-resources`](../platform-resources/), and health checks to [`platform-health`](../platform-health/). Re-exports are still available from `platform-core` for backward compatibility.
|
|
14
14
|
|
|
15
15
|
**Package:** `@breadstone/archipel-platform-core`
|
|
16
16
|
|
|
@@ -206,6 +206,8 @@ class MyMetricsRecorder implements ICacheMetricsRecorder {
|
|
|
206
206
|
|
|
207
207
|
## Mapping Service
|
|
208
208
|
|
|
209
|
+
> **Extracted:** Mapping functionality now lives in [`platform-mapping`](/packages/platform-mapping/). The imports below still work via backward-compatible re-exports from `platform-core`, but new code should import from `@breadstone/archipel-platform-mapping` directly.
|
|
210
|
+
|
|
209
211
|
Centralized object mapping with type-safe keys and profiles.
|
|
210
212
|
|
|
211
213
|
### Defining Mapping Keys
|
|
@@ -472,12 +474,13 @@ export class OrderService {
|
|
|
472
474
|
| Export | Type | Description |
|
|
473
475
|
| ----------------------- | ------------- | ----------------------------------------------------------------------------------- |
|
|
474
476
|
| `ConfigModule` | NestJS Module | Configuration registration and validation (re-export from `platform-configuration`) |
|
|
475
|
-
| `MappingModule` | NestJS Module | Mapping profile registration
|
|
477
|
+
| `MappingModule` | NestJS Module | Mapping profile registration (re-export from `platform-mapping`) |
|
|
476
478
|
| `EventModule` | NestJS Module | Event pub/sub system |
|
|
477
479
|
| `IdentifierModule` | NestJS Module | ID generation strategy |
|
|
478
480
|
| `HostModule` | NestJS Module | Host services and templates |
|
|
479
|
-
| `HealthModule` | NestJS Module | Health check orchestration (
|
|
480
|
-
| `
|
|
481
|
+
| `HealthModule` | NestJS Module | Health check orchestration (re-export from `platform-health`) |
|
|
482
|
+
| `ResourceModule` | NestJS Module | Resource loading strategies (re-export from `platform-resources`) |
|
|
483
|
+
| `MappingService` | Service | Central object mapping (re-export from `platform-mapping`) |
|
|
481
484
|
| `ConfigService` | Service | Type-safe config access (re-export from `platform-configuration`) |
|
|
482
485
|
| `BcryptService` | Service | Password hashing |
|
|
483
486
|
| `CryptoService` | Service | UUID generation |
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: BcryptService
|
|
7
7
|
|
|
8
|
-
Defined in: [BcryptService.ts:
|
|
8
|
+
Defined in: [BcryptService.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptService.ts#L34)
|
|
9
9
|
|
|
10
10
|
The `BcryptService` class.
|
|
11
11
|
Provides bcrypt hashing and comparison with configurable salt rounds,
|
|
@@ -20,7 +20,7 @@ exceeding bcrypt's 72-byte input limit.
|
|
|
20
20
|
new BcryptService(options?): BcryptService;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Defined in: [BcryptService.ts:
|
|
23
|
+
Defined in: [BcryptService.ts:50](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptService.ts#L50)
|
|
24
24
|
|
|
25
25
|
Initializes a new instance of the `BcryptService` class.
|
|
26
26
|
|
|
@@ -42,7 +42,7 @@ Initializes a new instance of the `BcryptService` class.
|
|
|
42
42
|
compare(data, encrypted): Promise<boolean>;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [BcryptService.ts:
|
|
45
|
+
Defined in: [BcryptService.ts:92](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptService.ts#L92)
|
|
46
46
|
|
|
47
47
|
Compares the given data with the encrypted data.
|
|
48
48
|
|
|
@@ -73,7 +73,7 @@ symmetrically with [BcryptService.hash](#hash).
|
|
|
73
73
|
hash(data): Promise<string>;
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Defined in: [BcryptService.ts:
|
|
76
|
+
Defined in: [BcryptService.ts:71](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptService.ts#L71)
|
|
77
77
|
|
|
78
78
|
Hashes the given data using bcrypt with a generated salt.
|
|
79
79
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: OtpService
|
|
7
7
|
|
|
8
|
-
Defined in: [otp/OtpService.ts:
|
|
8
|
+
Defined in: [otp/OtpService.ts:45](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L45)
|
|
9
9
|
|
|
10
10
|
OTP service implementation backed by otplib v13.
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@ the library version.
|
|
|
25
25
|
new OtpService(options?): OtpService;
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Defined in: [otp/OtpService.ts:
|
|
28
|
+
Defined in: [otp/OtpService.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L61)
|
|
29
29
|
|
|
30
30
|
Initializes a new instance of the `OtpService` class.
|
|
31
31
|
|
|
@@ -47,7 +47,7 @@ Initializes a new instance of the `OtpService` class.
|
|
|
47
47
|
generateSecret(): string;
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Defined in: [otp/OtpService.ts:
|
|
50
|
+
Defined in: [otp/OtpService.ts:75](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L75)
|
|
51
51
|
|
|
52
52
|
Generates a cryptographically random secret suitable for TOTP.
|
|
53
53
|
|
|
@@ -69,7 +69,7 @@ The generated secret string.
|
|
|
69
69
|
generateUri(options): string;
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Defined in: [otp/OtpService.ts:
|
|
72
|
+
Defined in: [otp/OtpService.ts:80](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L80)
|
|
73
73
|
|
|
74
74
|
Generates an `otpauth://` URI for QR code enrollment.
|
|
75
75
|
|
|
@@ -97,7 +97,7 @@ The formatted `otpauth://` URI.
|
|
|
97
97
|
verify(token, secret): boolean;
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Defined in: [otp/OtpService.ts:
|
|
100
|
+
Defined in: [otp/OtpService.ts:92](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L92)
|
|
101
101
|
|
|
102
102
|
Verifies a TOTP token against the given secret.
|
|
103
103
|
|
|
@@ -132,7 +132,7 @@ verifyHotp(
|
|
|
132
132
|
counter): Promise<boolean>;
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
Defined in: [otp/OtpService.ts:
|
|
135
|
+
Defined in: [otp/OtpService.ts:99](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L99)
|
|
136
136
|
|
|
137
137
|
Verifies an HOTP (counter-based) token against the given secret and counter.
|
|
138
138
|
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const BCRYPT_OPTIONS: typeof BCRYPT_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [
|
|
12
|
+
Defined in: [BcryptTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptTokens.ts#L6)
|
|
13
13
|
|
|
14
|
-
Injection token for
|
|
14
|
+
Injection token for bcrypt options.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MAX_BCRYPT_PASSWORD_BYTES: 72 = 72;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [BcryptService.ts:
|
|
12
|
+
Defined in: [BcryptService.ts:23](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptService.ts#L23)
|
|
13
13
|
|
|
14
14
|
Maximum password byte length that bcrypt processes without truncation.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const MIN_BCRYPT_ROUNDS: 12 = 12;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [BcryptService.ts:
|
|
12
|
+
Defined in: [BcryptService.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/BcryptService.ts#L16)
|
|
13
13
|
|
|
14
14
|
Minimum number of bcrypt salt rounds enforced by the service (OWASP ≥ 12).
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const OTP_OPTIONS: typeof OTP_OPTIONS;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [otp/
|
|
12
|
+
Defined in: [otp/OtpTokens.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpTokens.ts#L6)
|
|
13
13
|
|
|
14
|
-
Injection token for
|
|
14
|
+
Injection token for OTP service options.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const OTP_SERVICE_TOKEN: typeof OTP_SERVICE_TOKEN;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [otp/
|
|
12
|
+
Defined in: [otp/OtpTokens.ts:13](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpTokens.ts#L13)
|
|
13
13
|
|
|
14
|
-
Injection token for
|
|
14
|
+
Injection token for the OTP service abstraction.
|
|
@@ -9,7 +9,7 @@ editUrl: false
|
|
|
9
9
|
const TOTP_EPOCH_TOLERANCE: 30 = 30;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [otp/OtpService.ts:
|
|
12
|
+
Defined in: [otp/OtpService.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L33)
|
|
13
13
|
|
|
14
14
|
Default TOTP verification tolerance expressed in **seconds** (otplib v13 `epochTolerance`).
|
|
15
15
|
|
|
@@ -29,9 +29,9 @@ editUrl: false
|
|
|
29
29
|
|
|
30
30
|
| Variable | Description |
|
|
31
31
|
| ------ | ------ |
|
|
32
|
-
| [BCRYPT\_OPTIONS](Variable.BCRYPT_OPTIONS) | Injection token for
|
|
32
|
+
| [BCRYPT\_OPTIONS](Variable.BCRYPT_OPTIONS) | Injection token for bcrypt options. |
|
|
33
33
|
| [MAX\_BCRYPT\_PASSWORD\_BYTES](Variable.MAX_BCRYPT_PASSWORD_BYTES) | Maximum password byte length that bcrypt processes without truncation. |
|
|
34
34
|
| [MIN\_BCRYPT\_ROUNDS](Variable.MIN_BCRYPT_ROUNDS) | Minimum number of bcrypt salt rounds enforced by the service (OWASP ≥ 12). |
|
|
35
|
-
| [OTP\_OPTIONS](Variable.OTP_OPTIONS) | Injection token for
|
|
36
|
-
| [OTP\_SERVICE\_TOKEN](Variable.OTP_SERVICE_TOKEN) | Injection token for
|
|
35
|
+
| [OTP\_OPTIONS](Variable.OTP_OPTIONS) | Injection token for OTP service options. |
|
|
36
|
+
| [OTP\_SERVICE\_TOKEN](Variable.OTP_SERVICE_TOKEN) | Injection token for the OTP service abstraction. |
|
|
37
37
|
| [TOTP\_EPOCH\_TOLERANCE](Variable.TOTP_EPOCH_TOLERANCE) | Default TOTP verification tolerance expressed in **seconds** (otplib v13 `epochTolerance`). |
|
|
@@ -10,6 +10,11 @@ Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:18](https://github.com/R
|
|
|
10
10
|
Base class for document renderers.
|
|
11
11
|
Provides common functionality for template loading, parsing, and image processing.
|
|
12
12
|
|
|
13
|
+
## Extended by
|
|
14
|
+
|
|
15
|
+
- [`DocxDocumentRenderer2`](Class.DocxDocumentRenderer2)
|
|
16
|
+
- [`PdfDocumentRenderer`](Class.PdfDocumentRenderer)
|
|
17
|
+
|
|
13
18
|
## Implements
|
|
14
19
|
|
|
15
20
|
- [`IDocumentRenderer`](Interface.IDocumentRenderer)
|
|
@@ -31,13 +36,15 @@ Defined in: [renderer/abstracts/BaseDocumentRenderer.ts:29](https://github.com/R
|
|
|
31
36
|
|
|
32
37
|
| Parameter | Type | Description |
|
|
33
38
|
| ------ | ------ | ------ |
|
|
34
|
-
| `options` | \{ `debug`: `boolean`; `delimiters`: \{ `end`: `string`; `start`: `string`; \}; `maxImageHeight`: `number`; `maxImageWidth`: `number`; \} | - |
|
|
39
|
+
| `options` | \{ `debug`: `boolean`; `delimiters`: \{ `end`: `string`; `start`: `string`; \}; `imageProcessor`: \{ \}; `maxImageHeight`: `number`; `maxImageWidth`: `number`; `renderers`: \{ \}[]; \} | - |
|
|
35
40
|
| `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
41
|
| `options.delimiters` | \{ `end`: `string`; `start`: `string`; \} | Delimiters for template placeholders. |
|
|
37
42
|
| `options.delimiters.end` | `string` | Ending delimiter. **Default** `']]'` |
|
|
38
43
|
| `options.delimiters.start` | `string` | Starting delimiter. **Default** `'[['` |
|
|
44
|
+
| `options.imageProcessor` | \{ \} | Image processor implementation class. Import from `@breadstone/archipel-platform-documents/sharp` for the default Sharp-based processor. |
|
|
39
45
|
| `options.maxImageHeight` | `number` | Maximum image height in pixels. |
|
|
40
46
|
| `options.maxImageWidth` | `number` | Maximum image width in pixels. |
|
|
47
|
+
| `options.renderers` | \{ \}[] | Document renderer implementation classes. Import from `@breadstone/archipel-platform-documents/docx` and `/pdf` for the built-in renderers. |
|
|
41
48
|
| `resourceManager` | `ResourceManager` | - |
|
|
42
49
|
| `imageProcessor` | [`IImageProcessor`](Interface.IImageProcessor) | - |
|
|
43
50
|
|
|
@@ -66,8 +73,12 @@ protected readonly _options: {
|
|
|
66
73
|
end: string;
|
|
67
74
|
start: string;
|
|
68
75
|
};
|
|
76
|
+
imageProcessor: {
|
|
77
|
+
};
|
|
69
78
|
maxImageHeight: number;
|
|
70
79
|
maxImageWidth: number;
|
|
80
|
+
renderers: {
|
|
81
|
+
}[];
|
|
71
82
|
};
|
|
72
83
|
```
|
|
73
84
|
|
|
@@ -125,6 +136,16 @@ Starting delimiter.
|
|
|
125
136
|
'[['
|
|
126
137
|
```
|
|
127
138
|
|
|
139
|
+
#### imageProcessor
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
readonly imageProcessor: {
|
|
143
|
+
};
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Image processor implementation class.
|
|
147
|
+
Import from `@breadstone/archipel-platform-documents/sharp` for the default Sharp-based processor.
|
|
148
|
+
|
|
128
149
|
#### maxImageHeight
|
|
129
150
|
|
|
130
151
|
```ts
|
|
@@ -141,6 +162,16 @@ readonly maxImageWidth: number;
|
|
|
141
162
|
|
|
142
163
|
Maximum image width in pixels.
|
|
143
164
|
|
|
165
|
+
#### renderers
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
readonly renderers: {
|
|
169
|
+
}[];
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Document renderer implementation classes.
|
|
173
|
+
Import from `@breadstone/archipel-platform-documents/docx` and `/pdf` for the built-in renderers.
|
|
174
|
+
|
|
144
175
|
***
|
|
145
176
|
|
|
146
177
|
### \_resourceManager
|