tychat-contracts 1.0.51 → 1.0.52

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 CHANGED
@@ -6,6 +6,7 @@ DTOs compartilhados com **class-validator** usados pela **tychat-api** e pelos m
6
6
 
7
7
  - **auth**: `LoginDto`, `RefreshTokenDto`, `RequestPasswordResetDto`, `ConfirmPasswordResetDto`, `AuthLoginResponseDto`, payloads Kafka (`LoginPayload`, `RequestPasswordResetPayload`, etc.)
8
8
  - **users**: `CreateUserDto` (sem password para criação por admin), `UserListItemDto`, `UpdateSelfUserDto`, `UpdateUserByAdminDto`, `UpdatedUserDto`, `ChangeForcePasswordDto`
9
+ - **professionals**: `ProfessionalProfileDto`, `UpdateProfessionalProfileDto`, `CreateProfessionalWithProfileDto`
9
10
 
10
11
  ## Uso
11
12
 
@@ -3,6 +3,5 @@ export declare class UpdateSelfUserDto {
3
3
  _atLeastOne?: string;
4
4
  name?: string;
5
5
  email?: string;
6
- password?: string;
7
6
  }
8
7
  //# sourceMappingURL=update-self-user.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-self-user.dto.d.ts","sourceRoot":"","sources":["../../src/users/update-self-user.dto.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,qBAAa,iBAAiB;IAG5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAUd,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"update-self-user.dto.d.ts","sourceRoot":"","sources":["../../src/users/update-self-user.dto.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,qBAAa,iBAAiB;IAG5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAUd,KAAK,CAAC,EAAE,MAAM,CAAC;CAEhB"}
@@ -18,12 +18,11 @@ class UpdateSelfUserDto {
18
18
  _atLeastOne;
19
19
  name;
20
20
  email;
21
- password;
22
21
  }
23
22
  exports.UpdateSelfUserDto = UpdateSelfUserDto;
24
23
  __decorate([
25
24
  (0, swagger_1.ApiHideProperty)(),
26
- (0, at_least_one_of_decorator_1.AtLeastOneOf)(['name', 'email', 'password']),
25
+ (0, at_least_one_of_decorator_1.AtLeastOneOf)(['name', 'email']),
27
26
  __metadata("design:type", String)
28
27
  ], UpdateSelfUserDto.prototype, "_atLeastOne", void 0);
