tychat-contracts 1.0.89 → 1.0.90

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,6 +1,8 @@
1
1
  import { CreatePatientDto } from './create-patient.dto';
2
+ import { type PatientStatusDto } from './patient-status.dto';
2
3
  declare const UpdatePatientDto_base: import("@nestjs/common").Type<Partial<CreatePatientDto>>;
3
4
  export declare class UpdatePatientDto extends UpdatePatientDto_base {
5
+ status?: PatientStatusDto;
4
6
  }
5
7
  export {};
6
8
  //# sourceMappingURL=update-patient.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-patient.dto.d.ts","sourceRoot":"","sources":["../../src/patients/update-patient.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;AAExD,qBAAa,gBAAiB,SAAQ,qBAA6B;CAAG"}
1
+ {"version":3,"file":"update-patient.dto.d.ts","sourceRoot":"","sources":["../../src/patients/update-patient.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;AAE/E,qBAAa,gBAAiB,SAAQ,qBAA6B;IAOjE,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
@@ -1,8 +1,29 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.UpdatePatientDto = void 0;
4
13
  const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
5
15
  const create_patient_dto_1 = require("./create-patient.dto");
16
+ const patient_status_dto_1 = require("./patient-status.dto");
6
17
  class UpdatePatientDto extends (0, swagger_1.PartialType)(create_patient_dto_1.CreatePatientDto) {
18
+ status;
7
19
  }
8
20
  exports.UpdatePatientDto = UpdatePatientDto;
21
+ __decorate([
22
+ (0, swagger_1.ApiPropertyOptional)({
23
+ description: 'Status de engajamento do paciente (active | inactive)',
24
+ enum: patient_status_dto_1.PATIENT_STATUSES,
25
+ }),
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.IsIn)([...patient_status_dto_1.PATIENT_STATUSES]),
28
+ __metadata("design:type", String)
29
+ ], UpdatePatientDto.prototype, "status", void 0);
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "name": "tychat-contracts",
3
- "version": "1.0.89",
4
- "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "private": false,
8
- "scripts": {
9
- "build": "tsc",
10
- "prepublishOnly": "npm run build"
11
- },
12
- "dependencies": {
13
- "class-transformer": "^0.5.1",
14
- "class-validator": "^0.14.1",
15
- "ioredis": "^5.10.0",
16
- "jest": "^30.3.0",
17
- "reflect-metadata": "*"
18
- },
19
- "devDependencies": {
20
- "@nestjs/swagger": "^11.2.6",
21
- "typescript": "^5.7.3"
22
- },
23
- "peerDependencies": {
24
- "@nestjs/swagger": "^11.2.6",
25
- "reflect-metadata": "*"
26
- }
27
- }
1
+ {
2
+ "name": "tychat-contracts",
3
+ "version": "1.0.90",
4
+ "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "private": false,
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "prepublishOnly": "npm run build"
11
+ },
12
+ "dependencies": {
13
+ "class-transformer": "^0.5.1",
14
+ "class-validator": "^0.14.1",
15
+ "ioredis": "^5.10.0",
16
+ "jest": "^30.3.0",
17
+ "reflect-metadata": "*"
18
+ },
19
+ "devDependencies": {
20
+ "@nestjs/swagger": "^11.2.6",
21
+ "typescript": "^5.7.3"
22
+ },
23
+ "peerDependencies": {
24
+ "@nestjs/swagger": "^11.2.6",
25
+ "reflect-metadata": "*"
26
+ }
27
+ }
@@ -1,5 +1,15 @@
1
- import { PartialType } from '@nestjs/swagger';
1
+ import { ApiPropertyOptional, PartialType } from '@nestjs/swagger';
2
+ import { IsIn, IsOptional } from 'class-validator';
2
3
  import { CreatePatientDto } from './create-patient.dto';
4
+ import { PATIENT_STATUSES, type PatientStatusDto } from './patient-status.dto';
3
5
 
4
- export class UpdatePatientDto extends PartialType(CreatePatientDto) {}
6
+ export class UpdatePatientDto extends PartialType(CreatePatientDto) {
7
+ @ApiPropertyOptional({
8
+ description: 'Status de engajamento do paciente (active | inactive)',
9
+ enum: PATIENT_STATUSES,
10
+ })
11
+ @IsOptional()
12
+ @IsIn([...PATIENT_STATUSES])
13
+ status?: PatientStatusDto;
14
+ }
5
15