tychat-contracts 1.3.4 → 1.3.6

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.
Files changed (41) hide show
  1. package/dist/anamneses/anamnesis-token-session.dto.d.ts +17 -0
  2. package/dist/anamneses/anamnesis-token-session.dto.d.ts.map +1 -0
  3. package/dist/anamneses/anamnesis-token-session.dto.js +81 -0
  4. package/dist/anamneses/create-anamnesis-by-token.dto.d.ts +5 -0
  5. package/dist/anamneses/create-anamnesis-by-token.dto.d.ts.map +1 -0
  6. package/dist/anamneses/create-anamnesis-by-token.dto.js +42 -0
  7. package/dist/anamneses/index.d.ts +4 -0
  8. package/dist/anamneses/index.d.ts.map +1 -0
  9. package/dist/anamneses/index.js +19 -0
  10. package/dist/anamneses/patient-anamnesis.dto.d.ts +10 -0
  11. package/dist/anamneses/patient-anamnesis.dto.d.ts.map +1 -0
  12. package/dist/anamneses/patient-anamnesis.dto.js +51 -0
  13. package/dist/configurations/anamnesis-custom-field.dto.d.ts +8 -0
  14. package/dist/configurations/anamnesis-custom-field.dto.d.ts.map +1 -0
  15. package/dist/configurations/anamnesis-custom-field.dto.js +47 -0
  16. package/dist/configurations/clinic-configuration.dto.d.ts +2 -0
  17. package/dist/configurations/clinic-configuration.dto.d.ts.map +1 -1
  18. package/dist/configurations/clinic-configuration.dto.js +10 -0
  19. package/dist/configurations/index.d.ts +1 -0
  20. package/dist/configurations/index.d.ts.map +1 -1
  21. package/dist/configurations/index.js +1 -0
  22. package/dist/configurations/update-clinic-configuration.dto.d.ts +2 -0
  23. package/dist/configurations/update-clinic-configuration.dto.d.ts.map +1 -1
  24. package/dist/configurations/update-clinic-configuration.dto.js +18 -0
  25. package/dist/conversations/followup-events.dto.d.ts +1 -0
  26. package/dist/conversations/followup-events.dto.d.ts.map +1 -1
  27. package/dist/conversations/followup-events.dto.js +7 -0
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -0
  31. package/package.json +1 -1
  32. package/src/anamneses/anamnesis-token-session.dto.ts +45 -0
  33. package/src/anamneses/create-anamnesis-by-token.dto.ts +25 -0
  34. package/src/anamneses/index.ts +3 -0
  35. package/src/anamneses/patient-anamnesis.dto.ts +24 -0
  36. package/src/configurations/anamnesis-custom-field.dto.ts +30 -0
  37. package/src/configurations/clinic-configuration.dto.ts +8 -0
  38. package/src/configurations/index.ts +1 -0
  39. package/src/configurations/update-clinic-configuration.dto.ts +17 -0
  40. package/src/conversations/followup-events.dto.ts +5 -0
  41. package/src/index.ts +1 -0
