@breadstone/archipel-mcp 0.0.20 → 0.0.21
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/ai-text-generation.md +10 -0
- package/data/guides/analytics-and-error-tracking.md +6 -0
- package/data/guides/cryptography-and-otp.md +18 -0
- package/data/guides/document-generation.md +26 -0
- package/data/guides/email-delivery.md +23 -0
- package/data/guides/email-templates.md +298 -0
- package/data/guides/esigning-integration.md +1 -1
- package/data/guides/index.md +1 -0
- package/data/guides/mcp-server.md +9 -0
- package/data/guides/payments-and-feature-gating.md +18 -0
- package/data/guides/telemetry-and-observability.md +7 -1
- package/data/packages/platform-analytics/api/Class.AppInsightsAnalyticsClient.md +55 -6
- package/data/packages/platform-analytics/api/Class.DatadogAnalyticsClient.md +32 -6
- package/data/packages/platform-analytics/api/Class.SentryAnalyticsClient.md +55 -6
- package/data/packages/platform-analytics/index.md +13 -0
- package/data/packages/platform-core/api/Class.EventHub.md +7 -7
- package/data/packages/platform-core/api/Class.HealthOrchestrator.md +1 -1
- package/data/packages/platform-core/api/Class.SseHub.md +29 -6
- package/data/packages/platform-core/index.md +2 -1
- package/data/packages/platform-cryptography/api/Class.CryptoService.md +3 -3
- package/data/packages/platform-cryptography/index.md +10 -0
- package/data/packages/platform-documents/api/Class.DocumentEngine.md +4 -4
- package/data/packages/platform-documents/api/Class.DocumentError.md +61 -0
- package/data/packages/platform-documents/api/Class.DocumentRenderError.md +53 -0
- package/data/packages/platform-documents/api/Class.DocumentValidationError.md +52 -0
- package/data/packages/platform-documents/api/Class.ImageProcessingError.md +53 -0
- package/data/packages/platform-documents/api/Class.SharpImageProcessor.md +5 -5
- package/data/packages/platform-documents/api/index.md +4 -0
- package/data/packages/platform-documents/index.md +27 -0
- package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +1 -1
- package/data/packages/platform-esigning/api/Class.InternalEsigningProvider.md +8 -8
- package/data/packages/platform-esigning/index.md +2 -0
- package/data/packages/platform-intelligence/api/Class.IntelligenceCapabilityRegistry.md +3 -3
- package/data/packages/platform-intelligence/api/Class.IntelligenceConfigurationError.md +50 -0
- package/data/packages/platform-intelligence/api/Class.IntelligenceTextGenerator.md +27 -4
- package/data/packages/platform-intelligence/api/Class.IntelligenceValidationError.md +50 -0
- package/data/packages/platform-intelligence/api/Function.loadProviderFactory.md +1 -1
- package/data/packages/platform-intelligence/api/index.md +2 -0
- package/data/packages/platform-intelligence/index.md +32 -0
- package/data/packages/platform-logging/api/Class.LoggerModule.md +1 -1
- package/data/packages/platform-logging/index.md +2 -0
- package/data/packages/platform-mailing/api/Class.MailDeliveryError.md +65 -0
- package/data/packages/platform-mailing/api/Class.MailgunDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.PostmarkDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.ResendDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.SendGridDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/Class.SmtpDeliveryStrategy.md +3 -3
- package/data/packages/platform-mailing/api/index.md +1 -0
- package/data/packages/platform-mailing/index.md +29 -0
- package/data/packages/platform-mcp/api/Class.McpServerService.md +8 -8
- package/data/packages/platform-mcp/index.md +11 -0
- package/data/packages/platform-openapi/api/Class.SwaggerTheme.md +2 -2
- package/data/packages/platform-openapi/index.md +1 -1
- package/data/packages/platform-payments/api/Class.LemonSqueezyClient.md +6 -6
- package/data/packages/platform-payments/api/Class.MollieClient.md +6 -6
- package/data/packages/platform-payments/api/Class.PaddleClient.md +6 -6
- package/data/packages/platform-payments/api/Class.PaymentError.md +65 -0
- package/data/packages/platform-payments/api/Class.StripeClient.md +6 -6
- package/data/packages/platform-payments/api/index.md +1 -0
- package/data/packages/platform-payments/index.md +29 -0
- package/data/packages/platform-reporting/api/Class.ReportingContributorRegistry.md +1 -1
- package/data/packages/platform-reporting/index.md +3 -1
- package/data/packages/platform-telemetry/api/Class.MetricsService.md +29 -3
- package/data/packages/platform-telemetry/api/Class.OtelSdkHolder.md +3 -2
- package/data/packages/platform-telemetry/api/Class.TelemetryLoggerService.md +6 -6
- package/data/packages/platform-telemetry/api/Class.TelemetryRuleEngine.md +3 -3
- package/data/packages/platform-telemetry/api/index.md +1 -1
- package/data/packages/platform-telemetry/index.md +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: ImageProcessingError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: ImageProcessingError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/ImageProcessingError.ts:8](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/errors/ImageProcessingError.ts#L8)
|
|
9
|
+
|
|
10
|
+
Thrown when image processing fails.
|
|
11
|
+
|
|
12
|
+
## Extends
|
|
13
|
+
|
|
14
|
+
- [`DocumentError`](Class.DocumentError)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new ImageProcessingError(message, cause?): ImageProcessingError;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [errors/ImageProcessingError.ts:11](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/errors/ImageProcessingError.ts#L11)
|
|
25
|
+
|
|
26
|
+
#### Parameters
|
|
27
|
+
|
|
28
|
+
| Parameter | Type |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| `message` | `string` |
|
|
31
|
+
| `cause?` | `unknown` |
|
|
32
|
+
|
|
33
|
+
#### Returns
|
|
34
|
+
|
|
35
|
+
`ImageProcessingError`
|
|
36
|
+
|
|
37
|
+
#### Overrides
|
|
38
|
+
|
|
39
|
+
[`DocumentError`](Class.DocumentError).[`constructor`](Class.DocumentError#constructor)
|
|
40
|
+
|
|
41
|
+
## Properties
|
|
42
|
+
|
|
43
|
+
### code
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
readonly code: string;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Defined in: [errors/DocumentError.ts:10](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/errors/DocumentError.ts#L10)
|
|
50
|
+
|
|
51
|
+
#### Inherited from
|
|
52
|
+
|
|
53
|
+
[`DocumentError`](Class.DocumentError).[`code`](Class.DocumentError#code)
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: SharpImageProcessor
|
|
7
7
|
|
|
8
|
-
Defined in: [processor/SharpImageProcessor.ts:
|
|
8
|
+
Defined in: [processor/SharpImageProcessor.ts:28](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/processor/SharpImageProcessor.ts#L28)
|
|
9
9
|
|
|
10
10
|
Sharp-based image processor.
|
|
11
11
|
Handles image resizing and format conversion.
|
|
@@ -22,7 +22,7 @@ Handles image resizing and format conversion.
|
|
|
22
22
|
new SharpImageProcessor(options): SharpImageProcessor;
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Defined in: [processor/SharpImageProcessor.ts:
|
|
25
|
+
Defined in: [processor/SharpImageProcessor.ts:38](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/processor/SharpImageProcessor.ts#L38)
|
|
26
26
|
|
|
27
27
|
#### Parameters
|
|
28
28
|
|
|
@@ -42,7 +42,7 @@ Defined in: [processor/SharpImageProcessor.ts:36](https://github.com/RueDeRennes
|
|
|
42
42
|
process(payload): Promise<IImagePayload>;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [processor/SharpImageProcessor.ts:
|
|
45
|
+
Defined in: [processor/SharpImageProcessor.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/processor/SharpImageProcessor.ts#L53)
|
|
46
46
|
|
|
47
47
|
Process image payload.
|
|
48
48
|
|
|
@@ -74,7 +74,7 @@ toJpeg(
|
|
|
74
74
|
quality?): Promise<Buffer<ArrayBufferLike>>;
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Defined in: [processor/SharpImageProcessor.ts:
|
|
77
|
+
Defined in: [processor/SharpImageProcessor.ts:129](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/processor/SharpImageProcessor.ts#L129)
|
|
78
78
|
|
|
79
79
|
Convert to JPEG.
|
|
80
80
|
|
|
@@ -108,7 +108,7 @@ toPng(
|
|
|
108
108
|
height?): Promise<Buffer<ArrayBufferLike>>;
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
Defined in: [processor/SharpImageProcessor.ts:
|
|
111
|
+
Defined in: [processor/SharpImageProcessor.ts:102](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-documents/src/processor/SharpImageProcessor.ts#L102)
|
|
112
112
|
|
|
113
113
|
Convert to PNG.
|
|
114
114
|
|
|
@@ -11,7 +11,11 @@ editUrl: false
|
|
|
11
11
|
| ------ | ------ |
|
|
12
12
|
| [BaseDocumentRenderer](Class.BaseDocumentRenderer) | Base class for document renderers. Provides common functionality for template loading, parsing, and image processing. |
|
|
13
13
|
| [DocumentEngine](Class.DocumentEngine) | DocumentEngine orchestrates document generation workflow. Coordinates resource loading and renderer components. |
|
|
14
|
+
| [DocumentError](Class.DocumentError) | Base class for document-related domain errors. |
|
|
14
15
|
| [DocumentModule](Class.DocumentModule) | DocumentModule provides services for document generation and image processing. Uses abstract base classes and interfaces for extensibility. |
|
|
16
|
+
| [DocumentRenderError](Class.DocumentRenderError) | Thrown when document rendering fails. |
|
|
17
|
+
| [DocumentValidationError](Class.DocumentValidationError) | Thrown when document input validation fails. |
|
|
18
|
+
| [ImageProcessingError](Class.ImageProcessingError) | Thrown when image processing fails. |
|
|
15
19
|
| [SharpImageProcessor](Class.SharpImageProcessor) | Sharp-based image processor. Handles image resizing and format conversion. |
|
|
16
20
|
|
|
17
21
|
## Interfaces
|
|
@@ -203,6 +203,29 @@ export class ContractController {
|
|
|
203
203
|
|
|
204
204
|
---
|
|
205
205
|
|
|
206
|
+
## Error Handling
|
|
207
|
+
|
|
208
|
+
The library provides a hierarchy of domain error classes for structured error handling:
|
|
209
|
+
|
|
210
|
+
| Error class | Base class | When thrown |
|
|
211
|
+
| -------------------------- | --------------- | ------------------------------------------------- |
|
|
212
|
+
| `DocumentError` | `Error` | Base class for all document errors |
|
|
213
|
+
| `DocumentRenderError` | `DocumentError` | Template rendering failures (DOCX, PDF) |
|
|
214
|
+
| `DocumentValidationError` | `DocumentError` | Invalid templates, missing placeholders |
|
|
215
|
+
| `ImageProcessingError` | `DocumentError` | Image resize/conversion failures (Sharp) |
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
import {
|
|
219
|
+
DocumentRenderError,
|
|
220
|
+
DocumentValidationError,
|
|
221
|
+
ImageProcessingError,
|
|
222
|
+
} from '@breadstone/archipel-platform-documents';
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
All errors extend `DocumentError`, so a single `catch (error instanceof DocumentError)` handles any document-related failure.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
206
229
|
## Exports Summary
|
|
207
230
|
|
|
208
231
|
| Export | Type | Description |
|
|
@@ -217,3 +240,7 @@ export class ContractController {
|
|
|
217
240
|
| `TemplateFormat` | Enum | Template format identifiers |
|
|
218
241
|
| `IRenderResult` | Interface | Render output (buffer, name, contentType) |
|
|
219
242
|
| `IDocumentProbeReport` | Interface | Template validation report |
|
|
243
|
+
| `DocumentError` | Error class | Base document error |
|
|
244
|
+
| `DocumentRenderError` | Error class | Render failure error |
|
|
245
|
+
| `DocumentValidationError` | Error class | Validation failure error |
|
|
246
|
+
| `ImageProcessingError` | Error class | Image processing failure error |
|
|
@@ -14,8 +14,8 @@ this contract so that the consuming application can switch providers without cha
|
|
|
14
14
|
## Extended by
|
|
15
15
|
|
|
16
16
|
- [`InternalEsigningProvider`](Class.InternalEsigningProvider)
|
|
17
|
-
- [`AdobeSignEsigningProvider`](Class.AdobeSignEsigningProvider)
|
|
18
17
|
- [`DocuSignEsigningProvider`](Class.DocuSignEsigningProvider)
|
|
18
|
+
- [`AdobeSignEsigningProvider`](Class.AdobeSignEsigningProvider)
|
|
19
19
|
- [`DropboxSignEsigningProvider`](Class.DropboxSignEsigningProvider)
|
|
20
20
|
|
|
21
21
|
## Constructors
|
|
@@ -41,7 +41,7 @@ new InternalEsigningProvider(): InternalEsigningProvider;
|
|
|
41
41
|
get providerId(): string;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
44
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L53)
|
|
45
45
|
|
|
46
46
|
Unique identifier of the provider implementation.
|
|
47
47
|
|
|
@@ -63,7 +63,7 @@ Unique identifier of the provider implementation.
|
|
|
63
63
|
cancelSigningRequest(signingRequestId, _reason?): Promise<void>;
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
66
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:192](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L192)
|
|
67
67
|
|
|
68
68
|
Cancel an in-progress signing request.
|
|
69
69
|
|
|
@@ -90,7 +90,7 @@ Cancel an in-progress signing request.
|
|
|
90
90
|
completeSigner(signingRequestId, signerId): Promise<void>;
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
93
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:219](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L219)
|
|
94
94
|
|
|
95
95
|
Marks a signer as having completed their signing.
|
|
96
96
|
This is specific to the internal provider and allows the consuming
|
|
@@ -115,7 +115,7 @@ application to programmatically complete a signer's step.
|
|
|
115
115
|
createSigningRequest(request): Promise<ISigningRequest>;
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
118
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L61)
|
|
119
119
|
|
|
120
120
|
Create a new signing request (envelope/agreement).
|
|
121
121
|
|
|
@@ -143,7 +143,7 @@ The created signing request with provider-assigned identifiers.
|
|
|
143
143
|
createSigningSession(request): Promise<ISigningSession>;
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
146
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:132](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L132)
|
|
147
147
|
|
|
148
148
|
Generate a signing session (signing link/URL) for a specific signer.
|
|
149
149
|
|
|
@@ -171,7 +171,7 @@ The signing session with the signing URL.
|
|
|
171
171
|
getSignedDocuments(signingRequestId): Promise<ISignedDocument[]>;
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
174
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:175](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L175)
|
|
175
175
|
|
|
176
176
|
Retrieve the final signed documents for a completed signing request.
|
|
177
177
|
|
|
@@ -199,7 +199,7 @@ Array of signed documents with their content.
|
|
|
199
199
|
getSigningRequest(signingRequestId): Promise<ISigningRequest>;
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
202
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:161](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L161)
|
|
203
203
|
|
|
204
204
|
Retrieve the current status and details of a signing request.
|
|
205
205
|
|
|
@@ -230,7 +230,7 @@ verifyWebhook(
|
|
|
230
230
|
_headers?): Promise<IEsigningWebhookEvent>;
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
Defined in: [providers/internal/InternalEsigningProvider.ts:
|
|
233
|
+
Defined in: [providers/internal/InternalEsigningProvider.ts:202](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/providers/internal/InternalEsigningProvider.ts#L202)
|
|
234
234
|
|
|
235
235
|
Verify a webhook payload signature and return a normalized event.
|
|
236
236
|
|
|
@@ -108,6 +108,8 @@ EsigningModule.register({
|
|
|
108
108
|
|
|
109
109
|
The `InternalEsigningProvider` manages signing requests in-memory. Suitable for development, testing, or simple self-managed signing workflows.
|
|
110
110
|
|
|
111
|
+
> **Capacity limit:** The internal provider enforces a maximum of **10,000** stored signing requests. Attempts to create beyond this limit throw an error. Use an external provider for production workloads.
|
|
112
|
+
|
|
111
113
|
```typescript
|
|
112
114
|
import { InternalEsigningProvider } from '@breadstone/archipel-platform-esigning';
|
|
113
115
|
|
|
@@ -33,7 +33,7 @@ new IntelligenceCapabilityRegistry(): IntelligenceCapabilityRegistry;
|
|
|
33
33
|
list(): readonly IIntelligenceCapability[];
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Defined in: [IntelligenceCapabilityRegistry.ts:
|
|
36
|
+
Defined in: [IntelligenceCapabilityRegistry.ts:45](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceCapabilityRegistry.ts#L45)
|
|
37
37
|
|
|
38
38
|
Returns a read-only snapshot of all registered capabilities.
|
|
39
39
|
|
|
@@ -55,7 +55,7 @@ A defensive copy of the registered capabilities.
|
|
|
55
55
|
register(capability): void;
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
Defined in: [IntelligenceCapabilityRegistry.ts:
|
|
58
|
+
Defined in: [IntelligenceCapabilityRegistry.ts:27](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceCapabilityRegistry.ts#L27)
|
|
59
59
|
|
|
60
60
|
Registers a capability in the registry.
|
|
61
61
|
|
|
@@ -83,7 +83,7 @@ resolve(intent, context):
|
|
|
83
83
|
| null;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: [IntelligenceCapabilityRegistry.ts:
|
|
86
|
+
Defined in: [IntelligenceCapabilityRegistry.ts:40](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceCapabilityRegistry.ts#L40)
|
|
87
87
|
|
|
88
88
|
Resolves the most suitable capability for the given intent and context.
|
|
89
89
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: IntelligenceConfigurationError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: IntelligenceConfigurationError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/IntelligenceConfigurationError.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/errors/IntelligenceConfigurationError.ts#L6)
|
|
9
|
+
|
|
10
|
+
Error thrown when an intelligence provider configuration is invalid or missing.
|
|
11
|
+
|
|
12
|
+
## Extends
|
|
13
|
+
|
|
14
|
+
- `Error`
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new IntelligenceConfigurationError(message): IntelligenceConfigurationError;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [errors/IntelligenceConfigurationError.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/errors/IntelligenceConfigurationError.ts#L15)
|
|
25
|
+
|
|
26
|
+
#### Parameters
|
|
27
|
+
|
|
28
|
+
| Parameter | Type |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| `message` | `string` |
|
|
31
|
+
|
|
32
|
+
#### Returns
|
|
33
|
+
|
|
34
|
+
`IntelligenceConfigurationError`
|
|
35
|
+
|
|
36
|
+
#### Overrides
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
Error.constructor
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Properties
|
|
43
|
+
|
|
44
|
+
### code
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
readonly code: "INTELLIGENCE_CONFIGURATION" = 'INTELLIGENCE_CONFIGURATION';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Defined in: [errors/IntelligenceConfigurationError.ts:9](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/errors/IntelligenceConfigurationError.ts#L9)
|
|
@@ -5,13 +5,14 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: IntelligenceTextGenerator
|
|
7
7
|
|
|
8
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
8
|
+
Defined in: [IntelligenceTextGenerator.ts:54](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L54)
|
|
9
9
|
|
|
10
10
|
Executes text completions using the configured intelligence provider.
|
|
11
11
|
|
|
12
12
|
## Implements
|
|
13
13
|
|
|
14
14
|
- [`IIntelligenceTextGenerator`](Interface.IIntelligenceTextGenerator)
|
|
15
|
+
- `OnModuleInit`
|
|
15
16
|
|
|
16
17
|
## Constructors
|
|
17
18
|
|
|
@@ -21,7 +22,7 @@ Executes text completions using the configured intelligence provider.
|
|
|
21
22
|
new IntelligenceTextGenerator(configService): IntelligenceTextGenerator;
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
25
|
+
Defined in: [IntelligenceTextGenerator.ts:67](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L67)
|
|
25
26
|
|
|
26
27
|
#### Parameters
|
|
27
28
|
|
|
@@ -41,7 +42,7 @@ Defined in: [IntelligenceTextGenerator.ts:65](https://github.com/RueDeRennes/arc
|
|
|
41
42
|
generateText(prompt, options?): Promise<IIntelligenceTextCompletion>;
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
45
|
+
Defined in: [IntelligenceTextGenerator.ts:99](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L99)
|
|
45
46
|
|
|
46
47
|
Generates a completion using the configured provider.
|
|
47
48
|
|
|
@@ -68,7 +69,7 @@ Generates a completion using the configured provider.
|
|
|
68
69
|
getConfiguration(): IIntelligenceProviderConfiguration;
|
|
69
70
|
```
|
|
70
71
|
|
|
71
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
72
|
+
Defined in: [IntelligenceTextGenerator.ts:206](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L206)
|
|
72
73
|
|
|
73
74
|
Returns the resolved provider configuration with the API key redacted.
|
|
74
75
|
|
|
@@ -79,3 +80,25 @@ Returns the resolved provider configuration with the API key redacted.
|
|
|
79
80
|
#### Implementation of
|
|
80
81
|
|
|
81
82
|
[`IIntelligenceTextGenerator`](Interface.IIntelligenceTextGenerator).[`getConfiguration`](Interface.IIntelligenceTextGenerator#getconfiguration)
|
|
83
|
+
|
|
84
|
+
***
|
|
85
|
+
|
|
86
|
+
### onModuleInit()
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
onModuleInit(): void;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Defined in: [IntelligenceTextGenerator.ts:86](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L86)
|
|
93
|
+
|
|
94
|
+
Eagerly resolves configuration at startup to fail fast on missing keys.
|
|
95
|
+
|
|
96
|
+
#### Returns
|
|
97
|
+
|
|
98
|
+
`void`
|
|
99
|
+
|
|
100
|
+
#### Implementation of
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
OnModuleInit.onModuleInit
|
|
104
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: IntelligenceValidationError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: IntelligenceValidationError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/IntelligenceValidationError.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/errors/IntelligenceValidationError.ts#L6)
|
|
9
|
+
|
|
10
|
+
Error thrown when an intelligence input validation fails.
|
|
11
|
+
|
|
12
|
+
## Extends
|
|
13
|
+
|
|
14
|
+
- `Error`
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new IntelligenceValidationError(message): IntelligenceValidationError;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [errors/IntelligenceValidationError.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/errors/IntelligenceValidationError.ts#L15)
|
|
25
|
+
|
|
26
|
+
#### Parameters
|
|
27
|
+
|
|
28
|
+
| Parameter | Type |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| `message` | `string` |
|
|
31
|
+
|
|
32
|
+
#### Returns
|
|
33
|
+
|
|
34
|
+
`IntelligenceValidationError`
|
|
35
|
+
|
|
36
|
+
#### Overrides
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
Error.constructor
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Properties
|
|
43
|
+
|
|
44
|
+
### code
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
readonly code: "INTELLIGENCE_VALIDATION" = 'INTELLIGENCE_VALIDATION';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Defined in: [errors/IntelligenceValidationError.ts:9](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/errors/IntelligenceValidationError.ts#L9)
|
|
@@ -9,7 +9,7 @@ editUrl: false
|
|
|
9
9
|
function loadProviderFactory(moduleName, exportName): Promise<(model, options) => LanguageModelV2>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [providers/ProviderFactoryLoader.ts:
|
|
12
|
+
Defined in: [providers/ProviderFactoryLoader.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/providers/ProviderFactoryLoader.ts#L17)
|
|
13
13
|
|
|
14
14
|
Dynamically loads an AI SDK provider factory and returns the exported function reference.
|
|
15
15
|
|
|
@@ -11,9 +11,11 @@ editUrl: false
|
|
|
11
11
|
| ------ | ------ |
|
|
12
12
|
| [IntelligenceCapabilityRegistrarBase](Class.IntelligenceCapabilityRegistrarBase) | Provides a reusable registration flow that allows feature modules to contribute capabilities to the global intelligence registry while keeping their implementation details private. |
|
|
13
13
|
| [IntelligenceCapabilityRegistry](Class.IntelligenceCapabilityRegistry) | Central registry responsible for resolving intelligence capabilities based on intent metadata. |
|
|
14
|
+
| [IntelligenceConfigurationError](Class.IntelligenceConfigurationError) | Error thrown when an intelligence provider configuration is invalid or missing. |
|
|
14
15
|
| [IntelligenceModule](Class.IntelligenceModule) | Core module exposing the shared intelligence infrastructure to feature modules. |
|
|
15
16
|
| [IntelligenceProviderError](Class.IntelligenceProviderError) | Error thrown when an intelligence provider call fails. |
|
|
16
17
|
| [IntelligenceTextGenerator](Class.IntelligenceTextGenerator) | Executes text completions using the configured intelligence provider. |
|
|
18
|
+
| [IntelligenceValidationError](Class.IntelligenceValidationError) | Error thrown when an intelligence input validation fails. |
|
|
17
19
|
|
|
18
20
|
## Interfaces
|
|
19
21
|
|
|
@@ -150,6 +150,38 @@ All errors are wrapped in `IntelligenceProviderError` with `provider`, `model`,
|
|
|
150
150
|
|
|
151
151
|
---
|
|
152
152
|
|
|
153
|
+
## Error Handling
|
|
154
|
+
|
|
155
|
+
The library provides three domain error classes for different failure scenarios:
|
|
156
|
+
|
|
157
|
+
| Error class | Code | When thrown |
|
|
158
|
+
| ---------------------------------- | ----------------------------- | --------------------------------------------------------------------- |
|
|
159
|
+
| `IntelligenceProviderError` | `INTELLIGENCE_PROVIDER` | Provider SDK failures during text generation |
|
|
160
|
+
| `IntelligenceValidationError` | `INTELLIGENCE_VALIDATION` | Invalid generation parameters (temperature, topP, maxOutputTokens) |
|
|
161
|
+
| `IntelligenceConfigurationError` | `INTELLIGENCE_CONFIGURATION` | Unsupported provider, missing API key, or missing SDK package |
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
import {
|
|
165
|
+
IntelligenceProviderError,
|
|
166
|
+
IntelligenceValidationError,
|
|
167
|
+
IntelligenceConfigurationError,
|
|
168
|
+
} from '@breadstone/archipel-platform-intelligence';
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Lifecycle
|
|
174
|
+
|
|
175
|
+
`IntelligenceTextGenerator` implements `OnModuleInit` and validates the provider configuration eagerly at startup. Missing API keys or unsupported providers throw `IntelligenceConfigurationError` before the first request is processed.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Capability Registry Limits
|
|
180
|
+
|
|
181
|
+
`IntelligenceCapabilityRegistry` enforces a maximum of **500** registered capabilities. Attempts to register beyond this limit are logged as warnings and silently ignored. This prevents unbounded memory growth in applications with dynamic capability registration.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
153
185
|
## API Reference
|
|
154
186
|
|
|
155
187
|
See the full [API documentation](./api/) for all exported types, interfaces, and classes.
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: LoggerModule
|
|
7
7
|
|
|
8
|
-
Defined in: [LoggerModule.ts:
|
|
8
|
+
Defined in: [LoggerModule.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-logging/src/LoggerModule.ts#L35)
|
|
9
9
|
|
|
10
10
|
Global logging module that configures the NestJS Logger with an application-wide log level.
|
|
11
11
|
|
|
@@ -54,6 +54,8 @@ export class PaymentService {
|
|
|
54
54
|
| --------------- | -------------------------------------------------------------- | -------- | ------- |
|
|
55
55
|
| `APP_LOG_LEVEL` | Application log level (`'debug'`, `'info'`, `'warn'`, `'error'`) | No | `warn` |
|
|
56
56
|
|
|
57
|
+
> **Startup validation:** The module validates `APP_LOG_LEVEL` at initialization. An unrecognized value triggers a warning and falls back to `warn`.
|
|
58
|
+
|
|
57
59
|
---
|
|
58
60
|
|
|
59
61
|
## Exports Summary
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: MailDeliveryError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: MailDeliveryError
|
|
7
|
+
|
|
8
|
+
Defined in: [platform-mailing/src/errors/MailDeliveryError.ts:6](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/errors/MailDeliveryError.ts#L6)
|
|
9
|
+
|
|
10
|
+
Domain error thrown when email delivery fails.
|
|
11
|
+
|
|
12
|
+
## Extends
|
|
13
|
+
|
|
14
|
+
- `Error`
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new MailDeliveryError(
|
|
22
|
+
provider,
|
|
23
|
+
message,
|
|
24
|
+
cause?): MailDeliveryError;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Defined in: [platform-mailing/src/errors/MailDeliveryError.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/errors/MailDeliveryError.ts#L16)
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type |
|
|
32
|
+
| ------ | ------ |
|
|
33
|
+
| `provider` | `string` |
|
|
34
|
+
| `message` | `string` |
|
|
35
|
+
| `cause?` | `unknown` |
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`MailDeliveryError`
|
|
40
|
+
|
|
41
|
+
#### Overrides
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
Error.constructor
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Properties
|
|
48
|
+
|
|
49
|
+
### code
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
readonly code: "MAIL_DELIVERY" = 'MAIL_DELIVERY';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Defined in: [platform-mailing/src/errors/MailDeliveryError.ts:9](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/errors/MailDeliveryError.ts#L9)
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### provider
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
readonly provider: string;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Defined in: [platform-mailing/src/errors/MailDeliveryError.ts:10](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/errors/MailDeliveryError.ts#L10)
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: MailgunDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts:19](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts#L19)
|
|
9
9
|
|
|
10
10
|
Delivers emails via the Mailgun API.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Delivers emails via the Mailgun API.
|
|
|
21
21
|
new MailgunDeliveryStrategy(configService): MailgunDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts#L35)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `MailgunDeliveryStrategy` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts:60](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/strategies/MailgunDeliveryStrategy.ts#L60)
|
|
57
57
|
|
|
58
58
|
Sends an email using the Mailgun transport.
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: PostmarkDeliveryStrategy
|
|
7
7
|
|
|
8
|
-
Defined in: [platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts:
|
|
8
|
+
Defined in: [platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts#L17)
|
|
9
9
|
|
|
10
10
|
The `PostmarkDeliveryStrategy` class.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ The `PostmarkDeliveryStrategy` class.
|
|
|
21
21
|
new PostmarkDeliveryStrategy(configService): PostmarkDeliveryStrategy;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts:
|
|
24
|
+
Defined in: [platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts:32](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts#L32)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `PostmarkDeliveryStrategy` class.
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ send(
|
|
|
53
53
|
_attachments?): Promise<void>;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts:
|
|
56
|
+
Defined in: [platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/strategies/PostmarkDeliveryStrategy.ts#L52)
|
|
57
57
|
|
|
58
58
|
Sends an email using the Postmark transport.
|
|
59
59
|
|