tychat-contracts 1.0.65 → 1.0.66
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/appointment-procedure.dto.d.ts +12 -0
- package/dist/appointments/appointment-procedure.dto.d.ts.map +1 -0
- package/dist/appointments/appointment-procedure.dto.js +73 -0
- package/dist/appointments/index.d.ts +2 -0
- package/dist/appointments/index.d.ts.map +1 -1
- package/dist/appointments/index.js +2 -0
- package/dist/appointments/update-appointment-procedure.dto.d.ts +10 -0
- package/dist/appointments/update-appointment-procedure.dto.d.ts.map +1 -0
- package/dist/appointments/update-appointment-procedure.dto.js +12 -0
- package/package.json +1 -1
- package/src/appointments/appointment-procedure.dto.ts +58 -0
- package/src/appointments/index.ts +3 -1
- package/src/appointments/update-appointment-procedure.dto.ts +10 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for creating a procedure linked to an appointment.
|
|
3
|
+
* Procedures belong to appointments (not directly to patients).
|
|
4
|
+
*/
|
|
5
|
+
export declare class AppointmentProcedureDto {
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
finished: boolean;
|
|
9
|
+
finished_at?: string | null;
|
|
10
|
+
observation?: string | null;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=appointment-procedure.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,qBAAa,uBAAuB;IASlC,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAOd,QAAQ,EAAE,OAAO,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -0,0 +1,73 @@
|
|
|
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.AppointmentProcedureDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* DTO for creating a procedure linked to an appointment.
|
|
17
|
+
* Procedures belong to appointments (not directly to patients).
|
|
18
|
+
*/
|
|
19
|
+
class AppointmentProcedureDto {
|
|
20
|
+
name;
|
|
21
|
+
value;
|
|
22
|
+
finished;
|
|
23
|
+
finished_at;
|
|
24
|
+
observation;
|
|
25
|
+
}
|
|
26
|
+
exports.AppointmentProcedureDto = AppointmentProcedureDto;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'Name of the procedure to be performed or already performed',
|
|
30
|
+
example: 'Consulta clínica',
|
|
31
|
+
maxLength: 255,
|
|
32
|
+
}),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
(0, class_validator_1.MaxLength)(255),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AppointmentProcedureDto.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
description: 'Monetary value of the procedure',
|
|
41
|
+
example: 150.5,
|
|
42
|
+
}),
|
|
43
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], AppointmentProcedureDto.prototype, "value", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
description: 'Indicates whether the procedure has been completed',
|
|
49
|
+
example: false,
|
|
50
|
+
}),
|
|
51
|
+
(0, class_validator_1.IsBoolean)(),
|
|
52
|
+
__metadata("design:type", Boolean)
|
|
53
|
+
], AppointmentProcedureDto.prototype, "finished", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
56
|
+
description: 'Date and time when the procedure was completed (ISO 8601)',
|
|
57
|
+
example: '2026-03-10T14:30:00.000Z',
|
|
58
|
+
}),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsDateString)(),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], AppointmentProcedureDto.prototype, "finished_at", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
65
|
+
description: 'Additional observation about the procedure',
|
|
66
|
+
example: 'Paciente chegou em jejum',
|
|
67
|
+
maxLength: 2000,
|
|
68
|
+
}),
|
|
69
|
+
(0, class_validator_1.IsString)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.MaxLength)(2000),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], AppointmentProcedureDto.prototype, "observation", void 0);
|
|
@@ -5,4 +5,6 @@ export * from './available-slots-query.dto';
|
|
|
5
5
|
export * from './available-slots-response.dto';
|
|
6
6
|
export * from './appointment-status.dto';
|
|
7
7
|
export * from './appointment.dto';
|
|
8
|
+
export * from './appointment-procedure.dto';
|
|
9
|
+
export * from './update-appointment-procedure.dto';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
|
|
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;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC"}
|
|
@@ -21,3 +21,5 @@ __exportStar(require("./available-slots-query.dto"), exports);
|
|
|
21
21
|
__exportStar(require("./available-slots-response.dto"), exports);
|
|
22
22
|
__exportStar(require("./appointment-status.dto"), exports);
|
|
23
23
|
__exportStar(require("./appointment.dto"), exports);
|
|
24
|
+
__exportStar(require("./appointment-procedure.dto"), exports);
|
|
25
|
+
__exportStar(require("./update-appointment-procedure.dto"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppointmentProcedureDto } from './appointment-procedure.dto';
|
|
2
|
+
declare const UpdateAppointmentProcedureDto_base: import("@nestjs/common").Type<Partial<AppointmentProcedureDto>>;
|
|
3
|
+
/**
|
|
4
|
+
* DTO for partially updating an appointment procedure.
|
|
5
|
+
* All fields are optional.
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdateAppointmentProcedureDto extends UpdateAppointmentProcedureDto_base {
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=update-appointment-procedure.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/update-appointment-procedure.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;;AAEtE;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,kCAElD;CAAG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateAppointmentProcedureDto = void 0;
|
|
4
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
+
const appointment_procedure_dto_1 = require("./appointment-procedure.dto");
|
|
6
|
+
/**
|
|
7
|
+
* DTO for partially updating an appointment procedure.
|
|
8
|
+
* All fields are optional.
|
|
9
|
+
*/
|
|
10
|
+
class UpdateAppointmentProcedureDto extends (0, swagger_1.PartialType)(appointment_procedure_dto_1.AppointmentProcedureDto) {
|
|
11
|
+
}
|
|
12
|
+
exports.UpdateAppointmentProcedureDto = UpdateAppointmentProcedureDto;
|
package/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import {
|
|
3
|
+
IsBoolean,
|
|
4
|
+
IsDateString,
|
|
5
|
+
IsNotEmpty,
|
|
6
|
+
IsNumber,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsString,
|
|
9
|
+
MaxLength,
|
|
10
|
+
} from 'class-validator';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* DTO for creating a procedure linked to an appointment.
|
|
14
|
+
* Procedures belong to appointments (not directly to patients).
|
|
15
|
+
*/
|
|
16
|
+
export class AppointmentProcedureDto {
|
|
17
|
+
@ApiProperty({
|
|
18
|
+
description: 'Name of the procedure to be performed or already performed',
|
|
19
|
+
example: 'Consulta clínica',
|
|
20
|
+
maxLength: 255,
|
|
21
|
+
})
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsNotEmpty()
|
|
24
|
+
@MaxLength(255)
|
|
25
|
+
name: string;
|
|
26
|
+
|
|
27
|
+
@ApiProperty({
|
|
28
|
+
description: 'Monetary value of the procedure',
|
|
29
|
+
example: 150.5,
|
|
30
|
+
})
|
|
31
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
32
|
+
value: number;
|
|
33
|
+
|
|
34
|
+
@ApiProperty({
|
|
35
|
+
description: 'Indicates whether the procedure has been completed',
|
|
36
|
+
example: false,
|
|
37
|
+
})
|
|
38
|
+
@IsBoolean()
|
|
39
|
+
finished: boolean;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional({
|
|
42
|
+
description: 'Date and time when the procedure was completed (ISO 8601)',
|
|
43
|
+
example: '2026-03-10T14:30:00.000Z',
|
|
44
|
+
})
|
|
45
|
+
@IsOptional()
|
|
46
|
+
@IsDateString()
|
|
47
|
+
finished_at?: string | null;
|
|
48
|
+
|
|
49
|
+
@ApiPropertyOptional({
|
|
50
|
+
description: 'Additional observation about the procedure',
|
|
51
|
+
example: 'Paciente chegou em jejum',
|
|
52
|
+
maxLength: 2000,
|
|
53
|
+
})
|
|
54
|
+
@IsString()
|
|
55
|
+
@IsOptional()
|
|
56
|
+
@MaxLength(2000)
|
|
57
|
+
observation?: string | null;
|
|
58
|
+
}
|
|
@@ -4,4 +4,6 @@ export * from './list-appointments-query.dto';
|
|
|
4
4
|
export * from './available-slots-query.dto';
|
|
5
5
|
export * from './available-slots-response.dto';
|
|
6
6
|
export * from './appointment-status.dto';
|
|
7
|
-
export * from './appointment.dto';
|
|
7
|
+
export * from './appointment.dto';
|
|
8
|
+
export * from './appointment-procedure.dto';
|
|
9
|
+
export * from './update-appointment-procedure.dto';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PartialType } from '@nestjs/swagger';
|
|
2
|
+
import { AppointmentProcedureDto } from './appointment-procedure.dto';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* DTO for partially updating an appointment procedure.
|
|
6
|
+
* All fields are optional.
|
|
7
|
+
*/
|
|
8
|
+
export class UpdateAppointmentProcedureDto extends PartialType(
|
|
9
|
+
AppointmentProcedureDto,
|
|
10
|
+
) {}
|