@@ -0,0 +1,17 @@
1
+ import { AnamnesisCustomFieldDto } from '../configurations';
2
+ export declare class AnamnesisTokenSessionPatientDto {
3
+ id: string;
4
+ name: string;
5
+ cpf: string | null;
6
+ phone: string | null;
7
+ }
8
+ export declare class AnamnesisTokenSessionDto {
9
+ valid: boolean;
10
+ reason?: 'not_found' | 'expired' | 'consumed' | 'invalid_scope';
11
+ scope?: string;
12
+ expiresAt?: string;
13
+ appointmentId?: string;
14
+ patient?: AnamnesisTokenSessionPatientDto;
15
+ anamnesisCustomFields?: AnamnesisCustomFieldDto[];
16
+ }
17
+ //# sourceMappingURL=anamnesis-token-session.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anamnesis-token-session.dto.d.ts","sourceRoot":"","sources":["../../src/anamneses/anamnesis-token-session.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,qBAAa,+BAA+B;IAE1C,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,qBAAa,wBAAwB;IAEnC,KAAK,EAAE,OAAO,CAAC;IAMf,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,eAAe,CAAC;IAGhE,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,OAAO,CAAC,EAAE,+BAA+B,CAAC;IAM1C,qBAAqB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACnD"}
@@ -0,0 +1,81 @@
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.AnamnesisTokenSessionDto = exports.AnamnesisTokenSessionPatientDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const configurations_1 = require("../configurations");
15
+ class AnamnesisTokenSessionPatientDto {
16
+ id;
17
+ name;
18
+ cpf;
19
+ phone;
20
+ }
21
+ exports.AnamnesisTokenSessionPatientDto = AnamnesisTokenSessionPatientDto;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({ example: '550e8400-e29b-41d4-a716-446655440000' }),
24
+ __metadata("design:type", String)
25
+ ], AnamnesisTokenSessionPatientDto.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, swagger_1.ApiProperty)({ example: 'Maria Souza' }),
28
+ __metadata("design:type", String)
29
+ ], AnamnesisTokenSessionPatientDto.prototype, "name", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiPropertyOptional)({ example: '12345678909', nullable: true }),
32
+ __metadata("design:type", Object)
33
+ ], AnamnesisTokenSessionPatientDto.prototype, "cpf", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiPropertyOptional)({ example: '+5511999999999', nullable: true }),
36
+ __metadata("design:type", Object)
37
+ ], AnamnesisTokenSessionPatientDto.prototype, "phone", void 0);
38
+ class AnamnesisTokenSessionDto {
39
+ valid;
40
+ reason;
41
+ scope;
42
+ expiresAt;
43
+ appointmentId;
44
+ patient;
45
+ anamnesisCustomFields;
46
+ }
47
+ exports.AnamnesisTokenSessionDto = AnamnesisTokenSessionDto;
48
+ __decorate([
49
+ (0, swagger_1.ApiProperty)({ example: true }),
50
+ __metadata("design:type", Boolean)
51
+ ], AnamnesisTokenSessionDto.prototype, "valid", void 0);
52
+ __decorate([
53
+ (0, swagger_1.ApiPropertyOptional)({
54
+ example: 'expired',
55
+ enum: ['not_found', 'expired', 'consumed', 'invalid_scope'],
56
+ }),
57
+ __metadata("design:type", String)
58
+ ], AnamnesisTokenSessionDto.prototype, "reason", void 0);
59
+ __decorate([
60
+ (0, swagger_1.ApiPropertyOptional)({ example: 'anamnesis:submit:self' }),
61
+ __metadata("design:type", String)
62
+ ], AnamnesisTokenSessionDto.prototype, "scope", void 0);
63
+ __decorate([
64
+ (0, swagger_1.ApiPropertyOptional)({ example: '2026-04-14T14:30:00.000Z' }),
65
+ __metadata("design:type", String)
66
+ ], AnamnesisTokenSessionDto.prototype, "expiresAt", void 0);
67
+ __decorate([
68
+ (0, swagger_1.ApiPropertyOptional)({ example: '550e8400-e29b-41d4-a716-446655440111' }),
69
+ __metadata("design:type", String)
70
+ ], AnamnesisTokenSessionDto.prototype, "appointmentId", void 0);
71
+ __decorate([
72
+ (0, swagger_1.ApiPropertyOptional)({ type: AnamnesisTokenSessionPatientDto }),
73
+ __metadata("design:type", AnamnesisTokenSessionPatientDto)
74
+ ], AnamnesisTokenSessionDto.prototype, "patient", void 0);
75
+ __decorate([
76
+ (0, swagger_1.ApiPropertyOptional)({
77
+ type: [configurations_1.AnamnesisCustomFieldDto],
78
+ description: 'Campos adicionais da anamnese configurados pela clínica',
79
+ }),
80
+ __metadata("design:type", Array)
81
+ ], AnamnesisTokenSessionDto.prototype, "anamnesisCustomFields", void 0);
@@ -0,0 +1,5 @@
1
+ export declare class CreateAnamnesisByTokenDto {
2
+ token: string;
3
+ answersJson: Record<string, unknown>;
4
+ }
5
+ //# sourceMappingURL=create-anamnesis-by-token.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-anamnesis-by-token.dto.d.ts","sourceRoot":"","sources":["../../src/anamneses/create-anamnesis-by-token.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,yBAAyB;IAOpC,KAAK,EAAE,MAAM,CAAC;IAad,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC"}
@@ -0,0 +1,42 @@
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.CreateAnamnesisByTokenDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class CreateAnamnesisByTokenDto {
16
+ token;
17
+ answersJson;
18
+ }
19
+ exports.CreateAnamnesisByTokenDto = CreateAnamnesisByTokenDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ description: 'Token único de acesso à página de anamnese',
23
+ example: 'a5f8b3f1...',
24
+ }),
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.MinLength)(16),
27
+ __metadata("design:type", String)
28
+ ], CreateAnamnesisByTokenDto.prototype, "token", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({
31
+ description: 'Respostas estruturadas do formulário de anamnese',
32
+ type: Object,
33
+ example: {
34
+ hasAllergy: true,
35
+ allergyDescription: 'Dipirona',
36
+ medications: ['Omeprazol'],
37
+ },
38
+ }),
39
+ (0, class_validator_1.IsObject)(),
40
+ (0, class_validator_1.IsNotEmpty)(),
41
+ __metadata("design:type", Object)
42
+ ], CreateAnamnesisByTokenDto.prototype, "answersJson", void 0);
@@ -0,0 +1,4 @@
1
+ export * from './create-anamnesis-by-token.dto';
2
+ export * from './anamnesis-token-session.dto';
3
+ export * from './patient-anamnesis.dto';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/anamneses/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,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-anamnesis-by-token.dto"), exports);
18
+ __exportStar(require("./anamnesis-token-session.dto"), exports);
19
+ __exportStar(require("./patient-anamnesis.dto"), exports);
@@ -0,0 +1,10 @@
1
+ export declare class PatientAnamnesisDto {
2
+ id: string;
3
+ patientId: string;
4
+ appointmentId: string | null;
5
+ startDate: string;
6
+ endDate: string;
7
+ answersJson: Record<string, unknown>;
8
+ createdAt: string;
9
+ }
10
+ //# sourceMappingURL=patient-anamnesis.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient-anamnesis.dto.d.ts","sourceRoot":"","sources":["../../src/anamneses/patient-anamnesis.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAmB;IAE9B,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGrC,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,51 @@
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.PatientAnamnesisDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ class PatientAnamnesisDto {
15
+ id;
16
+ patientId;
17
+ appointmentId;
18
+ startDate;
19
+ endDate;
20
+ answersJson;
21
+ createdAt;
22
+ }
23
+ exports.PatientAnamnesisDto = PatientAnamnesisDto;
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)({ example: '550e8400-e29b-41d4-a716-446655440010' }),
26
+ __metadata("design:type", String)
27
+ ], PatientAnamnesisDto.prototype, "id", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({ example: '550e8400-e29b-41d4-a716-446655440000' }),
30
+ __metadata("design:type", String)
31
+ ], PatientAnamnesisDto.prototype, "patientId", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiPropertyOptional)({ example: '550e8400-e29b-41d4-a716-446655440111', nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], PatientAnamnesisDto.prototype, "appointmentId", void 0);
36
+ __decorate([
37
+ (0, swagger_1.ApiProperty)({ example: '2026-04-14T10:00:00.000Z' }),
38
+ __metadata("design:type", String)
39
+ ], PatientAnamnesisDto.prototype, "startDate", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({ example: '2026-10-14T10:00:00.000Z' }),
42
+ __metadata("design:type", String)
43
+ ], PatientAnamnesisDto.prototype, "endDate", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiProperty)({ type: Object }),
46
+ __metadata("design:type", Object)
47
+ ], PatientAnamnesisDto.prototype, "answersJson", void 0);
48
+ __decorate([
49
+ (0, swagger_1.ApiProperty)({ example: '2026-04-14T10:00:10.000Z' }),
50
+ __metadata("design:type", String)
51
+ ], PatientAnamnesisDto.prototype, "createdAt", void 0);
@@ -0,0 +1,8 @@
1
+ export declare const ANAMNESIS_CUSTOM_FIELD_TYPES: readonly ["number", "date", "boolean", "text"];
2
+ export type AnamnesisCustomFieldType = (typeof ANAMNESIS_CUSTOM_FIELD_TYPES)[number];
3
+ export declare class AnamnesisCustomFieldDto {
4
+ enabled: boolean;
5
+ question: string;
6
+ type: AnamnesisCustomFieldType;
7
+ }
8
+ //# sourceMappingURL=anamnesis-custom-field.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anamnesis-custom-field.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/anamnesis-custom-field.dto.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,4BAA4B,gDAAiD,CAAC;AAC3F,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,qBAAa,uBAAuB;IAMlC,OAAO,EAAE,OAAO,CAAC;IAQjB,QAAQ,EAAE,MAAM,CAAC;IAQjB,IAAI,EAAE,wBAAwB,CAAC;CAChC"}
@@ -0,0 +1,47 @@
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.AnamnesisCustomFieldDto = exports.ANAMNESIS_CUSTOM_FIELD_TYPES = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ exports.ANAMNESIS_CUSTOM_FIELD_TYPES = ['number', 'date', 'boolean', 'text'];
16
+ class AnamnesisCustomFieldDto {
17
+ enabled;
18
+ question;
19
+ type;
20
+ }
21
+ exports.AnamnesisCustomFieldDto = AnamnesisCustomFieldDto;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({
24
+ description: 'Campo está ativo para aparecer no formulário público',
25
+ example: true,
26
+ }),
27
+ (0, class_validator_1.IsBoolean)(),
28
+ __metadata("design:type", Boolean)
29
+ ], AnamnesisCustomFieldDto.prototype, "enabled", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({
32
+ description: 'Pergunta exibida ao paciente',
33
+ example: 'Qual sua pressão arterial média?',
34
+ }),
35
+ (0, class_validator_1.IsString)(),
36
+ (0, class_validator_1.MinLength)(3),
37
+ __metadata("design:type", String)
38
+ ], AnamnesisCustomFieldDto.prototype, "question", void 0);
39
+ __decorate([
40
+ (0, swagger_1.ApiProperty)({
41
+ description: 'Tipo de resposta esperada para o campo',
42
+ enum: exports.ANAMNESIS_CUSTOM_FIELD_TYPES,
43
+ example: 'number',
44
+ }),
45
+ (0, class_validator_1.IsIn)(exports.ANAMNESIS_CUSTOM_FIELD_TYPES),
46
+ __metadata("design:type", String)
47
+ ], AnamnesisCustomFieldDto.prototype, "type", void 0);
@@ -1,10 +1,12 @@
1
1
  import { OpeningHoursSlotDto } from './opening-hours-slot.dto';
