tychat-contracts 1.0.18 → 1.0.20
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.
- package/dist/appointments/create-appointment.dto.d.ts +11 -0
- package/dist/appointments/create-appointment.dto.d.ts.map +1 -0
- package/dist/appointments/create-appointment.dto.js +85 -0
- package/dist/appointments/index.d.ts +4 -0
- package/dist/appointments/index.d.ts.map +1 -0
- package/dist/appointments/index.js +19 -0
- package/dist/appointments/list-appointments-query.dto.d.ts +10 -0
- package/dist/appointments/list-appointments-query.dto.d.ts.map +1 -0
- package/dist/appointments/list-appointments-query.dto.js +95 -0
- package/dist/appointments/update-appointment.dto.d.ts +6 -0
- package/dist/appointments/update-appointment.dto.d.ts.map +1 -0
- package/dist/appointments/update-appointment.dto.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/appointments/create-appointment.dto.ts +69 -0
- package/src/appointments/index.ts +3 -0
- package/src/appointments/list-appointments-query.dto.ts +68 -0
- package/src/appointments/update-appointment.dto.ts +4 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished"];
|
|
2
|
+
export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
|
|
3
|
+
export declare class CreateAppointmentDto {
|
|
4
|
+
patientId: string;
|
|
5
|
+
date: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
checkinCompleted?: boolean;
|
|
8
|
+
checkoutCompleted?: boolean;
|
|
9
|
+
status?: AppointmentStatusDto;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=create-appointment.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,0DAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,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"}
|
|
@@ -0,0 +1,85 @@
|
|
|
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.CreateAppointmentDto = exports.APPOINTMENT_STATUSES = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
exports.APPOINTMENT_STATUSES = [
|
|
16
|
+
'pending',
|
|
17
|
+
'processing',
|
|
18
|
+
'sended',
|
|
19
|
+
'finished',
|
|
20
|
+
];
|
|
21
|
+
class CreateAppointmentDto {
|
|
22
|
+
patientId;
|
|
23
|
+
date;
|
|
24
|
+
userId;
|
|
25
|
+
checkinCompleted;
|
|
26
|
+
checkoutCompleted;
|
|
27
|
+
status;
|
|
28
|
+
}
|
|
29
|
+
exports.CreateAppointmentDto = CreateAppointmentDto;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({
|
|
32
|
+
description: 'ID do paciente (UUID)',
|
|
33
|
+
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
34
|
+
}),
|
|
35
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CreateAppointmentDto.prototype, "patientId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'Data e hora do agendamento (ISO 8601)',
|
|
42
|
+
example: '2026-03-15T14:00:00.000Z',
|
|
43
|
+
}),
|
|
44
|
+
(0, class_validator_1.IsDateString)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateAppointmentDto.prototype, "date", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)({
|
|
49
|
+
description: 'ID do profissional de saúde atrelado ao agendamento (UUID)',
|
|
50
|
+
example: '550e8400-e29b-41d4-a716-446655440001',
|
|
51
|
+
}),
|
|
52
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
53
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], CreateAppointmentDto.prototype, "userId", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'Indica se o check-in foi realizado',
|
|
59
|
+
example: false,
|
|
60
|
+
default: false,
|
|
61
|
+
}),
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
(0, class_validator_1.IsBoolean)(),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], CreateAppointmentDto.prototype, "checkinCompleted", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
68
|
+
description: 'Indica se o check-out foi realizado',
|
|
69
|
+
example: false,
|
|
70
|
+
default: false,
|
|
71
|
+
}),
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
(0, class_validator_1.IsBoolean)(),
|
|
74
|
+
__metadata("design:type", Boolean)
|
|
75
|
+
], CreateAppointmentDto.prototype, "checkoutCompleted", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: 'Status do agendamento',
|
|
79
|
+
enum: exports.APPOINTMENT_STATUSES,
|
|
80
|
+
default: 'pending',
|
|
81
|
+
}),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsEnum)(exports.APPOINTMENT_STATUSES),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], CreateAppointmentDto.prototype, "status", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appointments/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-appointment.dto"), exports);
|
|
18
|
+
__exportStar(require("./update-appointment.dto"), exports);
|
|
19
|
+
__exportStar(require("./list-appointments-query.dto"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAGA,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"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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.ListAppointmentsQueryDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class ListAppointmentsQueryDto {
|
|
16
|
+
page;
|
|
17
|
+
limit;
|
|
18
|
+
dateFrom;
|
|
19
|
+
dateTo;
|
|
20
|
+
userId;
|
|
21
|
+
checkinCompleted;
|
|
22
|
+
patientId;
|
|
23
|
+
}
|
|
24
|
+
exports.ListAppointmentsQueryDto = ListAppointmentsQueryDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
27
|
+
description: 'Número da página (iniciando em 1)',
|
|
28
|
+
example: 1,
|
|
29
|
+
minimum: 1,
|
|
30
|
+
default: 1,
|
|
31
|
+
}),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsInt)(),
|
|
34
|
+
(0, class_validator_1.Min)(1),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], ListAppointmentsQueryDto.prototype, "page", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
39
|
+
description: 'Quantidade de registros por página',
|
|
40
|
+
example: 20,
|
|
41
|
+
minimum: 1,
|
|
42
|
+
maximum: 100,
|
|
43
|
+
default: 20,
|
|
44
|
+
}),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsInt)(),
|
|
47
|
+
(0, class_validator_1.Min)(1),
|
|
48
|
+
(0, class_validator_1.Max)(100),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], ListAppointmentsQueryDto.prototype, "limit", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
53
|
+
description: 'Filtrar agendamentos a partir desta data (ISO 8601)',
|
|
54
|
+
example: '2026-03-01T00:00:00.000Z',
|
|
55
|
+
}),
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.IsDateString)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ListAppointmentsQueryDto.prototype, "dateFrom", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
62
|
+
description: 'Filtrar agendamentos até esta data (ISO 8601)',
|
|
63
|
+
example: '2026-03-31T23:59:59.999Z',
|
|
64
|
+
}),
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_1.IsDateString)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ListAppointmentsQueryDto.prototype, "dateTo", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
71
|
+
description: 'Filtrar por profissional (UUID)',
|
|
72
|
+
example: '550e8400-e29b-41d4-a716-446655440001',
|
|
73
|
+
}),
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], ListAppointmentsQueryDto.prototype, "userId", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
80
|
+
description: 'Filtrar por status de check-in realizado',
|
|
81
|
+
example: true,
|
|
82
|
+
}),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsBoolean)(),
|
|
85
|
+
__metadata("design:type", Boolean)
|
|
86
|
+
], ListAppointmentsQueryDto.prototype, "checkinCompleted", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
89
|
+
description: 'Filtrar por paciente (UUID) - histórico de consultas',
|
|
90
|
+
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
91
|
+
}),
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], ListAppointmentsQueryDto.prototype, "patientId", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CreateAppointmentDto } from './create-appointment.dto';
|
|
2
|
+
declare const UpdateAppointmentDto_base: import("@nestjs/common").Type<Partial<CreateAppointmentDto>>;
|
|
3
|
+
export declare class UpdateAppointmentDto extends UpdateAppointmentDto_base {
|
|
4
|
+
}
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=update-appointment.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/update-appointment.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;;AAEhE,qBAAa,oBAAqB,SAAQ,yBAAiC;CAAG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateAppointmentDto = void 0;
|
|
4
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
+
const create_appointment_dto_1 = require("./create-appointment.dto");
|
|
6
|
+
class UpdateAppointmentDto extends (0, swagger_1.PartialType)(create_appointment_dto_1.CreateAppointmentDto) {
|
|
7
|
+
}
|
|
8
|
+
exports.UpdateAppointmentDto = UpdateAppointmentDto;
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./appointments"), exports);
|
|
17
18
|
__exportStar(require("./auth"), exports);
|
|
18
19
|
__exportStar(require("./users"), exports);
|
|
19
20
|
__exportStar(require("./patients"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import {
|
|
3
|
+
IsBoolean,
|
|
4
|
+
IsDateString,
|
|
5
|
+
IsEnum,
|
|
6
|
+
IsNotEmpty,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsUUID,
|
|
9
|
+
} from 'class-validator';
|
|
10
|
+
|
|
11
|
+
export const APPOINTMENT_STATUSES = [
|
|
12
|
+
'pending',
|
|
13
|
+
'processing',
|
|
14
|
+
'sended',
|
|
15
|
+
'finished',
|
|
16
|
+
] as const;
|
|
17
|
+
export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
|
|
18
|
+
|
|
19
|
+
export class CreateAppointmentDto {
|
|
20
|
+
@ApiProperty({
|
|
21
|
+
description: 'ID do paciente (UUID)',
|
|
22
|
+
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
23
|
+
})
|
|
24
|
+
@IsUUID('4')
|
|
25
|
+
@IsNotEmpty()
|
|
26
|
+
patientId: string;
|
|
27
|
+
|
|
28
|
+
@ApiProperty({
|
|
29
|
+
description: 'Data e hora do agendamento (ISO 8601)',
|
|
30
|
+
example: '2026-03-15T14:00:00.000Z',
|
|
31
|
+
})
|
|
32
|
+
@IsDateString()
|
|
33
|
+
date: string;
|
|
34
|
+
|
|
35
|
+
@ApiProperty({
|
|
36
|
+
description: 'ID do profissional de saúde atrelado ao agendamento (UUID)',
|
|
37
|
+
example: '550e8400-e29b-41d4-a716-446655440001',
|
|
38
|
+
})
|
|
39
|
+
@IsUUID('4')
|
|
40
|
+
@IsNotEmpty()
|
|
41
|
+
userId: string;
|
|
42
|
+
|
|
43
|
+
@ApiPropertyOptional({
|
|
44
|
+
description: 'Indica se o check-in foi realizado',
|
|
45
|
+
example: false,
|
|
46
|
+
default: false,
|
|
47
|
+
})
|
|
48
|
+
@IsOptional()
|
|
49
|
+
@IsBoolean()
|
|
50
|
+
checkinCompleted?: boolean;
|
|
51
|
+
|
|
52
|
+
@ApiPropertyOptional({
|
|
53
|
+
description: 'Indica se o check-out foi realizado',
|
|
54
|
+
example: false,
|
|
55
|
+
default: false,
|
|
56
|
+
})
|
|
57
|
+
@IsOptional()
|
|
58
|
+
@IsBoolean()
|
|
59
|
+
checkoutCompleted?: boolean;
|
|
60
|
+
|
|
61
|
+
@ApiPropertyOptional({
|
|
62
|
+
description: 'Status do agendamento',
|
|
63
|
+
enum: APPOINTMENT_STATUSES,
|
|
64
|
+
default: 'pending',
|
|
65
|
+
})
|
|
66
|
+
@IsOptional()
|
|
67
|
+
@IsEnum(APPOINTMENT_STATUSES)
|
|
68
|
+
status?: AppointmentStatusDto;
|
|
69
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import { IsBoolean, IsDateString, IsInt, IsOptional, IsUUID, Max, Min } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class ListAppointmentsQueryDto {
|
|
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
|
+
@ApiPropertyOptional({
|
|
30
|
+
description: 'Filtrar agendamentos a partir desta data (ISO 8601)',
|
|
31
|
+
example: '2026-03-01T00:00:00.000Z',
|
|
32
|
+
})
|
|
33
|
+
@IsOptional()
|
|
34
|
+
@IsDateString()
|
|
35
|
+
dateFrom?: string;
|
|
36
|
+
|
|
37
|
+
@ApiPropertyOptional({
|
|
38
|
+
description: 'Filtrar agendamentos até esta data (ISO 8601)',
|
|
39
|
+
example: '2026-03-31T23:59:59.999Z',
|
|
40
|
+
})
|
|
41
|
+
@IsOptional()
|
|
42
|
+
@IsDateString()
|
|
43
|
+
dateTo?: string;
|
|
44
|
+
|
|
45
|
+
@ApiPropertyOptional({
|
|
46
|
+
description: 'Filtrar por profissional (UUID)',
|
|
47
|
+
example: '550e8400-e29b-41d4-a716-446655440001',
|
|
48
|
+
})
|
|
49
|
+
@IsOptional()
|
|
50
|
+
@IsUUID('4')
|
|
51
|
+
userId?: string;
|
|
52
|
+
|
|
53
|
+
@ApiPropertyOptional({
|
|
54
|
+
description: 'Filtrar por status de check-in realizado',
|
|
55
|
+
example: true,
|
|
56
|
+
})
|
|
57
|
+
@IsOptional()
|
|
58
|
+
@IsBoolean()
|
|
59
|
+
checkinCompleted?: boolean;
|
|
60
|
+
|
|
61
|
+
@ApiPropertyOptional({
|
|
62
|
+
description: 'Filtrar por paciente (UUID) - histórico de consultas',
|
|
63
|
+
example: '550e8400-e29b-41d4-a716-446655440000',
|
|
64
|
+
})
|
|
65
|
+
@IsOptional()
|
|
66
|
+
@IsUUID('4')
|
|
67
|
+
patientId?: string;
|
|
68
|
+
}
|
package/src/index.ts
CHANGED