tychat-contracts 1.3.4 → 1.3.5
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/anamneses/anamnesis-token-session.dto.d.ts +15 -0
- package/dist/anamneses/anamnesis-token-session.dto.d.ts.map +1 -0
- package/dist/anamneses/anamnesis-token-session.dto.js +72 -0
- package/dist/anamneses/create-anamnesis-by-token.dto.d.ts +5 -0
- package/dist/anamneses/create-anamnesis-by-token.dto.d.ts.map +1 -0
- package/dist/anamneses/create-anamnesis-by-token.dto.js +42 -0
- package/dist/anamneses/index.d.ts +4 -0
- package/dist/anamneses/index.d.ts.map +1 -0
- package/dist/anamneses/index.js +19 -0
- package/dist/anamneses/patient-anamnesis.dto.d.ts +10 -0
- package/dist/anamneses/patient-anamnesis.dto.d.ts.map +1 -0
- package/dist/anamneses/patient-anamnesis.dto.js +51 -0
- package/dist/conversations/followup-events.dto.d.ts +1 -0
- package/dist/conversations/followup-events.dto.d.ts.map +1 -1
- package/dist/conversations/followup-events.dto.js +7 -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/anamneses/anamnesis-token-session.dto.ts +38 -0
- package/src/anamneses/create-anamnesis-by-token.dto.ts +25 -0
- package/src/anamneses/index.ts +3 -0
- package/src/anamneses/patient-anamnesis.dto.ts +24 -0
- package/src/conversations/followup-events.dto.ts +5 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class AnamnesisTokenSessionPatientDto {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
cpf: string | null;
|
|
5
|
+
phone: string | null;
|
|
6
|
+
}
|
|
7
|
+
export declare class AnamnesisTokenSessionDto {
|
|
8
|
+
valid: boolean;
|
|
9
|
+
reason?: 'not_found' | 'expired' | 'consumed' | 'invalid_scope';
|
|
10
|
+
scope?: string;
|
|
11
|
+
expiresAt?: string;
|
|
12
|
+
appointmentId?: string;
|
|
13
|
+
patient?: AnamnesisTokenSessionPatientDto;
|
|
14
|
+
}
|
|
15
|
+
//# 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":"AAEA,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;CAC3C"}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
class AnamnesisTokenSessionPatientDto {
|
|
15
|
+
id;
|
|
16
|
+
name;
|
|
17
|
+
cpf;
|
|
18
|
+
phone;
|
|
19
|
+
}
|
|
20
|
+
exports.AnamnesisTokenSessionPatientDto = AnamnesisTokenSessionPatientDto;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({ example: '550e8400-e29b-41d4-a716-446655440000' }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AnamnesisTokenSessionPatientDto.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({ example: 'Maria Souza' }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AnamnesisTokenSessionPatientDto.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '12345678909', nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], AnamnesisTokenSessionPatientDto.prototype, "cpf", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '+5511999999999', nullable: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], AnamnesisTokenSessionPatientDto.prototype, "phone", void 0);
|
|
37
|
+
class AnamnesisTokenSessionDto {
|
|
38
|
+
valid;
|
|
39
|
+
reason;
|
|
40
|
+
scope;
|
|
41
|
+
expiresAt;
|
|
42
|
+
appointmentId;
|
|
43
|
+
patient;
|
|
44
|
+
}
|
|
45
|
+
exports.AnamnesisTokenSessionDto = AnamnesisTokenSessionDto;
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ example: true }),
|
|
48
|
+
__metadata("design:type", Boolean)
|
|
49
|
+
], AnamnesisTokenSessionDto.prototype, "valid", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
52
|
+
example: 'expired',
|
|
53
|
+
enum: ['not_found', 'expired', 'consumed', 'invalid_scope'],
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], AnamnesisTokenSessionDto.prototype, "reason", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiPropertyOptional)({ example: 'anamnesis:submit:self' }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], AnamnesisTokenSessionDto.prototype, "scope", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '2026-04-14T14:30:00.000Z' }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], AnamnesisTokenSessionDto.prototype, "expiresAt", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '550e8400-e29b-41d4-a716-446655440111' }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], AnamnesisTokenSessionDto.prototype, "appointmentId", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiPropertyOptional)({ type: AnamnesisTokenSessionPatientDto }),
|
|
71
|
+
__metadata("design:type", AnamnesisTokenSessionPatientDto)
|
|
72
|
+
], AnamnesisTokenSessionDto.prototype, "patient", void 0);
|
|
@@ -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 @@
|
|
|
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);
|
|
@@ -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;
|
|
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
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,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
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
|
|
3
|
+
export class AnamnesisTokenSessionPatientDto {
|
|
4
|
+
@ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440000' })
|
|
5
|
+
id: string;
|
|
6
|
+
|
|
7
|
+
@ApiProperty({ example: 'Maria Souza' })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional({ example: '12345678909', nullable: true })
|
|
11
|
+
cpf: string | null;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional({ example: '+5511999999999', nullable: true })
|
|
14
|
+
phone: string | null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class AnamnesisTokenSessionDto {
|
|
18
|
+
@ApiProperty({ example: true })
|
|
19
|
+
valid: boolean;
|
|
20
|
+
|
|
21
|
+
@ApiPropertyOptional({
|
|
22
|
+
example: 'expired',
|
|
23
|
+
enum: ['not_found', 'expired', 'consumed', 'invalid_scope'],
|
|
24
|
+
})
|
|
25
|
+
reason?: 'not_found' | 'expired' | 'consumed' | 'invalid_scope';
|
|
26
|
+
|
|
27
|
+
@ApiPropertyOptional({ example: 'anamnesis:submit:self' })
|
|
28
|
+
scope?: string;
|
|
29
|
+
|
|
30
|
+
@ApiPropertyOptional({ example: '2026-04-14T14:30:00.000Z' })
|
|
31
|
+
expiresAt?: string;
|
|
32
|
+
|
|
33
|
+
@ApiPropertyOptional({ example: '550e8400-e29b-41d4-a716-446655440111' })
|
|
34
|
+
appointmentId?: string;
|
|
35
|
+
|
|
36
|
+
@ApiPropertyOptional({ type: AnamnesisTokenSessionPatientDto })
|
|
37
|
+
patient?: AnamnesisTokenSessionPatientDto;
|
|
38
|
+
}
|
|
@@ -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,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
|
+
}
|
|
@@ -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