@tc-libs/role 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.
Files changed (2) hide show
  1. package/README.md +41 -6
  2. package/package.json +11 -11
package/README.md CHANGED
@@ -1,11 +1,46 @@
1
- # role
1
+ # @tc-libs/role
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ Gestione ruoli applicativi e mapping con permessi.
4
4
 
5
- ## Building
5
+ Il package include:
6
6
 
7
- Run `nx build role` to build the library.
7
+ - `RoleModule`
8
+ - `RoleService`
9
+ - entity/repository/controller admin
10
+ - costanti e serializzazioni
8
11
 
9
- ## Running unit tests
12
+ ## `RoleService`
10
13
 
11
- Run `nx test role` to execute the unit tests via [Jest](https://jestjs.io).
14
+ Metodi specifici oltre al CRUD base:
15
+
16
+ - `findOneByName(name)`
17
+ - `existByName(name)`
18
+ - `createSuperAdmin()`
19
+ - `updateName(repository, dto)`
20
+ - `joinWithPermission(repository)`
21
+ - `updatePermission(repository, dto)`
22
+ - `active(repository)`
23
+ - `inactive(repository)`
24
+ - `getAccessFor()`
25
+
26
+ Esempio:
27
+
28
+ ```ts
29
+ const role = await this.roleService.createSuperAdmin();
30
+ ```
31
+
32
+ ## Integrazione con altri package
33
+
34
+ - usa `ENUM_AUTH_ACCESS_FOR` di `authentication`
35
+ - popola permessi tramite `PermissionEntity` di `permission`
36
+
37
+ ## Quando usarlo
38
+
39
+ Usalo quando il dominio applicativo deve distinguere ruoli, access level e permessi granulari in modo persistito.
40
+
41
+ ## Sviluppo
42
+
43
+ ```bash
44
+ nx build role
45
+ nx test role
46
+ ```
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@tc-libs/role",
3
- "version": "3.5.0",
3
+ "version": "3.6.1",
4
4
  "dependencies": {
5
- "@tc-libs/authentication": "3.5.0",
6
- "@tc-libs/pagination": "3.5.0",
7
- "@tc-libs/errors": "3.5.0",
8
- "@tc-libs/permission": "3.5.0",
9
- "@tc-libs/request": "3.5.0",
10
- "@tc-libs/response": "3.5.0",
11
- "@tc-libs/doc": "3.5.0",
12
- "@tc-libs/database": "3.5.0",
13
- "@tc-libs/app-cache": "3.5.0",
14
- "@tc-libs/service": "3.5.0",
5
+ "@tc-libs/authentication": "3.6.1",
6
+ "@tc-libs/pagination": "3.6.1",
7
+ "@tc-libs/errors": "3.6.1",
8
+ "@tc-libs/permission": "3.6.1",
9
+ "@tc-libs/request": "3.6.1",
10
+ "@tc-libs/response": "3.6.1",
11
+ "@tc-libs/doc": "3.6.1",
12
+ "@tc-libs/database": "3.6.1",
13
+ "@tc-libs/app-cache": "3.6.1",
14
+ "@tc-libs/service": "3.6.1",
15
15
  "@faker-js/faker": "^9.6.0",
16
16
  "@nestjs/common": "^11.0.12",
17
17
  "@nestjs/swagger": "^11.1.0",