tychat-contracts 1.0.9 → 1.0.11

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,4 +1,4 @@
1
1
  export { LoginDto } from './login.dto';
2
- export { LoginPayload, ValidatePayload, RefreshPayload, CreateUserPayload, } from './auth-kafka.payloads';
2
+ export type { LoginPayload, ValidatePayload, RefreshPayload, CreateUserPayload, } from './auth-kafka.payloads';
3
3
  export { RefreshTokenDto } from './refresh-token.dto';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,cAAc,EACd,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -4,6 +4,6 @@ export declare class CreatePatientDto {
4
4
  birthDate: string;
5
5
  hasDisability: boolean;
6
6
  disabilityDescription?: string | null;
7
- notes?: string | null;
7
+ initialObservation?: string | null;
8
8
  }
9
9
  //# sourceMappingURL=create-patient.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-patient.dto.d.ts","sourceRoot":"","sources":["../../src/patients/create-patient.dto.ts"],"names":[],"mappings":"AAWA,qBAAa,gBAAgB;IAS3B,IAAI,EAAE,MAAM,CAAC;IAUb,GAAG,EAAE,MAAM,CAAC;IAOZ,SAAS,EAAE,MAAM,CAAC;IAOlB,aAAa,EAAE,OAAO,CAAC;IAWvB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAUtC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB"}
1
+ {"version":3,"file":"create-patient.dto.d.ts","sourceRoot":"","sources":["../../src/patients/create-patient.dto.ts"],"names":[],"mappings":"AAWA,qBAAa,gBAAgB;IAS3B,IAAI,EAAE,MAAM,CAAC;IAUb,GAAG,EAAE,MAAM,CAAC;IAOZ,SAAS,EAAE,MAAM,CAAC;IAOlB,aAAa,EAAE,OAAO,CAAC;IAWvB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAUtC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
@@ -18,7 +18,7 @@ class CreatePatientDto {
18
18
  birthDate;
19
19
  hasDisability;
20
20
  disabilityDescription;
21
- notes;
21
+ initialObservation;
22
22
  }
23
23
  exports.CreatePatientDto = CreatePatientDto;
24
24
  __decorate([
@@ -72,12 +72,12 @@ __decorate([
72
72
  ], CreatePatientDto.prototype, "disabilityDescription", void 0);
73
73
  __decorate([
74
74
  (0, swagger_1.ApiPropertyOptional)({
75
- description: 'Observações gerais sobre o paciente',
76
- example: 'Paciente tem alergia a penicilina',
77
- maxLength: 1000,
75
+ description: 'Observação inicial do paciente (opcional)',
76
+ example: 'Paciente chegou com queixa de dor nas costas',
77
+ maxLength: 2000,
78
78
  }),
79
79
  (0, class_validator_1.IsString)(),
80
80
  (0, class_validator_1.IsOptional)(),
81
- (0, class_validator_1.MaxLength)(1000),
81
+ (0, class_validator_1.MaxLength)(2000),
82
82
  __metadata("design:type", Object)
83
- ], CreatePatientDto.prototype, "notes", void 0);
83
+ ], CreatePatientDto.prototype, "initialObservation", void 0);
@@ -1,4 +1,5 @@
1
1
  export * from './create-patient.dto';
2
2
  export * from './update-patient.dto';
3
3
  export * from './patient-history-entry.dto';
4
+ export * from './list-patients-query.dto';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patients/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patients/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-patient.dto"), exports);
18
18
  __exportStar(require("./update-patient.dto"), exports);
19
19
  __exportStar(require("./patient-history-entry.dto"), exports);
20
+ __exportStar(require("./list-patients-query.dto"), exports);
@@ -0,0 +1,5 @@
1
+ export declare class ListPatientsQueryDto {
2
+ page?: number;
3
+ limit?: number;
4
+ }
5
+ //# sourceMappingURL=list-patients-query.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-patients-query.dto.d.ts","sourceRoot":"","sources":["../../src/patients/list-patients-query.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAU/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -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.ListPatientsQueryDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class ListPatientsQueryDto {
16
+ page;
17
+ limit;
18
+ }
19
+ exports.ListPatientsQueryDto = ListPatientsQueryDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiPropertyOptional)({
22
+ description: 'Número da página (iniciando em 1)',
23
+ example: 1,
24
+ minimum: 1,
25
+ default: 1,
26
+ }),
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsInt)(),
29
+ (0, class_validator_1.Min)(1),
30
+ __metadata("design:type", Number)
31
+ ], ListPatientsQueryDto.prototype, "page", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiPropertyOptional)({
34
+ description: 'Quantidade de registros por página',
35
+ example: 20,
36
+ minimum: 1,
37
+ maximum: 100,
38
+ default: 20,
39
+ }),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsInt)(),
42
+ (0, class_validator_1.Min)(1),
43
+ (0, class_validator_1.Max)(100),
44
+ __metadata("design:type", Number)
45
+ ], ListPatientsQueryDto.prototype, "limit", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
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",
package/src/auth/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { LoginDto } from './login.dto';
2
- export {
2
+ export type {
3
3
  LoginPayload,
4
4
  ValidatePayload,
5
5
  RefreshPayload,
@@ -56,13 +56,13 @@ export class CreatePatientDto {
56
56
  disabilityDescription?: string | null;
57
57
 
58
58
  @ApiPropertyOptional({
59
- description: 'Observações gerais sobre o paciente',
60
- example: 'Paciente tem alergia a penicilina',
61
- maxLength: 1000,
59
+ description: 'Observação inicial do paciente (opcional)',
60
+ example: 'Paciente chegou com queixa de dor nas costas',
61
+ maxLength: 2000,
62
62
  })
63
63
  @IsString()
64
64
  @IsOptional()
65
- @MaxLength(1000)
66
- notes?: string | null;
65
+ @MaxLength(2000)
66
+ initialObservation?: string | null;
67
67
  }
68
68
 
@@ -1,4 +1,5 @@
1
1
  export * from './create-patient.dto';
2
2
  export * from './update-patient.dto';
3
3
  export * from './patient-history-entry.dto';
4
+ export * from './list-patients-query.dto';
4
5
 
@@ -0,0 +1,29 @@
1
+ import { ApiPropertyOptional } from '@nestjs/swagger';
2
+ import { IsInt, IsOptional, Max, Min } from 'class-validator';
3
+
4
+ export class ListPatientsQueryDto {
5
+ @ApiPropertyOptional({
6
+ description: 'Número da página (iniciando em 1)',
7
+ example: 1,
8
+ minimum: 1,
9
+ default: 1,
10
+ })
11
+ @IsOptional()
12
+ @IsInt()
13
+ @Min(1)
14
+ page?: number;
15
+
16
+ @ApiPropertyOptional({
17
+ description: 'Quantidade de registros por página',
18
+ example: 20,
19
+ minimum: 1,
20
+ maximum: 100,
21
+ default: 20,
22
+ })
23
+ @IsOptional()
24
+ @IsInt()
25
+ @Min(1)
26
+ @Max(100)
27
+ limit?: number;
28
+ }
29
+