tychat-contracts 1.6.44 → 1.6.46
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/analytics/event-analytic.enum.d.ts +1 -1
- package/dist/analytics/event-analytic.enum.d.ts.map +1 -1
- package/dist/analytics/event-analytic.enum.js +3 -0
- package/dist/analytics/followup-analytic-event-type.util.d.ts +3 -1
- package/dist/analytics/followup-analytic-event-type.util.d.ts.map +1 -1
- package/dist/analytics/followup-analytic-event-type.util.js +4 -1
- package/dist/appointments/appointment.dto.d.ts +1 -0
- package/dist/appointments/appointment.dto.d.ts.map +1 -1
- package/dist/appointments/create-appointment.dto.d.ts +1 -0
- package/dist/appointments/create-appointment.dto.d.ts.map +1 -1
- package/dist/appointments/create-appointment.dto.js +10 -0
- package/dist/conversations/followup-config-response.dto.d.ts +3 -0
- package/dist/conversations/followup-config-response.dto.d.ts.map +1 -1
- package/dist/conversations/followup-config-response.dto.js +29 -0
- package/dist/conversations/followup-type.dto.d.ts +2 -1
- package/dist/conversations/followup-type.dto.d.ts.map +1 -1
- package/dist/conversations/followup-type.dto.js +2 -0
- package/dist/panel-rbac/panel-permission-keys.d.ts +1 -0
- package/dist/panel-rbac/panel-permission-keys.d.ts.map +1 -1
- package/dist/panel-rbac/panel-permission-keys.js +1 -0
- package/dist/procedures/create-procedure.dto.d.ts +6 -1
- package/dist/procedures/create-procedure.dto.d.ts.map +1 -1
- package/dist/procedures/create-procedure.dto.js +39 -2
- package/dist/procedures/list-procedures-query.dto.d.ts +1 -1
- package/dist/procedures/list-procedures-query.dto.d.ts.map +1 -1
- package/dist/procedures/list-procedures-query.dto.js +3 -0
- package/dist/procedures/procedure-response.dto.d.ts +5 -1
- package/dist/procedures/procedure-response.dto.d.ts.map +1 -1
- package/dist/procedures/procedure-response.dto.js +20 -2
- package/package.json +1 -1
- package/src/analytics/event-analytic.enum.ts +3 -0
- package/src/analytics/followup-analytic-event-type.util.ts +8 -0
- package/src/appointments/appointment.dto.ts +5 -0
- package/src/appointments/create-appointment.dto.ts +9 -0
- package/src/conversations/followup-config-response.dto.ts +24 -0
- package/src/conversations/followup-type.dto.ts +2 -0
- package/src/panel-rbac/panel-permission-keys.ts +1 -0
- package/src/procedures/create-procedure.dto.ts +40 -2
- package/src/procedures/list-procedures-query.dto.ts +3 -0
- package/src/procedures/procedure-response.dto.ts +14 -2
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Enum of all analytic event types emitted by microservices.
|
|
3
3
|
* Each value follows the pattern: `domain.action`.
|
|
4
4
|
*/
|
|
5
|
-
export declare const EVENT_ANALYTIC_TYPES: readonly ["patient.created", "patient.updated", "patient.deleted", "patient.status_changed", "appointment.created", "appointment.updated", "appointment.canceled", "appointment.rescheduled", "appointment.no_show", "appointment.finished", "appointment.procedure_finished", "checkin.effectued", "checkout.effectued", "message.sent", "message.received", "conversation.session_started", "conversation.session_ended", "conversation.transferred_to_human", "followup.abandonment.sent", "followup.appointment_confirmation.sent", "followup.satisfaction_booking.sent", "followup.satisfaction_finished.sent", "followup.no_show_reschedule.sent", "followup.wellness_check.sent", "followup.return_suggestion.sent", "followup.satisfaction_booking.response_received", "followup.satisfaction_finished.response_received", "followup.config_updated", "payment.created", "payment.payed", "payment.refunded", "payment.canceled", "payment.overdue", "payment_gateway.payment_created", "payment_gateway.payment_confirmed", "payment_gateway.payment_failed", "payment_gateway.payment_refunded", "payment_gateway.payment_canceled", "payment_gateway.payment_expired", "payment_gateway.webhook_received", "billing.invoice_created", "billing.invoice_paid", "ai.interaction", "ai.fallback", "auth.login", "auth.logout", "auth.password_reset", "user.created", "user.updated", "user.deleted", "notification.sent", "notification.failed", "whatsapp.connection_established", "whatsapp.connection_lost", "whatsapp.official.credits.consume.failed", "whatsapp_credits.recharged", "procedure.created", "procedure.updated", "procedure.deleted", "specialty.created", "specialty.updated", "specialty.deleted", "professional.created", "professional.updated", "professional.deleted", "configuration.updated", "legal_term.template.updated", "storage.file_uploaded", "storage.file_deleted", "tenant.created", "tenant.updated"];
|
|
5
|
+
export declare const EVENT_ANALYTIC_TYPES: readonly ["patient.created", "patient.updated", "patient.deleted", "patient.status_changed", "appointment.created", "appointment.updated", "appointment.canceled", "appointment.rescheduled", "appointment.no_show", "appointment.finished", "appointment.procedure_finished", "checkin.effectued", "checkout.effectued", "message.sent", "message.received", "conversation.session_started", "conversation.session_ended", "conversation.transferred_to_human", "followup.abandonment.sent", "followup.appointment_confirmation.sent", "followup.appointment_confirmation.confirmed", "followup.appointment_confirmation.reschedule_requested", "followup.satisfaction_booking.sent", "followup.satisfaction_finished.sent", "followup.no_show_reschedule.sent", "followup.checkin_not_completed.sent", "followup.wellness_check.sent", "followup.return_suggestion.sent", "followup.satisfaction_booking.response_received", "followup.satisfaction_finished.response_received", "followup.config_updated", "payment.created", "payment.payed", "payment.refunded", "payment.canceled", "payment.overdue", "payment_gateway.payment_created", "payment_gateway.payment_confirmed", "payment_gateway.payment_failed", "payment_gateway.payment_refunded", "payment_gateway.payment_canceled", "payment_gateway.payment_expired", "payment_gateway.webhook_received", "billing.invoice_created", "billing.invoice_paid", "ai.interaction", "ai.fallback", "auth.login", "auth.logout", "auth.password_reset", "user.created", "user.updated", "user.deleted", "notification.sent", "notification.failed", "whatsapp.connection_established", "whatsapp.connection_lost", "whatsapp.official.credits.consume.failed", "whatsapp_credits.recharged", "procedure.created", "procedure.updated", "procedure.deleted", "specialty.created", "specialty.updated", "specialty.deleted", "professional.created", "professional.updated", "professional.deleted", "configuration.updated", "legal_term.template.updated", "storage.file_uploaded", "storage.file_deleted", "tenant.created", "tenant.updated"];
|
|
6
6
|
export type EventAnalyticType = (typeof EVENT_ANALYTIC_TYPES)[number];
|
|
7
7
|
//# sourceMappingURL=event-analytic.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-analytic.enum.d.ts","sourceRoot":"","sources":["../../src/analytics/event-analytic.enum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"event-analytic.enum.d.ts","sourceRoot":"","sources":["../../src/analytics/event-analytic.enum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,u+DAqHvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -33,9 +33,12 @@ exports.EVENT_ANALYTIC_TYPES = [
|
|
|
33
33
|
// ── Follow-up events (tychat-followup-service) ─────────────────
|
|
34
34
|
'followup.abandonment.sent',
|
|
35
35
|
'followup.appointment_confirmation.sent',
|
|
36
|
+
'followup.appointment_confirmation.confirmed',
|
|
37
|
+
'followup.appointment_confirmation.reschedule_requested',
|
|
36
38
|
'followup.satisfaction_booking.sent',
|
|
37
39
|
'followup.satisfaction_finished.sent',
|
|
38
40
|
'followup.no_show_reschedule.sent',
|
|
41
|
+
'followup.checkin_not_completed.sent',
|
|
39
42
|
'followup.wellness_check.sent',
|
|
40
43
|
'followup.return_suggestion.sent',
|
|
41
44
|
'followup.satisfaction_booking.response_received',
|
|
@@ -3,10 +3,12 @@ import type { EventAnalyticType } from './event-analytic.enum';
|
|
|
3
3
|
* Tipos de follow-up baseados em agendamento (fila `followup-appointment`),
|
|
4
4
|
* alinhados a {@link FOLLOWUP_TYPES} exceto `abandonment`.
|
|
5
5
|
*/
|
|
6
|
-
export type FollowupAppointmentDispatchKind = 'appointment_confirmation' | 'satisfaction_booking' | 'satisfaction_finished' | 'no_show_reschedule' | 'wellness_check' | 'return_suggestion';
|
|
6
|
+
export type FollowupAppointmentDispatchKind = 'appointment_confirmation' | 'satisfaction_booking' | 'satisfaction_finished' | 'no_show_reschedule' | 'checkin_not_completed' | 'wellness_check' | 'return_suggestion';
|
|
7
7
|
export declare function followupAppointmentSentEventType(kind: FollowupAppointmentDispatchKind): EventAnalyticType;
|
|
8
8
|
export type FollowupSatisfactionSurveyKind = 'satisfaction_booking' | 'satisfaction_finished';
|
|
9
9
|
export declare function followupSatisfactionResponseEventType(satisfactionType: FollowupSatisfactionSurveyKind): EventAnalyticType;
|
|
10
10
|
/** Evento quando um passo de abandono é enviado com sucesso. */
|
|
11
11
|
export declare const FOLLOWUP_ABANDONMENT_SENT_EVENT: EventAnalyticType;
|
|
12
|
+
export declare const FOLLOWUP_APPOINTMENT_CONFIRMATION_CONFIRMED_EVENT: EventAnalyticType;
|
|
13
|
+
export declare const FOLLOWUP_APPOINTMENT_CONFIRMATION_RESCHEDULE_REQUESTED_EVENT: EventAnalyticType;
|
|
12
14
|
//# sourceMappingURL=followup-analytic-event-type.util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followup-analytic-event-type.util.d.ts","sourceRoot":"","sources":["../../src/analytics/followup-analytic-event-type.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GACvC,0BAA0B,GAC1B,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,gBAAgB,GAChB,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"followup-analytic-event-type.util.d.ts","sourceRoot":"","sources":["../../src/analytics/followup-analytic-event-type.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GACvC,0BAA0B,GAC1B,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,uBAAuB,GACvB,gBAAgB,GAChB,mBAAmB,CAAC;AAYxB,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,+BAA+B,GACpC,iBAAiB,CAEnB;AAED,MAAM,MAAM,8BAA8B,GACtC,sBAAsB,GACtB,uBAAuB,CAAC;AAE5B,wBAAgB,qCAAqC,CACnD,gBAAgB,EAAE,8BAA8B,GAC/C,iBAAiB,CAKnB;AAED,gEAAgE;AAChE,eAAO,MAAM,+BAA+B,EAAE,iBAA+C,CAAC;AAE9F,eAAO,MAAM,iDAAiD,EAAE,iBACjB,CAAC;AAEhD,eAAO,MAAM,4DAA4D,EAAE,iBACjB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FOLLOWUP_ABANDONMENT_SENT_EVENT = void 0;
|
|
3
|
+
exports.FOLLOWUP_APPOINTMENT_CONFIRMATION_RESCHEDULE_REQUESTED_EVENT = exports.FOLLOWUP_APPOINTMENT_CONFIRMATION_CONFIRMED_EVENT = exports.FOLLOWUP_ABANDONMENT_SENT_EVENT = void 0;
|
|
4
4
|
exports.followupAppointmentSentEventType = followupAppointmentSentEventType;
|
|
5
5
|
exports.followupSatisfactionResponseEventType = followupSatisfactionResponseEventType;
|
|
6
6
|
const APPOINTMENT_SENT = {
|
|
@@ -8,6 +8,7 @@ const APPOINTMENT_SENT = {
|
|
|
8
8
|
satisfaction_booking: 'followup.satisfaction_booking.sent',
|
|
9
9
|
satisfaction_finished: 'followup.satisfaction_finished.sent',
|
|
10
10
|
no_show_reschedule: 'followup.no_show_reschedule.sent',
|
|
11
|
+
checkin_not_completed: 'followup.checkin_not_completed.sent',
|
|
11
12
|
wellness_check: 'followup.wellness_check.sent',
|
|
12
13
|
return_suggestion: 'followup.return_suggestion.sent',
|
|
13
14
|
};
|
|
@@ -22,3 +23,5 @@ function followupSatisfactionResponseEventType(satisfactionType) {
|
|
|
22
23
|
}
|
|
23
24
|
/** Evento quando um passo de abandono é enviado com sucesso. */
|
|
24
25
|
exports.FOLLOWUP_ABANDONMENT_SENT_EVENT = 'followup.abandonment.sent';
|
|
26
|
+
exports.FOLLOWUP_APPOINTMENT_CONFIRMATION_CONFIRMED_EVENT = 'followup.appointment_confirmation.confirmed';
|
|
27
|
+
exports.FOLLOWUP_APPOINTMENT_CONFIRMATION_RESCHEDULE_REQUESTED_EVENT = 'followup.appointment_confirmation.reschedule_requested';
|
|
@@ -26,6 +26,7 @@ export interface AppointmentDto {
|
|
|
26
26
|
observation?: string;
|
|
27
27
|
cancellationReason?: string;
|
|
28
28
|
status: AppointmentStatusDto;
|
|
29
|
+
patientConfirmedAt?: string;
|
|
29
30
|
appointmentType: AppointmentTypeDto;
|
|
30
31
|
rescheduledFromId?: string;
|
|
31
32
|
returnFromAppointmentId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEpF,mEAAmE;AACnE,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mFAAmF;IACnF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IAMX,SAAS,EAAE,MAAM,CAAC;IAKlB,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,OAAO,CAAC;IAK1B,iBAAiB,EAAE,OAAO,CAAC;IAK3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,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
|
+
{"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,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,eAAe,EAAE,kBAAkB,CAAC;IAKpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAK3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAIjC,UAAU,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAChD"}
|
|
@@ -10,6 +10,7 @@ export declare class CreateAppointmentDto {
|
|
|
10
10
|
observation?: string;
|
|
11
11
|
cancellationReason?: string;
|
|
12
12
|
status?: AppointmentStatusDto;
|
|
13
|
+
patientConfirmedAt?: string;
|
|
13
14
|
appointmentType?: AppointmentTypeDto;
|
|
14
15
|
rescheduledFromId?: string;
|
|
15
16
|
returnFromAppointmentId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,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;IAWjC,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAQ9C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAW7B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC"}
|
|
1
|
+
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,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,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAS5B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAQrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAQ3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAWjC,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAQ9C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAW7B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC"}
|
|
@@ -25,6 +25,7 @@ class CreateAppointmentDto {
|
|
|
25
25
|
observation;
|
|
26
26
|
cancellationReason;
|
|
27
27
|
status;
|
|
28
|
+
patientConfirmedAt;
|
|
28
29
|
appointmentType;
|
|
29
30
|
rescheduledFromId;
|
|
30
31
|
returnFromAppointmentId;
|
|
@@ -116,6 +117,15 @@ __decorate([
|
|
|
116
117
|
(0, class_validator_1.IsEnum)(appointment_status_dto_1.APPOINTMENT_STATUSES),
|
|
117
118
|
__metadata("design:type", String)
|
|
118
119
|
], CreateAppointmentDto.prototype, "status", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
122
|
+
description: 'Data/hora em que o paciente confirmou presença via WhatsApp (ISO 8601)',
|
|
123
|
+
example: '2026-03-14T10:30:00.000Z',
|
|
124
|
+
}),
|
|
125
|
+
(0, class_validator_1.IsOptional)(),
|
|
126
|
+
(0, class_validator_1.IsDateString)(),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], CreateAppointmentDto.prototype, "patientConfirmedAt", void 0);
|
|
119
129
|
__decorate([
|
|
120
130
|
(0, swagger_1.ApiPropertyOptional)({
|
|
121
131
|
description: 'Tipo do agendamento (regular ou retorno)',
|
|
@@ -21,6 +21,8 @@ export declare class FollowupConfigResponseDto {
|
|
|
21
21
|
satisfactionFinishedEnabled: boolean;
|
|
22
22
|
noShowDelayMinutes: number;
|
|
23
23
|
noShowEnabled: boolean;
|
|
24
|
+
checkinNotCompletedDelayMinutes: number;
|
|
25
|
+
checkinNotCompletedEnabled: boolean;
|
|
24
26
|
wellnessCheckDelayMinutes: number;
|
|
25
27
|
wellnessCheckEnabled: boolean;
|
|
26
28
|
returnSuggestionDelayMinutes: number;
|
|
@@ -29,6 +31,7 @@ export declare class FollowupConfigResponseDto {
|
|
|
29
31
|
templateSatisfactionBooking?: string;
|
|
30
32
|
templateSatisfactionFinished?: string;
|
|
31
33
|
templateNoShowReschedule?: string;
|
|
34
|
+
templateCheckinNotCompleted?: string;
|
|
32
35
|
templateWellnessCheck?: string;
|
|
33
36
|
templateReturnSuggestion?: string;
|
|
34
37
|
templateAbandonment?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followup-config-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-config-response.dto.ts"],"names":[],"mappings":"AAWA;;;;;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;
|
|
1
|
+
{"version":3,"file":"followup-config-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-config-response.dto.ts"],"names":[],"mappings":"AAWA;;;;;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;IAYvB,+BAA+B,EAAE,MAAM,CAAC;IAIxC,0BAA0B,EAAE,OAAO,CAAC;IASpC,yBAAyB,EAAE,MAAM,CAAC;IAIlC,oBAAoB,EAAE,OAAO,CAAC;IAS9B,4BAA4B,EAAE,MAAM,CAAC;IAIrC,uBAAuB,EAAE,OAAO,CAAC;IAYjC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAQzC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAQrC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IAQtC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAQlC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAQrC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAQ/B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAQlC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAQ7B,OAAO,EAAE,OAAO,CAAC;IASjB,mCAAmC,EAAE,MAAM,CAAC;IAS5C,oCAAoC,EAAE,MAAM,CAAC;IAS7C,qCAAqC,EAAE,MAAM,CAAC;IAS9C,wCAAwC,EAAE,MAAM,CAAC;IASjD,8BAA8B,EAAE,MAAM,CAAC;IASvC,+BAA+B,EAAE,MAAM,CAAC;IASxC,gCAAgC,EAAE,MAAM,CAAC;IASzC,6BAA6B,EAAE,MAAM,CAAC;IAUtC,+BAA+B,EAAE,MAAM,CAAC;CACzC"}
|
|
@@ -48,6 +48,11 @@ class FollowupConfigResponseDto {
|
|
|
48
48
|
noShowDelayMinutes;
|
|
49
49
|
noShowEnabled;
|
|
50
50
|
// ---------------------------------------------------------------------------
|
|
51
|
+
// Check-in not completed settings
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
checkinNotCompletedDelayMinutes;
|
|
54
|
+
checkinNotCompletedEnabled;
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
51
56
|
// Wellness check settings
|
|
52
57
|
// ---------------------------------------------------------------------------
|
|
53
58
|
wellnessCheckDelayMinutes;
|
|
@@ -64,6 +69,7 @@ class FollowupConfigResponseDto {
|
|
|
64
69
|
templateSatisfactionBooking;
|
|
65
70
|
templateSatisfactionFinished;
|
|
66
71
|
templateNoShowReschedule;
|
|
72
|
+
templateCheckinNotCompleted;
|
|
67
73
|
templateWellnessCheck;
|
|
68
74
|
templateReturnSuggestion;
|
|
69
75
|
templateAbandonment;
|
|
@@ -178,6 +184,20 @@ __decorate([
|
|
|
178
184
|
(0, class_validator_1.IsBoolean)(),
|
|
179
185
|
__metadata("design:type", Boolean)
|
|
180
186
|
], FollowupConfigResponseDto.prototype, "noShowEnabled", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, swagger_1.ApiProperty)({
|
|
189
|
+
description: 'Minutes after appointment date to send follow-up when check-in was not completed',
|
|
190
|
+
example: 60,
|
|
191
|
+
}),
|
|
192
|
+
(0, class_validator_1.IsInt)(),
|
|
193
|
+
(0, class_validator_1.Min)(1),
|
|
194
|
+
__metadata("design:type", Number)
|
|
195
|
+
], FollowupConfigResponseDto.prototype, "checkinNotCompletedDelayMinutes", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether check-in not completed follow-up is enabled' }),
|
|
198
|
+
(0, class_validator_1.IsBoolean)(),
|
|
199
|
+
__metadata("design:type", Boolean)
|
|
200
|
+
], FollowupConfigResponseDto.prototype, "checkinNotCompletedEnabled", void 0);
|
|
181
201
|
__decorate([
|
|
182
202
|
(0, swagger_1.ApiProperty)({ description: 'Minutes after appointment finishes to send the wellness check', example: 1440 }),
|
|
183
203
|
(0, class_validator_1.IsInt)(),
|
|
@@ -236,6 +256,15 @@ __decorate([
|
|
|
236
256
|
(0, class_validator_1.IsString)(),
|
|
237
257
|
__metadata("design:type", String)
|
|
238
258
|
], FollowupConfigResponseDto.prototype, "templateNoShowReschedule", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
261
|
+
description: 'WhatsApp Official template name for check-in not completed follow-ups',
|
|
262
|
+
example: 'checkin_not_completed',
|
|
263
|
+
}),
|
|
264
|
+
(0, class_validator_1.IsOptional)(),
|
|
265
|
+
(0, class_validator_1.IsString)(),
|
|
266
|
+
__metadata("design:type", String)
|
|
267
|
+
], FollowupConfigResponseDto.prototype, "templateCheckinNotCompleted", void 0);
|
|
239
268
|
__decorate([
|
|
240
269
|
(0, swagger_1.ApiPropertyOptional)({
|
|
241
270
|
description: 'WhatsApp Official template name for wellness check follow-ups',
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* - "satisfaction_booking" → Satisfaction survey after the patient books an appointment.
|
|
7
7
|
* - "satisfaction_finished" → Satisfaction survey after an appointment is marked as finished.
|
|
8
8
|
* - "no_show_reschedule" → Follow-up for patients who did not show up (no_show status).
|
|
9
|
+
* - "checkin_not_completed" → Follow-up for appointments without check-in after configured delay.
|
|
9
10
|
* - "wellness_check" → Check on patient well-being after procedures (side effects).
|
|
10
11
|
* - "return_suggestion" → Suggest a return visit based on procedure return_days.
|
|
11
12
|
*/
|
|
12
|
-
export declare const FOLLOWUP_TYPES: readonly ["abandonment", "appointment_confirmation", "satisfaction_booking", "satisfaction_finished", "no_show_reschedule", "wellness_check", "return_suggestion"];
|
|
13
|
+
export declare const FOLLOWUP_TYPES: readonly ["abandonment", "appointment_confirmation", "satisfaction_booking", "satisfaction_finished", "no_show_reschedule", "checkin_not_completed", "wellness_check", "return_suggestion"];
|
|
13
14
|
export type FollowupTypeDto = (typeof FOLLOWUP_TYPES)[number];
|
|
14
15
|
//# sourceMappingURL=followup-type.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followup-type.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-type.dto.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"followup-type.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-type.dto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,6LASjB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -9,6 +9,7 @@ exports.FOLLOWUP_TYPES = void 0;
|
|
|
9
9
|
* - "satisfaction_booking" → Satisfaction survey after the patient books an appointment.
|
|
10
10
|
* - "satisfaction_finished" → Satisfaction survey after an appointment is marked as finished.
|
|
11
11
|
* - "no_show_reschedule" → Follow-up for patients who did not show up (no_show status).
|
|
12
|
+
* - "checkin_not_completed" → Follow-up for appointments without check-in after configured delay.
|
|
12
13
|
* - "wellness_check" → Check on patient well-being after procedures (side effects).
|
|
13
14
|
* - "return_suggestion" → Suggest a return visit based on procedure return_days.
|
|
14
15
|
*/
|
|
@@ -18,6 +19,7 @@ exports.FOLLOWUP_TYPES = [
|
|
|
18
19
|
'satisfaction_booking',
|
|
19
20
|
'satisfaction_finished',
|
|
20
21
|
'no_show_reschedule',
|
|
22
|
+
'checkin_not_completed',
|
|
21
23
|
'wellness_check',
|
|
22
24
|
'return_suggestion',
|
|
23
25
|
];
|
|
@@ -9,6 +9,7 @@ export declare const PANEL_RESOURCE_ACTIONS: {
|
|
|
9
9
|
readonly tenant_billings: readonly ["view", "create", "update", "delete"];
|
|
10
10
|
readonly tenant_connections: readonly ["view", "update"];
|
|
11
11
|
readonly tenant_ai_tokens: readonly ["view", "update"];
|
|
12
|
+
readonly tenant_whatsapp_credits: readonly ["view", "update"];
|
|
12
13
|
readonly audit_logs: readonly ["view"];
|
|
13
14
|
readonly plans: readonly ["view", "create", "update"];
|
|
14
15
|
readonly configurations: readonly ["view", "update"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-permission-keys.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/panel-permission-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"panel-permission-keys.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/panel-permission-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;CA2BzB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAEhE,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,aAAa,IAC7C,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAS7C,eAAO,MAAM,qBAAqB,EAAW,SAAS,MAAM,EAAE,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,GACjC,kBAAkB,CAEpB"}
|
|
@@ -22,6 +22,7 @@ exports.PANEL_RESOURCE_ACTIONS = {
|
|
|
22
22
|
tenant_billings: ['view', 'create', 'update', 'delete'],
|
|
23
23
|
tenant_connections: ['view', 'update'],
|
|
24
24
|
tenant_ai_tokens: ['view', 'update'],
|
|
25
|
+
tenant_whatsapp_credits: ['view', 'update'],
|
|
25
26
|
audit_logs: ['view'],
|
|
26
27
|
plans: ['view', 'create', 'update'],
|
|
27
28
|
configurations: ['view', 'update'],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const PROCEDURE_PRICING_TYPES: readonly ["fixed", "variable"];
|
|
2
|
+
export type ProcedurePricingTypeDto = (typeof PROCEDURE_PRICING_TYPES)[number];
|
|
1
3
|
export declare class CreateProcedureDto {
|
|
2
4
|
name: string;
|
|
3
5
|
category?: string | null;
|
|
@@ -5,7 +7,10 @@ export declare class CreateProcedureDto {
|
|
|
5
7
|
blockTime?: number | null;
|
|
6
8
|
defaultValue?: number | null;
|
|
7
9
|
returnDays?: number | null;
|
|
8
|
-
|
|
10
|
+
pricingType: ProcedurePricingTypeDto;
|
|
11
|
+
value?: number;
|
|
12
|
+
minValue?: number;
|
|
13
|
+
maxValue?: number;
|
|
9
14
|
duration: number;
|
|
10
15
|
side_effects?: string | null;
|
|
11
16
|
specialtyId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/create-procedure.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/create-procedure.dto.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,uBAAuB,gCAAiC,CAAC;AACtE,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,qBAAa,kBAAkB;IAS7B,IAAI,EAAE,MAAM,CAAC;IAUb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAUzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAS7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,WAAW,EAAE,uBAAuB,CAAC;IAUrC,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,QAAQ,EAAE,MAAM,CAAC;IAUjB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -9,9 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateProcedureDto = void 0;
|
|
12
|
+
exports.CreateProcedureDto = exports.PROCEDURE_PRICING_TYPES = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
exports.PROCEDURE_PRICING_TYPES = ['fixed', 'variable'];
|
|
15
16
|
class CreateProcedureDto {
|
|
16
17
|
name;
|
|
17
18
|
category;
|
|
@@ -19,7 +20,10 @@ class CreateProcedureDto {
|
|
|
19
20
|
blockTime;
|
|
20
21
|
defaultValue;
|
|
21
22
|
returnDays;
|
|
23
|
+
pricingType;
|
|
22
24
|
value;
|
|
25
|
+
minValue;
|
|
26
|
+
maxValue;
|
|
23
27
|
duration;
|
|
24
28
|
side_effects;
|
|
25
29
|
specialtyId;
|
|
@@ -90,13 +94,46 @@ __decorate([
|
|
|
90
94
|
], CreateProcedureDto.prototype, "returnDays", void 0);
|
|
91
95
|
__decorate([
|
|
92
96
|
(0, swagger_1.ApiProperty)({
|
|
93
|
-
description: '
|
|
97
|
+
description: 'Tipo de precificacao do procedimento',
|
|
98
|
+
enum: exports.PROCEDURE_PRICING_TYPES,
|
|
99
|
+
example: 'fixed',
|
|
100
|
+
}),
|
|
101
|
+
(0, class_validator_1.IsIn)(exports.PROCEDURE_PRICING_TYPES),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], CreateProcedureDto.prototype, "pricingType", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
106
|
+
description: 'Valor fixo do procedimento (obrigatorio quando pricingType = fixed)',
|
|
94
107
|
example: 150.5,
|
|
95
108
|
}),
|
|
109
|
+
(0, class_validator_1.ValidateIf)((o) => o.pricingType === 'fixed'),
|
|
110
|
+
(0, class_validator_1.IsDefined)(),
|
|
96
111
|
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
97
112
|
(0, class_validator_1.Min)(0),
|
|
98
113
|
__metadata("design:type", Number)
|
|
99
114
|
], CreateProcedureDto.prototype, "value", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
117
|
+
description: 'Valor minimo da faixa de preco (obrigatorio quando pricingType = variable)',
|
|
118
|
+
example: 120,
|
|
119
|
+
}),
|
|
120
|
+
(0, class_validator_1.ValidateIf)((o) => o.pricingType === 'variable'),
|
|
121
|
+
(0, class_validator_1.IsDefined)(),
|
|
122
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
123
|
+
(0, class_validator_1.Min)(0),
|
|
124
|
+
__metadata("design:type", Number)
|
|
125
|
+
], CreateProcedureDto.prototype, "minValue", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
128
|
+
description: 'Valor maximo da faixa de preco (obrigatorio quando pricingType = variable)',
|
|
129
|
+
example: 220,
|
|
130
|
+
}),
|
|
131
|
+
(0, class_validator_1.ValidateIf)((o) => o.pricingType === 'variable'),
|
|
132
|
+
(0, class_validator_1.IsDefined)(),
|
|
133
|
+
(0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
|
|
134
|
+
(0, class_validator_1.Min)(0),
|
|
135
|
+
__metadata("design:type", Number)
|
|
136
|
+
], CreateProcedureDto.prototype, "maxValue", void 0);
|
|
100
137
|
__decorate([
|
|
101
138
|
(0, swagger_1.ApiProperty)({
|
|
102
139
|
description: 'Duração do procedimento em minutos',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ParsedFilterDto } from '../filters/parsed-filter.dto';
|
|
2
|
-
export declare const PROCEDURE_LIST_FILTER_KEYS: readonly ["id", "name", "category", "description", "blockTime", "defaultValue", "returnDays", "value", "duration", "sideEffects", "specialtyId", "createdAt", "updatedAt", "deletedAt"];
|
|
2
|
+
export declare const PROCEDURE_LIST_FILTER_KEYS: readonly ["id", "name", "category", "description", "blockTime", "defaultValue", "returnDays", "value", "pricingType", "minValue", "maxValue", "duration", "sideEffects", "specialtyId", "createdAt", "updatedAt", "deletedAt"];
|
|
3
3
|
export type ProcedureListFilterKeyDto = (typeof PROCEDURE_LIST_FILTER_KEYS)[number];
|
|
4
4
|
export declare class ListProceduresQueryDto {
|
|
5
5
|
page?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-procedures-query.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/list-procedures-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"list-procedures-query.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/list-procedures-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,eAAO,MAAM,0BAA0B,gOAkB7B,CAAC;AACX,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpF,qBAAa,sBAAsB;IAUjC,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAYf,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SpecialtyEmbedDto } from './specialty-embed.dto';
|
|
2
|
+
import { ProcedurePricingTypeDto } from './create-procedure.dto';
|
|
2
3
|
/**
|
|
3
4
|
* Procedimento como retornado pela API (inclui especialidade carregada).
|
|
4
5
|
*/
|
|
@@ -10,7 +11,10 @@ export declare class ProcedureResponseDto {
|
|
|
10
11
|
blockTime: number | null;
|
|
11
12
|
defaultValue: number | null;
|
|
12
13
|
returnDays: number | null;
|
|
13
|
-
|
|
14
|
+
pricingType: ProcedurePricingTypeDto;
|
|
15
|
+
value: number | null;
|
|
16
|
+
minValue: number | null;
|
|
17
|
+
maxValue: number | null;
|
|
14
18
|
duration: number;
|
|
15
19
|
side_effects: string | null;
|
|
16
20
|
specialtyId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedure-response.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/procedure-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"procedure-response.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/procedure-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAA2B,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAE1F;;GAEG;AACH,qBAAa,oBAAoB;IAE/B,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAK1B,WAAW,EAAE,uBAAuB,CAAC;IAGrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,QAAQ,EAAE,MAAM,CAAC;IAGjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAK5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,iBAAiB,CAAC;IAG7B,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProcedureResponseDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const specialty_embed_dto_1 = require("./specialty-embed.dto");
|
|
15
|
+
const create_procedure_dto_1 = require("./create-procedure.dto");
|
|
15
16
|
/**
|
|
16
17
|
* Procedimento como retornado pela API (inclui especialidade carregada).
|
|
17
18
|
*/
|
|
@@ -23,7 +24,10 @@ class ProcedureResponseDto {
|
|
|
23
24
|
blockTime;
|
|
24
25
|
defaultValue;
|
|
25
26
|
returnDays;
|
|
27
|
+
pricingType;
|
|
26
28
|
value;
|
|
29
|
+
minValue;
|
|
30
|
+
maxValue;
|
|
27
31
|
duration;
|
|
28
32
|
side_effects;
|
|
29
33
|
specialtyId;
|
|
@@ -62,9 +66,23 @@ __decorate([
|
|
|
62
66
|
__metadata("design:type", Object)
|
|
63
67
|
], ProcedureResponseDto.prototype, "returnDays", void 0);
|
|
64
68
|
__decorate([
|
|
65
|
-
(0, swagger_1.ApiProperty)(
|
|
66
|
-
|
|
69
|
+
(0, swagger_1.ApiProperty)({
|
|
70
|
+
enum: create_procedure_dto_1.PROCEDURE_PRICING_TYPES,
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], ProcedureResponseDto.prototype, "pricingType", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
76
|
+
__metadata("design:type", Object)
|
|
67
77
|
], ProcedureResponseDto.prototype, "value", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], ProcedureResponseDto.prototype, "minValue", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], ProcedureResponseDto.prototype, "maxValue", void 0);
|
|
68
86
|
__decorate([
|
|
69
87
|
(0, swagger_1.ApiProperty)(),
|
|
70
88
|
__metadata("design:type", Number)
|
package/package.json
CHANGED
|
@@ -35,9 +35,12 @@ export const EVENT_ANALYTIC_TYPES = [
|
|
|
35
35
|
// ── Follow-up events (tychat-followup-service) ─────────────────
|
|
36
36
|
'followup.abandonment.sent',
|
|
37
37
|
'followup.appointment_confirmation.sent',
|
|
38
|
+
'followup.appointment_confirmation.confirmed',
|
|
39
|
+
'followup.appointment_confirmation.reschedule_requested',
|
|
38
40
|
'followup.satisfaction_booking.sent',
|
|
39
41
|
'followup.satisfaction_finished.sent',
|
|
40
42
|
'followup.no_show_reschedule.sent',
|
|
43
|
+
'followup.checkin_not_completed.sent',
|
|
41
44
|
'followup.wellness_check.sent',
|
|
42
45
|
'followup.return_suggestion.sent',
|
|
43
46
|
'followup.satisfaction_booking.response_received',
|
|
@@ -9,6 +9,7 @@ export type FollowupAppointmentDispatchKind =
|
|
|
9
9
|
| 'satisfaction_booking'
|
|
10
10
|
| 'satisfaction_finished'
|
|
11
11
|
| 'no_show_reschedule'
|
|
12
|
+
| 'checkin_not_completed'
|
|
12
13
|
| 'wellness_check'
|
|
13
14
|
| 'return_suggestion';
|
|
14
15
|
|
|
@@ -17,6 +18,7 @@ const APPOINTMENT_SENT: Record<FollowupAppointmentDispatchKind, EventAnalyticTyp
|
|
|
17
18
|
satisfaction_booking: 'followup.satisfaction_booking.sent',
|
|
18
19
|
satisfaction_finished: 'followup.satisfaction_finished.sent',
|
|
19
20
|
no_show_reschedule: 'followup.no_show_reschedule.sent',
|
|
21
|
+
checkin_not_completed: 'followup.checkin_not_completed.sent',
|
|
20
22
|
wellness_check: 'followup.wellness_check.sent',
|
|
21
23
|
return_suggestion: 'followup.return_suggestion.sent',
|
|
22
24
|
};
|
|
@@ -42,3 +44,9 @@ export function followupSatisfactionResponseEventType(
|
|
|
42
44
|
|
|
43
45
|
/** Evento quando um passo de abandono é enviado com sucesso. */
|
|
44
46
|
export const FOLLOWUP_ABANDONMENT_SENT_EVENT: EventAnalyticType = 'followup.abandonment.sent';
|
|
47
|
+
|
|
48
|
+
export const FOLLOWUP_APPOINTMENT_CONFIRMATION_CONFIRMED_EVENT: EventAnalyticType =
|
|
49
|
+
'followup.appointment_confirmation.confirmed';
|
|
50
|
+
|
|
51
|
+
export const FOLLOWUP_APPOINTMENT_CONFIRMATION_RESCHEDULE_REQUESTED_EVENT: EventAnalyticType =
|
|
52
|
+
'followup.appointment_confirmation.reschedule_requested';
|
|
@@ -66,6 +66,11 @@ export interface AppointmentDto {
|
|
|
66
66
|
*/
|
|
67
67
|
status: AppointmentStatusDto;
|
|
68
68
|
/*
|
|
69
|
+
* Data/hora em que o paciente confirmou presença via WhatsApp (ISO 8601)
|
|
70
|
+
* @example '2026-03-14T10:30:00.000Z'
|
|
71
|
+
*/
|
|
72
|
+
patientConfirmedAt?: string;
|
|
73
|
+
/*
|
|
69
74
|
* Type of the appointment (regular or return visit)
|
|
70
75
|
* @example 'regular'
|
|
71
76
|
*/
|
|
@@ -96,6 +96,15 @@ export class CreateAppointmentDto {
|
|
|
96
96
|
@IsEnum(APPOINTMENT_STATUSES)
|
|
97
97
|
status?: AppointmentStatusDto;
|
|
98
98
|
|
|
99
|
+
@ApiPropertyOptional({
|
|
100
|
+
description:
|
|
101
|
+
'Data/hora em que o paciente confirmou presença via WhatsApp (ISO 8601)',
|
|
102
|
+
example: '2026-03-14T10:30:00.000Z',
|
|
103
|
+
})
|
|
104
|
+
@IsOptional()
|
|
105
|
+
@IsDateString()
|
|
106
|
+
patientConfirmedAt?: string;
|
|
107
|
+
|
|
99
108
|
@ApiPropertyOptional({
|
|
100
109
|
description: 'Tipo do agendamento (regular ou retorno)',
|
|
101
110
|
enum: APPOINTMENT_TYPES,
|
|
@@ -112,6 +112,22 @@ export class FollowupConfigResponseDto {
|
|
|
112
112
|
@IsBoolean()
|
|
113
113
|
noShowEnabled: boolean;
|
|
114
114
|
|
|
115
|
+
// ---------------------------------------------------------------------------
|
|
116
|
+
// Check-in not completed settings
|
|
117
|
+
// ---------------------------------------------------------------------------
|
|
118
|
+
|
|
119
|
+
@ApiProperty({
|
|
120
|
+
description: 'Minutes after appointment date to send follow-up when check-in was not completed',
|
|
121
|
+
example: 60,
|
|
122
|
+
})
|
|
123
|
+
@IsInt()
|
|
124
|
+
@Min(1)
|
|
125
|
+
checkinNotCompletedDelayMinutes: number;
|
|
126
|
+
|
|
127
|
+
@ApiProperty({ description: 'Whether check-in not completed follow-up is enabled' })
|
|
128
|
+
@IsBoolean()
|
|
129
|
+
checkinNotCompletedEnabled: boolean;
|
|
130
|
+
|
|
115
131
|
// ---------------------------------------------------------------------------
|
|
116
132
|
// Wellness check settings
|
|
117
133
|
// ---------------------------------------------------------------------------
|
|
@@ -174,6 +190,14 @@ export class FollowupConfigResponseDto {
|
|
|
174
190
|
@IsString()
|
|
175
191
|
templateNoShowReschedule?: string;
|
|
176
192
|
|
|
193
|
+
@ApiPropertyOptional({
|
|
194
|
+
description: 'WhatsApp Official template name for check-in not completed follow-ups',
|
|
195
|
+
example: 'checkin_not_completed',
|
|
196
|
+
})
|
|
197
|
+
@IsOptional()
|
|
198
|
+
@IsString()
|
|
199
|
+
templateCheckinNotCompleted?: string;
|
|
200
|
+
|
|
177
201
|
@ApiPropertyOptional({
|
|
178
202
|
description: 'WhatsApp Official template name for wellness check follow-ups',
|
|
179
203
|
example: 'wellness_check',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* - "satisfaction_booking" → Satisfaction survey after the patient books an appointment.
|
|
7
7
|
* - "satisfaction_finished" → Satisfaction survey after an appointment is marked as finished.
|
|
8
8
|
* - "no_show_reschedule" → Follow-up for patients who did not show up (no_show status).
|
|
9
|
+
* - "checkin_not_completed" → Follow-up for appointments without check-in after configured delay.
|
|
9
10
|
* - "wellness_check" → Check on patient well-being after procedures (side effects).
|
|
10
11
|
* - "return_suggestion" → Suggest a return visit based on procedure return_days.
|
|
11
12
|
*/
|
|
@@ -15,6 +16,7 @@ export const FOLLOWUP_TYPES = [
|
|
|
15
16
|
'satisfaction_booking',
|
|
16
17
|
'satisfaction_finished',
|
|
17
18
|
'no_show_reschedule',
|
|
19
|
+
'checkin_not_completed',
|
|
18
20
|
'wellness_check',
|
|
19
21
|
'return_suggestion',
|
|
20
22
|
] as const;
|
|
@@ -17,6 +17,7 @@ export const PANEL_RESOURCE_ACTIONS = {
|
|
|
17
17
|
tenant_billings: ['view', 'create', 'update', 'delete'] as const,
|
|
18
18
|
tenant_connections: ['view', 'update'] as const,
|
|
19
19
|
tenant_ai_tokens: ['view', 'update'] as const,
|
|
20
|
+
tenant_whatsapp_credits: ['view', 'update'] as const,
|
|
20
21
|
audit_logs: ['view'] as const,
|
|
21
22
|
plans: ['view', 'create', 'update'] as const,
|
|
22
23
|
configurations: ['view', 'update'] as const,
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
2
|
import {
|
|
3
|
+
IsDefined,
|
|
3
4
|
IsInt,
|
|
4
5
|
IsNotEmpty,
|
|
5
6
|
IsNumber,
|
|
6
7
|
IsOptional,
|
|
8
|
+
IsIn,
|
|
7
9
|
IsString,
|
|
8
10
|
IsUUID,
|
|
9
11
|
MaxLength,
|
|
10
12
|
Min,
|
|
13
|
+
ValidateIf,
|
|
11
14
|
} from 'class-validator';
|
|
12
15
|
|
|
16
|
+
export const PROCEDURE_PRICING_TYPES = ['fixed', 'variable'] as const;
|
|
17
|
+
export type ProcedurePricingTypeDto = (typeof PROCEDURE_PRICING_TYPES)[number];
|
|
18
|
+
|
|
13
19
|
export class CreateProcedureDto {
|
|
14
20
|
@ApiProperty({
|
|
15
21
|
description: 'Nome do procedimento',
|
|
@@ -69,12 +75,44 @@ export class CreateProcedureDto {
|
|
|
69
75
|
returnDays?: number | null;
|
|
70
76
|
|
|
71
77
|
@ApiProperty({
|
|
72
|
-
description: '
|
|
78
|
+
description: 'Tipo de precificacao do procedimento',
|
|
79
|
+
enum: PROCEDURE_PRICING_TYPES,
|
|
80
|
+
example: 'fixed',
|
|
81
|
+
})
|
|
82
|
+
@IsIn(PROCEDURE_PRICING_TYPES)
|
|
83
|
+
pricingType: ProcedurePricingTypeDto;
|
|
84
|
+
|
|
85
|
+
@ApiPropertyOptional({
|
|
86
|
+
description: 'Valor fixo do procedimento (obrigatorio quando pricingType = fixed)',
|
|
73
87
|
example: 150.5,
|
|
74
88
|
})
|
|
89
|
+
@ValidateIf((o: CreateProcedureDto) => o.pricingType === 'fixed')
|
|
90
|
+
@IsDefined()
|
|
91
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
92
|
+
@Min(0)
|
|
93
|
+
value?: number;
|
|
94
|
+
|
|
95
|
+
@ApiPropertyOptional({
|
|
96
|
+
description:
|
|
97
|
+
'Valor minimo da faixa de preco (obrigatorio quando pricingType = variable)',
|
|
98
|
+
example: 120,
|
|
99
|
+
})
|
|
100
|
+
@ValidateIf((o: CreateProcedureDto) => o.pricingType === 'variable')
|
|
101
|
+
@IsDefined()
|
|
102
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
103
|
+
@Min(0)
|
|
104
|
+
minValue?: number;
|
|
105
|
+
|
|
106
|
+
@ApiPropertyOptional({
|
|
107
|
+
description:
|
|
108
|
+
'Valor maximo da faixa de preco (obrigatorio quando pricingType = variable)',
|
|
109
|
+
example: 220,
|
|
110
|
+
})
|
|
111
|
+
@ValidateIf((o: CreateProcedureDto) => o.pricingType === 'variable')
|
|
112
|
+
@IsDefined()
|
|
75
113
|
@IsNumber({ maxDecimalPlaces: 2 })
|
|
76
114
|
@Min(0)
|
|
77
|
-
|
|
115
|
+
maxValue?: number;
|
|
78
116
|
|
|
79
117
|
@ApiProperty({
|
|
80
118
|
description: 'Duração do procedimento em minutos',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
2
|
import { SpecialtyEmbedDto } from './specialty-embed.dto';
|
|
3
|
+
import { PROCEDURE_PRICING_TYPES, ProcedurePricingTypeDto } from './create-procedure.dto';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Procedimento como retornado pela API (inclui especialidade carregada).
|
|
@@ -26,8 +27,19 @@ export class ProcedureResponseDto {
|
|
|
26
27
|
@ApiPropertyOptional({ nullable: true })
|
|
27
28
|
returnDays: number | null;
|
|
28
29
|
|
|
29
|
-
@ApiProperty(
|
|
30
|
-
|
|
30
|
+
@ApiProperty({
|
|
31
|
+
enum: PROCEDURE_PRICING_TYPES,
|
|
32
|
+
})
|
|
33
|
+
pricingType: ProcedurePricingTypeDto;
|
|
34
|
+
|
|
35
|
+
@ApiPropertyOptional({ nullable: true })
|
|
36
|
+
value: number | null;
|
|
37
|
+
|
|
38
|
+
@ApiPropertyOptional({ nullable: true })
|
|
39
|
+
minValue: number | null;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional({ nullable: true })
|
|
42
|
+
maxValue: number | null;
|
|
31
43
|
|
|
32
44
|
@ApiProperty()
|
|
33
45
|
duration: number;
|