@breadstone/archipel-mcp 0.0.26 → 0.0.27
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/document-generation.md +17 -6
- package/data/packages/platform-database/api/Class.RepositoryBase.md +33 -23
- package/data/packages/platform-database/api/Class.RepositoryBase2.md +17 -7
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.DelegateReturnTypes.md +1 -1
- package/data/packages/platform-database/index.md +1 -1
- package/data/packages/platform-documents/index.md +14 -7
- package/package.json +1 -1
|
@@ -23,10 +23,15 @@ yarn add @breadstone/archipel-platform-documents
|
|
|
23
23
|
```typescript
|
|
24
24
|
import { Module } from '@nestjs/common';
|
|
25
25
|
import { DocumentModule } from '@breadstone/archipel-platform-documents';
|
|
26
|
+
import { SharpImageProcessor } from '@breadstone/archipel-platform-documents/sharp';
|
|
27
|
+
import { DocxDocumentRenderer2 } from '@breadstone/archipel-platform-documents/docx';
|
|
28
|
+
import { PdfDocumentRenderer } from '@breadstone/archipel-platform-documents/pdf';
|
|
26
29
|
|
|
27
30
|
@Module({
|
|
28
31
|
imports: [
|
|
29
32
|
DocumentModule.forRoot({
|
|
33
|
+
imageProcessor: SharpImageProcessor,
|
|
34
|
+
renderers: [DocxDocumentRenderer2, PdfDocumentRenderer],
|
|
30
35
|
maxImageWidth: 1920,
|
|
31
36
|
maxImageHeight: 1080,
|
|
32
37
|
delimiters: { start: '[[', end: ']]' },
|
|
@@ -38,12 +43,14 @@ export class AppModule {}
|
|
|
38
43
|
|
|
39
44
|
### Options
|
|
40
45
|
|
|
41
|
-
| Option | Default | Description
|
|
42
|
-
| ---------------- | ------- |
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
46
|
+
| Option | Default | Description |
|
|
47
|
+
| ---------------- | ------- | ------------------------------------------------------------------------- |
|
|
48
|
+
| `imageProcessor` | — | **Required.** Image processor class (e.g. `SharpImageProcessor`) |
|
|
49
|
+
| `renderers` | — | **Required.** Renderer classes (e.g. `[DocxDocumentRenderer2, PdfDocumentRenderer]`) |
|
|
50
|
+
| `maxImageWidth` | `1920` | Maximum width for embedded images (in pixels) |
|
|
51
|
+
| `maxImageHeight` | `1080` | Maximum height for embedded images (in pixels) |
|
|
52
|
+
| `delimiters` | `[[ ]]` | Start and end delimiters for template variables |
|
|
53
|
+
| `debug` | `false` | Enable verbose logging for the rendering pipeline |
|
|
47
54
|
|
|
48
55
|
---
|
|
49
56
|
|
|
@@ -64,6 +71,8 @@ You can change the delimiter format:
|
|
|
64
71
|
|
|
65
72
|
```typescript
|
|
66
73
|
DocumentModule.forRoot({
|
|
74
|
+
imageProcessor: SharpImageProcessor,
|
|
75
|
+
renderers: [DocxDocumentRenderer2, PdfDocumentRenderer],
|
|
67
76
|
delimiters: { start: '{{', end: '}}' },
|
|
68
77
|
});
|
|
69
78
|
```
|
|
@@ -160,6 +169,8 @@ Enable debug logging to trace the rendering pipeline:
|
|
|
160
169
|
|
|
161
170
|
```typescript
|
|
162
171
|
DocumentModule.forRoot({
|
|
172
|
+
imageProcessor: SharpImageProcessor,
|
|
173
|
+
renderers: [DocxDocumentRenderer2, PdfDocumentRenderer],
|
|
163
174
|
debug: true,
|
|
164
175
|
});
|
|
165
176
|
```
|
|
@@ -26,19 +26,29 @@ The base class for all repositories.
|
|
|
26
26
|
new RepositoryBase<TDelegate, TArgs, TReturn, TEntity>(db, model): RepositoryBase<TDelegate, TArgs, TReturn, TEntity>;
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
29
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:102](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L102)
|
|
30
|
+
|
|
31
|
+
Constructs a new instance of the repository.
|
|
30
32
|
|
|
31
33
|
#### Parameters
|
|
32
34
|
|
|
33
35
|
| Parameter | Type |
|
|
34
36
|
| ------ | ------ |
|
|
35
37
|
| `db` | [`DatabaseService`](Class.DatabaseService) |
|
|
36
|
-
| `model` | `
|
|
38
|
+
| `model` | `Record`\<[`RepositoryOperationsBase`](TypeAlias.RepositoryOperationsBase), (`args`) => `Promise`\<`any`\>\> |
|
|
37
39
|
|
|
38
40
|
#### Returns
|
|
39
41
|
|
|
40
42
|
`RepositoryBase`\<`TDelegate`, `TArgs`, `TReturn`, `TEntity`\>
|
|
41
43
|
|
|
44
|
+
#### Remarks
|
|
45
|
+
|
|
46
|
+
The `model` parameter accepts any Prisma delegate that structurally satisfies
|
|
47
|
+
the required operations. This wider signature avoids `GlobalOmitOptions`
|
|
48
|
+
mismatches introduced in Prisma 7 where `PrismaClient` instantiates delegates
|
|
49
|
+
with `PrismaClientOptions` while consumer code references them with the
|
|
50
|
+
default `{}`.
|
|
51
|
+
|
|
42
52
|
## Accessors
|
|
43
53
|
|
|
44
54
|
### database
|
|
@@ -49,7 +59,7 @@ Defined in: [repositories/abstracts/RepositoryBase.ts:91](https://github.com/Rue
|
|
|
49
59
|
get protected database(): DatabaseService;
|
|
50
60
|
```
|
|
51
61
|
|
|
52
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
62
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:125](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L125)
|
|
53
63
|
|
|
54
64
|
Provides access to the underlying DatabaseService for derived repositories.
|
|
55
65
|
Only to be used for transactional orchestration that spans multiple models.
|
|
@@ -68,7 +78,7 @@ Only to be used for transactional orchestration that spans multiple models.
|
|
|
68
78
|
get protected model(): TDelegate;
|
|
69
79
|
```
|
|
70
80
|
|
|
71
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
81
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:115](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L115)
|
|
72
82
|
|
|
73
83
|
##### Returns
|
|
74
84
|
|
|
@@ -82,7 +92,7 @@ Defined in: [repositories/abstracts/RepositoryBase.ts:104](https://github.com/Ru
|
|
|
82
92
|
protected aggregate<TResult>(args): Promise<TResult>;
|
|
83
93
|
```
|
|
84
94
|
|
|
85
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
95
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:323](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L323)
|
|
86
96
|
|
|
87
97
|
Performs aggregation operations on the records.
|
|
88
98
|
|
|
@@ -112,7 +122,7 @@ The aggregation result.
|
|
|
112
122
|
protected count<TResult>(args): Promise<TResult>;
|
|
113
123
|
```
|
|
114
124
|
|
|
115
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
125
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:335](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L335)
|
|
116
126
|
|
|
117
127
|
Counts the number of records that match the criteria.
|
|
118
128
|
|
|
@@ -142,7 +152,7 @@ The count of matching records.
|
|
|
142
152
|
protected create<TResult>(args): Promise<TResult>;
|
|
143
153
|
```
|
|
144
154
|
|
|
145
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
155
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:239](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L239)
|
|
146
156
|
|
|
147
157
|
Creates a new record.
|
|
148
158
|
|
|
@@ -172,7 +182,7 @@ The created record.
|
|
|
172
182
|
protected createMany<TResult>(args): Promise<TResult>;
|
|
173
183
|
```
|
|
174
184
|
|
|
175
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
185
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:251](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L251)
|
|
176
186
|
|
|
177
187
|
Creates multiple records.
|
|
178
188
|
|
|
@@ -202,7 +212,7 @@ The created records.
|
|
|
202
212
|
protected delete<TResult>(args): Promise<TResult>;
|
|
203
213
|
```
|
|
204
214
|
|
|
205
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
215
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:299](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L299)
|
|
206
216
|
|
|
207
217
|
Deletes a record by its identifier.
|
|
208
218
|
|
|
@@ -232,7 +242,7 @@ The deleted record.
|
|
|
232
242
|
protected deleteMany<TResult>(args): Promise<TResult>;
|
|
233
243
|
```
|
|
234
244
|
|
|
235
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
245
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:311](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L311)
|
|
236
246
|
|
|
237
247
|
Deletes multiple records by their identifiers.
|
|
238
248
|
|
|
@@ -262,7 +272,7 @@ The deleted records.
|
|
|
262
272
|
execute<TResult>(query): Promise<TResult>;
|
|
263
273
|
```
|
|
264
274
|
|
|
265
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
275
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:140](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L140)
|
|
266
276
|
|
|
267
277
|
Executes a predefined query against the underlying model.
|
|
268
278
|
|
|
@@ -292,7 +302,7 @@ The query result.
|
|
|
292
302
|
executeTransactional<TResult>(query): Promise<TResult>;
|
|
293
303
|
```
|
|
294
304
|
|
|
295
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
305
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:152](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L152)
|
|
296
306
|
|
|
297
307
|
Executes a transactional query providing a Prisma TransactionClient for multi-model work.
|
|
298
308
|
|
|
@@ -322,7 +332,7 @@ The query result.
|
|
|
322
332
|
protected findFirst<TResult>(args): Promise<TResult>;
|
|
323
333
|
```
|
|
324
334
|
|
|
325
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
335
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:214](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L214)
|
|
326
336
|
|
|
327
337
|
Finds the first record that matches the criteria.
|
|
328
338
|
|
|
@@ -352,7 +362,7 @@ The found record or null if not found.
|
|
|
352
362
|
protected findFirstOrThrow<TResult>(args): Promise<TResult>;
|
|
353
363
|
```
|
|
354
364
|
|
|
355
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
365
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:227](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L227)
|
|
356
366
|
|
|
357
367
|
Finds the first record that matches the criteria or throws if not found.
|
|
358
368
|
|
|
@@ -386,7 +396,7 @@ PrismaClientKnownRequestError with code P2025 if no record matches.
|
|
|
386
396
|
findMany<TResult>(args?, page?): Promise<TResult>;
|
|
387
397
|
```
|
|
388
398
|
|
|
389
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
399
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:192](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L192)
|
|
390
400
|
|
|
391
401
|
Finds multiple records with optional pagination.
|
|
392
402
|
|
|
@@ -417,7 +427,7 @@ The found records.
|
|
|
417
427
|
protected findUnique<TResult>(args): Promise<TResult>;
|
|
418
428
|
```
|
|
419
429
|
|
|
420
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
430
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:164](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L164)
|
|
421
431
|
|
|
422
432
|
Finds a unique record by its identifier.
|
|
423
433
|
|
|
@@ -447,7 +457,7 @@ The found record or null if not found.
|
|
|
447
457
|
protected findUniqueOrThrow<TResult>(args): Promise<TResult>;
|
|
448
458
|
```
|
|
449
459
|
|
|
450
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
460
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:177](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L177)
|
|
451
461
|
|
|
452
462
|
Finds a unique record by its identifier or throws if not found.
|
|
453
463
|
|
|
@@ -481,7 +491,7 @@ PrismaClientKnownRequestError with code P2025 if the record does not exist.
|
|
|
481
491
|
protected groupBy<TResult>(args): Promise<TResult>;
|
|
482
492
|
```
|
|
483
493
|
|
|
484
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
494
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:347](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L347)
|
|
485
495
|
|
|
486
496
|
Groups records by specified fields and performs aggregations.
|
|
487
497
|
|
|
@@ -511,7 +521,7 @@ The grouped records with aggregations.
|
|
|
511
521
|
protected merge<TResult>(entity): Promise<TResult>;
|
|
512
522
|
```
|
|
513
523
|
|
|
514
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
524
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:359](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L359)
|
|
515
525
|
|
|
516
526
|
Merges the given `data` with the user identified by the `id`.
|
|
517
527
|
|
|
@@ -541,7 +551,7 @@ The merged data.
|
|
|
541
551
|
protected tryCatch<T>(promise): Promise<T>;
|
|
542
552
|
```
|
|
543
553
|
|
|
544
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
554
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:393](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L393)
|
|
545
555
|
|
|
546
556
|
Wraps a promise in a try-catch block to handle errors uniformly.
|
|
547
557
|
|
|
@@ -571,7 +581,7 @@ The result of the promise or throws an error.
|
|
|
571
581
|
protected update<TResult>(args): Promise<TResult>;
|
|
572
582
|
```
|
|
573
583
|
|
|
574
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
584
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:263](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L263)
|
|
575
585
|
|
|
576
586
|
Updates an existing record.
|
|
577
587
|
|
|
@@ -601,7 +611,7 @@ The updated record.
|
|
|
601
611
|
protected updateMany<TResult>(args): Promise<TResult>;
|
|
602
612
|
```
|
|
603
613
|
|
|
604
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
614
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:275](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L275)
|
|
605
615
|
|
|
606
616
|
Updates multiple existing records.
|
|
607
617
|
|
|
@@ -631,7 +641,7 @@ The updated records.
|
|
|
631
641
|
protected upsert<TResult>(args): Promise<TResult>;
|
|
632
642
|
```
|
|
633
643
|
|
|
634
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
644
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:287](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L287)
|
|
635
645
|
|
|
636
646
|
Creates or updates a record based on its existence.
|
|
637
647
|
|
|
@@ -26,21 +26,31 @@ provides a typed pipe helper for functional operators.
|
|
|
26
26
|
new RepositoryBase2<TDelegate>(db, delegate): RepositoryBase2<TDelegate>;
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Defined in: [repositories2/abstracts/RepositoryBase2.ts:
|
|
29
|
+
Defined in: [repositories2/abstracts/RepositoryBase2.ts:39](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories2/abstracts/RepositoryBase2.ts#L39)
|
|
30
30
|
|
|
31
31
|
**`Beta`**
|
|
32
32
|
|
|
33
|
+
Constructs a new instance of the repository.
|
|
34
|
+
|
|
33
35
|
#### Parameters
|
|
34
36
|
|
|
35
37
|
| Parameter | Type |
|
|
36
38
|
| ------ | ------ |
|
|
37
39
|
| `db` | [`DatabaseService`](Class.DatabaseService) |
|
|
38
|
-
| `delegate` | `
|
|
40
|
+
| `delegate` | `unknown` |
|
|
39
41
|
|
|
40
42
|
#### Returns
|
|
41
43
|
|
|
42
44
|
`RepositoryBase2`\<`TDelegate`\>
|
|
43
45
|
|
|
46
|
+
#### Remarks
|
|
47
|
+
|
|
48
|
+
The `delegate` parameter is typed as `unknown` and cast internally to
|
|
49
|
+
`TDelegate`. This avoids `GlobalOmitOptions` mismatches introduced in
|
|
50
|
+
Prisma 7 where `PrismaClient` instantiates delegates with
|
|
51
|
+
`PrismaClientOptions` while consumer code references them with the
|
|
52
|
+
default `{}`.
|
|
53
|
+
|
|
44
54
|
## Accessors
|
|
45
55
|
|
|
46
56
|
### database
|
|
@@ -51,7 +61,7 @@ Defined in: [repositories2/abstracts/RepositoryBase2.ts:29](https://github.com/R
|
|
|
51
61
|
get protected database(): DatabaseService;
|
|
52
62
|
```
|
|
53
63
|
|
|
54
|
-
Defined in: [repositories2/abstracts/RepositoryBase2.ts:
|
|
64
|
+
Defined in: [repositories2/abstracts/RepositoryBase2.ts:55](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories2/abstracts/RepositoryBase2.ts#L55)
|
|
55
65
|
|
|
56
66
|
**`Beta`**
|
|
57
67
|
|
|
@@ -72,7 +82,7 @@ Only to be used for transactional orchestration that spans multiple models.
|
|
|
72
82
|
get protected delegate(): TDelegate;
|
|
73
83
|
```
|
|
74
84
|
|
|
75
|
-
Defined in: [repositories2/abstracts/RepositoryBase2.ts:
|
|
85
|
+
Defined in: [repositories2/abstracts/RepositoryBase2.ts:66](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories2/abstracts/RepositoryBase2.ts#L66)
|
|
76
86
|
|
|
77
87
|
**`Beta`**
|
|
78
88
|
|
|
@@ -91,7 +101,7 @@ Use with caution, as this bypasses any repository-level logic.
|
|
|
91
101
|
execute<TRun>(query): Promise<UnwrapPromise<ReturnType<TRun>>>;
|
|
92
102
|
```
|
|
93
103
|
|
|
94
|
-
Defined in: [repositories2/abstracts/RepositoryBase2.ts:
|
|
104
|
+
Defined in: [repositories2/abstracts/RepositoryBase2.ts:88](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories2/abstracts/RepositoryBase2.ts#L88)
|
|
95
105
|
|
|
96
106
|
Executes an query and preserves full inferred return type.
|
|
97
107
|
Always returns a Promise of the unwrapped result, regardless of whether the underlying run is sync or async.
|
|
@@ -120,7 +130,7 @@ Always returns a Promise of the unwrapped result, regardless of whether the unde
|
|
|
120
130
|
pipe<R>(op): R;
|
|
121
131
|
```
|
|
122
132
|
|
|
123
|
-
Defined in: [repositories2/abstracts/RepositoryBase2.ts:
|
|
133
|
+
Defined in: [repositories2/abstracts/RepositoryBase2.ts:78](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories2/abstracts/RepositoryBase2.ts#L78)
|
|
124
134
|
|
|
125
135
|
Executes a single operator against this repository's delegate.
|
|
126
136
|
|
|
@@ -148,7 +158,7 @@ Executes a single operator against this repository's delegate.
|
|
|
148
158
|
protected tryCatch<T>(promise): Promise<T>;
|
|
149
159
|
```
|
|
150
160
|
|
|
151
|
-
Defined in: [repositories2/abstracts/RepositoryBase2.ts:
|
|
161
|
+
Defined in: [repositories2/abstracts/RepositoryBase2.ts:100](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories2/abstracts/RepositoryBase2.ts#L100)
|
|
152
162
|
|
|
153
163
|
**`Beta`**
|
|
154
164
|
|
|
@@ -9,7 +9,7 @@ editUrl: false
|
|
|
9
9
|
type DelegateArgs<T> = { [K in keyof T]: T[K] extends (args: infer A) => Promise<unknown> ? A : never };
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
12
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:423](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L423)
|
|
13
13
|
|
|
14
14
|
## Type Parameters
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ editUrl: false
|
|
|
9
9
|
type DelegateReturnTypes<T> = { [K in keyof T]: T[K] extends (args: infer A) => Promise<infer R> ? R : never };
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
12
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:430](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L430)
|
|
13
13
|
|
|
14
14
|
## Type Parameters
|
|
15
15
|
|
|
@@ -89,7 +89,7 @@ import type { Prisma } from '@prisma/client';
|
|
|
89
89
|
@Injectable()
|
|
90
90
|
export class OrderRepository extends RepositoryBase<Prisma.OrderDelegate, Prisma.OrderFindManyArgs, unknown> {
|
|
91
91
|
constructor(database: DatabaseService) {
|
|
92
|
-
super(database
|
|
92
|
+
super(database, database.order);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
```
|
|
@@ -17,10 +17,15 @@ Template-based document generation engine supporting DOCX and PDF output. Uses p
|
|
|
17
17
|
```typescript
|
|
18
18
|
import { Module } from '@nestjs/common';
|
|
19
19
|
import { DocumentModule } from '@breadstone/archipel-platform-documents';
|
|
20
|
+
import { SharpImageProcessor } from '@breadstone/archipel-platform-documents/sharp';
|
|
21
|
+
import { DocxDocumentRenderer2 } from '@breadstone/archipel-platform-documents/docx';
|
|
22
|
+
import { PdfDocumentRenderer } from '@breadstone/archipel-platform-documents/pdf';
|
|
20
23
|
|
|
21
24
|
@Module({
|
|
22
25
|
imports: [
|
|
23
26
|
DocumentModule.forRoot({
|
|
27
|
+
imageProcessor: SharpImageProcessor,
|
|
28
|
+
renderers: [DocxDocumentRenderer2, PdfDocumentRenderer],
|
|
24
29
|
maxImageWidth: 1920,
|
|
25
30
|
maxImageHeight: 1080,
|
|
26
31
|
delimiters: { start: '[[', end: ']]' },
|
|
@@ -37,13 +42,15 @@ export class AppModule {}
|
|
|
37
42
|
|
|
38
43
|
### IDocumentModuleOptions
|
|
39
44
|
|
|
40
|
-
| Property | Type
|
|
41
|
-
| ------------------ |
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
45
|
+
| Property | Type | Default | Description |
|
|
46
|
+
| ------------------ | ----------------------------- | ------- | ------------------------------------------------------------------------- |
|
|
47
|
+
| `imageProcessor` | `Type<IImageProcessor>` | — | **Required.** Image processor class (e.g. `SharpImageProcessor`) |
|
|
48
|
+
| `renderers` | `Type<IDocumentRenderer>[]` | — | **Required.** Renderer classes (e.g. `[DocxDocumentRenderer2, PdfDocumentRenderer]`) |
|
|
49
|
+
| `maxImageWidth` | `number` | `1920` | Maximum width for embedded images |
|
|
50
|
+
| `maxImageHeight` | `number` | `1080` | Maximum height for embedded images |
|
|
51
|
+
| `delimiters.start` | `string` | `'[['` | Template variable start delimiter |
|
|
52
|
+
| `delimiters.end` | `string` | `']]'` | Template variable end delimiter |
|
|
53
|
+
| `debug` | `boolean` | `false` | Enable debug output |
|
|
47
54
|
|
|
48
55
|
---
|
|
49
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone/archipel-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "MCP server providing Archipel platform knowledge - documentation, query patterns, and coding conventions - to AI development tools.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/main.js",
|