@breadstone/archipel-mcp 0.0.25 → 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-analytics/api/Class.AnalyticsHealthIndicator.md +4 -4
- package/data/packages/platform-authentication/api/Class.AuthenticationHealthIndicator.md +3 -3
- package/data/packages/platform-blob-storage/api/Class.BlobHealthIndicator.md +4 -4
- package/data/packages/platform-database/api/Class.DatabaseHealthIndicator.md +4 -4
- package/data/packages/platform-database/api/Class.RepositoryBase.md +124 -50
- package/data/packages/platform-database/api/Class.RepositoryBase2.md +181 -0
- package/data/packages/platform-database/api/Function.aggregate.md +33 -0
- package/data/packages/platform-database/api/Function.aggregateRaw.md +34 -0
- package/data/packages/platform-database/api/Function.count.md +33 -0
- package/data/packages/platform-database/api/Function.create.md +33 -0
- package/data/packages/platform-database/api/Function.createMany.md +33 -0
- package/data/packages/platform-database/api/Function.createManyAndReturn.md +35 -0
- package/data/packages/platform-database/api/Function.findFirst.md +35 -0
- package/data/packages/platform-database/api/Function.findFirstOrThrow.md +34 -0
- package/data/packages/platform-database/api/Function.findMany.md +32 -0
- package/data/packages/platform-database/api/Function.findManyPaged.md +34 -0
- package/data/packages/platform-database/api/Function.findRaw.md +34 -0
- package/data/packages/platform-database/api/Function.findUnique.md +32 -0
- package/data/packages/platform-database/api/Function.findUniqueOrThrow.md +34 -0
- package/data/packages/platform-database/api/Function.groupBy.md +33 -0
- package/data/packages/platform-database/api/Function.pipe.md +34 -0
- package/data/packages/platform-database/api/Function.pipeAll.md +35 -0
- package/data/packages/platform-database/api/Function.query2.md +35 -0
- package/data/packages/platform-database/api/Function.remove.md +33 -0
- package/data/packages/platform-database/api/Function.removeMany.md +33 -0
- package/data/packages/platform-database/api/Function.update.md +33 -0
- package/data/packages/platform-database/api/Function.updateMany.md +33 -0
- package/data/packages/platform-database/api/Function.updateManyAndReturn.md +35 -0
- package/data/packages/platform-database/api/Function.upsert.md +33 -0
- package/data/packages/platform-database/api/Interface.IRepositoryQuery2.md +45 -0
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.DelegateOperations.md +29 -0
- package/data/packages/platform-database/api/TypeAlias.DelegateReturnTypes.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.RepositoryOperationsAll.md +19 -0
- package/data/packages/platform-database/api/TypeAlias.RepositoryOperationsBase.md +34 -0
- package/data/packages/platform-database/api/index.md +29 -1
- package/data/packages/platform-database/index.md +1 -1
- package/data/packages/platform-documents/index.md +14 -7
- package/data/packages/platform-esigning/api/Class.EsigningHealthIndicator.md +4 -4
- package/data/packages/platform-mailing/api/Class.MailHealthIndicator.md +4 -4
- package/data/packages/platform-mcp/api/Class.McpHealthIndicator.md +4 -4
- package/data/packages/platform-payments/api/Class.PaymentHealthIndicator.md +4 -4
- package/data/packages/platform-telemetry/api/Class.TelemetryHealthIndicator.md +4 -4
- 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
|
```
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: AnalyticsHealthIndicator
|
|
7
7
|
|
|
8
|
-
Defined in: health/AnalyticsHealthIndicator.ts:17
|
|
8
|
+
Defined in: [health/AnalyticsHealthIndicator.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-analytics/src/health/AnalyticsHealthIndicator.ts#L17)
|
|
9
9
|
|
|
10
10
|
Health indicator for the analytics infrastructure.
|
|
11
11
|
Calls [AnalyticsClientPort.ping](Class.AnalyticsClientPort#ping) to verify provider readiness.
|
|
@@ -22,7 +22,7 @@ Calls [AnalyticsClientPort.ping](Class.AnalyticsClientPort#ping) to verify provi
|
|
|
22
22
|
new AnalyticsHealthIndicator(analyticsClient?): AnalyticsHealthIndicator;
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Defined in: health/AnalyticsHealthIndicator.ts:27
|
|
25
|
+
Defined in: [health/AnalyticsHealthIndicator.ts:27](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-analytics/src/health/AnalyticsHealthIndicator.ts#L27)
|
|
26
26
|
|
|
27
27
|
#### Parameters
|
|
28
28
|
|
|
@@ -42,7 +42,7 @@ Defined in: health/AnalyticsHealthIndicator.ts:27
|
|
|
42
42
|
readonly key: string = 'analytics';
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: health/AnalyticsHealthIndicator.ts:35
|
|
45
|
+
Defined in: [health/AnalyticsHealthIndicator.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-analytics/src/health/AnalyticsHealthIndicator.ts#L35)
|
|
46
46
|
|
|
47
47
|
Unique key identifying the indicator
|
|
48
48
|
|
|
@@ -60,7 +60,7 @@ IHealthIndicator.key
|
|
|
60
60
|
check(): Promise<HealthIndicatorResult<string>>;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in: health/AnalyticsHealthIndicator.ts:48
|
|
63
|
+
Defined in: [health/AnalyticsHealthIndicator.ts:48](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-analytics/src/health/AnalyticsHealthIndicator.ts#L48)
|
|
64
64
|
|
|
65
65
|
Pings the analytics provider to verify readiness.
|
|
66
66
|
Returns disabled status when no client is configured.
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: AuthenticationHealthIndicator
|
|
7
7
|
|
|
8
|
-
Defined in: libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts:15
|
|
8
|
+
Defined in: [libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts#L15)
|
|
9
9
|
|
|
10
10
|
Health indicator for the authentication infrastructure.
|
|
11
11
|
|
|
@@ -33,7 +33,7 @@ new AuthenticationHealthIndicator(): AuthenticationHealthIndicator;
|
|
|
33
33
|
readonly key: string = 'authentication';
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Defined in: libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts:18
|
|
36
|
+
Defined in: [libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts#L18)
|
|
37
37
|
|
|
38
38
|
Unique key identifying the indicator
|
|
39
39
|
|
|
@@ -51,7 +51,7 @@ IHealthIndicator.key
|
|
|
51
51
|
check(): HealthIndicatorResult<string>;
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Defined in: libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts:30
|
|
54
|
+
Defined in: [libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts:30](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/health/AuthenticationHealthIndicator.ts#L30)
|
|
55
55
|
|
|
56
56
|
Returns the health status of the authentication infrastructure.
|
|
57
57
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: BlobHealthIndicator
|
|
7
7
|
|
|
8
|
-
Defined in: health/BlobHealthIndicator.ts:17
|
|
8
|
+
Defined in: [health/BlobHealthIndicator.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/health/BlobHealthIndicator.ts#L17)
|
|
9
9
|
|
|
10
10
|
Health indicator for blob storage service.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Health indicator for blob storage service.
|
|
|
21
21
|
new BlobHealthIndicator(configService, httpHealthIndicator): BlobHealthIndicator;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: health/BlobHealthIndicator.ts:32
|
|
24
|
+
Defined in: [health/BlobHealthIndicator.ts:32](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/health/BlobHealthIndicator.ts#L32)
|
|
25
25
|
|
|
26
26
|
Constructs a new instance of the `BlobHealthIndicator` class.
|
|
27
27
|
|
|
@@ -44,7 +44,7 @@ Constructs a new instance of the `BlobHealthIndicator` class.
|
|
|
44
44
|
readonly key: string = 'blob';
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Defined in: health/BlobHealthIndicator.ts:41
|
|
47
|
+
Defined in: [health/BlobHealthIndicator.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/health/BlobHealthIndicator.ts#L41)
|
|
48
48
|
|
|
49
49
|
Unique key identifying the indicator
|
|
50
50
|
|
|
@@ -62,7 +62,7 @@ IHealthIndicator.key
|
|
|
62
62
|
check(): Promise<HealthIndicatorResult<"blob">>;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Defined in: health/BlobHealthIndicator.ts:53
|
|
65
|
+
Defined in: [health/BlobHealthIndicator.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/health/BlobHealthIndicator.ts#L53)
|
|
66
66
|
|
|
67
67
|
Checks if the blob storage endpoint is reachable.
|
|
68
68
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: DatabaseHealthIndicator
|
|
7
7
|
|
|
8
|
-
Defined in: health/DatabaseHealthIndicator.ts:16
|
|
8
|
+
Defined in: [health/DatabaseHealthIndicator.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/health/DatabaseHealthIndicator.ts#L16)
|
|
9
9
|
|
|
10
10
|
Health indicator for database connectivity.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Health indicator for database connectivity.
|
|
|
21
21
|
new DatabaseHealthIndicator(prismaHealthIndicator, databaseService): DatabaseHealthIndicator;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: health/DatabaseHealthIndicator.ts:26
|
|
24
|
+
Defined in: [health/DatabaseHealthIndicator.ts:26](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/health/DatabaseHealthIndicator.ts#L26)
|
|
25
25
|
|
|
26
26
|
#### Parameters
|
|
27
27
|
|
|
@@ -42,7 +42,7 @@ Defined in: health/DatabaseHealthIndicator.ts:26
|
|
|
42
42
|
readonly key: string = 'database';
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: health/DatabaseHealthIndicator.ts:35
|
|
45
|
+
Defined in: [health/DatabaseHealthIndicator.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/health/DatabaseHealthIndicator.ts#L35)
|
|
46
46
|
|
|
47
47
|
Unique key identifying the indicator
|
|
48
48
|
|
|
@@ -60,7 +60,7 @@ IHealthIndicator.key
|
|
|
60
60
|
check(): Promise<HealthIndicatorResult<"database">>;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in: health/DatabaseHealthIndicator.ts:47
|
|
63
|
+
Defined in: [health/DatabaseHealthIndicator.ts:47](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/health/DatabaseHealthIndicator.ts#L47)
|
|
64
64
|
|
|
65
65
|
Checks database connectivity via a Prisma ping.
|
|
66
66
|
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: '
|
|
2
|
+
title: 'Abstract Class: RepositoryBase\<TDelegate, TArgs, TReturn, TEntity\>'
|
|
3
3
|
generated: true
|
|
4
4
|
editUrl: false
|
|
5
5
|
---
|
|
6
|
-
#
|
|
6
|
+
# Abstract Class: RepositoryBase\<TDelegate, TArgs, TReturn, TEntity\>
|
|
7
7
|
|
|
8
|
-
Defined in: [repositories/abstracts/RepositoryBase.ts:
|
|
8
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:74](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L74)
|
|
9
9
|
|
|
10
10
|
The base class for all repositories.
|
|
11
11
|
|
|
12
|
-
## Deprecated
|
|
13
|
-
|
|
14
|
-
Use `RepositoryBase2` instead. This class will be removed in a future major version.
|
|
15
|
-
|
|
16
12
|
## Type Parameters
|
|
17
13
|
|
|
18
14
|
| Type Parameter | Default type |
|
|
19
15
|
| ------ | ------ |
|
|
20
|
-
| `TDelegate` *extends* `Record
|
|
21
|
-
| `TArgs` *extends* `Record
|
|
22
|
-
| `TReturn` *extends* `Record
|
|
16
|
+
| `TDelegate` *extends* `Record`\<[`RepositoryOperationsBase`](TypeAlias.RepositoryOperationsBase), (`args`) => `Promise`\<`any`\>\> | - |
|
|
17
|
+
| `TArgs` *extends* `Record`\<[`RepositoryOperationsBase`](TypeAlias.RepositoryOperationsBase), `unknown`\> | - |
|
|
18
|
+
| `TReturn` *extends* `Record`\<[`RepositoryOperationsBase`](TypeAlias.RepositoryOperationsBase), `unknown`\> | - |
|
|
23
19
|
| `TEntity` | `unknown` |
|
|
24
20
|
|
|
25
21
|
## Constructors
|
|
@@ -30,22 +26,32 @@ Use `RepositoryBase2` instead. This class will be removed in a future major vers
|
|
|
30
26
|
new RepositoryBase<TDelegate, TArgs, TReturn, TEntity>(db, model): RepositoryBase<TDelegate, TArgs, TReturn, TEntity>;
|
|
31
27
|
```
|
|
32
28
|
|
|
33
|
-
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.
|
|
34
32
|
|
|
35
33
|
#### Parameters
|
|
36
34
|
|
|
37
35
|
| Parameter | Type |
|
|
38
36
|
| ------ | ------ |
|
|
39
37
|
| `db` | [`DatabaseService`](Class.DatabaseService) |
|
|
40
|
-
| `model` | `
|
|
38
|
+
| `model` | `Record`\<[`RepositoryOperationsBase`](TypeAlias.RepositoryOperationsBase), (`args`) => `Promise`\<`any`\>\> |
|
|
41
39
|
|
|
42
40
|
#### Returns
|
|
43
41
|
|
|
44
42
|
`RepositoryBase`\<`TDelegate`, `TArgs`, `TReturn`, `TEntity`\>
|
|
45
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
|
+
|
|
46
52
|
## Accessors
|
|
47
53
|
|
|
48
|
-
###
|
|
54
|
+
### database
|
|
49
55
|
|
|
50
56
|
#### Get Signature
|
|
51
57
|
|
|
@@ -53,7 +59,7 @@ Defined in: [repositories/abstracts/RepositoryBase.ts:62](https://github.com/Rue
|
|
|
53
59
|
get protected database(): DatabaseService;
|
|
54
60
|
```
|
|
55
61
|
|
|
56
|
-
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)
|
|
57
63
|
|
|
58
64
|
Provides access to the underlying DatabaseService for derived repositories.
|
|
59
65
|
Only to be used for transactional orchestration that spans multiple models.
|
|
@@ -64,7 +70,7 @@ Only to be used for transactional orchestration that spans multiple models.
|
|
|
64
70
|
|
|
65
71
|
***
|
|
66
72
|
|
|
67
|
-
###
|
|
73
|
+
### model
|
|
68
74
|
|
|
69
75
|
#### Get Signature
|
|
70
76
|
|
|
@@ -72,7 +78,7 @@ Only to be used for transactional orchestration that spans multiple models.
|
|
|
72
78
|
get protected model(): TDelegate;
|
|
73
79
|
```
|
|
74
80
|
|
|
75
|
-
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)
|
|
76
82
|
|
|
77
83
|
##### Returns
|
|
78
84
|
|
|
@@ -80,13 +86,13 @@ Defined in: [repositories/abstracts/RepositoryBase.ts:75](https://github.com/Rue
|
|
|
80
86
|
|
|
81
87
|
## Methods
|
|
82
88
|
|
|
83
|
-
###
|
|
89
|
+
### aggregate()
|
|
84
90
|
|
|
85
91
|
```ts
|
|
86
92
|
protected aggregate<TResult>(args): Promise<TResult>;
|
|
87
93
|
```
|
|
88
94
|
|
|
89
|
-
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)
|
|
90
96
|
|
|
91
97
|
Performs aggregation operations on the records.
|
|
92
98
|
|
|
@@ -110,13 +116,13 @@ The aggregation result.
|
|
|
110
116
|
|
|
111
117
|
***
|
|
112
118
|
|
|
113
|
-
###
|
|
119
|
+
### count()
|
|
114
120
|
|
|
115
121
|
```ts
|
|
116
122
|
protected count<TResult>(args): Promise<TResult>;
|
|
117
123
|
```
|
|
118
124
|
|
|
119
|
-
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)
|
|
120
126
|
|
|
121
127
|
Counts the number of records that match the criteria.
|
|
122
128
|
|
|
@@ -140,13 +146,13 @@ The count of matching records.
|
|
|
140
146
|
|
|
141
147
|
***
|
|
142
148
|
|
|
143
|
-
###
|
|
149
|
+
### create()
|
|
144
150
|
|
|
145
151
|
```ts
|
|
146
152
|
protected create<TResult>(args): Promise<TResult>;
|
|
147
153
|
```
|
|
148
154
|
|
|
149
|
-
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)
|
|
150
156
|
|
|
151
157
|
Creates a new record.
|
|
152
158
|
|
|
@@ -170,13 +176,13 @@ The created record.
|
|
|
170
176
|
|
|
171
177
|
***
|
|
172
178
|
|
|
173
|
-
###
|
|
179
|
+
### createMany()
|
|
174
180
|
|
|
175
181
|
```ts
|
|
176
182
|
protected createMany<TResult>(args): Promise<TResult>;
|
|
177
183
|
```
|
|
178
184
|
|
|
179
|
-
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)
|
|
180
186
|
|
|
181
187
|
Creates multiple records.
|
|
182
188
|
|
|
@@ -200,13 +206,13 @@ The created records.
|
|
|
200
206
|
|
|
201
207
|
***
|
|
202
208
|
|
|
203
|
-
###
|
|
209
|
+
### delete()
|
|
204
210
|
|
|
205
211
|
```ts
|
|
206
212
|
protected delete<TResult>(args): Promise<TResult>;
|
|
207
213
|
```
|
|
208
214
|
|
|
209
|
-
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)
|
|
210
216
|
|
|
211
217
|
Deletes a record by its identifier.
|
|
212
218
|
|
|
@@ -230,13 +236,13 @@ The deleted record.
|
|
|
230
236
|
|
|
231
237
|
***
|
|
232
238
|
|
|
233
|
-
###
|
|
239
|
+
### deleteMany()
|
|
234
240
|
|
|
235
241
|
```ts
|
|
236
242
|
protected deleteMany<TResult>(args): Promise<TResult>;
|
|
237
243
|
```
|
|
238
244
|
|
|
239
|
-
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)
|
|
240
246
|
|
|
241
247
|
Deletes multiple records by their identifiers.
|
|
242
248
|
|
|
@@ -260,13 +266,13 @@ The deleted records.
|
|
|
260
266
|
|
|
261
267
|
***
|
|
262
268
|
|
|
263
|
-
###
|
|
269
|
+
### execute()
|
|
264
270
|
|
|
265
271
|
```ts
|
|
266
272
|
execute<TResult>(query): Promise<TResult>;
|
|
267
273
|
```
|
|
268
274
|
|
|
269
|
-
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)
|
|
270
276
|
|
|
271
277
|
Executes a predefined query against the underlying model.
|
|
272
278
|
|
|
@@ -290,13 +296,13 @@ The query result.
|
|
|
290
296
|
|
|
291
297
|
***
|
|
292
298
|
|
|
293
|
-
###
|
|
299
|
+
### executeTransactional()
|
|
294
300
|
|
|
295
301
|
```ts
|
|
296
302
|
executeTransactional<TResult>(query): Promise<TResult>;
|
|
297
303
|
```
|
|
298
304
|
|
|
299
|
-
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)
|
|
300
306
|
|
|
301
307
|
Executes a transactional query providing a Prisma TransactionClient for multi-model work.
|
|
302
308
|
|
|
@@ -320,13 +326,13 @@ The query result.
|
|
|
320
326
|
|
|
321
327
|
***
|
|
322
328
|
|
|
323
|
-
###
|
|
329
|
+
### findFirst()
|
|
324
330
|
|
|
325
331
|
```ts
|
|
326
332
|
protected findFirst<TResult>(args): Promise<TResult>;
|
|
327
333
|
```
|
|
328
334
|
|
|
329
|
-
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)
|
|
330
336
|
|
|
331
337
|
Finds the first record that matches the criteria.
|
|
332
338
|
|
|
@@ -350,13 +356,47 @@ The found record or null if not found.
|
|
|
350
356
|
|
|
351
357
|
***
|
|
352
358
|
|
|
353
|
-
###
|
|
359
|
+
### findFirstOrThrow()
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
protected findFirstOrThrow<TResult>(args): Promise<TResult>;
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:227](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L227)
|
|
366
|
+
|
|
367
|
+
Finds the first record that matches the criteria or throws if not found.
|
|
368
|
+
|
|
369
|
+
#### Type Parameters
|
|
370
|
+
|
|
371
|
+
| Type Parameter | Default type |
|
|
372
|
+
| ------ | ------ |
|
|
373
|
+
| `TResult` | `TReturn`\[`"findFirstOrThrow"`\] |
|
|
374
|
+
|
|
375
|
+
#### Parameters
|
|
376
|
+
|
|
377
|
+
| Parameter | Type | Description |
|
|
378
|
+
| ------ | ------ | ------ |
|
|
379
|
+
| `args` | `TArgs`\[`"findFirstOrThrow"`\] | The arguments to find the first record. |
|
|
380
|
+
|
|
381
|
+
#### Returns
|
|
382
|
+
|
|
383
|
+
`Promise`\<`TResult`\>
|
|
384
|
+
|
|
385
|
+
The found record.
|
|
386
|
+
|
|
387
|
+
#### Throws
|
|
388
|
+
|
|
389
|
+
PrismaClientKnownRequestError with code P2025 if no record matches.
|
|
390
|
+
|
|
391
|
+
***
|
|
392
|
+
|
|
393
|
+
### findMany()
|
|
354
394
|
|
|
355
395
|
```ts
|
|
356
396
|
findMany<TResult>(args?, page?): Promise<TResult>;
|
|
357
397
|
```
|
|
358
398
|
|
|
359
|
-
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)
|
|
360
400
|
|
|
361
401
|
Finds multiple records with optional pagination.
|
|
362
402
|
|
|
@@ -381,13 +421,13 @@ The found records.
|
|
|
381
421
|
|
|
382
422
|
***
|
|
383
423
|
|
|
384
|
-
###
|
|
424
|
+
### findUnique()
|
|
385
425
|
|
|
386
426
|
```ts
|
|
387
427
|
protected findUnique<TResult>(args): Promise<TResult>;
|
|
388
428
|
```
|
|
389
429
|
|
|
390
|
-
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)
|
|
391
431
|
|
|
392
432
|
Finds a unique record by its identifier.
|
|
393
433
|
|
|
@@ -411,13 +451,47 @@ The found record or null if not found.
|
|
|
411
451
|
|
|
412
452
|
***
|
|
413
453
|
|
|
414
|
-
###
|
|
454
|
+
### findUniqueOrThrow()
|
|
455
|
+
|
|
456
|
+
```ts
|
|
457
|
+
protected findUniqueOrThrow<TResult>(args): Promise<TResult>;
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Defined in: [repositories/abstracts/RepositoryBase.ts:177](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/repositories/abstracts/RepositoryBase.ts#L177)
|
|
461
|
+
|
|
462
|
+
Finds a unique record by its identifier or throws if not found.
|
|
463
|
+
|
|
464
|
+
#### Type Parameters
|
|
465
|
+
|
|
466
|
+
| Type Parameter | Default type |
|
|
467
|
+
| ------ | ------ |
|
|
468
|
+
| `TResult` | `TReturn`\[`"findUniqueOrThrow"`\] |
|
|
469
|
+
|
|
470
|
+
#### Parameters
|
|
471
|
+
|
|
472
|
+
| Parameter | Type | Description |
|
|
473
|
+
| ------ | ------ | ------ |
|
|
474
|
+
| `args` | `TArgs`\[`"findUniqueOrThrow"`\] | The arguments to find the unique record. |
|
|
475
|
+
|
|
476
|
+
#### Returns
|
|
477
|
+
|
|
478
|
+
`Promise`\<`TResult`\>
|
|
479
|
+
|
|
480
|
+
The found record.
|
|
481
|
+
|
|
482
|
+
#### Throws
|
|
483
|
+
|
|
484
|
+
PrismaClientKnownRequestError with code P2025 if the record does not exist.
|
|
485
|
+
|
|
486
|
+
***
|
|
487
|
+
|
|
488
|
+
### groupBy()
|
|
415
489
|
|
|
416
490
|
```ts
|
|
417
491
|
protected groupBy<TResult>(args): Promise<TResult>;
|
|
418
492
|
```
|
|
419
493
|
|
|
420
|
-
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)
|
|
421
495
|
|
|
422
496
|
Groups records by specified fields and performs aggregations.
|
|
423
497
|
|
|
@@ -441,13 +515,13 @@ The grouped records with aggregations.
|
|
|
441
515
|
|
|
442
516
|
***
|
|
443
517
|
|
|
444
|
-
###
|
|
518
|
+
### merge()
|
|
445
519
|
|
|
446
520
|
```ts
|
|
447
521
|
protected merge<TResult>(entity): Promise<TResult>;
|
|
448
522
|
```
|
|
449
523
|
|
|
450
|
-
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)
|
|
451
525
|
|
|
452
526
|
Merges the given `data` with the user identified by the `id`.
|
|
453
527
|
|
|
@@ -471,13 +545,13 @@ The merged data.
|
|
|
471
545
|
|
|
472
546
|
***
|
|
473
547
|
|
|
474
|
-
###
|
|
548
|
+
### tryCatch()
|
|
475
549
|
|
|
476
550
|
```ts
|
|
477
551
|
protected tryCatch<T>(promise): Promise<T>;
|
|
478
552
|
```
|
|
479
553
|
|
|
480
|
-
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)
|
|
481
555
|
|
|
482
556
|
Wraps a promise in a try-catch block to handle errors uniformly.
|
|
483
557
|
|
|
@@ -501,13 +575,13 @@ The result of the promise or throws an error.
|
|
|
501
575
|
|
|
502
576
|
***
|
|
503
577
|
|
|
504
|
-
###
|
|
578
|
+
### update()
|
|
505
579
|
|
|
506
580
|
```ts
|
|
507
581
|
protected update<TResult>(args): Promise<TResult>;
|
|
508
582
|
```
|
|
509
583
|
|
|
510
|
-
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)
|
|
511
585
|
|
|
512
586
|
Updates an existing record.
|
|
513
587
|
|
|
@@ -531,13 +605,13 @@ The updated record.
|
|
|
531
605
|
|
|
532
606
|
***
|
|
533
607
|
|
|
534
|
-
###
|
|
608
|
+
### updateMany()
|
|
535
609
|
|
|
536
610
|
```ts
|
|
537
611
|
protected updateMany<TResult>(args): Promise<TResult>;
|
|
538
612
|
```
|
|
539
613
|
|
|
540
|
-
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)
|
|
541
615
|
|
|
542
616
|
Updates multiple existing records.
|
|
543
617
|
|
|
@@ -561,13 +635,13 @@ The updated records.
|
|
|
561
635
|
|
|
562
636
|
***
|
|
563
637
|
|
|
564
|
-
###
|
|
638
|
+
### upsert()
|
|
565
639
|
|
|
566
640
|
```ts
|
|
567
641
|
protected upsert<TResult>(args): Promise<TResult>;
|
|
568
642
|
```
|
|
569
643
|
|
|
570
|
-
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)
|
|
571
645
|
|
|
572
646
|
Creates or updates a record based on its existence.
|
|
573
647
|
|