tychat-contracts 1.6.51 → 1.6.52
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 +5 -0
- package/dist/appointments/appointment-procedure.dto.d.ts.map +1 -1
- package/dist/appointments/appointment-procedure.dto.js +33 -1
- package/dist/appointments/appointment.dto.d.ts +4 -0
- package/dist/appointments/appointment.dto.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/appointments/appointment-procedure.dto.ts +31 -0
- package/src/appointments/appointment.dto.ts +4 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const APPOINTMENT_PROCEDURE_PRICING_TYPES: readonly ["fixed", "variable"];
|
|
2
|
+
export type AppointmentProcedurePricingTypeDto = (typeof APPOINTMENT_PROCEDURE_PRICING_TYPES)[number];
|
|
1
3
|
/**
|
|
2
4
|
* DTO for creating a procedure linked to an appointment.
|
|
3
5
|
* Procedures belong to appointments (not directly to patients).
|
|
@@ -10,5 +12,8 @@ export declare class AppointmentProcedureDto {
|
|
|
10
12
|
observation?: string | null;
|
|
11
13
|
side_effects?: string | null;
|
|
12
14
|
return_days?: number | null;
|
|
15
|
+
pricing_type?: AppointmentProcedurePricingTypeDto;
|
|
16
|
+
min_value?: number | null;
|
|
17
|
+
max_value?: number | null;
|
|
13
18
|
}
|
|
14
19
|
//# sourceMappingURL=appointment-procedure.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mCAAmC,gCAAiC,CAAC;AAClF,MAAM,MAAM,kCAAkC,GAC5C,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;;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;IAU5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,YAAY,CAAC,EAAE,kCAAkC,CAAC;IAQlD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
|
|
@@ -9,9 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AppointmentProcedureDto = void 0;
|
|
12
|
+
exports.AppointmentProcedureDto = exports.APPOINTMENT_PROCEDURE_PRICING_TYPES = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
exports.APPOINTMENT_PROCEDURE_PRICING_TYPES = ['fixed', 'variable'];
|
|
15
16
|
/**
|
|
16
17
|
* DTO for creating a procedure linked to an appointment.
|
|
17
18
|
* Procedures belong to appointments (not directly to patients).
|
|
@@ -24,6 +25,9 @@ class AppointmentProcedureDto {
|
|
|
24
25
|
observation;
|
|
25
26
|
side_effects;
|
|
26
27
|
return_days;
|
|
28
|
+
pricing_type;
|
|
29
|
+
min_value;
|
|
30
|
+
max_value;
|
|
27
31
|
}
|
|
28
32
|
exports.AppointmentProcedureDto = AppointmentProcedureDto;
|
|
29
33
|
__decorate([
|
|
@@ -93,3 +97,31 @@ __decorate([
|
|
|
93
97
|
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 0 }),
|
|
94
98
|
__metadata("design:type", Object)
|
|
95
99
|
], AppointmentProcedureDto.prototype, "return_days", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
102
|
+
description: 'Tipo de precificação do catálogo no agendamento (snapshot). Valor final definido pelo médico na consulta quando variable.',
|
|
103
|
+
enum: exports.APPOINTMENT_PROCEDURE_PRICING_TYPES,
|
|
104
|
+
example: 'variable',
|
|
105
|
+
}),
|
|
106
|
+
(0, class_validator_1.IsOptional)(),
|
|
107
|
+
(0, class_validator_1.IsIn)(exports.APPOINTMENT_PROCEDURE_PRICING_TYPES),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], AppointmentProcedureDto.prototype, "pricing_type", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
112
|
+
description: 'Valor mínimo da faixa (snapshot do catálogo)',
|
|
113
|
+
example: 120,
|
|
114
|
+
}),
|
|
115
|
+
(0, class_validator_1.IsOptional)(),
|
|
116
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], AppointmentProcedureDto.prototype, "min_value", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
121
|
+
description: 'Valor máximo da faixa (snapshot do catálogo)',
|
|
122
|
+
example: 220,
|
|
123
|
+
}),
|
|
124
|
+
(0, class_validator_1.IsOptional)(),
|
|
125
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
126
|
+
__metadata("design:type", Object)
|
|
127
|
+
], AppointmentProcedureDto.prototype, "max_value", void 0);
|
|
@@ -12,6 +12,10 @@ export interface AppointmentProcedureResponseDto {
|
|
|
12
12
|
sideEffects: string | null;
|
|
13
13
|
/** Recommended number of days until a return visit (used for return follow-up). */
|
|
14
14
|
returnDays: number | null;
|
|
15
|
+
/** Pricing snapshot from catalog at booking time. */
|
|
16
|
+
pricingType?: 'fixed' | 'variable' | null;
|
|
17
|
+
minValue?: number | null;
|
|
18
|
+
maxValue?: number | null;
|
|
15
19
|
createdAt?: string;
|
|
16
20
|
updatedAt?: string;
|
|
17
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEpF,mEAAmE;AACnE,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mFAAmF;IACnF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,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,MAA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,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;IAK7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,eAAe,EAAE,kBAAkB,CAAC;IAKpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAK3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAIjC,UAAU,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAChD"}
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
2
2
|
import {
|
|
3
3
|
IsBoolean,
|
|
4
4
|
IsDateString,
|
|
5
|
+
IsIn,
|
|
5
6
|
IsNotEmpty,
|
|
6
7
|
IsNumber,
|
|
7
8
|
IsOptional,
|
|
@@ -9,6 +10,10 @@ import {
|
|
|
9
10
|
MaxLength,
|
|
10
11
|
} from 'class-validator';
|
|
11
12
|
|
|
13
|
+
export const APPOINTMENT_PROCEDURE_PRICING_TYPES = ['fixed', 'variable'] as const;
|
|
14
|
+
export type AppointmentProcedurePricingTypeDto =
|
|
15
|
+
(typeof APPOINTMENT_PROCEDURE_PRICING_TYPES)[number];
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* DTO for creating a procedure linked to an appointment.
|
|
14
19
|
* Procedures belong to appointments (not directly to patients).
|
|
@@ -73,4 +78,30 @@ export class AppointmentProcedureDto {
|
|
|
73
78
|
@IsOptional()
|
|
74
79
|
@IsNumber({ maxDecimalPlaces: 0 })
|
|
75
80
|
return_days?: number | null;
|
|
81
|
+
|
|
82
|
+
@ApiPropertyOptional({
|
|
83
|
+
description:
|
|
84
|
+
'Tipo de precificação do catálogo no agendamento (snapshot). Valor final definido pelo médico na consulta quando variable.',
|
|
85
|
+
enum: APPOINTMENT_PROCEDURE_PRICING_TYPES,
|
|
86
|
+
example: 'variable',
|
|
87
|
+
})
|
|
88
|
+
@IsOptional()
|
|
89
|
+
@IsIn(APPOINTMENT_PROCEDURE_PRICING_TYPES)
|
|
90
|
+
pricing_type?: AppointmentProcedurePricingTypeDto;
|
|
91
|
+
|
|
92
|
+
@ApiPropertyOptional({
|
|
93
|
+
description: 'Valor mínimo da faixa (snapshot do catálogo)',
|
|
94
|
+
example: 120,
|
|
95
|
+
})
|
|
96
|
+
@IsOptional()
|
|
97
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
98
|
+
min_value?: number | null;
|
|
99
|
+
|
|
100
|
+
@ApiPropertyOptional({
|
|
101
|
+
description: 'Valor máximo da faixa (snapshot do catálogo)',
|
|
102
|
+
example: 220,
|
|
103
|
+
})
|
|
104
|
+
@IsOptional()
|
|
105
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
106
|
+
max_value?: number | null;
|
|
76
107
|
}
|
|
@@ -13,6 +13,10 @@ export interface AppointmentProcedureResponseDto {
|
|
|
13
13
|
sideEffects: string | null;
|
|
14
14
|
/** Recommended number of days until a return visit (used for return follow-up). */
|
|
15
15
|
returnDays: number | null;
|
|
16
|
+
/** Pricing snapshot from catalog at booking time. */
|
|
17
|
+
pricingType?: 'fixed' | 'variable' | null;
|
|
18
|
+
minValue?: number | null;
|
|
19
|
+
maxValue?: number | null;
|
|
16
20
|
createdAt?: string;
|
|
17
21
|
updatedAt?: string;
|
|
18
22
|
}
|