@tc-libs/ticket 3.5.0 → 3.6.1
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/README.md +39 -6
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
# ticket
|
|
1
|
+
# @tc-libs/ticket
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Modulo ticketing di base.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Espone:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- `TicketModule`
|
|
8
|
+
- `TicketService`
|
|
9
|
+
- entity/repository/controller admin e public
|
|
10
|
+
- DTO e serializzazioni
|
|
8
11
|
|
|
9
|
-
##
|
|
12
|
+
## `TicketService`
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Oltre ai metodi ereditati da `AbstractService`, espone:
|
|
15
|
+
|
|
16
|
+
- `addComment(userId, ticketId, text, isOperator)`
|
|
17
|
+
|
|
18
|
+
Esempio:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
await this.ticketService.addComment(
|
|
22
|
+
user._id.toString(),
|
|
23
|
+
ticket._id.toString(),
|
|
24
|
+
'Aggiornamento stato pratica',
|
|
25
|
+
true,
|
|
26
|
+
);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Il commento viene pushato nell'array `comments` del ticket.
|
|
30
|
+
|
|
31
|
+
## Uso tipico
|
|
32
|
+
|
|
33
|
+
Il package e pensato per:
|
|
34
|
+
|
|
35
|
+
- creazione ticket lato utente pubblico o backoffice
|
|
36
|
+
- consultazione ticket con serializzazioni dedicate
|
|
37
|
+
- gestione commenti operatore/utente
|
|
38
|
+
|
|
39
|
+
## Sviluppo
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
nx build ticket
|
|
43
|
+
nx test ticket
|
|
44
|
+
```
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tc-libs/ticket",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@faker-js/faker": "^9.6.0",
|
|
6
|
-
"@tc-libs/pagination": "3.
|
|
7
|
-
"@tc-libs/authentication": "3.
|
|
6
|
+
"@tc-libs/pagination": "3.6.1",
|
|
7
|
+
"@tc-libs/authentication": "3.6.1",
|
|
8
8
|
"@nestjs/common": "^11.0.12",
|
|
9
9
|
"@nestjs/swagger": "^11.1.0",
|
|
10
|
-
"@tc-libs/request": "3.
|
|
11
|
-
"@tc-libs/response": "3.
|
|
12
|
-
"@tc-libs/doc": "3.
|
|
10
|
+
"@tc-libs/request": "3.6.1",
|
|
11
|
+
"@tc-libs/response": "3.6.1",
|
|
12
|
+
"@tc-libs/doc": "3.6.1",
|
|
13
13
|
"class-validator": "^0.14.1",
|
|
14
14
|
"class-transformer": "^0.5.1",
|
|
15
|
-
"@tc-libs/errors": "3.
|
|
16
|
-
"@tc-libs/database": "3.
|
|
15
|
+
"@tc-libs/errors": "3.6.1",
|
|
16
|
+
"@tc-libs/database": "3.6.1",
|
|
17
17
|
"@nestjs/mongoose": "^11.0.3",
|
|
18
18
|
"mongoose": "^8.13.1",
|
|
19
|
-
"@tc-libs/app-cache": "3.
|
|
20
|
-
"@tc-libs/service": "3.
|
|
19
|
+
"@tc-libs/app-cache": "3.6.1",
|
|
20
|
+
"@tc-libs/service": "3.6.1",
|
|
21
21
|
"tslib": "^2.8.1"
|
|
22
22
|
},
|
|
23
23
|
"type": "commonjs",
|