evo360-types 1.3.373 → 1.3.375

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.
Files changed (30) hide show
  1. package/dist/apps/evo-hub-ia/v1/zod-schemas.d.ts +1191 -135
  2. package/dist/apps/evo-hub-ia/v1/zod-schemas.js +31 -4
  3. package/dist/apps/evo-hub-ia/v1/zod-schemas.ts +31 -4
  4. package/dist/types/evo-chat/call-session/index.d.ts +41 -0
  5. package/dist/types/evo-chat/call-session/index.js +2 -0
  6. package/dist/types/evo-chat/call-session/index.ts +81 -0
  7. package/dist/types/evo-chat/channel/index.d.ts +18 -0
  8. package/dist/types/evo-chat/channel/index.ts +20 -0
  9. package/dist/types/evo-chat/fb_collections.d.ts +1 -0
  10. package/dist/types/evo-chat/fb_collections.js +2 -1
  11. package/dist/types/evo-chat/fb_collections.ts +1 -0
  12. package/dist/types/evo-chat/index.d.ts +1 -0
  13. package/dist/types/evo-chat/index.js +1 -0
  14. package/dist/types/evo-chat/index.ts +1 -0
  15. package/dist/types/evo-chat/thread-message/index.d.ts +3 -1
  16. package/dist/types/evo-chat/thread-message/index.ts +6 -1
  17. package/dist/types/evo-finops/common/billing.d.ts +9 -0
  18. package/dist/types/evo-finops/common/billing.ts +10 -0
  19. package/dist/types/evo-finops/fb_collections.d.ts +1 -0
  20. package/dist/types/evo-finops/fb_collections.js +2 -1
  21. package/dist/types/evo-finops/fb_collections.ts +1 -0
  22. package/dist/types/evo-finops/payment-links/index.d.ts +12 -0
  23. package/dist/types/evo-finops/payment-links/index.js +12 -2
  24. package/dist/types/evo-finops/payment-links/index.ts +18 -1
  25. package/dist/types/evo-hub-ia/v1/index.d.ts +16 -7
  26. package/dist/types/evo-hub-ia/v1/index.js +1 -1
  27. package/dist/types/evo-hub-ia/v1/index.ts +17 -8
  28. package/dist/types/evo-med/appointment/index.d.ts +15 -0
  29. package/dist/types/evo-med/appointment/index.ts +16 -0
  30. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- // Tipos da camada evo-hubia-rules (motor determinístico pré-LLM).
1
+ // Tipos da camada evo-hubia-rules (motor determinístico de regras).
2
2
  // Schemas zod correspondentes ficam em src/apps/evo-hub-ia/v1/zod-schemas.ts;
3
3
  // estes tipos são escritos à mão e mantidos em paralelo (convenção do projeto:
4
4
  // `apps/` = zod, `types/` = interfaces TS).
@@ -7,18 +7,25 @@
7
7
 
8
8
  // ── Enums / Literals ──
9
9
 
10
- /** Fase de avaliação. `pre_llm` roda antes do orchestrator;
11
- * `post_llm` está reservado (não implementado nesta entrega). */
10
+ /** Fase de avaliação.
11
+ * - `pre_llm` (v1.0) : avalia antes do orchestrator LLM.
12
+ * - `post_llm` (v1.1) : avalia depois do orchestrator e antes do envio
13
+ * outbound (safety/governance). */
12
14
  export type IHubiaRulePhase = "pre_llm" | "post_llm";
13
15
 
14
- /** Gatilho que dispara a avaliação. */
16
+ /** Gatilho que dispara a avaliação. Correlacionado com `phase`:
17
+ * pre_llm → inbound_message; post_llm → llm_completed (validado pelo
18
+ * superRefine de `zHubiaRuleSchema`). */
15
19
  export type IHubiaRuleTrigger = "inbound_message" | "llm_completed";
16
20
 
17
21
  /** Desfecho do turno após a regra disparar:
18
- * - `stop` — finaliza turno sem chamar o LLM.
19
- * - `to_llm` — segue para o orchestrator normalmente.
22
+ * - `stop` — finaliza turno; em pre_llm pula o LLM,
23
+ * em post_llm bloqueia o envio outbound (único
24
+ * outcome permitido em post_llm).
25
+ * - `to_llm` — segue para o orchestrator normalmente
26
+ * (apenas pre_llm).
20
27
  * - `to_llm_with_context` — segue para o orchestrator com trace das ações
21
- * injetado como bloco de sistema.
28
+ * injetado como bloco de sistema (apenas pre_llm).
22
29
  * Quando o LLM está desligado no binding (default_mode `human_only`/`blocked`),
23
30
  * `to_llm`/`to_llm_with_context` degradam para "cai pro humano". */
