tychat-contracts 1.0.63 → 1.0.64

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,3 +1,3 @@
1
- export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished"];
1
+ export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished", "canceled"];
2
2
  export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
3
3
  //# sourceMappingURL=appointment-status.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,0DAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,sEAMvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -6,4 +6,5 @@ exports.APPOINTMENT_STATUSES = [
6
6
  'processing',
7
7
  'sended',
8
8
  'finished',
9
+ 'canceled',
9
10
  ];
@@ -6,6 +6,9 @@ export interface AppointmentDto {
6
6
  date: string;
7
7
  checkinCompleted: boolean;
8
8
  checkoutCompleted: boolean;
9
+ exitTime?: string;
10
+ observation?: string;
11
+ cancellationReason?: string;
9
12
  status: AppointmentStatusDto;
10
13
  }
11
14
  //# sourceMappingURL=appointment.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IAMX,SAAS,EAAE,MAAM,CAAC;IAKlB,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,OAAO,CAAC;IAK1B,iBAAiB,EAAE,OAAO,CAAC;IAK3B,MAAM,EAAE,oBAAoB,CAAC;CAC9B"}
1
+ {"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IAMX,SAAS,EAAE,MAAM,CAAC;IAKlB,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,OAAO,CAAC;IAK1B,iBAAiB,EAAE,OAAO,CAAC;IAK3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,MAAM,EAAE,oBAAoB,CAAC;CAC9B"}
@@ -5,6 +5,9 @@ export declare class CreateAppointmentDto {
5
5
  userId: string;
6
6
  checkinCompleted?: boolean;
7
7
  checkoutCompleted?: boolean;
8
+ exitTime?: string;
9
+ observation?: string;
10
+ cancellationReason?: string;
8
11
  status?: AppointmentStatusDto;
9
12
  }
10
13
  //# sourceMappingURL=create-appointment.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AASA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAItF,qBAAa,oBAAoB;IAO/B,SAAS,EAAE,MAAM,CAAC;IAOlB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
1
+ {"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAUA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAItF,qBAAa,oBAAoB;IAO/B,SAAS,EAAE,MAAM,CAAC;IAOlB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAQ5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
@@ -19,6 +19,9 @@ class CreateAppointmentDto {
19
19
  userId;
20
20
  checkinCompleted;
21
21
  checkoutCompleted;
22
+ exitTime;
23
+ observation;
24
+ cancellationReason;
22
25
  status;
23
26
  }
24
27
  exports.CreateAppointmentDto = CreateAppointmentDto;
@@ -68,6 +71,33 @@ __decorate([
68
71
  (0, class_validator_1.IsBoolean)(),
69
72
  __metadata("design:type", Boolean)
70
73
  ], CreateAppointmentDto.prototype, "checkoutCompleted", void 0);
74
+ __decorate([
75
+ (0, swagger_1.ApiPropertyOptional)({
76
+ description: 'Horário de saída do atendimento (ISO 8601)',
77
+ example: '2026-03-15T14:45:00.000Z',
78
+ }),
79
+ (0, class_validator_1.IsOptional)(),
80
+ (0, class_validator_1.IsDateString)(),
81
+ __metadata("design:type", String)
82
+ ], CreateAppointmentDto.prototype, "exitTime", void 0);
83
+ __decorate([
84
+ (0, swagger_1.ApiPropertyOptional)({
85
+ description: 'Observação do agendamento',
86
+ example: 'Paciente solicitou prioridade no retorno.',
87
+ }),
88
+ (0, class_validator_1.IsOptional)(),
89
+ (0, class_validator_1.IsString)(),
90
+ __metadata("design:type", String)
91
+ ], CreateAppointmentDto.prototype, "observation", void 0);
92
+ __decorate([
93
+ (0, swagger_1.ApiPropertyOptional)({
94
+ description: 'Motivo do cancelamento',
95
+ example: 'Paciente não compareceu.',
96
+ }),
97
+ (0, class_validator_1.IsOptional)(),
98
+ (0, class_validator_1.IsString)(),
99
+ __metadata("design:type", String)
100
+ ], CreateAppointmentDto.prototype, "cancellationReason", void 0);
71
101
  __decorate([
72
102
  (0, swagger_1.ApiPropertyOptional)({
73
103
  description: 'Status do agendamento',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
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,5 +3,6 @@ export const APPOINTMENT_STATUSES = [
3
3
  'processing',
4
4
  'sended',
5
5
  'finished',
6
+ 'canceled',
6
7
  ] as const;
7
8
  export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
@@ -29,6 +29,21 @@ export interface AppointmentDto {
29
29
  */
30
30
  checkoutCompleted: boolean;
31
31
  /*
32
+ * Horário de saída do atendimento (ISO 8601)
33
+ * @example '2026-03-15T14:45:00.000Z'
34
+ */
35
+ exitTime?: string;
36
+ /*
37
+ * Observação do agendamento
38
+ * @example 'Paciente solicitou prioridade no retorno.'
39
+ */
40
+ observation?: string;
41
+ /*
42
+ * Motivo do cancelamento
43
+ * @example 'Paciente não compareceu.'
44
+ */
45
+ cancellationReason?: string;
46
+ /*
32
47
  * Status do agendamento
33
48
  * @example 'pending'
34
49
  */
@@ -5,6 +5,7 @@ import {
5
5
  IsEnum,
6
6
  IsNotEmpty,
7
7
  IsOptional,
8
+ IsString,
8
9
  IsUUID,
9
10
  } from 'class-validator';
10
11
  import { APPOINTMENT_STATUSES, AppointmentStatusDto } from './appointment-status.dto';
@@ -53,6 +54,30 @@ export class CreateAppointmentDto {
53
54
  @IsBoolean()
54
55
  checkoutCompleted?: boolean;
55
56
 
57
+ @ApiPropertyOptional({
58
+ description: 'Horário de saída do atendimento (ISO 8601)',
59
+ example: '2026-03-15T14:45:00.000Z',
60
+ })
61
+ @IsOptional()
62
+ @IsDateString()
63
+ exitTime?: string;
64
+
65
+ @ApiPropertyOptional({
66
+ description: 'Observação do agendamento',
67
+ example: 'Paciente solicitou prioridade no retorno.',
68
+ })
69
+ @IsOptional()
70
+ @IsString()
71
+ observation?: string;
72
+
73
+ @ApiPropertyOptional({
74
+ description: 'Motivo do cancelamento',
75
+ example: 'Paciente não compareceu.',
76
+ })
77
+ @IsOptional()
78
+ @IsString()
79
+ cancellationReason?: string;
80
+
56
81
  @ApiPropertyOptional({
57
82
  description: 'Status do agendamento',
58
83
  enum: APPOINTMENT_STATUSES,