tychat-contracts 1.0.73 → 1.0.75
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 +2 -0
- package/dist/appointments/appointment-procedure.dto.d.ts.map +1 -1
- package/dist/appointments/appointment-procedure.dto.js +22 -0
- package/dist/appointments/appointment-status.dto.d.ts +8 -1
- package/dist/appointments/appointment-status.dto.d.ts.map +1 -1
- package/dist/appointments/appointment-status.dto.js +8 -1
- package/dist/appointments/appointment.dto.d.ts +8 -1
- package/dist/appointments/appointment.dto.d.ts.map +1 -1
- package/dist/appointments/create-appointment.dto.d.ts +4 -1
- package/dist/appointments/create-appointment.dto.d.ts.map +1 -1
- package/dist/appointments/create-appointment.dto.js +31 -0
- package/dist/conversations/conversation-intention.dto.d.ts +7 -0
- package/dist/conversations/conversation-intention.dto.d.ts.map +1 -0
- package/dist/conversations/conversation-intention.dto.js +25 -0
- package/dist/conversations/conversation-session-response.dto.d.ts +2 -0
- package/dist/conversations/conversation-session-response.dto.d.ts.map +1 -1
- package/dist/conversations/conversation-session-response.dto.js +12 -0
- package/dist/conversations/followup-config-response.dto.d.ts +30 -0
- package/dist/conversations/followup-config-response.dto.d.ts.map +1 -0
- package/dist/conversations/followup-config-response.dto.js +188 -0
- package/dist/conversations/followup-events.dto.d.ts +30 -0
- package/dist/conversations/followup-events.dto.d.ts.map +1 -0
- package/dist/conversations/followup-events.dto.js +162 -0
- package/dist/conversations/followup-log-response.dto.d.ts +17 -0
- package/dist/conversations/followup-log-response.dto.d.ts.map +1 -0
- package/dist/conversations/followup-log-response.dto.js +89 -0
- package/dist/conversations/followup-type.dto.d.ts +14 -0
- package/dist/conversations/followup-type.dto.d.ts.map +1 -0
- package/dist/conversations/followup-type.dto.js +23 -0
- package/dist/conversations/index.d.ts +6 -0
- package/dist/conversations/index.d.ts.map +1 -1
- package/dist/conversations/index.js +6 -0
- package/dist/conversations/satisfaction-response.dto.d.ts +36 -0
- package/dist/conversations/satisfaction-response.dto.d.ts.map +1 -0
- package/dist/conversations/satisfaction-response.dto.js +149 -0
- package/dist/patients/index.d.ts +1 -0
- package/dist/patients/index.d.ts.map +1 -1
- package/dist/patients/index.js +1 -0
- package/dist/patients/patient-status.dto.d.ts +9 -0
- package/dist/patients/patient-status.dto.d.ts.map +1 -0
- package/dist/patients/patient-status.dto.js +10 -0
- package/package.json +1 -1
- package/src/appointments/appointment-procedure.dto.ts +18 -0
- package/src/appointments/appointment-status.dto.ts +10 -1
- package/src/appointments/appointment.dto.ts +20 -1
- package/src/appointments/create-appointment.dto.ts +31 -1
- package/src/conversations/conversation-intention.dto.ts +24 -0
- package/src/conversations/conversation-session-response.dto.ts +11 -1
- package/src/conversations/followup-config-response.dto.ts +140 -0
- package/src/conversations/followup-events.dto.ts +111 -0
- package/src/conversations/followup-log-response.dto.ts +58 -0
- package/src/conversations/followup-type.dto.ts +22 -0
- package/src/conversations/index.ts +6 -0
- package/src/conversations/satisfaction-response.dto.ts +116 -0
- package/src/patients/index.ts +1 -0
- package/src/patients/patient-status.dto.ts +9 -0
|
@@ -1 +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"}
|
|
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;IAU5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -22,6 +22,8 @@ class AppointmentProcedureDto {
|
|
|
22
22
|
finished;
|
|
23
23
|
finished_at;
|
|
24
24
|
observation;
|
|
25
|
+
side_effects;
|
|
26
|
+
return_days;
|
|
25
27
|
}
|
|
26
28
|
exports.AppointmentProcedureDto = AppointmentProcedureDto;
|
|
27
29
|
__decorate([
|
|
@@ -71,3 +73,23 @@ __decorate([
|
|
|
71
73
|
(0, class_validator_1.MaxLength)(2000),
|
|
72
74
|
__metadata("design:type", Object)
|
|
73
75
|
], AppointmentProcedureDto.prototype, "observation", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: 'Known side effects of the procedure (used for wellness follow-up after appointment)',
|
|
79
|
+
example: 'Possivel inchaço na area tratada, sensibilidade ao toque por 24-48h',
|
|
80
|
+
maxLength: 2000,
|
|
81
|
+
}),
|
|
82
|
+
(0, class_validator_1.IsString)(),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.MaxLength)(2000),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], AppointmentProcedureDto.prototype, "side_effects", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
89
|
+
description: 'Recommended number of days until a return visit',
|
|
90
|
+
example: 30,
|
|
91
|
+
}),
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 0 }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], AppointmentProcedureDto.prototype, "return_days", void 0);
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished", "canceled"];
|
|
1
|
+
export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished", "canceled", "no_show"];
|
|
2
2
|
export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Appointment types to differentiate regular appointments from return visits.
|
|
5
|
+
* - "regular" → standard appointment with procedures.
|
|
6
|
+
* - "return" → follow-up return visit linked to a previous appointment.
|
|
7
|
+
*/
|
|
8
|
+
export declare const APPOINTMENT_TYPES: readonly ["regular", "return"];
|
|
9
|
+
export type AppointmentTypeDto = (typeof APPOINTMENT_TYPES)[number];
|
|
3
10
|
//# sourceMappingURL=appointment-status.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,iFAOvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APPOINTMENT_STATUSES = void 0;
|
|
3
|
+
exports.APPOINTMENT_TYPES = exports.APPOINTMENT_STATUSES = void 0;
|
|
4
4
|
exports.APPOINTMENT_STATUSES = [
|
|
5
5
|
'pending',
|
|
6
6
|
'processing',
|
|
7
7
|
'sended',
|
|
8
8
|
'finished',
|
|
9
9
|
'canceled',
|
|
10
|
+
'no_show',
|
|
10
11
|
];
|
|
12
|
+
/**
|
|
13
|
+
* Appointment types to differentiate regular appointments from return visits.
|
|
14
|
+
* - "regular" → standard appointment with procedures.
|
|
15
|
+
* - "return" → follow-up return visit linked to a previous appointment.
|
|
16
|
+
*/
|
|
17
|
+
exports.APPOINTMENT_TYPES = ['regular', 'return'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppointmentStatusDto } from "./appointment-status.dto";
|
|
1
|
+
import { AppointmentStatusDto, AppointmentTypeDto } from "./appointment-status.dto";
|
|
2
2
|
/** Procedure as returned nested inside an appointment response. */
|
|
3
3
|
export interface AppointmentProcedureResponseDto {
|
|
4
4
|
id: string;
|
|
@@ -8,6 +8,10 @@ export interface AppointmentProcedureResponseDto {
|
|
|
8
8
|
finished: boolean;
|
|
9
9
|
finishedAt: string | null;
|
|
10
10
|
observation: string | null;
|
|
11
|
+
/** Known side effects of the procedure (used for wellness follow-up). */
|
|
12
|
+
sideEffects: string | null;
|
|
13
|
+
/** Recommended number of days until a return visit (used for return follow-up). */
|
|
14
|
+
returnDays: number | null;
|
|
11
15
|
createdAt?: string;
|
|
12
16
|
updatedAt?: string;
|
|
13
17
|
}
|
|
@@ -22,6 +26,9 @@ export interface AppointmentDto {
|
|
|
22
26
|
observation?: string;
|
|
23
27
|
cancellationReason?: string;
|
|
24
28
|
status: AppointmentStatusDto;
|
|
29
|
+
appointmentType: AppointmentTypeDto;
|
|
30
|
+
rescheduledFromId?: string;
|
|
31
|
+
returnFromAppointmentId?: string;
|
|
25
32
|
procedures?: AppointmentProcedureResponseDto[];
|
|
26
33
|
}
|
|
27
34
|
//# sourceMappingURL=appointment.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;
|
|
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,MAAM,EAAE,oBAAoB,CAAC;IAK7B,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppointmentStatusDto } from './appointment-status.dto';
|
|
1
|
+
import { AppointmentStatusDto, AppointmentTypeDto } from './appointment-status.dto';
|
|
2
2
|
export declare class CreateAppointmentDto {
|
|
3
3
|
patientId: string;
|
|
4
4
|
date: string;
|
|
@@ -9,5 +9,8 @@ export declare class CreateAppointmentDto {
|
|
|
9
9
|
observation?: string;
|
|
10
10
|
cancellationReason?: string;
|
|
11
11
|
status?: AppointmentStatusDto;
|
|
12
|
+
appointmentType?: AppointmentTypeDto;
|
|
13
|
+
rescheduledFromId?: string;
|
|
14
|
+
returnFromAppointmentId?: string;
|
|
12
15
|
}
|
|
13
16
|
//# sourceMappingURL=create-appointment.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAIlC,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;IAQ5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAS9B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAQrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAQ3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC"}
|
|
@@ -23,6 +23,9 @@ class CreateAppointmentDto {
|
|
|
23
23
|
observation;
|
|
24
24
|
cancellationReason;
|
|
25
25
|
status;
|
|
26
|
+
appointmentType;
|
|
27
|
+
rescheduledFromId;
|
|
28
|
+
returnFromAppointmentId;
|
|
26
29
|
}
|
|
27
30
|
exports.CreateAppointmentDto = CreateAppointmentDto;
|
|
28
31
|
__decorate([
|
|
@@ -108,3 +111,31 @@ __decorate([
|
|
|
108
111
|
(0, class_validator_1.IsEnum)(appointment_status_dto_1.APPOINTMENT_STATUSES),
|
|
109
112
|
__metadata("design:type", String)
|
|
110
113
|
], CreateAppointmentDto.prototype, "status", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
116
|
+
description: 'Tipo do agendamento (regular ou retorno)',
|
|
117
|
+
enum: appointment_status_dto_1.APPOINTMENT_TYPES,
|
|
118
|
+
default: 'regular',
|
|
119
|
+
}),
|
|
120
|
+
(0, class_validator_1.IsOptional)(),
|
|
121
|
+
(0, class_validator_1.IsEnum)(appointment_status_dto_1.APPOINTMENT_TYPES),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], CreateAppointmentDto.prototype, "appointmentType", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
126
|
+
description: 'UUID do agendamento original que foi reagendado (se for reagendamento)',
|
|
127
|
+
example: '550e8400-e29b-41d4-a716-446655440003',
|
|
128
|
+
}),
|
|
129
|
+
(0, class_validator_1.IsOptional)(),
|
|
130
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], CreateAppointmentDto.prototype, "rescheduledFromId", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
135
|
+
description: 'UUID do agendamento original ao qual este retorno está vinculado',
|
|
136
|
+
example: '550e8400-e29b-41d4-a716-446655440004',
|
|
137
|
+
}),
|
|
138
|
+
(0, class_validator_1.IsOptional)(),
|
|
139
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], CreateAppointmentDto.prototype, "returnFromAppointmentId", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All possible user intention types detected by the AI during a conversation.
|
|
3
|
+
* Used to drive follow-up logic when the user becomes inactive.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CONVERSATION_INTENTIONS: readonly ["greeting", "ask_services", "ask_prices", "ask_availability", "select_service", "provide_datetime", "confirm_appointment", "reject_appointment", "provide_data", "reschedule", "cancel_appointment", "check_appointment", "clinic_info", "human_handoff", "out_of_scope", "unclear"];
|
|
6
|
+
export type ConversationIntentionDto = (typeof CONVERSATION_INTENTIONS)[number];
|
|
7
|
+
//# sourceMappingURL=conversation-intention.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-intention.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/conversation-intention.dto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,gSAiB1B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONVERSATION_INTENTIONS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* All possible user intention types detected by the AI during a conversation.
|
|
6
|
+
* Used to drive follow-up logic when the user becomes inactive.
|
|
7
|
+
*/
|
|
8
|
+
exports.CONVERSATION_INTENTIONS = [
|
|
9
|
+
'greeting',
|
|
10
|
+
'ask_services',
|
|
11
|
+
'ask_prices',
|
|
12
|
+
'ask_availability',
|
|
13
|
+
'select_service',
|
|
14
|
+
'provide_datetime',
|
|
15
|
+
'confirm_appointment',
|
|
16
|
+
'reject_appointment',
|
|
17
|
+
'provide_data',
|
|
18
|
+
'reschedule',
|
|
19
|
+
'cancel_appointment',
|
|
20
|
+
'check_appointment',
|
|
21
|
+
'clinic_info',
|
|
22
|
+
'human_handoff',
|
|
23
|
+
'out_of_scope',
|
|
24
|
+
'unclear',
|
|
25
|
+
];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConversationIntentionDto } from './conversation-intention.dto';
|
|
1
2
|
/**
|
|
2
3
|
* Represents a conversation session record returned by the API.
|
|
3
4
|
* A session is valid for 24 hours from its start time.
|
|
@@ -8,6 +9,7 @@ export declare class ConversationSessionResponseDto {
|
|
|
8
9
|
tenant: string;
|
|
9
10
|
patientId: string;
|
|
10
11
|
unitId?: number;
|
|
12
|
+
intention?: ConversationIntentionDto;
|
|
11
13
|
startedAt: string;
|
|
12
14
|
expiresAt: string;
|
|
13
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-session-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/conversation-session-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation-session-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/conversation-session-response.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEjG;;;GAGG;AACH,qBAAa,8BAA8B;IAIzC,EAAE,EAAE,MAAM,CAAC;IAQX,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IASf,SAAS,EAAE,MAAM,CAAC;IAIlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAShB,SAAS,CAAC,EAAE,wBAAwB,CAAC;IAQrC,SAAS,EAAE,MAAM,CAAC;IAQlB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ConversationSessionResponseDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const conversation_intention_dto_1 = require("./conversation-intention.dto");
|
|
15
16
|
/**
|
|
16
17
|
* Represents a conversation session record returned by the API.
|
|
17
18
|
* A session is valid for 24 hours from its start time.
|
|
@@ -22,6 +23,7 @@ class ConversationSessionResponseDto {
|
|
|
22
23
|
tenant;
|
|
23
24
|
patientId;
|
|
24
25
|
unitId;
|
|
26
|
+
intention;
|
|
25
27
|
startedAt;
|
|
26
28
|
expiresAt;
|
|
27
29
|
}
|
|
@@ -62,6 +64,16 @@ __decorate([
|
|
|
62
64
|
(0, class_validator_1.IsOptional)(),
|
|
63
65
|
__metadata("design:type", Number)
|
|
64
66
|
], ConversationSessionResponseDto.prototype, "unitId", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
69
|
+
description: 'User intention detected by the AI for this session',
|
|
70
|
+
enum: conversation_intention_dto_1.CONVERSATION_INTENTIONS,
|
|
71
|
+
example: 'ask_services',
|
|
72
|
+
}),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.IsEnum)(conversation_intention_dto_1.CONVERSATION_INTENTIONS),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ConversationSessionResponseDto.prototype, "intention", void 0);
|
|
65
77
|
__decorate([
|
|
66
78
|
(0, swagger_1.ApiProperty)({
|
|
67
79
|
description: 'Session start timestamp (ISO 8601)',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a follow-up timing configuration for a tenant.
|
|
3
|
+
* Defines timing and enabled flags for all follow-up types:
|
|
4
|
+
* abandonment, appointment confirmation, satisfaction surveys,
|
|
5
|
+
* no-show reschedule, wellness check, and return suggestion.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FollowupConfigResponseDto {
|
|
8
|
+
id: string;
|
|
9
|
+
unitId?: number;
|
|
10
|
+
abandonmentThresholdMinutes: number;
|
|
11
|
+
followup1DelayMinutes: number;
|
|
12
|
+
followup2DelayMinutes: number;
|
|
13
|
+
followup3DelayMinutes: number;
|
|
14
|
+
followup4DelayMinutes: number;
|
|
15
|
+
followup5DelayMinutes: number;
|
|
16
|
+
confirmationMinutesBefore: number;
|
|
17
|
+
confirmationEnabled: boolean;
|
|
18
|
+
satisfactionBookingDelayMinutes: number;
|
|
19
|
+
satisfactionBookingEnabled: boolean;
|
|
20
|
+
satisfactionFinishedDelayMinutes: number;
|
|
21
|
+
satisfactionFinishedEnabled: boolean;
|
|
22
|
+
noShowDelayMinutes: number;
|
|
23
|
+
noShowEnabled: boolean;
|
|
24
|
+
wellnessCheckDelayMinutes: number;
|
|
25
|
+
wellnessCheckEnabled: boolean;
|
|
26
|
+
returnSuggestionDelayMinutes: number;
|
|
27
|
+
returnSuggestionEnabled: boolean;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=followup-config-response.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"followup-config-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-config-response.dto.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qBAAa,yBAAyB;IAIpC,EAAE,EAAE,MAAM,CAAC;IAMX,MAAM,CAAC,EAAE,MAAM,CAAC;IAYhB,2BAA2B,EAAE,MAAM,CAAC;IAKpC,qBAAqB,EAAE,MAAM,CAAC;IAK9B,qBAAqB,EAAE,MAAM,CAAC;IAK9B,qBAAqB,EAAE,MAAM,CAAC;IAK9B,qBAAqB,EAAE,MAAM,CAAC;IAK9B,qBAAqB,EAAE,MAAM,CAAC;IAS9B,yBAAyB,EAAE,MAAM,CAAC;IAIlC,mBAAmB,EAAE,OAAO,CAAC;IAS7B,+BAA+B,EAAE,MAAM,CAAC;IAIxC,0BAA0B,EAAE,OAAO,CAAC;IAKpC,gCAAgC,EAAE,MAAM,CAAC;IAIzC,2BAA2B,EAAE,OAAO,CAAC;IASrC,kBAAkB,EAAE,MAAM,CAAC;IAI3B,aAAa,EAAE,OAAO,CAAC;IASvB,yBAAyB,EAAE,MAAM,CAAC;IAIlC,oBAAoB,EAAE,OAAO,CAAC;IAS9B,4BAA4B,EAAE,MAAM,CAAC;IAIrC,uBAAuB,EAAE,OAAO,CAAC;IAQjC,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,188 @@
|
|
|
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.FollowupConfigResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Represents a follow-up timing configuration for a tenant.
|
|
17
|
+
* Defines timing and enabled flags for all follow-up types:
|
|
18
|
+
* abandonment, appointment confirmation, satisfaction surveys,
|
|
19
|
+
* no-show reschedule, wellness check, and return suggestion.
|
|
20
|
+
*/
|
|
21
|
+
class FollowupConfigResponseDto {
|
|
22
|
+
id;
|
|
23
|
+
unitId;
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// Abandonment follow-up settings
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
abandonmentThresholdMinutes;
|
|
28
|
+
followup1DelayMinutes;
|
|
29
|
+
followup2DelayMinutes;
|
|
30
|
+
followup3DelayMinutes;
|
|
31
|
+
followup4DelayMinutes;
|
|
32
|
+
followup5DelayMinutes;
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// Appointment confirmation settings
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
confirmationMinutesBefore;
|
|
37
|
+
confirmationEnabled;
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
// Satisfaction survey settings
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
satisfactionBookingDelayMinutes;
|
|
42
|
+
satisfactionBookingEnabled;
|
|
43
|
+
satisfactionFinishedDelayMinutes;
|
|
44
|
+
satisfactionFinishedEnabled;
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
// No-show reschedule settings
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
noShowDelayMinutes;
|
|
49
|
+
noShowEnabled;
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// Wellness check settings
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
wellnessCheckDelayMinutes;
|
|
54
|
+
wellnessCheckEnabled;
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
// Return suggestion settings
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
returnSuggestionDelayMinutes;
|
|
59
|
+
returnSuggestionEnabled;
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
// Global setting
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
enabled;
|
|
64
|
+
}
|
|
65
|
+
exports.FollowupConfigResponseDto = FollowupConfigResponseDto;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiProperty)({ description: 'Config primary key (UUID)' }),
|
|
68
|
+
(0, class_validator_1.IsString)(),
|
|
69
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], FollowupConfigResponseDto.prototype, "id", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Tenant unit id', example: 1 }),
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsInt)(),
|
|
76
|
+
(0, class_validator_1.Min)(1),
|
|
77
|
+
__metadata("design:type", Number)
|
|
78
|
+
], FollowupConfigResponseDto.prototype, "unitId", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, swagger_1.ApiProperty)({
|
|
81
|
+
description: 'Minutes since last AI/human message to consider the session as abandoned',
|
|
82
|
+
example: 30,
|
|
83
|
+
}),
|
|
84
|
+
(0, class_validator_1.IsInt)(),
|
|
85
|
+
(0, class_validator_1.Min)(1),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], FollowupConfigResponseDto.prototype, "abandonmentThresholdMinutes", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes to wait before sending follow-up #1 after abandonment', example: 5 }),
|
|
90
|
+
(0, class_validator_1.IsInt)(),
|
|
91
|
+
(0, class_validator_1.Min)(1),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], FollowupConfigResponseDto.prototype, "followup1DelayMinutes", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes to wait before sending follow-up #2 after #1', example: 15 }),
|
|
96
|
+
(0, class_validator_1.IsInt)(),
|
|
97
|
+
(0, class_validator_1.Min)(1),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], FollowupConfigResponseDto.prototype, "followup2DelayMinutes", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes to wait before sending follow-up #3 after #2', example: 60 }),
|
|
102
|
+
(0, class_validator_1.IsInt)(),
|
|
103
|
+
(0, class_validator_1.Min)(1),
|
|
104
|
+
__metadata("design:type", Number)
|
|
105
|
+
], FollowupConfigResponseDto.prototype, "followup3DelayMinutes", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes to wait before sending follow-up #4 after #3', example: 1440 }),
|
|
108
|
+
(0, class_validator_1.IsInt)(),
|
|
109
|
+
(0, class_validator_1.Min)(1),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], FollowupConfigResponseDto.prototype, "followup4DelayMinutes", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes to wait before sending follow-up #5 (final) after #4', example: 2880 }),
|
|
114
|
+
(0, class_validator_1.IsInt)(),
|
|
115
|
+
(0, class_validator_1.Min)(1),
|
|
116
|
+
__metadata("design:type", Number)
|
|
117
|
+
], FollowupConfigResponseDto.prototype, "followup5DelayMinutes", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes before the appointment to send the confirmation reminder', example: 60 }),
|
|
120
|
+
(0, class_validator_1.IsInt)(),
|
|
121
|
+
(0, class_validator_1.Min)(1),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], FollowupConfigResponseDto.prototype, "confirmationMinutesBefore", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether appointment confirmation follow-up is enabled' }),
|
|
126
|
+
(0, class_validator_1.IsBoolean)(),
|
|
127
|
+
__metadata("design:type", Boolean)
|
|
128
|
+
], FollowupConfigResponseDto.prototype, "confirmationEnabled", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes after booking confirmation to send the satisfaction survey', example: 10 }),
|
|
131
|
+
(0, class_validator_1.IsInt)(),
|
|
132
|
+
(0, class_validator_1.Min)(1),
|
|
133
|
+
__metadata("design:type", Number)
|
|
134
|
+
], FollowupConfigResponseDto.prototype, "satisfactionBookingDelayMinutes", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether satisfaction survey after booking is enabled' }),
|
|
137
|
+
(0, class_validator_1.IsBoolean)(),
|
|
138
|
+
__metadata("design:type", Boolean)
|
|
139
|
+
], FollowupConfigResponseDto.prototype, "satisfactionBookingEnabled", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes after appointment finishes to send the satisfaction survey', example: 30 }),
|
|
142
|
+
(0, class_validator_1.IsInt)(),
|
|
143
|
+
(0, class_validator_1.Min)(1),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], FollowupConfigResponseDto.prototype, "satisfactionFinishedDelayMinutes", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether satisfaction survey after finished appointment is enabled' }),
|
|
148
|
+
(0, class_validator_1.IsBoolean)(),
|
|
149
|
+
__metadata("design:type", Boolean)
|
|
150
|
+
], FollowupConfigResponseDto.prototype, "satisfactionFinishedEnabled", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes after a no-show to send the reschedule follow-up', example: 60 }),
|
|
153
|
+
(0, class_validator_1.IsInt)(),
|
|
154
|
+
(0, class_validator_1.Min)(1),
|
|
155
|
+
__metadata("design:type", Number)
|
|
156
|
+
], FollowupConfigResponseDto.prototype, "noShowDelayMinutes", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether no-show follow-up is enabled' }),
|
|
159
|
+
(0, class_validator_1.IsBoolean)(),
|
|
160
|
+
__metadata("design:type", Boolean)
|
|
161
|
+
], FollowupConfigResponseDto.prototype, "noShowEnabled", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes after appointment finishes to send the wellness check', example: 1440 }),
|
|
164
|
+
(0, class_validator_1.IsInt)(),
|
|
165
|
+
(0, class_validator_1.Min)(1),
|
|
166
|
+
__metadata("design:type", Number)
|
|
167
|
+
], FollowupConfigResponseDto.prototype, "wellnessCheckDelayMinutes", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether wellness check follow-up is enabled' }),
|
|
170
|
+
(0, class_validator_1.IsBoolean)(),
|
|
171
|
+
__metadata("design:type", Boolean)
|
|
172
|
+
], FollowupConfigResponseDto.prototype, "wellnessCheckEnabled", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, swagger_1.ApiProperty)({ description: 'Minutes after appointment finishes to send the return suggestion', example: 2880 }),
|
|
175
|
+
(0, class_validator_1.IsInt)(),
|
|
176
|
+
(0, class_validator_1.Min)(1),
|
|
177
|
+
__metadata("design:type", Number)
|
|
178
|
+
], FollowupConfigResponseDto.prototype, "returnSuggestionDelayMinutes", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether return suggestion follow-up is enabled' }),
|
|
181
|
+
(0, class_validator_1.IsBoolean)(),
|
|
182
|
+
__metadata("design:type", Boolean)
|
|
183
|
+
], FollowupConfigResponseDto.prototype, "returnSuggestionEnabled", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether abandonment follow-up is enabled for this tenant' }),
|
|
186
|
+
(0, class_validator_1.IsBoolean)(),
|
|
187
|
+
__metadata("design:type", Boolean)
|
|
188
|
+
], FollowupConfigResponseDto.prototype, "enabled", void 0);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const TOPIC_MESSAGE_SENT = "MESSAGE_SENT";
|
|
2
|
+
export declare const TOPIC_MESSAGE_RECEIVED = "MESSAGE_RECEIVED";
|
|
3
|
+
export declare const TOPIC_FOLLOWUP_CONFIG_UPDATED = "FOLLOWUP_CONFIG_UPDATED";
|
|
4
|
+
export declare const TOPIC_APPOINTMENT_CHANGED = "APPOINTMENT_CHANGED";
|
|
5
|
+
export declare class FollowupConversationEventPayload {
|
|
6
|
+
tenant: string;
|
|
7
|
+
patientId: string;
|
|
8
|
+
sessionUuid: string;
|
|
9
|
+
unitId?: number;
|
|
10
|
+
messageType: 'ia' | 'human' | 'patient';
|
|
11
|
+
isFollowup?: boolean;
|
|
12
|
+
occurredAt: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class FollowupConfigUpdatedEventPayload {
|
|
15
|
+
tenant: string;
|
|
16
|
+
unitId?: number;
|
|
17
|
+
config: Record<string, unknown>;
|
|
18
|
+
occurredAt: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class AppointmentChangedEventPayload {
|
|
21
|
+
tenant: string;
|
|
22
|
+
appointmentId: string;
|
|
23
|
+
patientId: string;
|
|
24
|
+
status: string;
|
|
25
|
+
previousStatus?: string;
|
|
26
|
+
date?: string;
|
|
27
|
+
exitTime?: string;
|
|
28
|
+
occurredAt: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=followup-events.dto.d.ts.map
|
|
@@ -0,0 +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,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"}
|