evo360-types 1.3.494 → 1.3.497
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.
|
@@ -57,6 +57,37 @@ export interface IInboxItem {
|
|
|
57
57
|
last_message_type?: string;
|
|
58
58
|
last_message_channel_id?: string;
|
|
59
59
|
unread_count?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Nº de pacientes (evo-med) vinculados ao lead deste item, via `patient.lead_id`
|
|
62
|
+
* (+ `deleted_at == null`). Denormalizado pelo evochat-inbox-handler a cada
|
|
63
|
+
* INBOX_CHANGED (o vínculo pode nascer no meio da conversa). `0` = sabidamente
|
|
64
|
+
* sem paciente (inclui item sem lead). AUSENTE = desconhecido (item legado ou
|
|
65
|
+
* contagem falhou) — o FE não mostra nada. feat-106 item 1.
|
|
66
|
+
*/
|
|
67
|
+
linked_patient_count?: number;
|
|
68
|
+
/**
|
|
69
|
+
* `true` = contato sem nenhum ticket fechado "de verdade" antes deste —
|
|
70
|
+
* fechamentos com `system_status: 'moved' | 'merged'` (transferência/varredura)
|
|
71
|
+
* não contam. Computado UMA vez por ticket (evento `action === 'created'`) e
|
|
72
|
+
* preservado pelos merges seguintes do upsertItem. AUSENTE = desconhecido — o
|
|
73
|
+
* FE não mostra nada. feat-106 item 2.
|
|
74
|
+
*/
|
|
75
|
+
is_new_contact?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Nº de tasks HUMANAS (`mode:'human'`) abertas (status não-final) vinculadas ao
|
|
78
|
+
* lead ou aos pacientes do lead (`externalLinkKeys`). Denormalizado pelo
|
|
79
|
+
* evochat-inbox-handler; refrescado também pelo task-replication-handler via
|
|
80
|
+
* INBOX_CHANGED quando uma task humana muda. `0` = sabidamente sem task aberta.
|
|
81
|
+
* AUSENTE = desconhecido — o FE não mostra nada. feat-106 item 4.
|
|
82
|
+
*/
|
|
83
|
+
open_task_count?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Menor `schedule.due_at` entre as tasks abertas contadas acima (null = nenhuma
|
|
86
|
+
* com prazo). O FE deriva "vencida" comparando com o relógio local — NUNCA
|
|
87
|
+
* denormalizamos o booleano "vencida", que apodreceria com a passagem do tempo
|
|
88
|
+
* sem evento. feat-106 item 4.
|
|
89
|
+
*/
|
|
90
|
+
next_task_due_at?: Date | null;
|
|
60
91
|
contact_name?: string;
|
|
61
92
|
contact_address?: string;
|
|
62
93
|
updated_at?: Date;
|
|
@@ -76,6 +76,37 @@ export interface IInboxItem {
|
|
|
76
76
|
last_message_type?: string;
|
|
77
77
|
last_message_channel_id?: string;
|
|
78
78
|
unread_count?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Nº de pacientes (evo-med) vinculados ao lead deste item, via `patient.lead_id`
|
|
81
|
+
* (+ `deleted_at == null`). Denormalizado pelo evochat-inbox-handler a cada
|
|
82
|
+
* INBOX_CHANGED (o vínculo pode nascer no meio da conversa). `0` = sabidamente
|
|
83
|
+
* sem paciente (inclui item sem lead). AUSENTE = desconhecido (item legado ou
|
|
84
|
+
* contagem falhou) — o FE não mostra nada. feat-106 item 1.
|
|
85
|
+
*/
|
|
86
|
+
linked_patient_count?: number;
|
|
87
|
+
/**
|
|
88
|
+
* `true` = contato sem nenhum ticket fechado "de verdade" antes deste —
|
|
89
|
+
* fechamentos com `system_status: 'moved' | 'merged'` (transferência/varredura)
|
|
90
|
+
* não contam. Computado UMA vez por ticket (evento `action === 'created'`) e
|
|
91
|
+
* preservado pelos merges seguintes do upsertItem. AUSENTE = desconhecido — o
|
|
92
|
+
* FE não mostra nada. feat-106 item 2.
|
|
93
|
+
*/
|
|
94
|
+
is_new_contact?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Nº de tasks HUMANAS (`mode:'human'`) abertas (status não-final) vinculadas ao
|
|
97
|
+
* lead ou aos pacientes do lead (`externalLinkKeys`). Denormalizado pelo
|
|
98
|
+
* evochat-inbox-handler; refrescado também pelo task-replication-handler via
|
|
99
|
+
* INBOX_CHANGED quando uma task humana muda. `0` = sabidamente sem task aberta.
|
|
100
|
+
* AUSENTE = desconhecido — o FE não mostra nada. feat-106 item 4.
|
|
101
|
+
*/
|
|
102
|
+
open_task_count?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Menor `schedule.due_at` entre as tasks abertas contadas acima (null = nenhuma
|
|
105
|
+
* com prazo). O FE deriva "vencida" comparando com o relógio local — NUNCA
|
|
106
|
+
* denormalizamos o booleano "vencida", que apodreceria com a passagem do tempo
|
|
107
|
+
* sem evento. feat-106 item 4.
|
|
108
|
+
*/
|
|
109
|
+
next_task_due_at?: Date | null;
|
|
79
110
|
contact_name?: string;
|
|
80
111
|
contact_address?: string;
|
|
81
112
|
updated_at?: Date;
|