@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.
Files changed (136) hide show
  1. package/data/guides/cryptography-and-otp.md +2 -2
  2. package/data/guides/database-setup.md +4 -3
  3. package/data/guides/email-templates.md +3 -3
  4. package/data/guides/getting-started.md +6 -6
  5. package/data/guides/resource-management.md +9 -9
  6. package/data/packages/platform-blob-storage/api/Variable.AWS_S3_PROVIDER_OPTIONS.md +1 -1
  7. package/data/packages/platform-blob-storage/api/Variable.AZURE_BLOB_PROVIDER_OPTIONS.md +1 -1
  8. package/data/packages/platform-blob-storage/api/Variable.BLOB_PROVIDER.md +1 -1
  9. package/data/packages/platform-blob-storage/api/Variable.VERCEL_BLOB_PROVIDER_OPTIONS.md +1 -1
  10. package/data/packages/platform-core/api/Class.ErrorTemplateService.md +1 -1
  11. package/data/packages/platform-core/api/Class.HostService.md +1 -1
  12. package/data/packages/platform-core/api/Variable.ID_GENERATOR_TOKEN.md +1 -1
  13. package/data/packages/platform-core/api/index.md +0 -27
  14. package/data/packages/platform-core/index.md +7 -4
  15. package/data/packages/platform-cryptography/api/Class.BcryptService.md +4 -4
  16. package/data/packages/platform-cryptography/api/Class.OtpService.md +6 -6
  17. package/data/packages/platform-cryptography/api/Variable.BCRYPT_OPTIONS.md +2 -2
  18. package/data/packages/platform-cryptography/api/Variable.MAX_BCRYPT_PASSWORD_BYTES.md +1 -1
  19. package/data/packages/platform-cryptography/api/Variable.MIN_BCRYPT_ROUNDS.md +1 -1
  20. package/data/packages/platform-cryptography/api/Variable.OTP_OPTIONS.md +2 -2
  21. package/data/packages/platform-cryptography/api/Variable.OTP_SERVICE_TOKEN.md +2 -2
  22. package/data/packages/platform-cryptography/api/Variable.TOTP_EPOCH_TOLERANCE.md +1 -1
  23. package/data/packages/platform-cryptography/api/index.md +3 -3
  24. package/data/packages/platform-documents/api/Class.BaseDocumentRenderer.md +32 -1
  25. package/data/packages/platform-documents/api/Class.DocumentEngine.md +4 -4
  26. package/data/packages/platform-documents/api/Class.DocumentModule.md +2 -2
  27. package/data/packages/platform-documents/api/Class.DocxDocumentRenderer2.md +333 -0
  28. package/data/packages/platform-documents/api/Class.PdfDocumentRenderer.md +355 -0
  29. package/data/packages/platform-documents/api/Interface.IDocumentModuleOptions.md +31 -5
  30. package/data/packages/platform-documents/api/Variable.DOCUMENT_MODULE_OPTIONS.md +1 -1
  31. package/data/packages/platform-documents/api/Variable.DOCUMENT_PARSER_TOKEN.md +1 -1
  32. package/data/packages/platform-documents/api/Variable.DOCUMENT_RENDERER_TOKEN.md +1 -1
  33. package/data/packages/platform-documents/api/Variable.IMAGE_PROCESSOR_TOKEN.md +1 -1
  34. package/data/packages/platform-documents/api/index.md +2 -0
  35. package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +1 -1
  36. package/data/packages/platform-health/index.md +128 -0
  37. package/data/packages/platform-mailing/api/Class.DeliveryStrategyBase.md +0 -1
  38. package/data/packages/platform-mailing/api/Class.MailModule.md +1 -1
  39. package/data/packages/platform-mailing/api/Class.TemplateFetchStrategyBase.md +0 -5
  40. package/data/packages/platform-mailing/api/Variable.SMTP_CONFIG_ENTRIES.md +14 -0
  41. package/data/packages/platform-mailing/api/Variable.SMTP_HOST.md +14 -0
  42. package/data/packages/platform-mailing/api/Variable.SMTP_PASSWORD.md +14 -0
  43. package/data/packages/platform-mailing/api/Variable.SMTP_PORT.md +14 -0
  44. package/data/packages/platform-mailing/api/Variable.SMTP_SECURE.md +14 -0
  45. package/data/packages/platform-mailing/api/Variable.SMTP_USER.md +14 -0
  46. package/data/packages/platform-mailing/api/index.md +6 -3
  47. package/data/packages/platform-mapping/index.md +121 -0
  48. package/data/packages/platform-mcp/api/Variable.MCP_MODULE_OPTIONS.md +1 -1
  49. package/data/packages/platform-openapi/api/Class.SwaggerMultiDocumentService.md +4 -4
  50. package/data/packages/platform-resources/index.md +135 -0
  51. package/data/packages/platform-telemetry/api/Variable.TELEMETRY_ENABLED.md +1 -1
  52. package/data/packages/platform-telemetry/api/Variable.TELEMETRY_FACADE.md +1 -1
  53. package/data/packages/platform-telemetry/api/Variable.TELEMETRY_OPTIONS.md +1 -1
  54. package/{src/knowledge/configPattern.js → data/patterns/config-pattern.md} +44 -47
  55. package/{src/knowledge/dtoPattern.js → data/patterns/dto-pattern.md} +58 -61
  56. package/{src/knowledge/errorHandlingPattern.js → data/patterns/error-handling-pattern.md} +35 -38
  57. package/{src/knowledge/guardPattern.js → data/patterns/guard-pattern.md} +35 -38
  58. package/{src/knowledge/mappingPattern.js → data/patterns/mapping-pattern.md} +43 -144
  59. package/data/patterns/module-pattern.md +182 -0
  60. package/data/patterns/query-pattern.md +137 -0
  61. package/data/patterns/repository-pattern.md +208 -0
  62. package/{src/knowledge/testingPattern.js → data/patterns/testing-pattern.md} +37 -40
  63. package/package.json +1 -1
  64. package/src/PatternsLoader.d.ts +12 -0
  65. package/src/PatternsLoader.js +65 -0
  66. package/src/generators/mappingPatternGenerator.d.ts +5 -0
  67. package/src/generators/mappingPatternGenerator.js +107 -0
  68. package/src/generators/modulePatternGenerator.d.ts +5 -0
  69. package/src/generators/modulePatternGenerator.js +107 -0
  70. package/src/generators/queryPatternGenerator.d.ts +4 -0
  71. package/src/generators/queryPatternGenerator.js +83 -0
  72. package/src/generators/repositoryPatternGenerator.d.ts +5 -0
  73. package/src/generators/repositoryPatternGenerator.js +165 -0
  74. package/src/main.js +15 -9
  75. package/src/models/IPatternDoc.d.ts +15 -0
  76. package/src/models/IPatternDoc.js +3 -0
  77. package/src/tools/registerGetConfigPatternTool.d.ts +2 -1
  78. package/src/tools/registerGetConfigPatternTool.js +4 -3
  79. package/src/tools/registerGetDtoPatternTool.d.ts +2 -1
  80. package/src/tools/registerGetDtoPatternTool.js +4 -3
  81. package/src/tools/registerGetErrorHandlingPatternTool.d.ts +2 -1
  82. package/src/tools/registerGetErrorHandlingPatternTool.js +4 -3
  83. package/src/tools/registerGetGuardPatternTool.d.ts +2 -1
  84. package/src/tools/registerGetGuardPatternTool.js +4 -3
  85. package/src/tools/registerGetMappingPatternTool.d.ts +2 -1
  86. package/src/tools/registerGetMappingPatternTool.js +5 -4
  87. package/src/tools/registerGetModulePatternTool.d.ts +2 -1
  88. package/src/tools/registerGetModulePatternTool.js +5 -4
  89. package/src/tools/registerGetQueryPatternTool.d.ts +2 -1
  90. package/src/tools/registerGetQueryPatternTool.js +5 -4
  91. package/src/tools/registerGetRepositoryPatternTool.d.ts +2 -1
  92. package/src/tools/registerGetRepositoryPatternTool.js +5 -4
  93. package/src/tools/registerGetTestingPatternTool.d.ts +2 -1
  94. package/src/tools/registerGetTestingPatternTool.js +4 -3
  95. package/data/packages/platform-core/api/Class.BlobResourceStrategy.md +0 -195
  96. package/data/packages/platform-core/api/Class.EmbeddedResourceStrategy.md +0 -215
  97. package/data/packages/platform-core/api/Class.FileResourceStrategy.md +0 -192
  98. package/data/packages/platform-core/api/Class.HealthModule.md +0 -42
  99. package/data/packages/platform-core/api/Class.HealthOrchestrator.md +0 -64
  100. package/data/packages/platform-core/api/Class.MappingBuilder.md +0 -110
  101. package/data/packages/platform-core/api/Class.MappingModule.md +0 -46
  102. package/data/packages/platform-core/api/Class.MappingNotRegisteredError.md +0 -56
  103. package/data/packages/platform-core/api/Class.MappingProfileBase.md +0 -52
  104. package/data/packages/platform-core/api/Class.MappingService.md +0 -284
  105. package/data/packages/platform-core/api/Class.ResourceManager.md +0 -565
  106. package/data/packages/platform-core/api/Class.ResourceModule.md +0 -46
  107. package/data/packages/platform-core/api/Class.TypeMappingNotRegisteredError.md +0 -57
  108. package/data/packages/platform-core/api/Function.createMappingKey.md +0 -39
  109. package/data/packages/platform-core/api/Interface.IBlobResourceStrategyConfig.md +0 -28
  110. package/data/packages/platform-core/api/Interface.IBlobServiceAdapter.md +0 -40
  111. package/data/packages/platform-core/api/Interface.IFileResourceStrategyConfig.md +0 -72
  112. package/data/packages/platform-core/api/Interface.IHealthCheckResult.md +0 -46
  113. package/data/packages/platform-core/api/Interface.IHealthIndicator.md +0 -41
  114. package/data/packages/platform-core/api/Interface.IMappingBuilder.md +0 -76
  115. package/data/packages/platform-core/api/Interface.IMappingKey.md +0 -58
  116. package/data/packages/platform-core/api/Interface.IMappingProfile.md +0 -32
  117. package/data/packages/platform-core/api/Interface.IResourceManagerConfig.md +0 -89
  118. package/data/packages/platform-core/api/Interface.IResourceMetadata.md +0 -94
  119. package/data/packages/platform-core/api/Interface.IResourceResult.md +0 -34
  120. package/data/packages/platform-core/api/Interface.IResourceStrategy.md +0 -134
  121. package/data/packages/platform-core/api/Variable.HEALTH_INDICATORS_TOKEN.md +0 -14
  122. package/data/packages/platform-mailing/api/Class.BlobTemplateFetchStrategy.md +0 -60
  123. package/data/packages/platform-mailing/api/Class.FileTemplateFetchStrategy.md +0 -58
  124. package/data/packages/platform-mailing/api/Class.LogDeliveryStrategy.md +0 -71
  125. package/src/knowledge/configPattern.d.ts +0 -5
  126. package/src/knowledge/dtoPattern.d.ts +0 -5
  127. package/src/knowledge/errorHandlingPattern.d.ts +0 -5
  128. package/src/knowledge/guardPattern.d.ts +0 -5
  129. package/src/knowledge/mappingPattern.d.ts +0 -6
  130. package/src/knowledge/modulePattern.d.ts +0 -6
  131. package/src/knowledge/modulePattern.js +0 -283
  132. package/src/knowledge/queryPattern.d.ts +0 -6
  133. package/src/knowledge/queryPattern.js +0 -215
  134. package/src/knowledge/repositoryPattern.d.ts +0 -6
  135. package/src/knowledge/repositoryPattern.js +0 -367
  136. package/src/knowledge/testingPattern.d.ts +0 -5
