evo360-types 1.3.746 → 1.3.748
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-chat/thread-message/zod-schemas.d.ts +24 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.js +2 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.ts +2 -0
- package/dist/apps/evo-hub-ia/v1/zod-schemas.d.ts +177 -0
- package/dist/apps/evo-hub-ia/v1/zod-schemas.js +58 -1
- package/dist/apps/evo-hub-ia/v1/zod-schemas.ts +73 -0
- package/package.json +1 -1
|
@@ -63,6 +63,8 @@ export declare const zMessageMediaSchema: z.ZodObject<{
|
|
|
63
63
|
filename: z.ZodOptional<z.ZodString>;
|
|
64
64
|
caption: z.ZodOptional<z.ZodString>;
|
|
65
65
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
66
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
67
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
66
68
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
67
69
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
68
70
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -72,6 +74,8 @@ export declare const zMessageMediaSchema: z.ZodObject<{
|
|
|
72
74
|
filename: z.ZodOptional<z.ZodString>;
|
|
73
75
|
caption: z.ZodOptional<z.ZodString>;
|
|
74
76
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
77
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
78
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
75
79
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
76
80
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
77
81
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -81,6 +85,8 @@ export declare const zMessageMediaSchema: z.ZodObject<{
|
|
|
81
85
|
filename: z.ZodOptional<z.ZodString>;
|
|
82
86
|
caption: z.ZodOptional<z.ZodString>;
|
|
83
87
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
88
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
89
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
84
90
|
}, z.ZodTypeAny, "passthrough">>;
|
|
85
91
|
export declare const zMessageCreatedBySchema: z.ZodObject<{
|
|
86
92
|
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
@@ -209,6 +215,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
209
215
|
filename: z.ZodOptional<z.ZodString>;
|
|
210
216
|
caption: z.ZodOptional<z.ZodString>;
|
|
211
217
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
218
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
219
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
212
220
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
213
221
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
214
222
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -218,6 +226,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
218
226
|
filename: z.ZodOptional<z.ZodString>;
|
|
219
227
|
caption: z.ZodOptional<z.ZodString>;
|
|
220
228
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
229
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
230
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
221
231
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
222
232
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
223
233
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -227,6 +237,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
227
237
|
filename: z.ZodOptional<z.ZodString>;
|
|
228
238
|
caption: z.ZodOptional<z.ZodString>;
|
|
229
239
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
240
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
241
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
230
242
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
231
243
|
location: z.ZodOptional<z.ZodObject<{
|
|
232
244
|
latitude: z.ZodNumber;
|
|
@@ -536,6 +548,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
536
548
|
filename: z.ZodOptional<z.ZodString>;
|
|
537
549
|
caption: z.ZodOptional<z.ZodString>;
|
|
538
550
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
551
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
552
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
539
553
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
540
554
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
541
555
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -545,6 +559,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
545
559
|
filename: z.ZodOptional<z.ZodString>;
|
|
546
560
|
caption: z.ZodOptional<z.ZodString>;
|
|
547
561
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
562
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
563
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
548
564
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
549
565
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
550
566
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -554,6 +570,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
554
570
|
filename: z.ZodOptional<z.ZodString>;
|
|
555
571
|
caption: z.ZodOptional<z.ZodString>;
|
|
556
572
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
573
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
574
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
557
575
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
558
576
|
location: z.ZodOptional<z.ZodObject<{
|
|
559
577
|
latitude: z.ZodNumber;
|
|
@@ -863,6 +881,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
863
881
|
filename: z.ZodOptional<z.ZodString>;
|
|
864
882
|
caption: z.ZodOptional<z.ZodString>;
|
|
865
883
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
884
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
885
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
866
886
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
867
887
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
868
888
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -872,6 +892,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
872
892
|
filename: z.ZodOptional<z.ZodString>;
|
|
873
893
|
caption: z.ZodOptional<z.ZodString>;
|
|
874
894
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
895
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
896
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
875
897
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
876
898
|
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
877
899
|
url: z.ZodOptional<z.ZodString>;
|
|
@@ -881,6 +903,8 @@ export declare const zThreadMessageSchema: z.ZodObject<{
|
|
|
881
903
|
filename: z.ZodOptional<z.ZodString>;
|
|
882
904
|
caption: z.ZodOptional<z.ZodString>;
|
|
883
905
|
meta_media_id: z.ZodOptional<z.ZodString>;
|
|
906
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
907
|
+
voice: z.ZodOptional<z.ZodBoolean>;
|
|
884
908
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
885
909
|
location: z.ZodOptional<z.ZodObject<{
|
|
886
910
|
latitude: z.ZodNumber;
|
|
@@ -23,6 +23,8 @@ exports.zMessageMediaSchema = zod_1.z.object({
|
|
|
23
23
|
filename: zod_1.z.string().optional(),
|
|
24
24
|
caption: zod_1.z.string().optional(),
|
|
25
25
|
meta_media_id: zod_1.z.string().optional(),
|
|
26
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
27
|
+
voice: zod_1.z.boolean().optional(),
|
|
26
28
|
}).passthrough();
|
|
27
29
|
exports.zMessageCreatedBySchema = zod_1.z.object({
|
|
28
30
|
type: zod_1.z.enum(['human', 'automation', 'system']),
|
|
@@ -22,6 +22,8 @@ export const zMessageMediaSchema = z.object({
|
|
|
22
22
|
filename: z.string().optional(),
|
|
23
23
|
caption: z.string().optional(),
|
|
24
24
|
meta_media_id: z.string().optional(),
|
|
25
|
+
/** feat-303: áudio enviado como nota de voz (OGG/Opus + `voice: true` na Meta). */
|
|
26
|
+
voice: z.boolean().optional(),
|
|
25
27
|
}).passthrough();
|
|
26
28
|
|
|
27
29
|
export const zMessageCreatedBySchema = z.object({
|
|
@@ -1611,6 +1611,123 @@ export declare const zHubiaRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1611
1611
|
/** Aborta sequência de ações no primeiro erro. */
|
|
1612
1612
|
stop_actions_on_error: z.ZodDefault<z.ZodBoolean>;
|
|
1613
1613
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1614
|
+
/** Vozes do `gpt-4o-mini-tts` oferecidas na UI. O schema aceita qualquer string
|
|
1615
|
+
* para o provedor poder mudar sem novo contrato. */
|
|
1616
|
+
export declare const HUBIA_VOICE_REPLY_OPENAI_VOICES: readonly ["alloy", "ash", "ballad", "coral", "echo", "fable", "nova", "onyx", "sage", "shimmer", "verse", "marin", "cedar"];
|
|
1617
|
+
export declare const HUBIA_VOICE_REPLY_DEFAULT_VOICE = "coral";
|
|
1618
|
+
/** Liga a resposta em áudio no binding. QUANDO usar áudio é regra do prompt do
|
|
1619
|
+
* binding (o LLM decide por turno), não deste objeto. */
|
|
1620
|
+
export declare const zHubiaVoiceReplySchema: z.ZodObject<{
|
|
1621
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1622
|
+
voice: z.ZodDefault<z.ZodString>;
|
|
1623
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
1624
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
1625
|
+
/** 1.0 = normal. */
|
|
1626
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1627
|
+
}, "strip", z.ZodTypeAny, {
|
|
1628
|
+
enabled: boolean;
|
|
1629
|
+
voice: string;
|
|
1630
|
+
instructions?: string | undefined;
|
|
1631
|
+
speed?: number | undefined;
|
|
1632
|
+
}, {
|
|
1633
|
+
enabled?: boolean | undefined;
|
|
1634
|
+
voice?: string | undefined;
|
|
1635
|
+
instructions?: string | undefined;
|
|
1636
|
+
speed?: number | undefined;
|
|
1637
|
+
}>;
|
|
1638
|
+
export type IHubiaVoiceReply = z.infer<typeof zHubiaVoiceReplySchema>;
|
|
1639
|
+
export declare const zHubiaResponseModeSchema: z.ZodEnum<["text", "audio"]>;
|
|
1640
|
+
export type HubiaResponseMode = z.infer<typeof zHubiaResponseModeSchema>;
|
|
1641
|
+
/** `conversations/{id}.pending_suggestion` (modo hybrid_assist). */
|
|
1642
|
+
export declare const zHubiaPendingSuggestionSchema: z.ZodObject<{
|
|
1643
|
+
execution_id: z.ZodString;
|
|
1644
|
+
messages: z.ZodArray<z.ZodString, "many">;
|
|
1645
|
+
created_at: z.ZodAny;
|
|
1646
|
+
was_used: z.ZodOptional<z.ZodBoolean>;
|
|
1647
|
+
/** Escolha do LLM; pré-marca "enviar como áudio" na caixa de sugestão. */
|
|
1648
|
+
response_mode: z.ZodOptional<z.ZodEnum<["text", "audio"]>>;
|
|
1649
|
+
/** Binding + canal permitiam áudio no turno da sugestão. */
|
|
1650
|
+
voice_available: z.ZodOptional<z.ZodBoolean>;
|
|
1651
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1652
|
+
execution_id: z.ZodString;
|
|
1653
|
+
messages: z.ZodArray<z.ZodString, "many">;
|
|
1654
|
+
created_at: z.ZodAny;
|
|
1655
|
+
was_used: z.ZodOptional<z.ZodBoolean>;
|
|
1656
|
+
/** Escolha do LLM; pré-marca "enviar como áudio" na caixa de sugestão. */
|
|
1657
|
+
response_mode: z.ZodOptional<z.ZodEnum<["text", "audio"]>>;
|
|
1658
|
+
/** Binding + canal permitiam áudio no turno da sugestão. */
|
|
1659
|
+
voice_available: z.ZodOptional<z.ZodBoolean>;
|
|
1660
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1661
|
+
execution_id: z.ZodString;
|
|
1662
|
+
messages: z.ZodArray<z.ZodString, "many">;
|
|
1663
|
+
created_at: z.ZodAny;
|
|
1664
|
+
was_used: z.ZodOptional<z.ZodBoolean>;
|
|
1665
|
+
/** Escolha do LLM; pré-marca "enviar como áudio" na caixa de sugestão. */
|
|
1666
|
+
response_mode: z.ZodOptional<z.ZodEnum<["text", "audio"]>>;
|
|
1667
|
+
/** Binding + canal permitiam áudio no turno da sugestão. */
|
|
1668
|
+
voice_available: z.ZodOptional<z.ZodBoolean>;
|
|
1669
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1670
|
+
export type IHubiaPendingSuggestion = z.infer<typeof zHubiaPendingSuggestionSchema>;
|
|
1671
|
+
/** Gravado na mensagem enviada a partir de uma sugestão da HubIA. */
|
|
1672
|
+
export declare const zHubiaSuggestionMessageRefSchema: z.ZodObject<{
|
|
1673
|
+
execution_id: z.ZodString;
|
|
1674
|
+
/** O operador alterou o texto antes de enviar. */
|
|
1675
|
+
edited: z.ZodBoolean;
|
|
1676
|
+
mode: z.ZodEnum<["text", "audio"]>;
|
|
1677
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1678
|
+
execution_id: z.ZodString;
|
|
1679
|
+
/** O operador alterou o texto antes de enviar. */
|
|
1680
|
+
edited: z.ZodBoolean;
|
|
1681
|
+
mode: z.ZodEnum<["text", "audio"]>;
|
|
1682
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1683
|
+
execution_id: z.ZodString;
|
|
1684
|
+
/** O operador alterou o texto antes de enviar. */
|
|
1685
|
+
edited: z.ZodBoolean;
|
|
1686
|
+
mode: z.ZodEnum<["text", "audio"]>;
|
|
1687
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1688
|
+
export type IHubiaSuggestionMessageRef = z.infer<typeof zHubiaSuggestionMessageRefSchema>;
|
|
1689
|
+
/** Desfecho da sugestão, gravado na execução que a gerou. */
|
|
1690
|
+
export declare const zHubiaSuggestionOutcomeSchema: z.ZodObject<{
|
|
1691
|
+
status: z.ZodEnum<["sent", "sent_edited", "discarded"]>;
|
|
1692
|
+
mode: z.ZodOptional<z.ZodEnum<["text", "audio"]>>;
|
|
1693
|
+
by_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1694
|
+
at: z.ZodAny;
|
|
1695
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1696
|
+
status: z.ZodEnum<["sent", "sent_edited", "discarded"]>;
|
|
1697
|
+
mode: z.ZodOptional<z.ZodEnum<["text", "audio"]>>;
|
|
1698
|
+
by_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1699
|
+
at: z.ZodAny;
|
|
1700
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1701
|
+
status: z.ZodEnum<["sent", "sent_edited", "discarded"]>;
|
|
1702
|
+
mode: z.ZodOptional<z.ZodEnum<["text", "audio"]>>;
|
|
1703
|
+
by_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1704
|
+
at: z.ZodAny;
|
|
1705
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1706
|
+
export type IHubiaSuggestionOutcome = z.infer<typeof zHubiaSuggestionOutcomeSchema>;
|
|
1707
|
+
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
1708
|
+
export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
1709
|
+
model: z.ZodString;
|
|
1710
|
+
voice: z.ZodString;
|
|
1711
|
+
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
1712
|
+
chars: z.ZodNumber;
|
|
1713
|
+
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1714
|
+
execution_id: z.ZodOptional<z.ZodString>;
|
|
1715
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1716
|
+
model: z.ZodString;
|
|
1717
|
+
voice: z.ZodString;
|
|
1718
|
+
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
1719
|
+
chars: z.ZodNumber;
|
|
1720
|
+
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1721
|
+
execution_id: z.ZodOptional<z.ZodString>;
|
|
1722
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1723
|
+
model: z.ZodString;
|
|
1724
|
+
voice: z.ZodString;
|
|
1725
|
+
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
1726
|
+
chars: z.ZodNumber;
|
|
1727
|
+
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1728
|
+
execution_id: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1730
|
+
export type IHubiaTtsMessageMeta = z.infer<typeof zHubiaTtsMessageMetaSchema>;
|
|
1614
1731
|
export declare const zAiBindingSchema: z.ZodObject<{
|
|
1615
1732
|
id: z.ZodString;
|
|
1616
1733
|
ref: z.ZodAny;
|
|
@@ -2377,6 +2494,26 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
2377
2494
|
* com `hubia` em `usable_for`) usada neste departamento. Vence o
|
|
2378
2495
|
* `llm_connection_id` do canal. `null`/ausente = herda do canal. */
|
|
2379
2496
|
llm_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2497
|
+
/** Ausente/`enabled: false` = HubIA só responde em texto. Exige o contrato
|
|
2498
|
+
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
2499
|
+
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
2500
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2501
|
+
voice: z.ZodDefault<z.ZodString>;
|
|
2502
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
2503
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2504
|
+
/** 1.0 = normal. */
|
|
2505
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
2506
|
+
}, "strip", z.ZodTypeAny, {
|
|
2507
|
+
enabled: boolean;
|
|
2508
|
+
voice: string;
|
|
2509
|
+
instructions?: string | undefined;
|
|
2510
|
+
speed?: number | undefined;
|
|
2511
|
+
}, {
|
|
2512
|
+
enabled?: boolean | undefined;
|
|
2513
|
+
voice?: string | undefined;
|
|
2514
|
+
instructions?: string | undefined;
|
|
2515
|
+
speed?: number | undefined;
|
|
2516
|
+
}>>;
|
|
2380
2517
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2381
2518
|
id: z.ZodString;
|
|
2382
2519
|
ref: z.ZodAny;
|
|
@@ -3143,6 +3280,26 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
3143
3280
|
* com `hubia` em `usable_for`) usada neste departamento. Vence o
|
|
3144
3281
|
* `llm_connection_id` do canal. `null`/ausente = herda do canal. */
|
|
3145
3282
|
llm_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3283
|
+
/** Ausente/`enabled: false` = HubIA só responde em texto. Exige o contrato
|
|
3284
|
+
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
3285
|
+
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
3286
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3287
|
+
voice: z.ZodDefault<z.ZodString>;
|
|
3288
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
3289
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
3290
|
+
/** 1.0 = normal. */
|
|
3291
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
3292
|
+
}, "strip", z.ZodTypeAny, {
|
|
3293
|
+
enabled: boolean;
|
|
3294
|
+
voice: string;
|
|
3295
|
+
instructions?: string | undefined;
|
|
3296
|
+
speed?: number | undefined;
|
|
3297
|
+
}, {
|
|
3298
|
+
enabled?: boolean | undefined;
|
|
3299
|
+
voice?: string | undefined;
|
|
3300
|
+
instructions?: string | undefined;
|
|
3301
|
+
speed?: number | undefined;
|
|
3302
|
+
}>>;
|
|
3146
3303
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3147
3304
|
id: z.ZodString;
|
|
3148
3305
|
ref: z.ZodAny;
|
|
@@ -3909,6 +4066,26 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
3909
4066
|
* com `hubia` em `usable_for`) usada neste departamento. Vence o
|
|
3910
4067
|
* `llm_connection_id` do canal. `null`/ausente = herda do canal. */
|
|
3911
4068
|
llm_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4069
|
+
/** Ausente/`enabled: false` = HubIA só responde em texto. Exige o contrato
|
|
4070
|
+
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
4071
|
+
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
4072
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4073
|
+
voice: z.ZodDefault<z.ZodString>;
|
|
4074
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
4075
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
4076
|
+
/** 1.0 = normal. */
|
|
4077
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
4078
|
+
}, "strip", z.ZodTypeAny, {
|
|
4079
|
+
enabled: boolean;
|
|
4080
|
+
voice: string;
|
|
4081
|
+
instructions?: string | undefined;
|
|
4082
|
+
speed?: number | undefined;
|
|
4083
|
+
}, {
|
|
4084
|
+
enabled?: boolean | undefined;
|
|
4085
|
+
voice?: string | undefined;
|
|
4086
|
+
instructions?: string | undefined;
|
|
4087
|
+
speed?: number | undefined;
|
|
4088
|
+
}>>;
|
|
3912
4089
|
}, z.ZodTypeAny, "passthrough">>;
|
|
3913
4090
|
export type IAiBinding = z.infer<typeof zAiBindingSchema>;
|
|
3914
4091
|
/** Disposição de fechamento publicada no evento. Os bridges publicam `null`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zHubiaTicketClosedEventSchema = exports.zHubiaTicketClosedCloseSchema = exports.zAiBindingSchema = exports.zHubiaRuleSchema = exports.zHubiaRulesModeSchema = exports.zSendQuickReplyActionInputSchema = exports.zCreateTaskActionInputSchema = exports.zHubiaRuleActionSchema = exports.zHubiaRuleScopeSchema = exports.zHubiaConditionGroupSchema = exports.zHubiaConditionSchema = exports.zHubiaScheduleSchema = exports.zHubiaScheduleWindowSchema = exports.zHubiaConditionOpSchema = exports.zHubiaOutboundSourceSchema = exports.zHubiaRuleAppliesToSchema = exports.zHubiaRuleOutcomeSchema = exports.zHubiaRuleTriggerSchema = exports.zHubiaRulePhaseSchema = exports.zHubiaConversationModeSchema = exports.zHubiaConversationMessageSchema = exports.zHubiaV1ChannelConfigSchema = exports.zHubiaAttendanceModeSchema = void 0;
|
|
3
|
+
exports.zHubiaTicketClosedEventSchema = exports.zHubiaTicketClosedCloseSchema = exports.zAiBindingSchema = exports.zHubiaTtsMessageMetaSchema = exports.zHubiaSuggestionOutcomeSchema = exports.zHubiaSuggestionMessageRefSchema = exports.zHubiaPendingSuggestionSchema = exports.zHubiaResponseModeSchema = exports.zHubiaVoiceReplySchema = exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE = exports.HUBIA_VOICE_REPLY_OPENAI_VOICES = exports.zHubiaRuleSchema = exports.zHubiaRulesModeSchema = exports.zSendQuickReplyActionInputSchema = exports.zCreateTaskActionInputSchema = exports.zHubiaRuleActionSchema = exports.zHubiaRuleScopeSchema = exports.zHubiaConditionGroupSchema = exports.zHubiaConditionSchema = exports.zHubiaScheduleSchema = exports.zHubiaScheduleWindowSchema = exports.zHubiaConditionOpSchema = exports.zHubiaOutboundSourceSchema = exports.zHubiaRuleAppliesToSchema = exports.zHubiaRuleOutcomeSchema = exports.zHubiaRuleTriggerSchema = exports.zHubiaRulePhaseSchema = exports.zHubiaConversationModeSchema = exports.zHubiaConversationMessageSchema = exports.zHubiaV1ChannelConfigSchema = exports.zHubiaAttendanceModeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
6
|
const zod_schemas_2 = require("../../evo-csq/zod-schemas");
|
|
@@ -350,6 +350,59 @@ const zHubiaPromptOverridesSchema = zod_1.z.object({
|
|
|
350
350
|
routing: zod_1.z.string().optional(),
|
|
351
351
|
tool_usage: zod_1.z.string().optional(),
|
|
352
352
|
});
|
|
353
|
+
// ───────── Resposta em áudio (feat-303) ─────────
|
|
354
|
+
/** Vozes do `gpt-4o-mini-tts` oferecidas na UI. O schema aceita qualquer string
|
|
355
|
+
* para o provedor poder mudar sem novo contrato. */
|
|
356
|
+
exports.HUBIA_VOICE_REPLY_OPENAI_VOICES = [
|
|
357
|
+
'alloy', 'ash', 'ballad', 'coral', 'echo', 'fable', 'nova',
|
|
358
|
+
'onyx', 'sage', 'shimmer', 'verse', 'marin', 'cedar',
|
|
359
|
+
];
|
|
360
|
+
exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE = 'coral';
|
|
361
|
+
/** Liga a resposta em áudio no binding. QUANDO usar áudio é regra do prompt do
|
|
362
|
+
* binding (o LLM decide por turno), não deste objeto. */
|
|
363
|
+
exports.zHubiaVoiceReplySchema = zod_1.z.object({
|
|
364
|
+
enabled: zod_1.z.boolean().default(false),
|
|
365
|
+
voice: zod_1.z.string().min(1).max(40).default(exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE),
|
|
366
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
367
|
+
instructions: zod_1.z.string().max(1000).optional(),
|
|
368
|
+
/** 1.0 = normal. */
|
|
369
|
+
speed: zod_1.z.number().min(0.75).max(1.5).optional(),
|
|
370
|
+
});
|
|
371
|
+
exports.zHubiaResponseModeSchema = zod_1.z.enum(['text', 'audio']);
|
|
372
|
+
/** `conversations/{id}.pending_suggestion` (modo hybrid_assist). */
|
|
373
|
+
exports.zHubiaPendingSuggestionSchema = zod_1.z.object({
|
|
374
|
+
execution_id: zod_1.z.string(),
|
|
375
|
+
messages: zod_1.z.array(zod_1.z.string()),
|
|
376
|
+
created_at: zod_1.z.any(),
|
|
377
|
+
was_used: zod_1.z.boolean().optional(),
|
|
378
|
+
/** Escolha do LLM; pré-marca "enviar como áudio" na caixa de sugestão. */
|
|
379
|
+
response_mode: exports.zHubiaResponseModeSchema.optional(),
|
|
380
|
+
/** Binding + canal permitiam áudio no turno da sugestão. */
|
|
381
|
+
voice_available: zod_1.z.boolean().optional(),
|
|
382
|
+
}).passthrough();
|
|
383
|
+
/** Gravado na mensagem enviada a partir de uma sugestão da HubIA. */
|
|
384
|
+
exports.zHubiaSuggestionMessageRefSchema = zod_1.z.object({
|
|
385
|
+
execution_id: zod_1.z.string(),
|
|
386
|
+
/** O operador alterou o texto antes de enviar. */
|
|
387
|
+
edited: zod_1.z.boolean(),
|
|
388
|
+
mode: exports.zHubiaResponseModeSchema,
|
|
389
|
+
}).passthrough();
|
|
390
|
+
/** Desfecho da sugestão, gravado na execução que a gerou. */
|
|
391
|
+
exports.zHubiaSuggestionOutcomeSchema = zod_1.z.object({
|
|
392
|
+
status: zod_1.z.enum(['sent', 'sent_edited', 'discarded']),
|
|
393
|
+
mode: exports.zHubiaResponseModeSchema.optional(),
|
|
394
|
+
by_user_id: zod_1.z.string().nullable().optional(),
|
|
395
|
+
at: zod_1.z.any(),
|
|
396
|
+
}).passthrough();
|
|
397
|
+
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
398
|
+
exports.zHubiaTtsMessageMetaSchema = zod_1.z.object({
|
|
399
|
+
model: zod_1.z.string(),
|
|
400
|
+
voice: zod_1.z.string(),
|
|
401
|
+
format: zod_1.z.enum(['ogg', 'mp3']),
|
|
402
|
+
chars: zod_1.z.number(),
|
|
403
|
+
duration_seconds: zod_1.z.number().nullable(),
|
|
404
|
+
execution_id: zod_1.z.string().optional(),
|
|
405
|
+
}).passthrough();
|
|
353
406
|
exports.zAiBindingSchema = zod_schemas_1.zFireDocSchema.extend({
|
|
354
407
|
agent_type: zod_1.z.string(), // 'evo-hubia-v1', future: 'evo-hubia-v2', etc.
|
|
355
408
|
agent_config_id: zod_1.z.string(), // ref to the agent's channel config doc
|
|
@@ -397,6 +450,10 @@ exports.zAiBindingSchema = zod_schemas_1.zFireDocSchema.extend({
|
|
|
397
450
|
* com `hubia` em `usable_for`) usada neste departamento. Vence o
|
|
398
451
|
* `llm_connection_id` do canal. `null`/ausente = herda do canal. */
|
|
399
452
|
llm_connection_id: zod_1.z.string().nullable().optional(),
|
|
453
|
+
// ───── Resposta em áudio (feat-303) ─────
|
|
454
|
+
/** Ausente/`enabled: false` = HubIA só responde em texto. Exige o contrato
|
|
455
|
+
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
456
|
+
voice_reply: exports.zHubiaVoiceReplySchema.optional(),
|
|
400
457
|
}).passthrough();
|
|
401
458
|
// ───────── Evento `hubia-ticket-closed` (payload do tópico PubSub) ─────────
|
|
402
459
|
/** Disposição de fechamento publicada no evento. Os bridges publicam `null`
|
|
@@ -397,6 +397,74 @@ const zHubiaPromptOverridesSchema = z.object({
|
|
|
397
397
|
tool_usage: z.string().optional(),
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
+
// ───────── Resposta em áudio (feat-303) ─────────
|
|
401
|
+
|
|
402
|
+
/** Vozes do `gpt-4o-mini-tts` oferecidas na UI. O schema aceita qualquer string
|
|
403
|
+
* para o provedor poder mudar sem novo contrato. */
|
|
404
|
+
export const HUBIA_VOICE_REPLY_OPENAI_VOICES = [
|
|
405
|
+
'alloy', 'ash', 'ballad', 'coral', 'echo', 'fable', 'nova',
|
|
406
|
+
'onyx', 'sage', 'shimmer', 'verse', 'marin', 'cedar',
|
|
407
|
+
] as const;
|
|
408
|
+
|
|
409
|
+
export const HUBIA_VOICE_REPLY_DEFAULT_VOICE = 'coral';
|
|
410
|
+
|
|
411
|
+
/** Liga a resposta em áudio no binding. QUANDO usar áudio é regra do prompt do
|
|
412
|
+
* binding (o LLM decide por turno), não deste objeto. */
|
|
413
|
+
export const zHubiaVoiceReplySchema = z.object({
|
|
414
|
+
enabled: z.boolean().default(false),
|
|
415
|
+
voice: z.string().min(1).max(40).default(HUBIA_VOICE_REPLY_DEFAULT_VOICE),
|
|
416
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). */
|
|
417
|
+
instructions: z.string().max(1000).optional(),
|
|
418
|
+
/** 1.0 = normal. */
|
|
419
|
+
speed: z.number().min(0.75).max(1.5).optional(),
|
|
420
|
+
});
|
|
421
|
+
export type IHubiaVoiceReply = z.infer<typeof zHubiaVoiceReplySchema>;
|
|
422
|
+
|
|
423
|
+
export const zHubiaResponseModeSchema = z.enum(['text', 'audio']);
|
|
424
|
+
export type HubiaResponseMode = z.infer<typeof zHubiaResponseModeSchema>;
|
|
425
|
+
|
|
426
|
+
/** `conversations/{id}.pending_suggestion` (modo hybrid_assist). */
|
|
427
|
+
export const zHubiaPendingSuggestionSchema = z.object({
|
|
428
|
+
execution_id: z.string(),
|
|
429
|
+
messages: z.array(z.string()),
|
|
430
|
+
created_at: z.any(),
|
|
431
|
+
was_used: z.boolean().optional(),
|
|
432
|
+
/** Escolha do LLM; pré-marca "enviar como áudio" na caixa de sugestão. */
|
|
433
|
+
response_mode: zHubiaResponseModeSchema.optional(),
|
|
434
|
+
/** Binding + canal permitiam áudio no turno da sugestão. */
|
|
435
|
+
voice_available: z.boolean().optional(),
|
|
436
|
+
}).passthrough();
|
|
437
|
+
export type IHubiaPendingSuggestion = z.infer<typeof zHubiaPendingSuggestionSchema>;
|
|
438
|
+
|
|
439
|
+
/** Gravado na mensagem enviada a partir de uma sugestão da HubIA. */
|
|
440
|
+
export const zHubiaSuggestionMessageRefSchema = z.object({
|
|
441
|
+
execution_id: z.string(),
|
|
442
|
+
/** O operador alterou o texto antes de enviar. */
|
|
443
|
+
edited: z.boolean(),
|
|
444
|
+
mode: zHubiaResponseModeSchema,
|
|
445
|
+
}).passthrough();
|
|
446
|
+
export type IHubiaSuggestionMessageRef = z.infer<typeof zHubiaSuggestionMessageRefSchema>;
|
|
447
|
+
|
|
448
|
+
/** Desfecho da sugestão, gravado na execução que a gerou. */
|
|
449
|
+
export const zHubiaSuggestionOutcomeSchema = z.object({
|
|
450
|
+
status: z.enum(['sent', 'sent_edited', 'discarded']),
|
|
451
|
+
mode: zHubiaResponseModeSchema.optional(),
|
|
452
|
+
by_user_id: z.string().nullable().optional(),
|
|
453
|
+
at: z.any(),
|
|
454
|
+
}).passthrough();
|
|
455
|
+
export type IHubiaSuggestionOutcome = z.infer<typeof zHubiaSuggestionOutcomeSchema>;
|
|
456
|
+
|
|
457
|
+
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
458
|
+
export const zHubiaTtsMessageMetaSchema = z.object({
|
|
459
|
+
model: z.string(),
|
|
460
|
+
voice: z.string(),
|
|
461
|
+
format: z.enum(['ogg', 'mp3']),
|
|
462
|
+
chars: z.number(),
|
|
463
|
+
duration_seconds: z.number().nullable(),
|
|
464
|
+
execution_id: z.string().optional(),
|
|
465
|
+
}).passthrough();
|
|
466
|
+
export type IHubiaTtsMessageMeta = z.infer<typeof zHubiaTtsMessageMetaSchema>;
|
|
467
|
+
|
|
400
468
|
export const zAiBindingSchema = zFireDocSchema.extend({
|
|
401
469
|
agent_type: z.string(), // 'evo-hubia-v1', future: 'evo-hubia-v2', etc.
|
|
402
470
|
agent_config_id: z.string(), // ref to the agent's channel config doc
|
|
@@ -447,6 +515,11 @@ export const zAiBindingSchema = zFireDocSchema.extend({
|
|
|
447
515
|
* com `hubia` em `usable_for`) usada neste departamento. Vence o
|
|
448
516
|
* `llm_connection_id` do canal. `null`/ausente = herda do canal. */
|
|
449
517
|
llm_connection_id: z.string().nullable().optional(),
|
|
518
|
+
|
|
519
|
+
// ───── Resposta em áudio (feat-303) ─────
|
|
520
|
+
/** Ausente/`enabled: false` = HubIA só responde em texto. Exige o contrato
|
|
521
|
+
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
522
|
+
voice_reply: zHubiaVoiceReplySchema.optional(),
|
|
450
523
|
}).passthrough();
|
|
451
524
|
|
|
452
525
|
export type IAiBinding = z.infer<typeof zAiBindingSchema>;
|