2
+ import { AnamnesisCustomFieldDto } from './anamnesis-custom-field.dto';
2
3
  /**
3
4
  * Response DTO for clinic configuration (opening hours, etc.).
4
5
  */
5
6
  export declare class ClinicConfigurationDto {
6
7
  id: string;
7
8
  opening_hours: OpeningHoursSlotDto[];
9
+ anamnesis_custom_fields?: AnamnesisCustomFieldDto[];
8
10
  createdAt: Date;
9
11
  updatedAt: Date;
10
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"clinic-configuration.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/clinic-configuration.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;GAEG;AACH,qBAAa,sBAAsB;IAKjC,EAAE,EAAE,MAAM,CAAC;IAMX,aAAa,EAAE,mBAAmB,EAAE,CAAC;IAMrC,SAAS,EAAE,IAAI,CAAC;IAMhB,SAAS,EAAE,IAAI,CAAC;CACjB"}
1
+ {"version":3,"file":"clinic-configuration.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/clinic-configuration.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;GAEG;AACH,qBAAa,sBAAsB;IAKjC,EAAE,EAAE,MAAM,CAAC;IAMX,aAAa,EAAE,mBAAmB,EAAE,CAAC;IAOrC,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAMpD,SAAS,EAAE,IAAI,CAAC;IAMhB,SAAS,EAAE,IAAI,CAAC;CACjB"}
@@ -12,12 +12,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ClinicConfigurationDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const opening_hours_slot_dto_1 = require("./opening-hours-slot.dto");
15
+ const anamnesis_custom_field_dto_1 = require("./anamnesis-custom-field.dto");
15
16
  /**
16
17
  * Response DTO for clinic configuration (opening hours, etc.).
17
18
  */
