tychat-contracts 1.0.67 → 1.0.68

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,5 @@
1
1
  import { AppointmentDto } from './appointment.dto';
2
+ import { AppointmentStatusDto } from './appointment-status.dto';
2
3
  export declare class ListAppointmentsQueryDto {
3
4
  page?: number;
4
5
  limit?: number;
@@ -7,6 +8,7 @@ export declare class ListAppointmentsQueryDto {
7
8
  userId?: string;
8
9
  checkinCompleted?: boolean;
9
10
  patientId?: string;
11
+ status?: AppointmentStatusDto;
10
12
  }
11
13
  export interface AppointmentListResult {
12
14
  items: AppointmentDto[];
@@ -1 +1 @@
1
- {"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,wBAAwB;IAUnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAQ3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAwB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,qBAAa,wBAAwB;IAUnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAQ3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAUnB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ListAppointmentsQueryDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
+ const appointment_status_dto_1 = require("./appointment-status.dto");
15
16
  class ListAppointmentsQueryDto {
16
17
  page;
17
18
  limit;
@@ -20,6 +21,7 @@ class ListAppointmentsQueryDto {
20
21
  userId;
21
22
  checkinCompleted;
22
23
  patientId;
24
+ status;
23
25
  }
24
26
  exports.ListAppointmentsQueryDto = ListAppointmentsQueryDto;
25
27
  __decorate([
@@ -93,3 +95,14 @@ __decorate([
93
95
  (0, class_validator_1.IsUUID)('4'),
94
96
  __metadata("design:type", String)
95
97
  ], ListAppointmentsQueryDto.prototype, "patientId", void 0);
98
+ __decorate([
99
+ (0, swagger_1.ApiPropertyOptional)({
100
+ description: 'Filtrar por status do agendamento',
101
+ example: 'processing',
102
+ enum: appointment_status_dto_1.APPOINTMENT_STATUSES,
103
+ }),
104
+ (0, class_validator_1.IsOptional)(),
105
+ (0, class_validator_1.IsString)(),
106
+ (0, class_validator_1.IsIn)(appointment_status_dto_1.APPOINTMENT_STATUSES),
107
+ __metadata("design:type", String)
108
+ ], ListAppointmentsQueryDto.prototype, "status", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
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",
@@ -1,6 +1,7 @@
1
1
  import { ApiPropertyOptional } from '@nestjs/swagger';
2
- import { IsBoolean, IsDateString, IsInt, IsOptional, IsUUID, Max, Min } from 'class-validator';
2
+ import { IsBoolean, IsDateString, IsIn, IsInt, IsOptional, IsString, IsUUID, Max, Min } from 'class-validator';
3
3
  import { AppointmentDto } from './appointment.dto';
4
+ import { APPOINTMENT_STATUSES, AppointmentStatusDto } from './appointment-status.dto';
4
5
 
5
6
  export class ListAppointmentsQueryDto {
6
7
  @ApiPropertyOptional({
@@ -66,6 +67,16 @@ export class ListAppointmentsQueryDto {
66
67
  @IsOptional()
67
68
  @IsUUID('4')
68
69
  patientId?: string;
70
+
71
+ @ApiPropertyOptional({
72
+ description: 'Filtrar por status do agendamento',
73
+ example: 'processing',
74
+ enum: APPOINTMENT_STATUSES,
75
+ })
76
+ @IsOptional()
77
+ @IsString()
78
+ @IsIn(APPOINTMENT_STATUSES)
79
+ status?: AppointmentStatusDto;
69
80
  }
70
81
 
71
82
  export interface AppointmentListResult {