@@ -1,565 +0,0 @@
1
- ---
2
- title: 'Class: ResourceManager'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Class: ResourceManager
7
-
8
- Defined in: [resources/ResourceManager.ts:74](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L74)
9
-
10
- Central manager for loading resources from various sources.
11
- Supports multiple strategies (file, blob, embedded) with caching.
12
-
13
- ## Implements
14
-
15
- - `IResourceManager`
16
-
17
- ## Constructors
18
-
19
- ### Constructor
20
-
21
- ```ts
22
- new ResourceManager(config): ResourceManager;
23
- ```
24
-
25
- Defined in: [resources/ResourceManager.ts:92](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L92)
26
-
27
- Constructs a new instance of the `ResourceManager` class.
28
-
29
- #### Parameters
30
-
31
- | Parameter | Type |
32
- | ------ | ------ |
33
- | `config` | [`IResourceManagerConfig`](Interface.IResourceManagerConfig) |
34
-
35
- #### Returns
36
-
37
- `ResourceManager`
38
-
39
- ## Methods
40
-
41
- ### exists()
42
-
43
- ```ts
44
- exists(key): boolean;
45
- ```
46
-
47
- Defined in: [resources/ResourceManager.ts:383](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L383)
48
-
49
- Checks if a resource exists.
50
-
51
- #### Parameters
52
-
53
- | Parameter | Type | Description |
54
- | ------ | ------ | ------ |
55
- | `key` | `string` | The resource key |
56
-
57
- #### Returns
58
-
59
- `boolean`
60
-
61
- True if the resource exists in any strategy
62
-
63
- #### Implementation of
64
-
65
- ```ts
66
- IResourceManager.exists
67
- ```
68
-
69
- ***
70
-
71
- ### existsAsync()
72
-
73
- ```ts
74
- existsAsync(key): Promise<boolean>;
75
- ```
76
-
77
- Defined in: [resources/ResourceManager.ts:400](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L400)
78
-
79
- Checks if a resource exists (asynchronous).
80
-
81
- #### Parameters
82
-
83
- | Parameter | Type | Description |
84
- | ------ | ------ | ------ |
85
- | `key` | `string` | The resource key |
86
-
87
- #### Returns
88
-
89
- `Promise`\<`boolean`\>
90
-
91
- Promise resolving to true if the resource exists in any strategy
92
-
93
- #### Implementation of
94
-
95
- ```ts
96
- IResourceManager.existsAsync
97
- ```
98
-
99
- ***
100
-
101
- ### invalidate()
102
-
103
- ```ts
104
- invalidate(key): void;
105
- ```
106
-
107
- Defined in: [resources/ResourceManager.ts:416](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L416)
108
-
109
- Invalidates cached resource.
110
-
111
- #### Parameters
112
-
113
- | Parameter | Type | Description |
114
- | ------ | ------ | ------ |
115
- | `key` | `string` | The resource key |
116
-
117
- #### Returns
118
-
119
- `void`
120
-
121
- #### Implementation of
122
-
123
- ```ts
124
- IResourceManager.invalidate
125
- ```
126
-
127
- ***
128
-
129
- ### invalidateAsync()
130
-
131
- ```ts
132
- invalidateAsync(key): Promise<void>;
133
- ```
134
-
135
- Defined in: [resources/ResourceManager.ts:430](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L430)
136
-
137
- Invalidates cached resource (asynchronous).
138
-
139
- #### Parameters
140
-
141
- | Parameter | Type | Description |
142
- | ------ | ------ | ------ |
143
- | `key` | `string` | The resource key |
144
-
145
- #### Returns
146
-
147
- `Promise`\<`void`\>
148
-
149
- Promise that resolves when the cache is invalidated
150
-
151
- #### Implementation of
152
-
153
- ```ts
154
- IResourceManager.invalidateAsync
155
- ```
156
-
157
- ***
158
-
159
- ### load()
160
-
161
- ```ts
162
- load(key): IResourceResult;
163
- ```
164
-
165
- Defined in: [resources/ResourceManager.ts:115](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L115)
166
-
167
- Loads a resource by its key.
168
-
169
- #### Parameters
170
-
171
- | Parameter | Type | Description |
172
- | ------ | ------ | ------ |
173
- | `key` | `string` | The resource key |
174
-
175
- #### Returns
176
-
177
- [`IResourceResult`](Interface.IResourceResult)
178
-
179
- The resource result
180
-
181
- #### Throws
182
-
183
- Error if resource not found
184
-
185
- #### Implementation of
186
-
187
- ```ts
188
- IResourceManager.load
189
- ```
190
-
191
- ***
192
-
193
- ### loadAsBuffer()
194
-
195
- ```ts
196
- loadAsBuffer(key): Buffer;
197
- ```
198
-
199
- Defined in: [resources/ResourceManager.ts:324](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L324)
200
-
201
- Loads a resource as a Buffer.
202
-
203
- #### Parameters
204
-
205
- | Parameter | Type | Description |
206
- | ------ | ------ | ------ |
207
- | `key` | `string` | The resource key |
208
-
209
- #### Returns
210
-
211
- `Buffer`
212
-
213
- The resource content as a Buffer
214
-
215
- #### Throws
216
-
217
- Error if resource not found
218
-
219
- #### Implementation of
220
-
221
- ```ts
222
- IResourceManager.loadAsBuffer
223
- ```
224
-
225
- ***
226
-
227
- ### loadAsBufferAsync()
228
-
229
- ```ts
230
- loadAsBufferAsync(key): Promise<Buffer<ArrayBufferLike>>;
231
- ```
232
-
233
- Defined in: [resources/ResourceManager.ts:354](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L354)
234
-
235
- Loads a resource as a Buffer (asynchronous).
236
-
237
- #### Parameters
238
-
239
- | Parameter | Type | Description |
240
- | ------ | ------ | ------ |
241
- | `key` | `string` | The resource key |
242
-
243
- #### Returns
244
-
245
- `Promise`\<`Buffer`\<`ArrayBufferLike`\>\>
246
-
247
- Promise resolving to the resource content as a Buffer
248
-
249
- #### Throws
250
-
251
- Error if resource not found
252
-
253
- #### Implementation of
254
-
255
- ```ts
256
- IResourceManager.loadAsBufferAsync
257
- ```
258
-
259
- ***
260
-
261
- ### loadAsString()
262
-
263
- ```ts
264
- loadAsString(key, encoding?): string;
265
- ```
266
-
267
- Defined in: [resources/ResourceManager.ts:248](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L248)
268
-
269
- Loads a resource as a string.
270
-
271
- #### Parameters
272
-
273
- | Parameter | Type | Default value | Description |
274
- | ------ | ------ | ------ | ------ |
275
- | `key` | `string` | `undefined` | The resource key |
276
- | `encoding` | `BufferEncoding` | `'utf-8'` | The encoding to use (default: 'utf-8') |
277
-
278
- #### Returns
279
-
280
- `string`
281
-
282
- The resource content as a string
283
-
284
- #### Throws
285
-
286
- Error if resource not found
287
-
288
- #### Implementation of
289
-
290
- ```ts
291
- IResourceManager.loadAsString
292
- ```
293
-
294
- ***
295
-
296
- ### loadAsStringAsync()
297
-
298
- ```ts
299
- loadAsStringAsync(key, encoding?): Promise<string>;
300
- ```
301
-
302
- Defined in: [resources/ResourceManager.ts:285](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L285)
303
-
304
- Loads a resource as a string (asynchronous).
305
-
306
- #### Parameters
307
-
308
- | Parameter | Type | Default value | Description |
309
- | ------ | ------ | ------ | ------ |
310
- | `key` | `string` | `undefined` | The resource key |
311
- | `encoding` | `BufferEncoding` | `'utf-8'` | The encoding to use (default: 'utf-8') |
312
-
313
- #### Returns
314
-
315
- `Promise`\<`string`\>
316
-
317
- Promise resolving to the resource content as a string
318
-
319
- #### Throws
320
-
321
- Error if resource not found
322
-
323
- #### Implementation of
324
-
325
- ```ts
326
- IResourceManager.loadAsStringAsync
327
- ```
328
-
329
- ***
330
-
331
- ### loadAsync()
332
-
333
- ```ts
334
- loadAsync(key): Promise<IResourceResult>;
335
- ```
336
-
337
- Defined in: [resources/ResourceManager.ts:173](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L173)
338
-
339
- Loads a resource by its key (asynchronous).
340
-
341
- #### Parameters
342
-
343
- | Parameter | Type | Description |
344
- | ------ | ------ | ------ |
345
- | `key` | `string` | The resource key |
346
-
347
- #### Returns
348
-
349
- `Promise`\<[`IResourceResult`](Interface.IResourceResult)\>
350
-
351
- Promise resolving to the resource result
352
-
353
- #### Throws
354
-
355
- Error if resource not found
356
-
357
- #### Implementation of
358
-
359
- ```ts
360
- IResourceManager.loadAsync
361
- ```
362
-
363
- ***
364
-
365
- ### tryLoad()
366
-
367
- ```ts
368
- tryLoad(key): IResourceResult | undefined;
369
- ```
370
-
371
- Defined in: [resources/ResourceManager.ts:132](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L132)
372
-
373
- Tries to load a resource by its key.
374
-
375
- #### Parameters
376
-
377
- | Parameter | Type | Description |
378
- | ------ | ------ | ------ |
379
- | `key` | `string` | The resource key |
380
-
381
- #### Returns
382
-
383
- [`IResourceResult`](Interface.IResourceResult) \| `undefined`
384
-
385
- The resource result or undefined if not found
386
-
387
- #### Implementation of
388
-
389
- ```ts
390
- IResourceManager.tryLoad
391
- ```
392
-
393
- ***
394
-
395
- ### tryLoadAsBuffer()
396
-
397
- ```ts
398
- tryLoadAsBuffer(key): Buffer<ArrayBufferLike> | undefined;
399
- ```
400
-
401
- Defined in: [resources/ResourceManager.ts:341](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L341)
402
-
403
- Tries to load a resource as a Buffer.
404
-
405
- #### Parameters
406
-
407
- | Parameter | Type | Description |
408
- | ------ | ------ | ------ |
409
- | `key` | `string` | The resource key |
410
-
411
- #### Returns
412
-
413
- `Buffer`\<`ArrayBufferLike`\> \| `undefined`
414
-
415
- The resource content as a Buffer or undefined if not found
416
-
417
- #### Implementation of
418
-
419
- ```ts
420
- IResourceManager.tryLoadAsBuffer
421
- ```
422
-
423
- ***
424
-
425
- ### tryLoadAsBufferAsync()
426
-
427
- ```ts
428
- tryLoadAsBufferAsync(key): Promise<Buffer<ArrayBufferLike> | undefined>;
429
- ```
430
-
431
- Defined in: [resources/ResourceManager.ts:371](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L371)
432
-
433
- Tries to load a resource as a Buffer (asynchronous).
434
-
435
- #### Parameters
436
-
437
- | Parameter | Type | Description |
438
- | ------ | ------ | ------ |
439
- | `key` | `string` | The resource key |
440
-
441
- #### Returns
442
-
443
- `Promise`\<`Buffer`\<`ArrayBufferLike`\> \| `undefined`\>
444
-
445
- Promise resolving to the resource content as a Buffer or undefined if not found
446
-
447
- #### Implementation of
448
-
449
- ```ts
450
- IResourceManager.tryLoadAsBufferAsync
451
- ```
452
-
453
- ***
454
-
455
- ### tryLoadAsString()
456
-
457
- ```ts
458
- tryLoadAsString(key, encoding?): string | undefined;
459
- ```
460
-
461
- Defined in: [resources/ResourceManager.ts:266](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L266)
462
-
463
- Tries to load a resource as a string.
464
-
465
- #### Parameters
466
-
467
- | Parameter | Type | Default value | Description |
468
- | ------ | ------ | ------ | ------ |
469
- | `key` | `string` | `undefined` | The resource key |
470
- | `encoding` | `BufferEncoding` | `'utf-8'` | The encoding to use (default: 'utf-8') |
471
-
472
- #### Returns
473
-
474
- `string` \| `undefined`
475
-
476
- The resource content as a string or undefined if not found
477
-
478
- #### Implementation of
479
-
480
- ```ts
481
- IResourceManager.tryLoadAsString
482
- ```
483
-
484
- ***
485
-
486
- ### tryLoadAsStringAsync()
487
-
488
- ```ts
489
- tryLoadAsStringAsync(key, encoding?): Promise<string | undefined>;
490
- ```
491
-
492
- Defined in: [resources/ResourceManager.ts:303](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L303)
493
-
494
- Tries to load a resource as a string (asynchronous).
495
-
496
- #### Parameters
497
-
498
- | Parameter | Type | Default value | Description |
499
- | ------ | ------ | ------ | ------ |
500
- | `key` | `string` | `undefined` | The resource key |
501
- | `encoding` | `BufferEncoding` | `'utf-8'` | The encoding to use (default: 'utf-8') |
502
-
503
- #### Returns
504
-
505
- `Promise`\<`string` \| `undefined`\>
506
-
507
- Promise resolving to the resource content as a string or undefined if not found
508
-
509
- #### Implementation of
510
-
511
- ```ts
512
- IResourceManager.tryLoadAsStringAsync
513
- ```
514
-
515
- ***
516
-
517
- ### tryLoadAsync()
518
-
519
- ```ts
520
- tryLoadAsync(key): Promise<IResourceResult | undefined>;
521
- ```
522
-
523
- Defined in: [resources/ResourceManager.ts:190](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L190)
524
-
525
- Tries to load a resource by its key (asynchronous).
526
-
527
- #### Parameters
528
-
529
- | Parameter | Type | Description |
530
- | ------ | ------ | ------ |
531
- | `key` | `string` | The resource key |
532
-
533
- #### Returns
534
-
535
- `Promise`\<[`IResourceResult`](Interface.IResourceResult) \| `undefined`\>
536
-
537
- Promise resolving to the resource result or undefined if not found
538
-
539
- #### Implementation of
540
-
541
- ```ts
542
- IResourceManager.tryLoadAsync
543
- ```
544
-
545
- ***
546
-
547
- ### whatDoIHave()
548
-
549
- ```ts
550
- whatDoIHave(): void;
551
- ```
552
-
553
- Defined in: [resources/ResourceManager.ts:442](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceManager.ts#L442)
554
-
555
- List all files and folders in the base paths for debugging purposes.
556
-
557
- #### Returns
558
-
559
- `void`
560
-
561
- #### Implementation of
562
-
563
- ```ts
564
- IResourceManager.whatDoIHave
565
- ```
@@ -1,46 +0,0 @@
1
- ---
2
- title: 'Class: ResourceModule'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Class: ResourceModule
7
-
8
- Defined in: [resources/ResourceModule.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceModule.ts#L15)
9
-
10
- Module providing the ResourceManager.
11
-
12
- ## Constructors
13
-
14
- ### Constructor
15
-
16
- ```ts
17
- new ResourceModule(): ResourceModule;
18
- ```
19
-
20
- #### Returns
21
-
22
- `ResourceModule`
23
-
24
- ## Methods
25
-
26
- ### forRoot()
27
-
28
- ```ts
29
- static forRoot(config): DynamicModule;
30
- ```
31
-
32
- Defined in: [resources/ResourceModule.ts:26](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/resources/ResourceModule.ts#L26)
33
-
34
- Registers the ResourceManager with the provided configuration.
35
-
36
- #### Parameters
37
-
38
- | Parameter | Type | Description |
39
- | ------ | ------ | ------ |
40
- | `config` | [`IResourceManagerConfig`](Interface.IResourceManagerConfig) | The resource manager configuration |
41
-
42
- #### Returns
43
-
44
- `DynamicModule`
45
-
46
- A dynamic module
@@ -1,57 +0,0 @@
1
- ---
2
- title: 'Class: TypeMappingNotRegisteredError'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Class: TypeMappingNotRegisteredError
7
-
8
- Defined in: [mapping/errors/TypeMappingNotRegisteredError.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/errors/TypeMappingNotRegisteredError.ts#L12)
9
-
10
- Thrown when a type mapping is requested but not registered.
11
-
12
- ## Extends
13
-
14
- - `MappingError`
15
-
16
- ## Constructors
17
-
18
- ### Constructor
19
-
20
- ```ts
21
- new TypeMappingNotRegisteredError(source, destination): TypeMappingNotRegisteredError;
22
- ```
23
-
24
- Defined in: [mapping/errors/TypeMappingNotRegisteredError.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/errors/TypeMappingNotRegisteredError.ts#L16)
25
-
26
- #### Parameters
27
-
28
- | Parameter | Type |
29
- | ------ | ------ |
30
- | `source` | `string` |
31
- | `destination` | `string` |
32
-
33
- #### Returns
34
-
35
- `TypeMappingNotRegisteredError`
36
-
37
- #### Overrides
38
-
39
- ```ts
40
- MappingError.constructor
41
- ```
42
-
43
- ## Properties
44
-
45
- ### code
46
-
47
- ```ts
48
- readonly code: string;
49
- ```
50
-
51
- Defined in: [mapping/errors/MappingError.ts:11](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/errors/MappingError.ts#L11)
52
-
53
- #### Inherited from
54
-
55
- ```ts
56
- MappingError.code
57
- ```
@@ -1,39 +0,0 @@
1
- ---
2
- title: 'Function: createMappingKey()'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Function: createMappingKey()
7
-
8
- ```ts
9
- function createMappingKey<TInput, TOutput>(key): IMappingKey<TInput, TOutput>;
10
- ```
11
-
12
- Defined in: [mapping/types/MappingKey.ts:28](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/mapping/types/MappingKey.ts#L28)
13
-
14
- Creates a type-safe mapping key.
15
-
16
- ## Type Parameters
17
-
18
- | Type Parameter |
19
- | ------ |
20
- | `TInput` |
21
- | `TOutput` |
22
-
23
- ## Parameters
24
-
25
- | Parameter | Type | Description |
26
- | ------ | ------ | ------ |
27
- | `key` | `string` | The unique string identifier for the mapping. |
28
-
29
- ## Returns
30
-
31
- [`IMappingKey`](Interface.IMappingKey)\<`TInput`, `TOutput`\>
32
-
33
- A branded mapping key that encodes the input and output types.
34
-
35
- ## Example
36
-
37
- ```typescript
38
- export const PRODUCT_MAPPING_KEY = createMappingKey<IProductMappingInput, ProductResponse>('food.product');
39
- ```