tychat-contracts 1.0.46 → 1.0.47

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.
@@ -1,2 +1,3 @@
1
1
  export { CreateUserDto, CREATABLE_USER_ROLES, type CreatableUserRole, } from './create-user.dto';
2
+ export { UserListItemDto } from './user-list-item.dto';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATABLE_USER_ROLES = exports.CreateUserDto = void 0;
3
+ exports.UserListItemDto = exports.CREATABLE_USER_ROLES = exports.CreateUserDto = void 0;
4
4
  var create_user_dto_1 = require("./create-user.dto");
5
5
  Object.defineProperty(exports, "CreateUserDto", { enumerable: true, get: function () { return create_user_dto_1.CreateUserDto; } });
6
6
  Object.defineProperty(exports, "CREATABLE_USER_ROLES", { enumerable: true, get: function () { return create_user_dto_1.CREATABLE_USER_ROLES; } });
7
+ var user_list_item_dto_1 = require("./user-list-item.dto");
8
+ Object.defineProperty(exports, "UserListItemDto", { enumerable: true, get: function () { return user_list_item_dto_1.UserListItemDto; } });
@@ -0,0 +1,8 @@
1
+ /** Public user summary returned when an administrator lists users (no password). */
2
+ export declare class UserListItemDto {
3
+ id: string;
4
+ name: string;
5
+ email: string;
6
+ role: 'administrator' | 'attendant' | 'health_professional';
7
+ }
8
+ //# sourceMappingURL=user-list-item.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-list-item.dto.d.ts","sourceRoot":"","sources":["../../src/users/user-list-item.dto.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,qBAAa,eAAe;IAM1B,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAOd,IAAI,EAAE,eAAe,GAAG,WAAW,GAAG,qBAAqB,CAAC;CAC7D"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UserListItemDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /** Public user summary returned when an administrator lists users (no password). */
15
+ class UserListItemDto {
16
+ id;
17
+ name;
18
+ email;
19
+ role;
20
+ }
21
+ exports.UserListItemDto = UserListItemDto;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({
24
+ format: 'uuid',
25
+ description: 'User identifier',
26
+ example: '550e8400-e29b-41d4-a716-446655440000',
27
+ }),
28
+ __metadata("design:type", String)
29
+ ], UserListItemDto.prototype, "id", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({ description: 'Full name', example: 'Maria da Silva' }),
32
+ __metadata("design:type", String)
33
+ ], UserListItemDto.prototype, "name", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ description: 'E-mail (unique per tenant)', example: 'maria@empresa.com' }),
36
+ __metadata("design:type", String)
37
+ ], UserListItemDto.prototype, "email", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({
40
+ description: 'User role',
41
+ enum: ['administrator', 'attendant', 'health_professional'],
42
+ example: 'attendant',
43
+ }),
44
+ __metadata("design:type", String)
45
+ ], UserListItemDto.prototype, "role", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -3,3 +3,4 @@ export {
3
3
  CREATABLE_USER_ROLES,
4
4
  type CreatableUserRole,
5
5
  } from './create-user.dto';
6
+ export { UserListItemDto } from './user-list-item.dto';
@@ -0,0 +1,24 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+
3
+ /** Public user summary returned when an administrator lists users (no password). */
4
+ export class UserListItemDto {
5
+ @ApiProperty({
6
+ format: 'uuid',
7
+ description: 'User identifier',
8
+ example: '550e8400-e29b-41d4-a716-446655440000',
9
+ })
10
+ id: string;
11
+
12
+ @ApiProperty({ description: 'Full name', example: 'Maria da Silva' })
13
+ name: string;
14
+
15
+ @ApiProperty({ description: 'E-mail (unique per tenant)', example: 'maria@empresa.com' })
16
+ email: string;
17
+
18
+ @ApiProperty({
19
+ description: 'User role',
20
+ enum: ['administrator', 'attendant', 'health_professional'],
21
+ example: 'attendant',
22
+ })
23
+ role: 'administrator' | 'attendant' | 'health_professional';
24
+ }