18
19
  class ClinicConfigurationDto {
19
20
  id;
20
21
  opening_hours;
22
+ anamnesis_custom_fields;
21
23
  createdAt;
22
24
  updatedAt;
23
25
  }
@@ -36,6 +38,14 @@ __decorate([
36
38
  }),
37
39
  __metadata("design:type", Array)
38
40
  ], ClinicConfigurationDto.prototype, "opening_hours", void 0);
41
+ __decorate([
42
+ (0, swagger_1.ApiProperty)({
43
+ description: 'Campos adicionais de anamnese configurados pela clínica',
44
+ type: [anamnesis_custom_field_dto_1.AnamnesisCustomFieldDto],
45
+ required: false,
46
+ }),
47
+ __metadata("design:type", Array)
48
+ ], ClinicConfigurationDto.prototype, "anamnesis_custom_fields", void 0);
39
49
  __decorate([
40
50
  (0, swagger_1.ApiProperty)({
41
51
  description: 'Creation timestamp',
@@ -1,4 +1,5 @@
1
1
  export * from './opening-hours-slot.dto';
2
+ export * from './anamnesis-custom-field.dto';
2
3
  export * from './update-clinic-configuration.dto';
3
4
  export * from './clinic-configuration.dto';
4
5
  export * from './ai-tool-policy.enums';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./opening-hours-slot.dto"), exports);
18
+ __exportStar(require("./anamnesis-custom-field.dto"), exports);
18
19
  __exportStar(require("./update-clinic-configuration.dto"), exports);
19
20
  __exportStar(require("./clinic-configuration.dto"), exports);
20
21
  __exportStar(require("./ai-tool-policy.enums"), exports);
@@ -1,5 +1,7 @@
1
1
  import { OpeningHoursSlotDto } from './opening-hours-slot.dto';
2
+ import { AnamnesisCustomFieldDto } from './anamnesis-custom-field.dto';
2
3
  export declare class UpdateClinicConfigurationDto {
3
4
  opening_hours: OpeningHoursSlotDto[];
5
+ anamnesis_custom_fields?: AnamnesisCustomFieldDto[];
4
6
  }
5
7
  //# sourceMappingURL=update-clinic-configuration.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-clinic-configuration.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/update-clinic-configuration.dto.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,qBAAa,4BAA4B;IAYvC,aAAa,EAAE,mBAAmB,EAAE,CAAC;CACtC"}
1
+ {"version":3,"file":"update-clinic-configuration.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/update-clinic-configuration.dto.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,qBAAa,4BAA4B;IAYvC,aAAa,EAAE,mBAAmB,EAAE,CAAC;IAerC,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACrD"}
@@ -14,8 +14,10 @@ const swagger_1 = require("@nestjs/swagger");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  const opening_hours_slot_dto_1 = require("./opening-hours-slot.dto");
17
+ const anamnesis_custom_field_dto_1 = require("./anamnesis-custom-field.dto");
17
18
  class UpdateClinicConfigurationDto {
18
19
  opening_hours;
20
+ anamnesis_custom_fields;
19
21
  }
20
22
  exports.UpdateClinicConfigurationDto = UpdateClinicConfigurationDto;
21
23
  __decorate([
@@ -32,3 +34,19 @@ __decorate([
32
34
  (0, class_transformer_1.Type)(() => opening_hours_slot_dto_1.OpeningHoursSlotDto),
33
35
  __metadata("design:type", Array)
34
36
  ], UpdateClinicConfigurationDto.prototype, "opening_hours", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)({
39
+ description: 'Campos adicionais de anamnese configurados pela clínica',
40
+ type: [anamnesis_custom_field_dto_1.AnamnesisCustomFieldDto],
41
+ required: false,
42
+ example: [
43
+ { enabled: true, question: 'Qual foi sua última glicemia?', type: 'number' },
44
+ { enabled: true, question: 'Data do último exame?', type: 'date' },
45
+ ],
46
+ }),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsArray)(),
49
+ (0, class_validator_1.ValidateNested)({ each: true }),
50
+ (0, class_transformer_1.Type)(() => anamnesis_custom_field_dto_1.AnamnesisCustomFieldDto),
51
+ __metadata("design:type", Array)
52
+ ], UpdateClinicConfigurationDto.prototype, "anamnesis_custom_fields", void 0);
@@ -29,6 +29,7 @@ export declare class AppointmentChangedEventPayload {
29
29
  previousStatus?: string;
30
30
  date?: string;
31
31
  exitTime?: string;
32
+ checkinCompleted?: boolean;
32
33
  occurredAt: string;
33
34
  }
34
35
  //# sourceMappingURL=followup-events.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"followup-events.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-events.dto.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AACvE,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAC3D,gEAAgE;AAChE,eAAO,MAAM,wCAAwC,oCAClB,CAAC;AAEpC,qBAAa,gCAAgC;IAK3C,MAAM,EAAE,MAAM,CAAC;IAMf,SAAS,EAAE,MAAM,CAAC;IAIlB,WAAW,EAAE,MAAM,CAAC;IAIpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,WAAW,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;IAKxC,UAAU,CAAC,EAAE,OAAO,CAAC;IAIrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,iCAAiC;IAK5C,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAIhC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,8BAA8B;IAKzC,MAAM,EAAE,MAAM,CAAC;IAIf,aAAa,EAAE,MAAM,CAAC;IAMtB,SAAS,EAAE,MAAM,CAAC;IAMlB,MAAM,EAAE,MAAM,CAAC;IAMf,cAAc,CAAC,EAAE,MAAM,CAAC;IAKxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAIlB,UAAU,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"followup-events.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-events.dto.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AACvE,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAC3D,gEAAgE;AAChE,eAAO,MAAM,wCAAwC,oCAClB,CAAC;AAEpC,qBAAa,gCAAgC;IAK3C,MAAM,EAAE,MAAM,CAAC;IAMf,SAAS,EAAE,MAAM,CAAC;IAIlB,WAAW,EAAE,MAAM,CAAC;IAIpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,WAAW,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;IAKxC,UAAU,CAAC,EAAE,OAAO,CAAC;IAIrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,iCAAiC;IAK5C,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAIhC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,8BAA8B;IAKzC,MAAM,EAAE,MAAM,CAAC;IAIf,aAAa,EAAE,MAAM,CAAC;IAMtB,SAAS,EAAE,MAAM,CAAC;IAMlB,MAAM,EAAE,MAAM,CAAC;IAMf,cAAc,CAAC,EAAE,MAAM,CAAC;IAKxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAI3B,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -111,6 +111,7 @@ class AppointmentChangedEventPayload {
111
111
  previousStatus;
112
112
  date;
113
113
  exitTime;
114
+ checkinCompleted;
114
115
  occurredAt;
115
116
  }
116
117
  exports.AppointmentChangedEventPayload = AppointmentChangedEventPayload;
@@ -159,6 +160,12 @@ __decorate([
159
160
  (0, class_validator_1.IsISO8601)(),
160
161
  __metadata("design:type", String)
161
162
  ], AppointmentChangedEventPayload.prototype, "exitTime", void 0);
163
+ __decorate([
164
+ (0, swagger_1.ApiProperty)({ required: false, example: true }),
165
+ (0, class_validator_1.IsOptional)(),
166
+ (0, class_validator_1.IsBoolean)(),
167
+ __metadata("design:type", Boolean)
168
+ ], AppointmentChangedEventPayload.prototype, "checkinCompleted", void 0);
162
169
  __decorate([
163
170
  (0, swagger_1.ApiProperty)({ example: '2026-03-30T12:03:14.000Z' }),
164
171
  (0, class_validator_1.IsISO8601)(),
package/dist/index.d.ts CHANGED
@@ -18,4 +18,5 @@ export * from './connections';
18
18
  export * from './analytics';
19
19
  export * from './cashback';
20
20
  export * from './filters';
21
+ export * from './anamneses';
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,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;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -34,3 +34,4 @@ __exportStar(require("./connections"), exports);
34
34
  __exportStar(require("./analytics"), exports);
35
35
  __exportStar(require("./cashback"), exports);
36
36
  __exportStar(require("./filters"), exports);
37
+ __exportStar(require("./anamneses"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
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",
@@ -0,0 +1,45 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
+ import { AnamnesisCustomFieldDto } from '../configurations';
3
+
4
+ export class AnamnesisTokenSessionPatientDto {
5
+ @ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440000' })
6
+ id: string;
7
+
8
+ @ApiProperty({ example: 'Maria Souza' })
9
+ name: string;
10
+
11
+ @ApiPropertyOptional({ example: '12345678909', nullable: true })
12
+ cpf: string | null;
13
+
14
+ @ApiPropertyOptional({ example: '+5511999999999', nullable: true })
15
+ phone: string | null;
16
+ }
17
+
18
+ export class AnamnesisTokenSessionDto {
19
+ @ApiProperty({ example: true })
20
+ valid: boolean;
21
+
22
+ @ApiPropertyOptional({
23
+ example: 'expired',
24
+ enum: ['not_found', 'expired', 'consumed', 'invalid_scope'],
25
+ })
26
+ reason?: 'not_found' | 'expired' | 'consumed' | 'invalid_scope';
27
+
28
+ @ApiPropertyOptional({ example: 'anamnesis:submit:self' })
29
+ scope?: string;
30
+
31
+ @ApiPropertyOptional({ example: '2026-04-14T14:30:00.000Z' })
32
+ expiresAt?: string;
33
+
34
+ @ApiPropertyOptional({ example: '550e8400-e29b-41d4-a716-446655440111' })
35
+ appointmentId?: string;
36
+
37
+ @ApiPropertyOptional({ type: AnamnesisTokenSessionPatientDto })
38
+ patient?: AnamnesisTokenSessionPatientDto;
39
+
40
+ @ApiPropertyOptional({
41
+ type: [AnamnesisCustomFieldDto],
42
+ description: 'Campos adicionais da anamnese configurados pela clínica',
43
+ })
44
+ anamnesisCustomFields?: AnamnesisCustomFieldDto[];
45
+ }
@@ -0,0 +1,25 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { IsNotEmpty, IsObject, IsString, MinLength } from 'class-validator';
3
+
4
+ export class CreateAnamnesisByTokenDto {
5
+ @ApiProperty({
6
+ description: 'Token único de acesso à página de anamnese',
7
+ example: 'a5f8b3f1...',
8
+ })
9
+ @IsString()
10
+ @MinLength(16)
11
+ token: string;
12
+
13
+ @ApiProperty({
14
+ description: 'Respostas estruturadas do formulário de anamnese',
15
+ type: Object,
16
+ example: {
17
+ hasAllergy: true,
18
+ allergyDescription: 'Dipirona',
19
+ medications: ['Omeprazol'],
20
+ },
21
+ })
22
+ @IsObject()
23
+ @IsNotEmpty()
24
+ answersJson: Record<string, unknown>;
25
+ }
@@ -0,0 +1,3 @@
1
+ export * from './create-anamnesis-by-token.dto';
2
+ export * from './anamnesis-token-session.dto';
3
+ export * from './patient-anamnesis.dto';
@@ -0,0 +1,24 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
+
3
+ export class PatientAnamnesisDto {
4
+ @ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440010' })
5
+ id: string;
6
+
7
+ @ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440000' })
8
+ patientId: string;
9
+
10
+ @ApiPropertyOptional({ example: '550e8400-e29b-41d4-a716-446655440111', nullable: true })
11
+ appointmentId: string | null;
12
+
13
+ @ApiProperty({ example: '2026-04-14T10:00:00.000Z' })
14
+ startDate: string;
15
+
16
+ @ApiProperty({ example: '2026-10-14T10:00:00.000Z' })
17
+ endDate: string;
18
+
19
+ @ApiProperty({ type: Object })
20
+ answersJson: Record<string, unknown>;
21
+
22
+ @ApiProperty({ example: '2026-04-14T10:00:10.000Z' })
23
+ createdAt: string;
24
+ }
@@ -0,0 +1,30 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { IsBoolean, IsIn, IsString, MinLength } from 'class-validator';
3
+
4
+ export const ANAMNESIS_CUSTOM_FIELD_TYPES = ['number', 'date', 'boolean', 'text'] as const;
5
+ export type AnamnesisCustomFieldType = (typeof ANAMNESIS_CUSTOM_FIELD_TYPES)[number];
6
+
7
+ export class AnamnesisCustomFieldDto {
8
+ @ApiProperty({
9
+ description: 'Campo está ativo para aparecer no formulário público',
10
+ example: true,
11
+ })
12
+ @IsBoolean()
13
+ enabled: boolean;
14
+
15
+ @ApiProperty({
16
+ description: 'Pergunta exibida ao paciente',
17
+ example: 'Qual sua pressão arterial média?',
18
+ })
19
+ @IsString()
20
+ @MinLength(3)
21
+ question: string;
22
+
23
+ @ApiProperty({
24
+ description: 'Tipo de resposta esperada para o campo',
25
+ enum: ANAMNESIS_CUSTOM_FIELD_TYPES,
26
+ example: 'number',
27
+ })
28
+ @IsIn(ANAMNESIS_CUSTOM_FIELD_TYPES)
29
+ type: AnamnesisCustomFieldType;
30
+ }
@@ -1,5 +1,6 @@
1
1
  import { ApiProperty } from '@nestjs/swagger';
2
2
  import { OpeningHoursSlotDto } from './opening-hours-slot.dto';
3
+ import { AnamnesisCustomFieldDto } from './anamnesis-custom-field.dto';
3
4
 
4
5
  /**
5
6
  * Response DTO for clinic configuration (opening hours, etc.).
@@ -17,6 +18,13 @@ export class ClinicConfigurationDto {
17
18
  })
18
19
  opening_hours: OpeningHoursSlotDto[];
19
20
 
21
+ @ApiProperty({
22
+ description: 'Campos adicionais de anamnese configurados pela clínica',
23
+ type: [AnamnesisCustomFieldDto],
24
+ required: false,
25
+ })
26
+ anamnesis_custom_fields?: AnamnesisCustomFieldDto[];
27
+
20
28
  @ApiProperty({
21
29
  description: 'Creation timestamp',
22
30
  example: '2026-03-10T12:00:00.000Z',
@@ -1,4 +1,5 @@
1
1
  export * from './opening-hours-slot.dto';
2
+ export * from './anamnesis-custom-field.dto';
2
3
  export * from './update-clinic-configuration.dto';
3
4
  export * from './clinic-configuration.dto';
4
5
  export * from './ai-tool-policy.enums';
@@ -2,9 +2,11 @@ import { ApiProperty } from '@nestjs/swagger';
2
2
  import { Type } from 'class-transformer';
3
3
  import {
4
4
  IsArray,
5
+ IsOptional,
5
6
  ValidateNested,
6
7
  } from 'class-validator';
7
8
  import { OpeningHoursSlotDto } from './opening-hours-slot.dto';
9
+ import { AnamnesisCustomFieldDto } from './anamnesis-custom-field.dto';
8
10
 
9
11
  export class UpdateClinicConfigurationDto {
10
12
  @ApiProperty({
@@ -19,4 +21,19 @@ export class UpdateClinicConfigurationDto {
19
21
  @ValidateNested({ each: true })
20
22
  @Type(() => OpeningHoursSlotDto)
21
23
  opening_hours: OpeningHoursSlotDto[];
24
+
25
+ @ApiProperty({
26
+ description: 'Campos adicionais de anamnese configurados pela clínica',
27
+ type: [AnamnesisCustomFieldDto],
28
+ required: false,
29
+ example: [
30
+ { enabled: true, question: 'Qual foi sua última glicemia?', type: 'number' },
31
+ { enabled: true, question: 'Data do último exame?', type: 'date' },
32
+ ],
33
+ })
34
+ @IsOptional()
35
+ @IsArray()
36
+ @ValidateNested({ each: true })
37
+ @Type(() => AnamnesisCustomFieldDto)
38
+ anamnesis_custom_fields?: AnamnesisCustomFieldDto[];
22
39
  }
@@ -110,6 +110,11 @@ export class AppointmentChangedEventPayload {
110
110
  @IsISO8601()
111
111
  exitTime?: string;
112
112
 
113
+ @ApiProperty({ required: false, example: true })
114
+ @IsOptional()
115
+ @IsBoolean()
116
+ checkinCompleted?: boolean;
117
+
113
118
  @ApiProperty({ example: '2026-03-30T12:03:14.000Z' })
114
119
  @IsISO8601()
115
120
  occurredAt: string;
package/src/index.ts CHANGED
@@ -18,3 +18,4 @@ export * from './connections';
18
18
  export * from './analytics';
19
19
  export * from './cashback';
20
20
  export * from './filters';
21
+ export * from './anamneses';