29
28
  __decorate([
@@ -49,15 +48,3 @@ __decorate([
49
48
  (0, class_validator_1.MaxLength)(255),
50
49
  __metadata("design:type", String)
51
50
  ], UpdateSelfUserDto.prototype, "email", void 0);
52
- __decorate([
53
- (0, swagger_1.ApiPropertyOptional)({
54
- description: 'New password (bcrypt-hashed on the auth service)',
55
- example: 'senha123',
56
- minLength: 6,
57
- }),
58
- (0, class_validator_1.IsOptional)(),
59
- (0, class_validator_1.IsString)(),
60
- (0, class_validator_1.MinLength)(6, { message: 'password must be at least 6 characters' }),
61
- (0, class_validator_1.MaxLength)(255),
62
- __metadata("design:type", String)
63
- ], UpdateSelfUserDto.prototype, "password", void 0);
@@ -5,7 +5,6 @@ export declare class UpdateUserByAdminDto {
5
5
  _atLeastOne?: string;
6
6
  name?: string;
7
7
  email?: string;
8
- password?: string;
9
8
  role?: AllUserRole;
10
9
  }
11
10
  //# sourceMappingURL=update-user-by-admin.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-user-by-admin.dto.d.ts","sourceRoot":"","sources":["../../src/users/update-user-by-admin.dto.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,gEAIjB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,wEAAwE;AACxE,qBAAa,oBAAoB;IAG/B,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAUd,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAYlB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
1
+ {"version":3,"file":"update-user-by-admin.dto.d.ts","sourceRoot":"","sources":["../../src/users/update-user-by-admin.dto.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,gEAIjB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,wEAAwE;AACxE,qBAAa,oBAAoB;IAG/B,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAUd,KAAK,CAAC,EAAE,MAAM,CAAC;IAYf,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
@@ -23,13 +23,12 @@ class UpdateUserByAdminDto {
23
23
  _atLeastOne;
24
24
  name;
25
25
  email;
26
- password;
27
26
  role;
28
27
  }
29
28
  exports.UpdateUserByAdminDto = UpdateUserByAdminDto;
30
29
  __decorate([
31
30
  (0, swagger_1.ApiHideProperty)(),
32
- (0, at_least_one_of_decorator_1.AtLeastOneOf)(['name', 'email', 'password', 'role']),
31
+ (0, at_least_one_of_decorator_1.AtLeastOneOf)(['name', 'email', 'role']),
33
32
  __metadata("design:type", String)
34
33
  ], UpdateUserByAdminDto.prototype, "_atLeastOne", void 0);
35
34
  __decorate([
@@ -55,18 +54,6 @@ __decorate([
55
54
  (0, class_validator_1.MaxLength)(255),
56
55
  __metadata("design:type", String)
57
56
  ], UpdateUserByAdminDto.prototype, "email", void 0);
58
- __decorate([
59
- (0, swagger_1.ApiPropertyOptional)({
60
- description: 'New password (bcrypt-hashed on the auth service)',
61
- example: 'senha123',
62
- minLength: 6,
63
- }),
64
- (0, class_validator_1.IsOptional)(),
65
- (0, class_validator_1.IsString)(),
66
- (0, class_validator_1.MinLength)(6, { message: 'password must be at least 6 characters' }),
67
- (0, class_validator_1.MaxLength)(255),
68
- __metadata("design:type", String)
69
- ], UpdateUserByAdminDto.prototype, "password", void 0);
70
57
  __decorate([
71
58
  (0, swagger_1.ApiPropertyOptional)({
72
59
  description: 'User role',
@@ -6,7 +6,6 @@ export interface AuthUpdateSelfPayload {
6
6
  userId: string;
7
7
  name?: string;
8
8
  email?: string;
9
- password?: string;
10
9
  }
11
10
  /**
12
11
  * Kafka payload for auth.update_user_admin (tychat-api → tychat-auth-service).
@@ -18,7 +17,6 @@ export interface AuthUpdateUserAdminPayload {
18
17
  targetUserId: string;
19
18
  name?: string;
20
19
  email?: string;
21
- password?: string;
22
20
  role?: 'administrator' | 'attendant' | 'health_professional';
23
21
  }
24
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"user-update-kafka-payloads.d.ts","sourceRoot":"","sources":["../../src/users/user-update-kafka-payloads.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,eAAe,GAAG,WAAW,GAAG,qBAAqB,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"user-update-kafka-payloads.d.ts","sourceRoot":"","sources":["../../src/users/user-update-kafka-payloads.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,GAAG,WAAW,GAAG,qBAAqB,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
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",
@@ -5,7 +5,7 @@ import { AtLeastOneOf } from './at-least-one-of.decorator';
5
5
  /** Fields the authenticated user may change on their own profile (no role change). */
6
6
  export class UpdateSelfUserDto {
7
7
  @ApiHideProperty()
8
- @AtLeastOneOf(['name', 'email', 'password'])
8
+ @AtLeastOneOf(['name', 'email'])
9
9
  _atLeastOne?: string;
10
10
 
11
11
  @ApiPropertyOptional({
@@ -29,14 +29,4 @@ export class UpdateSelfUserDto {
29
29
  @MaxLength(255)
30
30
  email?: string;
31
31
 
32
- @ApiPropertyOptional({
33
- description: 'New password (bcrypt-hashed on the auth service)',
34
- example: 'senha123',
35
- minLength: 6,
36
- })
37
- @IsOptional()
38
- @IsString()
39
- @MinLength(6, { message: 'password must be at least 6 characters' })
40
- @MaxLength(255)
41
- password?: string;
42
32
  }
@@ -12,7 +12,7 @@ export type AllUserRole = (typeof ALL_USER_ROLES)[number];
12
12
  /** Fields an administrator may change for any user (including role). */
13
13
  export class UpdateUserByAdminDto {
14
14
  @ApiHideProperty()
15
- @AtLeastOneOf(['name', 'email', 'password', 'role'])
15
+ @AtLeastOneOf(['name', 'email', 'role'])
16
16
  _atLeastOne?: string;
17
17
 
18
18
  @ApiPropertyOptional({
@@ -36,17 +36,6 @@ export class UpdateUserByAdminDto {
36
36
  @MaxLength(255)
37
37
  email?: string;
38
38
 
39
- @ApiPropertyOptional({
40
- description: 'New password (bcrypt-hashed on the auth service)',
41
- example: 'senha123',
42
- minLength: 6,
43
- })
44
- @IsOptional()
45
- @IsString()
46
- @MinLength(6, { message: 'password must be at least 6 characters' })
47
- @MaxLength(255)
48
- password?: string;
49
-
50
39
  @ApiPropertyOptional({
51
40
  description: 'User role',
52
41
  enum: ALL_USER_ROLES,
@@ -6,7 +6,6 @@ export interface AuthUpdateSelfPayload {
6
6
  userId: string;
7
7
  name?: string;
8
8
  email?: string;
9
- password?: string;
10
9
  }
11
10
 
12
11
  /**
@@ -19,7 +18,6 @@ export interface AuthUpdateUserAdminPayload {
19
18
  targetUserId: string;
20
19
  name?: string;
21
20
  email?: string;
22
- password?: string;
23
21
  role?: 'administrator' | 'attendant' | 'health_professional';
24
22
  }
25
23