evo360-types 1.3.654 → 1.3.656
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/apps/evo-csq/zod-schemas.d.ts +894 -12
- package/dist/apps/evo-csq/zod-schemas.js +54 -2
- package/dist/apps/evo-csq/zod-schemas.ts +58 -0
- package/dist/apps/hub-automation/zod-schemas.d.ts +66 -0
- package/dist/apps/hub-automation/zod-schemas.js +3 -0
- package/dist/apps/hub-automation/zod-schemas.ts +3 -0
- package/dist/types/evo-csq/index.d.ts +77 -0
- package/dist/types/evo-csq/index.ts +92 -0
- package/dist/types/hub-automation/index.d.ts +2 -0
- package/dist/types/hub-automation/index.ts +6 -0
- package/package.json +1 -1
|
@@ -501,9 +501,19 @@ export interface ICsqClaimAppointmentInformed {
|
|
|
501
501
|
* jornada (o lead cancelou/desistiu, ou foi trocado por outro horario). O
|
|
502
502
|
* codigo nao exige registro na agenda de um claim assim. */
|
|
503
503
|
superseded?: boolean;
|
|
504
|
+
/** feat-206 F3: quem extraiu o claim. Ausente = o juiz (laudos anteriores a
|
|
505
|
+
* F3 e claim so do juiz). `detector` = so o detector de agenda; `both` = os
|
|
506
|
+
* dois (mesma data/hora; a evidencia e a uniao). */
|
|
507
|
+
source?: CsqClaimSource;
|
|
508
|
+
/** feat-206 F3: `YYYY-MM-DD|HH:mm` do horario que substituiu este (o
|
|
509
|
+
* detector viu um horario confirmado depois). */
|
|
510
|
+
superseded_by?: string;
|
|
504
511
|
evidence: ICsqEvidence[];
|
|
505
512
|
}
|
|
506
513
|
|
|
514
|
+
/** feat-206 F3: origem de um claim `appointment_informed`. */
|
|
515
|
+
export type CsqClaimSource = "judge" | "detector" | "both";
|
|
516
|
+
|
|
507
517
|
/** "Prometi X ate quando". */
|
|
508
518
|
export interface ICsqClaimPromise {
|
|
509
519
|
type: "promise";
|
|
@@ -767,6 +777,85 @@ export interface ICsqTriageDecision {
|
|
|
767
777
|
reasons: CsqTriageReason[];
|
|
768
778
|
}
|
|
769
779
|
|
|
780
|
+
// ───────── Detector de agenda (feat-206 F3) ─────────
|
|
781
|
+
|
|
782
|
+
/** Evento canonico de agenda extraido pelo detector (independente do juiz).
|
|
783
|
+
* `slot_offered` sozinho nao vira claim: oferta nao aceita nao e agendamento
|
|
784
|
+
* informado. */
|
|
785
|
+
export type CsqAppointmentEventKind =
|
|
786
|
+
| "slot_offered"
|
|
787
|
+
| "slot_accepted"
|
|
788
|
+
| "appointment_confirmed"
|
|
789
|
+
| "reschedule_requested"
|
|
790
|
+
| "appointment_cancelled";
|
|
791
|
+
|
|
792
|
+
/** Quem produziu o evento na conversa. */
|
|
793
|
+
export type CsqAppointmentEventActor = "attendant" | "lead" | "hubia" | "automation";
|
|
794
|
+
|
|
795
|
+
export interface ICsqAppointmentEvent {
|
|
796
|
+
kind: CsqAppointmentEventKind;
|
|
797
|
+
/** YYYY-MM-DD absoluto, TZ do tenant. */
|
|
798
|
+
date?: string;
|
|
799
|
+
/** HH:mm absoluto, TZ do tenant. */
|
|
800
|
+
time?: string;
|
|
801
|
+
professional?: string;
|
|
802
|
+
patient_name?: string;
|
|
803
|
+
modality?: string;
|
|
804
|
+
actor: CsqAppointmentEventActor;
|
|
805
|
+
/** `message_id`/`ticket_id` do recorte; `ts` sempre do transcript. */
|
|
806
|
+
evidence: ICsqEvidence[];
|
|
807
|
+
/** `YYYY-MM-DD|HH:mm` (hora pode faltar: `YYYY-MM-DD|`) do agendamento que
|
|
808
|
+
* este evento cancela ou remarca. */
|
|
809
|
+
supersedes?: string;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/** `off`: nao roda; `shadow`: roda e registra em `report.detector`, sem mexer
|
|
813
|
+
* nos claims; `on`: os claims do detector entram na verificacao. */
|
|
814
|
+
export type CsqDetectorMode = "off" | "shadow" | "on";
|
|
815
|
+
|
|
816
|
+
/** Como terminou a extracao por LLM do detector. */
|
|
817
|
+
export type CsqDetectorOutcome = "no_signal" | "ok" | "failed" | "skipped";
|
|
818
|
+
|
|
819
|
+
/** Uso do LLM do extrator (so quando houve chamada). */
|
|
820
|
+
export interface ICsqDetectorLlm {
|
|
821
|
+
provider: string;
|
|
822
|
+
model: string;
|
|
823
|
+
/** Doc em `llm-connections`; `null` quando sintetica. */
|
|
824
|
+
connection_id: string | null;
|
|
825
|
+
/** `extractor` = `extractor_connection_id`; `judge` = conexao do juiz. */
|
|
826
|
+
connection_source: "extractor" | "judge";
|
|
827
|
+
input_tokens: number;
|
|
828
|
+
/** Parte da entrada servida do cache do provedor (OpenAI: prefixo do system). */
|
|
829
|
+
cache_read_tokens?: number;
|
|
830
|
+
output_tokens: number;
|
|
831
|
+
rounds: number;
|
|
832
|
+
cost_usd_est: number | null;
|
|
833
|
+
duration_ms: number;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/** Divergencia detector x juiz do laudo (registrada, nao escalada — F4). */
|
|
837
|
+
export interface ICsqDetectorReport {
|
|
838
|
+
mode: CsqDetectorMode;
|
|
839
|
+
outcome: CsqDetectorOutcome;
|
|
840
|
+
/** Mensagens com sinal deterministico (data/hora, confirmacao, desfecho). */
|
|
841
|
+
signals: number;
|
|
842
|
+
/** Mensagens no recorte enviado ao extrator (sinais + vizinhanca). */
|
|
843
|
+
excerpt_messages: number;
|
|
844
|
+
events: number;
|
|
845
|
+
claims_detector: number;
|
|
846
|
+
claims_judge: number;
|
|
847
|
+
only_detector: number;
|
|
848
|
+
only_judge: number;
|
|
849
|
+
superseded_by_detector: number;
|
|
850
|
+
/** Claims do detector no MESMO dia de um claim do juiz, com outra hora: nao
|
|
851
|
+
* entram na verificacao (o juiz manda), so contam. */
|
|
852
|
+
time_mismatch?: number;
|
|
853
|
+
/** Eventos extraidos (com evidencia ja validada). */
|
|
854
|
+
event_list?: ICsqAppointmentEvent[];
|
|
855
|
+
llm?: ICsqDetectorLlm | null;
|
|
856
|
+
error?: string;
|
|
857
|
+
}
|
|
858
|
+
|
|
770
859
|
/** Tamanho de um bloco do prompt do juiz. `tokens_est` e estimativa
|
|
771
860
|
* deterministica (chars / 3,6), nao contagem do tokenizer. */
|
|
772
861
|
export interface ICsqPromptBlockUsage {
|
|
@@ -1127,4 +1216,7 @@ export interface ICsqLeadReport extends IFireDoc {
|
|
|
1127
1216
|
/** feat-206: presente quando o ULTIMO ticket nao passou pelo juiz. A avaliacao
|
|
1128
1217
|
* (score, pilares, criterios), `model` e `llm_usage` sao do ultimo juiz. */
|
|
1129
1218
|
judge_skipped_reasons?: CsqTriageReason[];
|
|
1219
|
+
/** feat-206 F3: detector de agenda (contagens e divergencia com o juiz).
|
|
1220
|
+
* Ausente quando o detector esta `off` ou o laudo e anterior a F3. */
|
|
1221
|
+
detector?: ICsqDetectorReport;
|
|
1130
1222
|
}
|
|
@@ -51,6 +51,8 @@ export interface IAutomationAppointmentSelection {
|
|
|
51
51
|
payment_status_not_in?: string[];
|
|
52
52
|
appointment_mode_in?: string[];
|
|
53
53
|
appointment_mode_not_in?: string[];
|
|
54
|
+
appointment_type_names?: string[];
|
|
55
|
+
appointment_type_names_not_in?: string[];
|
|
54
56
|
time_range?: {
|
|
55
57
|
start: string;
|
|
56
58
|
end: string;
|
|
@@ -128,6 +128,12 @@ export interface IAutomationAppointmentSelection {
|
|
|
128
128
|
// wildcard glob (same style as payment_status_in).
|
|
129
129
|
appointment_mode_in?: string[];
|
|
130
130
|
appointment_mode_not_in?: string[];
|
|
131
|
+
|
|
132
|
+
// ---- fix-262: free-text type NAME as it shows on the calendar
|
|
133
|
+
// (`appointmentType`, e.g. "Consulta particular"), complementing the BASE
|
|
134
|
+
// filter above. Glob-aware like the other name filters.
|
|
135
|
+
appointment_type_names?: string[];
|
|
136
|
+
appointment_type_names_not_in?: string[];
|
|
131
137
|
// Local-time window over appointment.startDate, evaluated in the TENANT
|
|
132
138
|
// timezone. Boundaries: `start <= hh:mm < end` (start inclusive, end
|
|
133
139
|
// exclusive) so adjacent ranges (08–12, 12–18) partition the day without
|