tychat-contracts 1.0.98 → 1.0.99
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,7 +1,7 @@
|
|
|
1
1
|
import { AppointmentDto } from './appointment.dto';
|
|
2
2
|
import { AppointmentStatusDto } from './appointment-status.dto';
|
|
3
3
|
/** Campo principal de ordenação na listagem de agendamentos. */
|
|
4
|
-
export declare const APPOINTMENT_LIST_SORT_BY: readonly ["date", "checkin_completed"];
|
|
4
|
+
export declare const APPOINTMENT_LIST_SORT_BY: readonly ["date", "checkin_completed", "checkout_completed"];
|
|
5
5
|
export type AppointmentListSortByDto = (typeof APPOINTMENT_LIST_SORT_BY)[number];
|
|
6
6
|
export declare const APPOINTMENT_LIST_SORT_ORDER: readonly ["ASC", "DESC"];
|
|
7
7
|
export type AppointmentListSortOrderDto = (typeof APPOINTMENT_LIST_SORT_ORDER)[number];
|
|
@@ -12,6 +12,7 @@ export declare class ListAppointmentsQueryDto {
|
|
|
12
12
|
dateTo?: string;
|
|
13
13
|
userId?: string;
|
|
14
14
|
checkinCompleted?: boolean;
|
|
15
|
+
checkoutCompleted?: boolean;
|
|
15
16
|
patientId?: string;
|
|
16
17
|
status?: AppointmentStatusDto;
|
|
17
18
|
sortBy?: AppointmentListSortByDto;
|
|
@@ -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;AACnD,OAAO,EAAwB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,gEAAgE;AAChE,eAAO,MAAM,wBAAwB,
|
|
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,gEAAgE;AAChE,eAAO,MAAM,wBAAwB,8DAI3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,eAAO,MAAM,2BAA2B,0BAA2B,CAAC;AACpE,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvF,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,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAQ5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAUnB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAU9B,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAUlC,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;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"}
|
|
@@ -14,7 +14,11 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const appointment_status_dto_1 = require("./appointment-status.dto");
|
|
16
16
|
/** Campo principal de ordenação na listagem de agendamentos. */
|
|
17
|
-
exports.APPOINTMENT_LIST_SORT_BY = [
|
|
17
|
+
exports.APPOINTMENT_LIST_SORT_BY = [
|
|
18
|
+
'date',
|
|
19
|
+
'checkin_completed',
|
|
20
|
+
'checkout_completed',
|
|
21
|
+
];
|
|
18
22
|
exports.APPOINTMENT_LIST_SORT_ORDER = ['ASC', 'DESC'];
|
|
19
23
|
class ListAppointmentsQueryDto {
|
|
20
24
|
page;
|
|
@@ -23,6 +27,7 @@ class ListAppointmentsQueryDto {
|
|
|
23
27
|
dateTo;
|
|
24
28
|
userId;
|
|
25
29
|
checkinCompleted;
|
|
30
|
+
checkoutCompleted;
|
|
26
31
|
patientId;
|
|
27
32
|
status;
|
|
28
33
|
sortBy;
|
|
@@ -91,6 +96,15 @@ __decorate([
|
|
|
91
96
|
(0, class_validator_1.IsBoolean)(),
|
|
92
97
|
__metadata("design:type", Boolean)
|
|
93
98
|
], ListAppointmentsQueryDto.prototype, "checkinCompleted", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
101
|
+
description: 'Filtrar por status de check-out realizado',
|
|
102
|
+
example: false,
|
|
103
|
+
}),
|
|
104
|
+
(0, class_validator_1.IsOptional)(),
|
|
105
|
+
(0, class_validator_1.IsBoolean)(),
|
|
106
|
+
__metadata("design:type", Boolean)
|
|
107
|
+
], ListAppointmentsQueryDto.prototype, "checkoutCompleted", void 0);
|
|
94
108
|
__decorate([
|
|
95
109
|
(0, swagger_1.ApiPropertyOptional)({
|
|
96
110
|
description: 'Filtrar por paciente (UUID) - histórico de consultas',
|
|
@@ -113,7 +127,7 @@ __decorate([
|
|
|
113
127
|
], ListAppointmentsQueryDto.prototype, "status", void 0);
|
|
114
128
|
__decorate([
|
|
115
129
|
(0, swagger_1.ApiPropertyOptional)({
|
|
116
|
-
description: 'Ordenação principal: `date` (
|
|
130
|
+
description: 'Ordenação principal: `date`, `checkin_completed` (check-in pendente vs concluído) ou `checkout_completed` (check-out pendente vs concluído). Omisso = `date`.',
|
|
117
131
|
enum: exports.APPOINTMENT_LIST_SORT_BY,
|
|
118
132
|
example: 'checkin_completed',
|
|
119
133
|
}),
|
|
@@ -123,7 +137,7 @@ __decorate([
|
|
|
123
137
|
], ListAppointmentsQueryDto.prototype, "sortBy", void 0);
|
|
124
138
|
__decorate([
|
|
125
139
|
(0, swagger_1.ApiPropertyOptional)({
|
|
126
|
-
description: 'Direção: `ASC` ou `DESC`. Com `
|
|
140
|
+
description: 'Direção: `ASC` ou `DESC`. Com `checkin_completed` ou `checkout_completed`, `ASC` coloca pendentes (false) primeiro; `DESC` coloca concluídos (true) primeiro. Com `date`, aplica-se à coluna `date`.',
|
|
127
141
|
enum: exports.APPOINTMENT_LIST_SORT_ORDER,
|
|
128
142
|
example: 'ASC',
|
|
129
143
|
}),
|
package/package.json
CHANGED
|
@@ -4,7 +4,11 @@ import { AppointmentDto } from './appointment.dto';
|
|
|
4
4
|
import { APPOINTMENT_STATUSES, AppointmentStatusDto } from './appointment-status.dto';
|
|
5
5
|
|
|
6
6
|
/** Campo principal de ordenação na listagem de agendamentos. */
|
|
7
|
-
export const APPOINTMENT_LIST_SORT_BY = [
|
|
7
|
+
export const APPOINTMENT_LIST_SORT_BY = [
|
|
8
|
+
'date',
|
|
9
|
+
'checkin_completed',
|
|
10
|
+
'checkout_completed',
|
|
11
|
+
] as const;
|
|
8
12
|
export type AppointmentListSortByDto = (typeof APPOINTMENT_LIST_SORT_BY)[number];
|
|
9
13
|
|
|
10
14
|
export const APPOINTMENT_LIST_SORT_ORDER = ['ASC', 'DESC'] as const;
|
|
@@ -67,6 +71,14 @@ export class ListAppointmentsQueryDto {
|
|
|
67
71
|
@IsBoolean()
|
|
68
72
|
checkinCompleted?: boolean;
|
|
69
73
|
|
|
74
|
+
@ApiPropertyOptional({
|
|
75
|
+
description: 'Filtrar por status de check-out realizado',
|
|
76
|
+
example: false,
|
|
77
|
+
})
|
|
78
|
+
@IsOptional()
|
|
79
|
+
@IsBoolean()
|
|
80
|
+
checkoutCompleted?: boolean;
|
|
81
|
+
|
|
70
82
|
@ApiPropertyOptional({
|
|
71
83
|
description: 'Filtrar por paciente (UUID) - histórico de consultas',
|
|
72
84
|
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
@@ -87,7 +99,7 @@ export class ListAppointmentsQueryDto {
|
|
|
87
99
|
|
|
88
100
|
@ApiPropertyOptional({
|
|
89
101
|
description:
|
|
90
|
-
'Ordenação principal: `date` (
|
|
102
|
+
'Ordenação principal: `date`, `checkin_completed` (check-in pendente vs concluído) ou `checkout_completed` (check-out pendente vs concluído). Omisso = `date`.',
|
|
91
103
|
enum: APPOINTMENT_LIST_SORT_BY,
|
|
92
104
|
example: 'checkin_completed',
|
|
93
105
|
})
|
|
@@ -97,7 +109,7 @@ export class ListAppointmentsQueryDto {
|
|
|
97
109
|
|
|
98
110
|
@ApiPropertyOptional({
|
|
99
111
|
description:
|
|
100
|
-
'Direção: `ASC` ou `DESC`. Com `
|
|
112
|
+
'Direção: `ASC` ou `DESC`. Com `checkin_completed` ou `checkout_completed`, `ASC` coloca pendentes (false) primeiro; `DESC` coloca concluídos (true) primeiro. Com `date`, aplica-se à coluna `date`.',
|
|
101
113
|
enum: APPOINTMENT_LIST_SORT_ORDER,
|
|
102
114
|
example: 'ASC',
|
|
103
115
|
})
|