@breadstone/archipel-mcp 0.0.20 → 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/ai-text-generation.md +10 -0
- package/data/guides/analytics-and-error-tracking.md +6 -0
- package/data/guides/cryptography-and-otp.md +20 -2
- package/data/guides/database-setup.md +4 -3
- 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/getting-started.md +6 -6
- 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/resource-management.md +9 -9
- 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-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.EventHub.md +7 -7
- package/data/packages/platform-core/api/Class.HostService.md +1 -1
- package/data/packages/platform-core/api/Class.SseHub.md +29 -6
- 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 +8 -4
- package/data/packages/platform-cryptography/api/Class.BcryptService.md +4 -4
- package/data/packages/platform-cryptography/api/Class.CryptoService.md +3 -3
- 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-cryptography/index.md +10 -0
- 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.DocumentError.md +61 -0
- package/data/packages/platform-documents/api/Class.DocumentModule.md +2 -2
- 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.DocxDocumentRenderer2.md +333 -0
- package/data/packages/platform-documents/api/Class.ImageProcessingError.md +53 -0
- package/data/packages/platform-documents/api/Class.PdfDocumentRenderer.md +355 -0
- package/data/packages/platform-documents/api/Class.SharpImageProcessor.md +5 -5
- 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 +6 -0
- package/data/packages/platform-documents/index.md +27 -0
- package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +2 -2
- package/data/packages/platform-esigning/api/Class.InternalEsigningProvider.md +8 -8
- package/data/packages/platform-esigning/index.md +2 -0
- package/data/packages/platform-health/index.md +128 -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.DeliveryStrategyBase.md +0 -1
- package/data/packages/platform-mailing/api/Class.MailDeliveryError.md +65 -0
- package/data/packages/platform-mailing/api/Class.MailModule.md +1 -1
- 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/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 -3
- package/data/packages/platform-mailing/index.md +29 -0
- package/data/packages/platform-mapping/index.md +121 -0
- package/data/packages/platform-mcp/api/Class.McpServerService.md +8 -8
- package/data/packages/platform-mcp/api/Variable.MCP_MODULE_OPTIONS.md +1 -1
- package/data/packages/platform-mcp/index.md +11 -0
- package/data/packages/platform-openapi/api/Class.SwaggerMultiDocumentService.md +4 -4
- 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-resources/index.md +135 -0
- 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/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/data/packages/platform-telemetry/api/index.md +1 -1
- package/data/packages/platform-telemetry/index.md +3 -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
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Class: MappingService'
|
|
3
|
-
generated: true
|
|
4
|
-
editUrl: false
|
|
5
|
-
---
|
|
6
|
-
# Class: MappingService
|
|
7
|
-
|
|
8
|
-
Defined in: [mapping/MappingService.ts:19](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L19)
|
|
9
|
-
|
|
10
|
-
Central mapping registry supporting keyed & type-based mappings.
|
|
11
|
-
|
|
12
|
-
## Constructors
|
|
13
|
-
|
|
14
|
-
### Constructor
|
|
15
|
-
|
|
16
|
-
```ts
|
|
17
|
-
new MappingService(): MappingService;
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Defined in: [mapping/MappingService.ts:37](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L37)
|
|
21
|
-
|
|
22
|
-
Constructs a new instance of the `MappingService` class.
|
|
23
|
-
|
|
24
|
-
#### Returns
|
|
25
|
-
|
|
26
|
-
`MappingService`
|
|
27
|
-
|
|
28
|
-
## Methods
|
|
29
|
-
|
|
30
|
-
### map()
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
map<TInput, TOutput>(key, source): TOutput;
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Defined in: [mapping/MappingService.ts:96](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L96)
|
|
37
|
-
|
|
38
|
-
Maps a source object to a destination type using a type-safe mapping key.
|
|
39
|
-
The key encodes both input and output types, ensuring compile-time type safety.
|
|
40
|
-
|
|
41
|
-
#### Type Parameters
|
|
42
|
-
|
|
43
|
-
| Type Parameter |
|
|
44
|
-
| ------ |
|
|
45
|
-
| `TInput` |
|
|
46
|
-
| `TOutput` |
|
|
47
|
-
|
|
48
|
-
#### Parameters
|
|
49
|
-
|
|
50
|
-
| Parameter | Type | Description |
|
|
51
|
-
| ------ | ------ | ------ |
|
|
52
|
-
| `key` | [`IMappingKey`](Interface.IMappingKey)\<`TInput`, `TOutput`\> | The type-safe mapping key. |
|
|
53
|
-
| `source` | `TInput` | The source object to map. |
|
|
54
|
-
|
|
55
|
-
#### Returns
|
|
56
|
-
|
|
57
|
-
`TOutput`
|
|
58
|
-
|
|
59
|
-
The mapped destination object.
|
|
60
|
-
|
|
61
|
-
#### Example
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
const response = this._mappingService.map(PRODUCT_MAPPING_KEY, productInput);
|
|
65
|
-
// response is automatically typed as ProductResponse
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
***
|
|
69
|
-
|
|
70
|
-
### mapTypes()
|
|
71
|
-
|
|
72
|
-
```ts
|
|
73
|
-
mapTypes<TSource, TDestination>(source, destination): TDestination;
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Defined in: [mapping/MappingService.ts:126](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L126)
|
|
77
|
-
|
|
78
|
-
Maps a source object to a destination type using a registered mapping function.
|
|
79
|
-
|
|
80
|
-
#### Type Parameters
|
|
81
|
-
|
|
82
|
-
| Type Parameter |
|
|
83
|
-
| ------ |
|
|
84
|
-
| `TSource` |
|
|
85
|
-
| `TDestination` |
|
|
86
|
-
|
|
87
|
-
#### Parameters
|
|
88
|
-
|
|
89
|
-
| Parameter | Type | Description |
|
|
90
|
-
| ------ | ------ | ------ |
|
|
91
|
-
| `source` | `TSource` | The source object to map. |
|
|
92
|
-
| `destination` | `Constructor`\<`TDestination`\> | The constructor of the destination type. |
|
|
93
|
-
|
|
94
|
-
#### Returns
|
|
95
|
-
|
|
96
|
-
`TDestination`
|
|
97
|
-
|
|
98
|
-
The mapped destination object.
|
|
99
|
-
|
|
100
|
-
***
|
|
101
|
-
|
|
102
|
-
### mapTypesArray()
|
|
103
|
-
|
|
104
|
-
```ts
|
|
105
|
-
mapTypesArray<TSource, TDestination>(sources, destination): TDestination[];
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Defined in: [mapping/MappingService.ts:155](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L155)
|
|
109
|
-
|
|
110
|
-
Maps an array of source objects to an array of destination types using a registered mapping function.
|
|
111
|
-
|
|
112
|
-
#### Type Parameters
|
|
113
|
-
|
|
114
|
-
| Type Parameter |
|
|
115
|
-
| ------ |
|
|
116
|
-
| `TSource` |
|
|
117
|
-
| `TDestination` |
|
|
118
|
-
|
|
119
|
-
#### Parameters
|
|
120
|
-
|
|
121
|
-
| Parameter | Type | Description |
|
|
122
|
-
| ------ | ------ | ------ |
|
|
123
|
-
| `sources` | `TSource`[] | The array of source objects to map. |
|
|
124
|
-
| `destination` | `Constructor`\<`TDestination`\> | The constructor of the destination type. |
|
|
125
|
-
|
|
126
|
-
#### Returns
|
|
127
|
-
|
|
128
|
-
`TDestination`[]
|
|
129
|
-
|
|
130
|
-
The array of mapped destination objects.
|
|
131
|
-
|
|
132
|
-
***
|
|
133
|
-
|
|
134
|
-
### register()
|
|
135
|
-
|
|
136
|
-
```ts
|
|
137
|
-
register<TSource, TDestination>(key, fn): void;
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Defined in: [mapping/MappingService.ts:55](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L55)
|
|
141
|
-
|
|
142
|
-
Registers a mapping function for a specific key.
|
|
143
|
-
|
|
144
|
-
#### Type Parameters
|
|
145
|
-
|
|
146
|
-
| Type Parameter |
|
|
147
|
-
| ------ |
|
|
148
|
-
| `TSource` |
|
|
149
|
-
| `TDestination` |
|
|
150
|
-
|
|
151
|
-
#### Parameters
|
|
152
|
-
|
|
153
|
-
| Parameter | Type | Description |
|
|
154
|
-
| ------ | ------ | ------ |
|
|
155
|
-
| `key` | `string` | The unique key for the mapping. |
|
|
156
|
-
| `fn` | (`source`) => `TDestination` | The mapping function. |
|
|
157
|
-
|
|
158
|
-
#### Returns
|
|
159
|
-
|
|
160
|
-
`void`
|
|
161
|
-
|
|
162
|
-
void
|
|
163
|
-
|
|
164
|
-
***
|
|
165
|
-
|
|
166
|
-
### registerMap()
|
|
167
|
-
|
|
168
|
-
```ts
|
|
169
|
-
registerMap<TSource, TDestination>(
|
|
170
|
-
source,
|
|
171
|
-
destination,
|
|
172
|
-
fn): void;
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Defined in: [mapping/MappingService.ts:72](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L72)
|
|
176
|
-
|
|
177
|
-
Registers a mapping function for a specific source and destination type.
|
|
178
|
-
|
|
179
|
-
#### Type Parameters
|
|
180
|
-
|
|
181
|
-
| Type Parameter |
|
|
182
|
-
| ------ |
|
|
183
|
-
| `TSource` |
|
|
184
|
-
| `TDestination` |
|
|
185
|
-
|
|
186
|
-
#### Parameters
|
|
187
|
-
|
|
188
|
-
| Parameter | Type | Description |
|
|
189
|
-
| ------ | ------ | ------ |
|
|
190
|
-
| `source` | `Constructor`\<`TSource`\> | The constructor of the source type. |
|
|
191
|
-
| `destination` | `Constructor`\<`TDestination`\> | The constructor of the destination type. |
|
|
192
|
-
| `fn` | (`source`) => `TDestination` | The mapping function. |
|
|
193
|
-
|
|
194
|
-
#### Returns
|
|
195
|
-
|
|
196
|
-
`void`
|
|
197
|
-
|
|
198
|
-
void
|
|
199
|
-
|
|
200
|
-
***
|
|
201
|
-
|
|
202
|
-
### registerProfile()
|
|
203
|
-
|
|
204
|
-
```ts
|
|
205
|
-
registerProfile(profile): void;
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Defined in: [mapping/MappingService.ts:166](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L166)
|
|
209
|
-
|
|
210
|
-
Registers a mapping profile containing multiple mappings.
|
|
211
|
-
|
|
212
|
-
#### Parameters
|
|
213
|
-
|
|
214
|
-
| Parameter | Type | Description |
|
|
215
|
-
| ------ | ------ | ------ |
|
|
216
|
-
| `profile` | [`IMappingProfile`](Interface.IMappingProfile) | The mapping profile to register. |
|
|
217
|
-
|
|
218
|
-
#### Returns
|
|
219
|
-
|
|
220
|
-
`void`
|
|
221
|
-
|
|
222
|
-
void
|
|
223
|
-
|
|
224
|
-
***
|
|
225
|
-
|
|
226
|
-
### tryMap()
|
|
227
|
-
|
|
228
|
-
```ts
|
|
229
|
-
tryMap<TInput, TOutput>(key, source): TOutput | undefined;
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
Defined in: [mapping/MappingService.ts:112](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L112)
|
|
233
|
-
|
|
234
|
-
Attempts to map returning undefined instead of throwing when mapping is absent.
|
|
235
|
-
|
|
236
|
-
#### Type Parameters
|
|
237
|
-
|
|
238
|
-
| Type Parameter |
|
|
239
|
-
| ------ |
|
|
240
|
-
| `TInput` |
|
|
241
|
-
| `TOutput` |
|
|
242
|
-
|
|
243
|
-
#### Parameters
|
|
244
|
-
|
|
245
|
-
| Parameter | Type | Description |
|
|
246
|
-
| ------ | ------ | ------ |
|
|
247
|
-
| `key` | [`IMappingKey`](Interface.IMappingKey)\<`TInput`, `TOutput`\> | The type-safe mapping key. |
|
|
248
|
-
| `source` | `TInput` | The source object to map. |
|
|
249
|
-
|
|
250
|
-
#### Returns
|
|
251
|
-
|
|
252
|
-
`TOutput` \| `undefined`
|
|
253
|
-
|
|
254
|
-
The mapped destination object or undefined if no mapping exists.
|
|
255
|
-
|
|
256
|
-
***
|
|
257
|
-
|
|
258
|
-
### tryMapTypes()
|
|
259
|
-
|
|
260
|
-
```ts
|
|
261
|
-
tryMapTypes<TSource, TDestination>(source, destination): TDestination | undefined;
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Defined in: [mapping/MappingService.ts:139](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/MappingService.ts#L139)
|
|
265
|
-
|
|
266
|
-
Safe variant of [mapTypes](#maptypes) that returns undefined if not registered.
|
|
267
|
-
|
|
268
|
-
#### Type Parameters
|
|
269
|
-
|
|
270
|
-
| Type Parameter |
|
|
271
|
-
| ------ |
|
|
272
|
-
| `TSource` |
|
|
273
|
-
| `TDestination` |
|
|
274
|
-
|
|
275
|
-
#### Parameters
|
|
276
|
-
|
|
277
|
-
| Parameter | Type |
|
|
278
|
-
| ------ | ------ |
|
|
279
|
-
| `source` | `TSource` |
|
|
280
|
-
| `destination` | `Constructor`\<`TDestination`\> |
|
|
281
|
-
|
|
282
|
-
#### Returns
|
|
283
|
-
|
|
284
|
-
`TDestination` \| `undefined`
|