24
31
  export type IHubiaRuleOutcome = "stop" | "to_llm" | "to_llm_with_context";
@@ -138,12 +145,14 @@ export interface IHubiaRule {
138
145
 
139
146
  /** Default: "pre_llm". */
140
147
  phase?: IHubiaRulePhase;
141
- /** Default: "inbound_message" (compatível com `phase: pre_llm`). */
148
+ /** Default: "inbound_message" (compatível com `phase: pre_llm`).
149
+ * Para `phase: post_llm`, precisa ser "llm_completed" (zod superRefine). */
142
150
  when?: IHubiaRuleTrigger;
143
151
 
144
152
  scope?: IHubiaRuleScope;
145
153
  conditions: IHubiaConditionGroup;
146
154
  actions: IHubiaRuleAction[];
155
+ /** Para `phase: post_llm`, único valor permitido é "stop" (zod superRefine). */
147
156
  outcome: IHubiaRuleOutcome;
148
157
 
149
158
  /** Shadow mode por regra (característica permanente, não só de rollout):
@@ -79,6 +79,15 @@ export interface IAppointmentPaymentInvoiceRef {
79
79
  /** Indica se a invoice foi enviada ao contato (ex.: via evo-chat/WhatsApp) */
80
80
  evo_chat_sent?: boolean;
81
81
  }
82
+ /** Origem da quitação do pagamento (ex.: link de pagamento Asaas via webhook). */
83
+ export interface IAppointmentPaymentPaidVia {
84
+ kind: "payment_link" | "manual" | "pix" | "boleto";
85
+ payment_link_id?: string;
86
+ asaas_payment_id?: string;
87
+ event?: string;
88
+ received_at?: string;
89
+ raw_status?: string;
90
+ }
82
91
  export interface IAppointmentPayment {
83
92
  total?: number | null;
84
93
  paid?: number | null;
@@ -87,6 +96,12 @@ export interface IAppointmentPayment {
87
96
  payment_type: PaymentType;
88
97
  /** Correspondência com invoices do evo-finops (NFSe) vinculadas a este pagamento */
89
98
  invoices?: IAppointmentPaymentInvoiceRef[];
99
+ /** Quando o pagamento foi marcado como pago (ISO 8601 ou Date). */
100
+ paid_at?: string | Date;
101
+ /** Origem da quitação (payment_link Asaas, manual, etc.). */
102
+ paid_via?: IAppointmentPaymentPaidVia | null;
103
+ /** Método/canal de pagamento livre (ex.: 'payment_link', 'cash', 'card_terminal'). */
104
+ payment_method?: string;
90
105
  metadata?: Record<string, unknown>;
91
106
  [key: string]: unknown;
92
107
  }
@@ -111,6 +111,16 @@ export interface IAppointmentPaymentInvoiceRef {
111
111
  evo_chat_sent?: boolean;
112
112
  }
113
113
 
114
+ /** Origem da quitação do pagamento (ex.: link de pagamento Asaas via webhook). */
115
+ export interface IAppointmentPaymentPaidVia {
116
+ kind: "payment_link" | "manual" | "pix" | "boleto";
117
+ payment_link_id?: string;
118
+ asaas_payment_id?: string;
119
+ event?: string;
120
+ received_at?: string;
121
+ raw_status?: string;
122
+ }
123
+
114
124
  // Interface para pagamento
115
125
  export interface IAppointmentPayment {
116
126
  total?: number | null;
@@ -120,6 +130,12 @@ export interface IAppointmentPayment {
120
130
  payment_type: PaymentType;
121
131
  /** Correspondência com invoices do evo-finops (NFSe) vinculadas a este pagamento */
122
132
  invoices?: IAppointmentPaymentInvoiceRef[];
133
+ /** Quando o pagamento foi marcado como pago (ISO 8601 ou Date). */
134
+ paid_at?: string | Date;
135
+ /** Origem da quitação (payment_link Asaas, manual, etc.). */
136
+ paid_via?: IAppointmentPaymentPaidVia | null;
137
+ /** Método/canal de pagamento livre (ex.: 'payment_link', 'cash', 'card_terminal'). */
138
+ payment_method?: string;
123
139
  metadata?: Record<string, unknown>;
124
140
  [key: string]: unknown;
125
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.373",
3
+ "version": "1.3.375",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",