evo360-types 1.3.748 → 1.3.752
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 +2 -2
- package/dist/apps/evo-hub-ia/v1/zod-schemas.d.ts +266 -22
- package/dist/apps/evo-hub-ia/v1/zod-schemas.js +60 -6
- package/dist/apps/evo-hub-ia/v1/zod-schemas.ts +69 -5
- package/dist/apps/evo-people/zod-schemas.d.ts +270 -0
- package/dist/apps/evo-people/zod-schemas.js +9 -1
- package/dist/apps/evo-people/zod-schemas.ts +9 -0
- package/dist/types/evo-people/index.d.ts +20 -0
- package/dist/types/evo-people/index.ts +17 -0
- package/dist/types/evo-reports/index.d.ts +3 -2
- package/dist/types/evo-reports/index.ts +3 -2
- package/package.json +1 -1
|
@@ -13127,6 +13127,7 @@ export declare const zCsqDryRunResultSchema: z.ZodObject<{
|
|
|
13127
13127
|
duration_ms: z.ZodNumber;
|
|
13128
13128
|
}, "strip", z.ZodTypeAny, {
|
|
13129
13129
|
duration_ms: number;
|
|
13130
|
+
model: string | null;
|
|
13130
13131
|
lead_id: string | null;
|
|
13131
13132
|
outcome: string;
|
|
13132
13133
|
channel_id: string;
|
|
@@ -13235,7 +13236,6 @@ export declare const zCsqDryRunResultSchema: z.ZodObject<{
|
|
|
13235
13236
|
error: z.ZodOptional<z.ZodString>;
|
|
13236
13237
|
}, z.ZodTypeAny, "passthrough"> | null;
|
|
13237
13238
|
evaluation_id: string | null;
|
|
13238
|
-
model: string | null;
|
|
13239
13239
|
cost_usd_est: number | null;
|
|
13240
13240
|
llm_provider: string | null;
|
|
13241
13241
|
llm_connection_id: string | null;
|
|
@@ -13245,6 +13245,7 @@ export declare const zCsqDryRunResultSchema: z.ZodObject<{
|
|
|
13245
13245
|
triage_mode: "skip_llm" | "full_review" | null;
|
|
13246
13246
|
}, {
|
|
13247
13247
|
duration_ms: number;
|
|
13248
|
+
model: string | null;
|
|
13248
13249
|
lead_id: string | null;
|
|
13249
13250
|
outcome: string;
|
|
13250
13251
|
channel_id: string;
|
|
@@ -13353,7 +13354,6 @@ export declare const zCsqDryRunResultSchema: z.ZodObject<{
|
|
|
13353
13354
|
error: z.ZodOptional<z.ZodString>;
|
|
13354
13355
|
}, z.ZodTypeAny, "passthrough"> | null;
|
|
13355
13356
|
evaluation_id: string | null;
|
|
13356
|
-
model: string | null;
|
|
13357
13357
|
cost_usd_est: number | null;
|
|
13358
13358
|
llm_provider: string | null;
|
|
13359
13359
|
llm_connection_id: string | null;
|
|
@@ -1615,25 +1615,158 @@ export declare const zHubiaRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1615
1615
|
* para o provedor poder mudar sem novo contrato. */
|
|
1616
1616
|
export declare const HUBIA_VOICE_REPLY_OPENAI_VOICES: readonly ["alloy", "ash", "ballad", "coral", "echo", "fable", "nova", "onyx", "sage", "shimmer", "verse", "marin", "cedar"];
|
|
1617
1617
|
export declare const HUBIA_VOICE_REPLY_DEFAULT_VOICE = "coral";
|
|
1618
|
-
/**
|
|
1619
|
-
|
|
1618
|
+
/** feat-303 F1.1: provedores de TTS. Ausente no binding = `openai`. */
|
|
1619
|
+
export declare const HUBIA_VOICE_REPLY_PROVIDERS: readonly ["openai", "elevenlabs"];
|
|
1620
|
+
export declare const zHubiaVoiceProviderSchema: z.ZodEnum<["openai", "elevenlabs"]>;
|
|
1621
|
+
export type HubiaVoiceProvider = z.infer<typeof zHubiaVoiceProviderSchema>;
|
|
1622
|
+
/** Modelo usado quando o binding não define `model`. */
|
|
1623
|
+
export declare const HUBIA_VOICE_REPLY_DEFAULT_MODEL: Record<HubiaVoiceProvider, string>;
|
|
1624
|
+
/** Modelos da ElevenLabs oferecidos na UI (o schema aceita qualquer string). */
|
|
1625
|
+
export declare const HUBIA_VOICE_REPLY_ELEVENLABS_MODELS: readonly ["eleven_v4", "eleven_v3", "eleven_multilingual_v2", "eleven_flash_v2_5"];
|
|
1626
|
+
/** Faixa de `speed` aceita pela ElevenLabs; o runtime limita a ela. */
|
|
1627
|
+
export declare const HUBIA_VOICE_REPLY_ELEVENLABS_SPEED: {
|
|
1628
|
+
readonly min: 0.7;
|
|
1629
|
+
readonly max: 1.2;
|
|
1630
|
+
};
|
|
1631
|
+
/** feat-303 F2.1: perfil de voz (fica no departamento, `voice_profile`). Sem `.default()`:
|
|
1632
|
+
* ler um departamento não pode "ganhar" uma voz que ninguém configurou. */
|
|
1633
|
+
export declare const zHubiaVoiceProfileSchema: z.ZodObject<{
|
|
1634
|
+
/** Ausente = `openai` quando há `voice`; sem provider nem voice = padrão da plataforma. */
|
|
1635
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1636
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
1637
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
1639
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
1641
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
1642
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
1643
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1644
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
1645
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
1646
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
1647
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
1648
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
1649
|
+
}, "strip", z.ZodTypeAny, {
|
|
1650
|
+
stability?: number | undefined;
|
|
1651
|
+
similarity_boost?: number | undefined;
|
|
1652
|
+
style?: number | undefined;
|
|
1653
|
+
}, {
|
|
1654
|
+
stability?: number | undefined;
|
|
1655
|
+
similarity_boost?: number | undefined;
|
|
1656
|
+
style?: number | undefined;
|
|
1657
|
+
}>>;
|
|
1658
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1659
|
+
/** Ausente = `openai` quando há `voice`; sem provider nem voice = padrão da plataforma. */
|
|
1660
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1661
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
1662
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1663
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
1664
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
1665
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
1666
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
1667
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
1668
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1669
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
1670
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
1671
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
1672
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
1673
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
1674
|
+
}, "strip", z.ZodTypeAny, {
|
|
1675
|
+
stability?: number | undefined;
|
|
1676
|
+
similarity_boost?: number | undefined;
|
|
1677
|
+
style?: number | undefined;
|
|
1678
|
+
}, {
|
|
1679
|
+
stability?: number | undefined;
|
|
1680
|
+
similarity_boost?: number | undefined;
|
|
1681
|
+
style?: number | undefined;
|
|
1682
|
+
}>>;
|
|
1683
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1684
|
+
/** Ausente = `openai` quando há `voice`; sem provider nem voice = padrão da plataforma. */
|
|
1685
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1686
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
1687
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1688
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
1689
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
1690
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
1691
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
1692
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
1693
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1694
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
1695
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
1696
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
1697
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
1698
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
1699
|
+
}, "strip", z.ZodTypeAny, {
|
|
1700
|
+
stability?: number | undefined;
|
|
1701
|
+
similarity_boost?: number | undefined;
|
|
1702
|
+
style?: number | undefined;
|
|
1703
|
+
}, {
|
|
1704
|
+
stability?: number | undefined;
|
|
1705
|
+
similarity_boost?: number | undefined;
|
|
1706
|
+
style?: number | undefined;
|
|
1707
|
+
}>>;
|
|
1708
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1709
|
+
export type IHubiaVoiceProfile = z.infer<typeof zHubiaVoiceProfileSchema>;
|
|
1710
|
+
/** Q16: voz padrão da plataforma (Roberta), quando nem o departamento nem o binding legado definem voz. */
|
|
1711
|
+
export declare const HUBIA_VOICE_PLATFORM_DEFAULT_PROFILE: {
|
|
1712
|
+
readonly provider: "elevenlabs";
|
|
1713
|
+
readonly voice: "RGymW84CSmfVugnA5tvA";
|
|
1714
|
+
readonly model: "eleven_v4";
|
|
1715
|
+
};
|
|
1716
|
+
/** Teto do "Enviar como áudio" do atendente (3 pedaços × 1.500). */
|
|
1717
|
+
export declare const HUBIA_HUMAN_TTS_MAX_CHARS = 4500;
|
|
1718
|
+
/** Liga a resposta em áudio da HubIA no binding. QUANDO usar áudio é regra do prompt do
|
|
1719
|
+
* binding (o LLM decide por turno). A voz vem do departamento (`voice_profile`). */
|
|
1620
1720
|
export declare const zHubiaVoiceReplySchema: z.ZodObject<{
|
|
1621
1721
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1622
|
-
|
|
1623
|
-
|
|
1722
|
+
/** @deprecated F2.1: a voz vem do departamento (`voice_profile`); lido só como legado. */
|
|
1723
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1724
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
1725
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1726
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
1727
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
1728
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
1624
1729
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1625
|
-
/** 1
|
|
1730
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
1626
1731
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
1732
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
1733
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
1734
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
1735
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
1736
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
1737
|
+
}, "strip", z.ZodTypeAny, {
|
|
1738
|
+
stability?: number | undefined;
|
|
1739
|
+
similarity_boost?: number | undefined;
|
|
1740
|
+
style?: number | undefined;
|
|
1741
|
+
}, {
|
|
1742
|
+
stability?: number | undefined;
|
|
1743
|
+
similarity_boost?: number | undefined;
|
|
1744
|
+
style?: number | undefined;
|
|
1745
|
+
}>>;
|
|
1627
1746
|
}, "strip", z.ZodTypeAny, {
|
|
1628
1747
|
enabled: boolean;
|
|
1629
|
-
|
|
1748
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
1749
|
+
elevenlabs?: {
|
|
1750
|
+
stability?: number | undefined;
|
|
1751
|
+
similarity_boost?: number | undefined;
|
|
1752
|
+
style?: number | undefined;
|
|
1753
|
+
} | undefined;
|
|
1754
|
+
model?: string | undefined;
|
|
1755
|
+
voice?: string | undefined;
|
|
1630
1756
|
instructions?: string | undefined;
|
|
1631
1757
|
speed?: number | undefined;
|
|
1632
1758
|
}, {
|
|
1633
|
-
|
|
1759
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
1760
|
+
elevenlabs?: {
|
|
1761
|
+
stability?: number | undefined;
|
|
1762
|
+
similarity_boost?: number | undefined;
|
|
1763
|
+
style?: number | undefined;
|
|
1764
|
+
} | undefined;
|
|
1765
|
+
model?: string | undefined;
|
|
1634
1766
|
voice?: string | undefined;
|
|
1635
1767
|
instructions?: string | undefined;
|
|
1636
1768
|
speed?: number | undefined;
|
|
1769
|
+
enabled?: boolean | undefined;
|
|
1637
1770
|
}>;
|
|
1638
1771
|
export type IHubiaVoiceReply = z.infer<typeof zHubiaVoiceReplySchema>;
|
|
1639
1772
|
export declare const zHubiaResponseModeSchema: z.ZodEnum<["text", "audio"]>;
|
|
@@ -1706,6 +1839,10 @@ export declare const zHubiaSuggestionOutcomeSchema: z.ZodObject<{
|
|
|
1706
1839
|
export type IHubiaSuggestionOutcome = z.infer<typeof zHubiaSuggestionOutcomeSchema>;
|
|
1707
1840
|
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
1708
1841
|
export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
1842
|
+
/** F2.1: quem pediu a síntese. Ausente = `hubia`. */
|
|
1843
|
+
origin: z.ZodOptional<z.ZodEnum<["hubia", "human"]>>;
|
|
1844
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
1845
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1709
1846
|
model: z.ZodString;
|
|
1710
1847
|
voice: z.ZodString;
|
|
1711
1848
|
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
@@ -1713,6 +1850,10 @@ export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
|
1713
1850
|
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1714
1851
|
execution_id: z.ZodOptional<z.ZodString>;
|
|
1715
1852
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1853
|
+
/** F2.1: quem pediu a síntese. Ausente = `hubia`. */
|
|
1854
|
+
origin: z.ZodOptional<z.ZodEnum<["hubia", "human"]>>;
|
|
1855
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
1856
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1716
1857
|
model: z.ZodString;
|
|
1717
1858
|
voice: z.ZodString;
|
|
1718
1859
|
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
@@ -1720,6 +1861,10 @@ export declare const zHubiaTtsMessageMetaSchema: z.ZodObject<{
|
|
|
1720
1861
|
duration_seconds: z.ZodNullable<z.ZodNumber>;
|
|
1721
1862
|
execution_id: z.ZodOptional<z.ZodString>;
|
|
1722
1863
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1864
|
+
/** F2.1: quem pediu a síntese. Ausente = `hubia`. */
|
|
1865
|
+
origin: z.ZodOptional<z.ZodEnum<["hubia", "human"]>>;
|
|
1866
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
1867
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
1723
1868
|
model: z.ZodString;
|
|
1724
1869
|
voice: z.ZodString;
|
|
1725
1870
|
format: z.ZodEnum<["ogg", "mp3"]>;
|
|
@@ -2498,21 +2643,54 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
2498
2643
|
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
2499
2644
|
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
2500
2645
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2501
|
-
|
|
2502
|
-
|
|
2646
|
+
/** @deprecated F2.1: a voz vem do departamento (`voice_profile`); lido só como legado. */
|
|
2647
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
2648
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
2649
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2650
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
2651
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
2652
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
2503
2653
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2504
|
-
/** 1
|
|
2654
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
2505
2655
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
2656
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
2657
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
2658
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
2659
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
2660
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
2661
|
+
}, "strip", z.ZodTypeAny, {
|
|
2662
|
+
stability?: number | undefined;
|
|
2663
|
+
similarity_boost?: number | undefined;
|
|
2664
|
+
style?: number | undefined;
|
|
2665
|
+
}, {
|
|
2666
|
+
stability?: number | undefined;
|
|
2667
|
+
similarity_boost?: number | undefined;
|
|
2668
|
+
style?: number | undefined;
|
|
2669
|
+
}>>;
|
|
2506
2670
|
}, "strip", z.ZodTypeAny, {
|
|
2507
2671
|
enabled: boolean;
|
|
2508
|
-
|
|
2672
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
2673
|
+
elevenlabs?: {
|
|
2674
|
+
stability?: number | undefined;
|
|
2675
|
+
similarity_boost?: number | undefined;
|
|
2676
|
+
style?: number | undefined;
|
|
2677
|
+
} | undefined;
|
|
2678
|
+
model?: string | undefined;
|
|
2679
|
+
voice?: string | undefined;
|
|
2509
2680
|
instructions?: string | undefined;
|
|
2510
2681
|
speed?: number | undefined;
|
|
2511
2682
|
}, {
|
|
2512
|
-
|
|
2683
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
2684
|
+
elevenlabs?: {
|
|
2685
|
+
stability?: number | undefined;
|
|
2686
|
+
similarity_boost?: number | undefined;
|
|
2687
|
+
style?: number | undefined;
|
|
2688
|
+
} | undefined;
|
|
2689
|
+
model?: string | undefined;
|
|
2513
2690
|
voice?: string | undefined;
|
|
2514
2691
|
instructions?: string | undefined;
|
|
2515
2692
|
speed?: number | undefined;
|
|
2693
|
+
enabled?: boolean | undefined;
|
|
2516
2694
|
}>>;
|
|
2517
2695
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2518
2696
|
id: z.ZodString;
|
|
@@ -3284,21 +3462,54 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
3284
3462
|
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
3285
3463
|
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
3286
3464
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3287
|
-
|
|
3288
|
-
|
|
3465
|
+
/** @deprecated F2.1: a voz vem do departamento (`voice_profile`); lido só como legado. */
|
|
3466
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
3467
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
3468
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3469
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
3470
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
3471
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
3289
3472
|
instructions: z.ZodOptional<z.ZodString>;
|
|
3290
|
-
/** 1
|
|
3473
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
3291
3474
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
3475
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
3476
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
3477
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
3478
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
3479
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
3480
|
+
}, "strip", z.ZodTypeAny, {
|
|
3481
|
+
stability?: number | undefined;
|
|
3482
|
+
similarity_boost?: number | undefined;
|
|
3483
|
+
style?: number | undefined;
|
|
3484
|
+
}, {
|
|
3485
|
+
stability?: number | undefined;
|
|
3486
|
+
similarity_boost?: number | undefined;
|
|
3487
|
+
style?: number | undefined;
|
|
3488
|
+
}>>;
|
|
3292
3489
|
}, "strip", z.ZodTypeAny, {
|
|
3293
3490
|
enabled: boolean;
|
|
3294
|
-
|
|
3491
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
3492
|
+
elevenlabs?: {
|
|
3493
|
+
stability?: number | undefined;
|
|
3494
|
+
similarity_boost?: number | undefined;
|
|
3495
|
+
style?: number | undefined;
|
|
3496
|
+
} | undefined;
|
|
3497
|
+
model?: string | undefined;
|
|
3498
|
+
voice?: string | undefined;
|
|
3295
3499
|
instructions?: string | undefined;
|
|
3296
3500
|
speed?: number | undefined;
|
|
3297
3501
|
}, {
|
|
3298
|
-
|
|
3502
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
3503
|
+
elevenlabs?: {
|
|
3504
|
+
stability?: number | undefined;
|
|
3505
|
+
similarity_boost?: number | undefined;
|
|
3506
|
+
style?: number | undefined;
|
|
3507
|
+
} | undefined;
|
|
3508
|
+
model?: string | undefined;
|
|
3299
3509
|
voice?: string | undefined;
|
|
3300
3510
|
instructions?: string | undefined;
|
|
3301
3511
|
speed?: number | undefined;
|
|
3512
|
+
enabled?: boolean | undefined;
|
|
3302
3513
|
}>>;
|
|
3303
3514
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3304
3515
|
id: z.ZodString;
|
|
@@ -4070,21 +4281,54 @@ export declare const zAiBindingSchema: z.ZodObject<{
|
|
|
4070
4281
|
* estruturado (`respond_to_contact`) ligado no canal. */
|
|
4071
4282
|
voice_reply: z.ZodOptional<z.ZodObject<{
|
|
4072
4283
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4073
|
-
|
|
4074
|
-
|
|
4284
|
+
/** @deprecated F2.1: a voz vem do departamento (`voice_profile`); lido só como legado. */
|
|
4285
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
4286
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
4287
|
+
model: z.ZodOptional<z.ZodString>;
|
|
4288
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
4289
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
4290
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
4075
4291
|
instructions: z.ZodOptional<z.ZodString>;
|
|
4076
|
-
/** 1
|
|
4292
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
4077
4293
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
4294
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
4295
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
4296
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
4297
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
4298
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
4299
|
+
}, "strip", z.ZodTypeAny, {
|
|
4300
|
+
stability?: number | undefined;
|
|
4301
|
+
similarity_boost?: number | undefined;
|
|
4302
|
+
style?: number | undefined;
|
|
4303
|
+
}, {
|
|
4304
|
+
stability?: number | undefined;
|
|
4305
|
+
similarity_boost?: number | undefined;
|
|
4306
|
+
style?: number | undefined;
|
|
4307
|
+
}>>;
|
|
4078
4308
|
}, "strip", z.ZodTypeAny, {
|
|
4079
4309
|
enabled: boolean;
|
|
4080
|
-
|
|
4310
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
4311
|
+
elevenlabs?: {
|
|
4312
|
+
stability?: number | undefined;
|
|
4313
|
+
similarity_boost?: number | undefined;
|
|
4314
|
+
style?: number | undefined;
|
|
4315
|
+
} | undefined;
|
|
4316
|
+
model?: string | undefined;
|
|
4317
|
+
voice?: string | undefined;
|
|
4081
4318
|
instructions?: string | undefined;
|
|
4082
4319
|
speed?: number | undefined;
|
|
4083
4320
|
}, {
|
|
4084
|
-
|
|
4321
|
+
provider?: "openai" | "elevenlabs" | undefined;
|
|
4322
|
+
elevenlabs?: {
|
|
4323
|
+
stability?: number | undefined;
|
|
4324
|
+
similarity_boost?: number | undefined;
|
|
4325
|
+
style?: number | undefined;
|
|
4326
|
+
} | undefined;
|
|
4327
|
+
model?: string | undefined;
|
|
4085
4328
|
voice?: string | undefined;
|
|
4086
4329
|
instructions?: string | undefined;
|
|
4087
4330
|
speed?: number | undefined;
|
|
4331
|
+
enabled?: boolean | undefined;
|
|
4088
4332
|
}>>;
|
|
4089
4333
|
}, z.ZodTypeAny, "passthrough">>;
|
|
4090
4334
|
export type IAiBinding = z.infer<typeof zAiBindingSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.zHubiaTicketClosedEventSchema = exports.zHubiaTicketClosedCloseSchema = exports.zAiBindingSchema = exports.zHubiaTtsMessageMetaSchema = exports.zHubiaSuggestionOutcomeSchema = exports.zHubiaSuggestionMessageRefSchema = exports.zHubiaPendingSuggestionSchema = exports.zHubiaResponseModeSchema = exports.zHubiaVoiceReplySchema = exports.HUBIA_HUMAN_TTS_MAX_CHARS = exports.HUBIA_VOICE_PLATFORM_DEFAULT_PROFILE = exports.zHubiaVoiceProfileSchema = exports.HUBIA_VOICE_REPLY_ELEVENLABS_SPEED = exports.HUBIA_VOICE_REPLY_ELEVENLABS_MODELS = exports.HUBIA_VOICE_REPLY_DEFAULT_MODEL = exports.zHubiaVoiceProviderSchema = exports.HUBIA_VOICE_REPLY_PROVIDERS = 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");
|
|
@@ -358,15 +358,65 @@ exports.HUBIA_VOICE_REPLY_OPENAI_VOICES = [
|
|
|
358
358
|
'onyx', 'sage', 'shimmer', 'verse', 'marin', 'cedar',
|
|
359
359
|
];
|
|
360
360
|
exports.HUBIA_VOICE_REPLY_DEFAULT_VOICE = 'coral';
|
|
361
|
-
/**
|
|
362
|
-
|
|
361
|
+
/** feat-303 F1.1: provedores de TTS. Ausente no binding = `openai`. */
|
|
362
|
+
exports.HUBIA_VOICE_REPLY_PROVIDERS = ['openai', 'elevenlabs'];
|
|
363
|
+
exports.zHubiaVoiceProviderSchema = zod_1.z.enum(exports.HUBIA_VOICE_REPLY_PROVIDERS);
|
|
364
|
+
/** Modelo usado quando o binding não define `model`. */
|
|
365
|
+
exports.HUBIA_VOICE_REPLY_DEFAULT_MODEL = {
|
|
366
|
+
openai: 'gpt-4o-mini-tts',
|
|
367
|
+
elevenlabs: 'eleven_v4',
|
|
368
|
+
};
|
|
369
|
+
/** Modelos da ElevenLabs oferecidos na UI (o schema aceita qualquer string). */
|
|
370
|
+
exports.HUBIA_VOICE_REPLY_ELEVENLABS_MODELS = [
|
|
371
|
+
'eleven_v4', 'eleven_v3', 'eleven_multilingual_v2', 'eleven_flash_v2_5',
|
|
372
|
+
];
|
|
373
|
+
/** Faixa de `speed` aceita pela ElevenLabs; o runtime limita a ela. */
|
|
374
|
+
exports.HUBIA_VOICE_REPLY_ELEVENLABS_SPEED = { min: 0.7, max: 1.2 };
|
|
375
|
+
const zHubiaElevenLabsSettingsSchema = zod_1.z.object({
|
|
376
|
+
stability: zod_1.z.number().min(0).max(1).optional(),
|
|
377
|
+
similarity_boost: zod_1.z.number().min(0).max(1).optional(),
|
|
378
|
+
style: zod_1.z.number().min(0).max(1).optional(),
|
|
379
|
+
});
|
|
380
|
+
/** feat-303 F2.1: perfil de voz (fica no departamento, `voice_profile`). Sem `.default()`:
|
|
381
|
+
* ler um departamento não pode "ganhar" uma voz que ninguém configurou. */
|
|
382
|
+
exports.zHubiaVoiceProfileSchema = zod_1.z.object({
|
|
383
|
+
/** Ausente = `openai` quando há `voice`; sem provider nem voice = padrão da plataforma. */
|
|
384
|
+
provider: exports.zHubiaVoiceProviderSchema.optional(),
|
|
385
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
386
|
+
model: zod_1.z.string().min(1).max(60).optional(),
|
|
387
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
388
|
+
voice: zod_1.z.string().min(1).max(40).optional(),
|
|
389
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
390
|
+
instructions: zod_1.z.string().max(1000).optional(),
|
|
391
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
392
|
+
speed: zod_1.z.number().min(0.7).max(1.5).optional(),
|
|
393
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
394
|
+
elevenlabs: zHubiaElevenLabsSettingsSchema.optional(),
|
|
395
|
+
}).passthrough();
|
|
396
|
+
/** Q16: voz padrão da plataforma (Roberta), quando nem o departamento nem o binding legado definem voz. */
|
|
397
|
+
exports.HUBIA_VOICE_PLATFORM_DEFAULT_PROFILE = {
|
|
398
|
+
provider: 'elevenlabs',
|
|
399
|
+
voice: 'RGymW84CSmfVugnA5tvA',
|
|
400
|
+
model: 'eleven_v4',
|
|
401
|
+
};
|
|
402
|
+
/** Teto do "Enviar como áudio" do atendente (3 pedaços × 1.500). */
|
|
403
|
+
exports.HUBIA_HUMAN_TTS_MAX_CHARS = 4500;
|
|
404
|
+
/** Liga a resposta em áudio da HubIA no binding. QUANDO usar áudio é regra do prompt do
|
|
405
|
+
* binding (o LLM decide por turno). A voz vem do departamento (`voice_profile`). */
|
|
363
406
|
exports.zHubiaVoiceReplySchema = zod_1.z.object({
|
|
364
407
|
enabled: zod_1.z.boolean().default(false),
|
|
365
|
-
|
|
366
|
-
|
|
408
|
+
/** @deprecated F2.1: a voz vem do departamento (`voice_profile`); lido só como legado. */
|
|
409
|
+
provider: exports.zHubiaVoiceProviderSchema.optional(),
|
|
410
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
411
|
+
model: zod_1.z.string().min(1).max(60).optional(),
|
|
412
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
413
|
+
voice: zod_1.z.string().min(1).max(40).optional(),
|
|
414
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
367
415
|
instructions: zod_1.z.string().max(1000).optional(),
|
|
368
|
-
/** 1
|
|
416
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
369
417
|
speed: zod_1.z.number().min(0.75).max(1.5).optional(),
|
|
418
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
419
|
+
elevenlabs: zHubiaElevenLabsSettingsSchema.optional(),
|
|
370
420
|
});
|
|
371
421
|
exports.zHubiaResponseModeSchema = zod_1.z.enum(['text', 'audio']);
|
|
372
422
|
/** `conversations/{id}.pending_suggestion` (modo hybrid_assist). */
|
|
@@ -396,6 +446,10 @@ exports.zHubiaSuggestionOutcomeSchema = zod_1.z.object({
|
|
|
396
446
|
}).passthrough();
|
|
397
447
|
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
398
448
|
exports.zHubiaTtsMessageMetaSchema = zod_1.z.object({
|
|
449
|
+
/** F2.1: quem pediu a síntese. Ausente = `hubia`. */
|
|
450
|
+
origin: zod_1.z.enum(['hubia', 'human']).optional(),
|
|
451
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
452
|
+
provider: exports.zHubiaVoiceProviderSchema.optional(),
|
|
399
453
|
model: zod_1.z.string(),
|
|
400
454
|
voice: zod_1.z.string(),
|
|
401
455
|
format: zod_1.z.enum(['ogg', 'mp3']),
|
|
@@ -408,15 +408,75 @@ export const HUBIA_VOICE_REPLY_OPENAI_VOICES = [
|
|
|
408
408
|
|
|
409
409
|
export const HUBIA_VOICE_REPLY_DEFAULT_VOICE = 'coral';
|
|
410
410
|
|
|
411
|
-
/**
|
|
412
|
-
|
|
411
|
+
/** feat-303 F1.1: provedores de TTS. Ausente no binding = `openai`. */
|
|
412
|
+
export const HUBIA_VOICE_REPLY_PROVIDERS = ['openai', 'elevenlabs'] as const;
|
|
413
|
+
export const zHubiaVoiceProviderSchema = z.enum(HUBIA_VOICE_REPLY_PROVIDERS);
|
|
414
|
+
export type HubiaVoiceProvider = z.infer<typeof zHubiaVoiceProviderSchema>;
|
|
415
|
+
|
|
416
|
+
/** Modelo usado quando o binding não define `model`. */
|
|
417
|
+
export const HUBIA_VOICE_REPLY_DEFAULT_MODEL: Record<HubiaVoiceProvider, string> = {
|
|
418
|
+
openai: 'gpt-4o-mini-tts',
|
|
419
|
+
elevenlabs: 'eleven_v4',
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
/** Modelos da ElevenLabs oferecidos na UI (o schema aceita qualquer string). */
|
|
423
|
+
export const HUBIA_VOICE_REPLY_ELEVENLABS_MODELS = [
|
|
424
|
+
'eleven_v4', 'eleven_v3', 'eleven_multilingual_v2', 'eleven_flash_v2_5',
|
|
425
|
+
] as const;
|
|
426
|
+
|
|
427
|
+
/** Faixa de `speed` aceita pela ElevenLabs; o runtime limita a ela. */
|
|
428
|
+
export const HUBIA_VOICE_REPLY_ELEVENLABS_SPEED = { min: 0.7, max: 1.2 } as const;
|
|
429
|
+
|
|
430
|
+
const zHubiaElevenLabsSettingsSchema = z.object({
|
|
431
|
+
stability: z.number().min(0).max(1).optional(),
|
|
432
|
+
similarity_boost: z.number().min(0).max(1).optional(),
|
|
433
|
+
style: z.number().min(0).max(1).optional(),
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
/** feat-303 F2.1: perfil de voz (fica no departamento, `voice_profile`). Sem `.default()`:
|
|
437
|
+
* ler um departamento não pode "ganhar" uma voz que ninguém configurou. */
|
|
438
|
+
export const zHubiaVoiceProfileSchema = z.object({
|
|
439
|
+
/** Ausente = `openai` quando há `voice`; sem provider nem voice = padrão da plataforma. */
|
|
440
|
+
provider: zHubiaVoiceProviderSchema.optional(),
|
|
441
|
+
/** Ausente = `HUBIA_VOICE_REPLY_DEFAULT_MODEL[provider]`. */
|
|
442
|
+
model: z.string().min(1).max(60).optional(),
|
|
443
|
+
/** OpenAI: nome da voz (`coral`). ElevenLabs: `voice_id` (`RGymW84CSmfVugnA5tvA`). */
|
|
444
|
+
voice: z.string().min(1).max(40).optional(),
|
|
445
|
+
/** Tom/estilo da fala ("cordial, ritmo calmo"). Só a OpenAI usa. */
|
|
446
|
+
instructions: z.string().max(1000).optional(),
|
|
447
|
+
/** 1.0 = normal. Na ElevenLabs o runtime limita a 0.7–1.2. */
|
|
448
|
+
speed: z.number().min(0.7).max(1.5).optional(),
|
|
449
|
+
/** Ajustes da voz na ElevenLabs (`voice_settings`). Ausente = os da voz. */
|
|
450
|
+
elevenlabs: zHubiaElevenLabsSettingsSchema.optional(),
|
|
451
|
+
}).passthrough();
|
|
452
|
+
export type IHubiaVoiceProfile = z.infer<typeof zHubiaVoiceProfileSchema>;
|
|
453
|
+
|
|
454
|
+
/** Q16: voz padrão da plataforma (Roberta), quando nem o departamento nem o binding legado definem voz. */
|
|
455
|
+
export const HUBIA_VOICE_PLATFORM_DEFAULT_PROFILE = {
|
|
456
|
+
provider: 'elevenlabs',
|
|
457
|
+
voice: 'RGymW84CSmfVugnA5tvA',
|
|
458
|
+
model: 'eleven_v4',
|
|
459
|
+
} as const satisfies IHubiaVoiceProfile;
|
|
460
|
+
|
|
461
|
+
/** Teto do "Enviar como áudio" do atendente (3 pedaços × 1.500). */
|
|
462
|
+
export const HUBIA_HUMAN_TTS_MAX_CHARS = 4500;
|
|
463
|
+
|
|
464
|
+
/** Liga a resposta em áudio da HubIA no binding. QUANDO usar áudio é regra do prompt do
|
|
465
|
+
* binding (o LLM decide por turno). A voz vem do departamento (`voice_profile`). */
|
|
413
466
|
export const zHubiaVoiceReplySchema = z.object({
|
|
414
467
|
enabled: z.boolean().default(false),
|
|
415
|
-
|
|
416
|
-
|
|
468
|
+
/** @deprecated F2.1: a voz vem do departamento (`voice_profile`); lido só como legado. */
|
|
469
|
+
provider: zHubiaVoiceProviderSchema.optional(),
|
|
470
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
471
|
+
model: z.string().min(1).max(60).optional(),
|
|
472
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
473
|
+
voice: z.string().min(1).max(40).optional(),
|
|
474
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
417
475
|
instructions: z.string().max(1000).optional(),
|
|
418
|
-
/** 1
|
|
476
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
419
477
|
speed: z.number().min(0.75).max(1.5).optional(),
|
|
478
|
+
/** @deprecated F2.1: ver `provider`. */
|
|
479
|
+
elevenlabs: zHubiaElevenLabsSettingsSchema.optional(),
|
|
420
480
|
});
|
|
421
481
|
export type IHubiaVoiceReply = z.infer<typeof zHubiaVoiceReplySchema>;
|
|
422
482
|
|
|
@@ -456,6 +516,10 @@ export type IHubiaSuggestionOutcome = z.infer<typeof zHubiaSuggestionOutcomeSche
|
|
|
456
516
|
|
|
457
517
|
/** Metadados da nota de voz gerada pela HubIA, gravados na mensagem. */
|
|
458
518
|
export const zHubiaTtsMessageMetaSchema = z.object({
|
|
519
|
+
/** F2.1: quem pediu a síntese. Ausente = `hubia`. */
|
|
520
|
+
origin: z.enum(['hubia', 'human']).optional(),
|
|
521
|
+
/** F1.1. Ausente nas mensagens gravadas antes = `openai`. */
|
|
522
|
+
provider: zHubiaVoiceProviderSchema.optional(),
|
|
459
523
|
model: z.string(),
|
|
460
524
|
voice: z.string(),
|
|
461
525
|
format: z.enum(['ogg', 'mp3']),
|
|
@@ -1,4 +1,73 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
/** feat-303 F2.1: "Voz do departamento" — usada pelo "Enviar como áudio" do atendente e
|
|
3
|
+
* herdada pela resposta em áudio da HubIA (binding `voice_reply.enabled`). */
|
|
4
|
+
export declare const zDepartmentVoiceProfileSchema: z.ZodObject<{
|
|
5
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
6
|
+
model: z.ZodOptional<z.ZodString>;
|
|
7
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
8
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
9
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
stability?: number | undefined;
|
|
16
|
+
similarity_boost?: number | undefined;
|
|
17
|
+
style?: number | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
stability?: number | undefined;
|
|
20
|
+
similarity_boost?: number | undefined;
|
|
21
|
+
style?: number | undefined;
|
|
22
|
+
}>>;
|
|
23
|
+
} & {
|
|
24
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
25
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
27
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
28
|
+
model: z.ZodOptional<z.ZodString>;
|
|
29
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
30
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
31
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
stability?: number | undefined;
|
|
38
|
+
similarity_boost?: number | undefined;
|
|
39
|
+
style?: number | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
stability?: number | undefined;
|
|
42
|
+
similarity_boost?: number | undefined;
|
|
43
|
+
style?: number | undefined;
|
|
44
|
+
}>>;
|
|
45
|
+
} & {
|
|
46
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
47
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
49
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
50
|
+
model: z.ZodOptional<z.ZodString>;
|
|
51
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
52
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
53
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
stability?: number | undefined;
|
|
60
|
+
similarity_boost?: number | undefined;
|
|
61
|
+
style?: number | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
stability?: number | undefined;
|
|
64
|
+
similarity_boost?: number | undefined;
|
|
65
|
+
style?: number | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
} & {
|
|
68
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
69
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2
71
|
export declare const zPeopleActionSchema: z.ZodEnum<["CREATE_COMPANY", "DELETE_COMPANY", "UPDATE_COMPANY", "UPDATE_COMPANY_LEAD", "UPDATE_COMPANY_NAME", "CREATE_OFFICE", "DELETE_OFFICE", "UPDATE_OFFICE", "UPDATE_OFFICE_NAME", "UPDATE_OFFICE_TIMEZONE", "UPDATE_OFFICE_COMPANY", "UPDATE_OFFICE_LEAD", "CREATE_DEPARTMENT", "DELETE_DEPARTMENT", "UPDATE_DEPARTMENT", "UPDATE_DEPARTMENT_PARENT_DEPARTMENT", "UPDATE_DEPARTMENT_LEAD", "UPDATE_DEPARTMENT_NAME", "CREATE_EMPLOYEE", "DELETE_EMPLOYEE", "UPDATE_EMPLOYEE", "UPDATE_EMPLOYEE_PHOTO", "UPDATE_PROFILE", "UPDATE_PHOTO", "UPDATE_PASSWORD", "UPDATE_EMPLOYEE_REPORT_TO", "UPDATE_EMPLOYEE_DEPARTMENT", "UPDATE_EMPLOYEE_OFFICE", "UPDATE_EMPLOYEE_COMPANY", "UPDATE_EMPLOYEE_JOB_TITLE", "UPDATE_EMPLOYEE_WORK_EMAIL", "UPDATE_EMPLOYEE_STATUS"]>;
|
|
3
72
|
export declare const zProfileSchema: z.ZodObject<{
|
|
4
73
|
id: z.ZodString;
|
|
@@ -247,6 +316,73 @@ export declare const zDepartmentSchema: z.ZodObject<{
|
|
|
247
316
|
}>, "many">>>;
|
|
248
317
|
chat_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
249
318
|
chat_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
319
|
+
voice_profile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
320
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
321
|
+
model: z.ZodOptional<z.ZodString>;
|
|
322
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
323
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
324
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
327
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
328
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
stability?: number | undefined;
|
|
331
|
+
similarity_boost?: number | undefined;
|
|
332
|
+
style?: number | undefined;
|
|
333
|
+
}, {
|
|
334
|
+
stability?: number | undefined;
|
|
335
|
+
similarity_boost?: number | undefined;
|
|
336
|
+
style?: number | undefined;
|
|
337
|
+
}>>;
|
|
338
|
+
} & {
|
|
339
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
340
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
342
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
343
|
+
model: z.ZodOptional<z.ZodString>;
|
|
344
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
345
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
346
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
}, "strip", z.ZodTypeAny, {
|
|
352
|
+
stability?: number | undefined;
|
|
353
|
+
similarity_boost?: number | undefined;
|
|
354
|
+
style?: number | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
stability?: number | undefined;
|
|
357
|
+
similarity_boost?: number | undefined;
|
|
358
|
+
style?: number | undefined;
|
|
359
|
+
}>>;
|
|
360
|
+
} & {
|
|
361
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
362
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
363
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
364
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
365
|
+
model: z.ZodOptional<z.ZodString>;
|
|
366
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
367
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
368
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
370
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
372
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
373
|
+
}, "strip", z.ZodTypeAny, {
|
|
374
|
+
stability?: number | undefined;
|
|
375
|
+
similarity_boost?: number | undefined;
|
|
376
|
+
style?: number | undefined;
|
|
377
|
+
}, {
|
|
378
|
+
stability?: number | undefined;
|
|
379
|
+
similarity_boost?: number | undefined;
|
|
380
|
+
style?: number | undefined;
|
|
381
|
+
}>>;
|
|
382
|
+
} & {
|
|
383
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
384
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
385
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
250
386
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
251
387
|
id: z.ZodString;
|
|
252
388
|
ref: z.ZodAny;
|
|
@@ -284,6 +420,73 @@ export declare const zDepartmentSchema: z.ZodObject<{
|
|
|
284
420
|
}>, "many">>>;
|
|
285
421
|
chat_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
286
422
|
chat_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
voice_profile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
424
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
425
|
+
model: z.ZodOptional<z.ZodString>;
|
|
426
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
427
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
428
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
430
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
431
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
433
|
+
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
stability?: number | undefined;
|
|
435
|
+
similarity_boost?: number | undefined;
|
|
436
|
+
style?: number | undefined;
|
|
437
|
+
}, {
|
|
438
|
+
stability?: number | undefined;
|
|
439
|
+
similarity_boost?: number | undefined;
|
|
440
|
+
style?: number | undefined;
|
|
441
|
+
}>>;
|
|
442
|
+
} & {
|
|
443
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
444
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
446
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
447
|
+
model: z.ZodOptional<z.ZodString>;
|
|
448
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
449
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
450
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
451
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
452
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
453
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
454
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
455
|
+
}, "strip", z.ZodTypeAny, {
|
|
456
|
+
stability?: number | undefined;
|
|
457
|
+
similarity_boost?: number | undefined;
|
|
458
|
+
style?: number | undefined;
|
|
459
|
+
}, {
|
|
460
|
+
stability?: number | undefined;
|
|
461
|
+
similarity_boost?: number | undefined;
|
|
462
|
+
style?: number | undefined;
|
|
463
|
+
}>>;
|
|
464
|
+
} & {
|
|
465
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
466
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
467
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
468
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
469
|
+
model: z.ZodOptional<z.ZodString>;
|
|
470
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
471
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
472
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
473
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
474
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
475
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
476
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
477
|
+
}, "strip", z.ZodTypeAny, {
|
|
478
|
+
stability?: number | undefined;
|
|
479
|
+
similarity_boost?: number | undefined;
|
|
480
|
+
style?: number | undefined;
|
|
481
|
+
}, {
|
|
482
|
+
stability?: number | undefined;
|
|
483
|
+
similarity_boost?: number | undefined;
|
|
484
|
+
style?: number | undefined;
|
|
485
|
+
}>>;
|
|
486
|
+
} & {
|
|
487
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
488
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
489
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
287
490
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
288
491
|
id: z.ZodString;
|
|
289
492
|
ref: z.ZodAny;
|
|
@@ -321,6 +524,73 @@ export declare const zDepartmentSchema: z.ZodObject<{
|
|
|
321
524
|
}>, "many">>>;
|
|
322
525
|
chat_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
323
526
|
chat_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
527
|
+
voice_profile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
528
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
529
|
+
model: z.ZodOptional<z.ZodString>;
|
|
530
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
531
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
532
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
533
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
534
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
535
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
536
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
537
|
+
}, "strip", z.ZodTypeAny, {
|
|
538
|
+
stability?: number | undefined;
|
|
539
|
+
similarity_boost?: number | undefined;
|
|
540
|
+
style?: number | undefined;
|
|
541
|
+
}, {
|
|
542
|
+
stability?: number | undefined;
|
|
543
|
+
similarity_boost?: number | undefined;
|
|
544
|
+
style?: number | undefined;
|
|
545
|
+
}>>;
|
|
546
|
+
} & {
|
|
547
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
548
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
549
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
550
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
551
|
+
model: z.ZodOptional<z.ZodString>;
|
|
552
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
553
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
554
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
556
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
557
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
558
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
559
|
+
}, "strip", z.ZodTypeAny, {
|
|
560
|
+
stability?: number | undefined;
|
|
561
|
+
similarity_boost?: number | undefined;
|
|
562
|
+
style?: number | undefined;
|
|
563
|
+
}, {
|
|
564
|
+
stability?: number | undefined;
|
|
565
|
+
similarity_boost?: number | undefined;
|
|
566
|
+
style?: number | undefined;
|
|
567
|
+
}>>;
|
|
568
|
+
} & {
|
|
569
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
570
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
571
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
572
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "elevenlabs"]>>;
|
|
573
|
+
model: z.ZodOptional<z.ZodString>;
|
|
574
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
575
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
576
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
577
|
+
elevenlabs: z.ZodOptional<z.ZodObject<{
|
|
578
|
+
stability: z.ZodOptional<z.ZodNumber>;
|
|
579
|
+
similarity_boost: z.ZodOptional<z.ZodNumber>;
|
|
580
|
+
style: z.ZodOptional<z.ZodNumber>;
|
|
581
|
+
}, "strip", z.ZodTypeAny, {
|
|
582
|
+
stability?: number | undefined;
|
|
583
|
+
similarity_boost?: number | undefined;
|
|
584
|
+
style?: number | undefined;
|
|
585
|
+
}, {
|
|
586
|
+
stability?: number | undefined;
|
|
587
|
+
similarity_boost?: number | undefined;
|
|
588
|
+
style?: number | undefined;
|
|
589
|
+
}>>;
|
|
590
|
+
} & {
|
|
591
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
592
|
+
human_tts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
593
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
324
594
|
}, z.ZodTypeAny, "passthrough">>;
|
|
325
595
|
export declare const zOfficeSchema: z.ZodObject<{
|
|
326
596
|
id: z.ZodString;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zCompanySchema = exports.zOfficeSchema = exports.zDepartmentSchema = exports.zEmployeeSchema = exports.zEmployeeStatusSchema = exports.zProfileSchema = exports.zPeopleActionSchema = void 0;
|
|
3
|
+
exports.zCompanySchema = exports.zOfficeSchema = exports.zDepartmentSchema = exports.zEmployeeSchema = exports.zEmployeeStatusSchema = exports.zProfileSchema = exports.zPeopleActionSchema = exports.zDepartmentVoiceProfileSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
|
+
const zod_schemas_2 = require("../evo-hub-ia/v1/zod-schemas");
|
|
7
|
+
/** feat-303 F2.1: "Voz do departamento" — usada pelo "Enviar como áudio" do atendente e
|
|
8
|
+
* herdada pela resposta em áudio da HubIA (binding `voice_reply.enabled`). */
|
|
9
|
+
exports.zDepartmentVoiceProfileSchema = zod_schemas_2.zHubiaVoiceProfileSchema.extend({
|
|
10
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
11
|
+
human_tts_enabled: zod_1.z.boolean().optional(),
|
|
12
|
+
});
|
|
6
13
|
exports.zPeopleActionSchema = zod_1.z.enum([
|
|
7
14
|
"CREATE_COMPANY",
|
|
8
15
|
"DELETE_COMPANY",
|
|
@@ -88,6 +95,7 @@ exports.zDepartmentSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocS
|
|
|
88
95
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
89
96
|
chat_enabled: zod_1.z.boolean().nullable().optional(),
|
|
90
97
|
chat_color: zod_1.z.string().nullable().optional(),
|
|
98
|
+
voice_profile: exports.zDepartmentVoiceProfileSchema.nullable().optional(),
|
|
91
99
|
})
|
|
92
100
|
.passthrough();
|
|
93
101
|
exports.zOfficeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zFireDocSchema, zTagSchema } from "../shared/zod-schemas";
|
|
3
|
+
import { zHubiaVoiceProfileSchema } from "../evo-hub-ia/v1/zod-schemas";
|
|
4
|
+
|
|
5
|
+
/** feat-303 F2.1: "Voz do departamento" — usada pelo "Enviar como áudio" do atendente e
|
|
6
|
+
* herdada pela resposta em áudio da HubIA (binding `voice_reply.enabled`). */
|
|
7
|
+
export const zDepartmentVoiceProfileSchema = zHubiaVoiceProfileSchema.extend({
|
|
8
|
+
/** "Habilitar TTS em resposta humana". Ausente = desligado. */
|
|
9
|
+
human_tts_enabled: z.boolean().optional(),
|
|
10
|
+
});
|
|
3
11
|
|
|
4
12
|
export const zPeopleActionSchema = z.enum([
|
|
5
13
|
"CREATE_COMPANY",
|
|
@@ -90,6 +98,7 @@ export const zDepartmentSchema = zFireDocSchema // Extend from FireDocSchema
|
|
|
90
98
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
91
99
|
chat_enabled: z.boolean().nullable().optional(),
|
|
92
100
|
chat_color: z.string().nullable().optional(),
|
|
101
|
+
voice_profile: zDepartmentVoiceProfileSchema.nullable().optional(),
|
|
93
102
|
})
|
|
94
103
|
.passthrough();
|
|
95
104
|
|
|
@@ -123,6 +123,26 @@ export interface IDepartment extends IFireDoc {
|
|
|
123
123
|
chat_enabled?: boolean | null;
|
|
124
124
|
/** Color for UI rendering in hub-omni (e.g., '#4CAF50'). */
|
|
125
125
|
chat_color?: string | null;
|
|
126
|
+
/** feat-303 F2.1: "Voz do departamento" (TTS do atendente e voz herdada pela HubIA). */
|
|
127
|
+
voice_profile?: IDepartmentVoiceProfile | null;
|
|
128
|
+
}
|
|
129
|
+
/** feat-303 F2.1: perfil de voz do departamento. Sem provider nem voice = padrão da plataforma (Roberta). */
|
|
130
|
+
export interface IDepartmentVoiceProfile {
|
|
131
|
+
provider?: "openai" | "elevenlabs";
|
|
132
|
+
model?: string;
|
|
133
|
+
/** OpenAI: nome da voz. ElevenLabs: `voice_id`. */
|
|
134
|
+
voice?: string;
|
|
135
|
+
/** Só OpenAI. */
|
|
136
|
+
instructions?: string;
|
|
137
|
+
speed?: number;
|
|
138
|
+
elevenlabs?: {
|
|
139
|
+
stability?: number;
|
|
140
|
+
similarity_boost?: number;
|
|
141
|
+
style?: number;
|
|
142
|
+
};
|
|
143
|
+
/** "Habilitar TTS em resposta humana" (botão "Enviar como áudio" no compositor). */
|
|
144
|
+
human_tts_enabled?: boolean;
|
|
145
|
+
[key: string]: unknown;
|
|
126
146
|
}
|
|
127
147
|
export interface IOffice extends IFireDoc {
|
|
128
148
|
code: string;
|
|
@@ -188,6 +188,23 @@ export interface IDepartment extends IFireDoc {
|
|
|
188
188
|
chat_enabled?: boolean | null;
|
|
189
189
|
/** Color for UI rendering in hub-omni (e.g., '#4CAF50'). */
|
|
190
190
|
chat_color?: string | null;
|
|
191
|
+
/** feat-303 F2.1: "Voz do departamento" (TTS do atendente e voz herdada pela HubIA). */
|
|
192
|
+
voice_profile?: IDepartmentVoiceProfile | null;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** feat-303 F2.1: perfil de voz do departamento. Sem provider nem voice = padrão da plataforma (Roberta). */
|
|
196
|
+
export interface IDepartmentVoiceProfile {
|
|
197
|
+
provider?: "openai" | "elevenlabs";
|
|
198
|
+
model?: string;
|
|
199
|
+
/** OpenAI: nome da voz. ElevenLabs: `voice_id`. */
|
|
200
|
+
voice?: string;
|
|
201
|
+
/** Só OpenAI. */
|
|
202
|
+
instructions?: string;
|
|
203
|
+
speed?: number;
|
|
204
|
+
elevenlabs?: { stability?: number; similarity_boost?: number; style?: number };
|
|
205
|
+
/** "Habilitar TTS em resposta humana" (botão "Enviar como áudio" no compositor). */
|
|
206
|
+
human_tts_enabled?: boolean;
|
|
207
|
+
[key: string]: unknown;
|
|
191
208
|
}
|
|
192
209
|
|
|
193
210
|
export interface IOffice extends IFireDoc {
|
|
@@ -122,9 +122,10 @@ export interface IUsageLlm {
|
|
|
122
122
|
* `AiUsageCategory` do `@evo/hubia`, sem as internas como `csq_judge`).
|
|
123
123
|
* - `hubia`: atendimento (turnos do LLM, reativação, busca de família).
|
|
124
124
|
* - `attachment_analysis`: leitura de foto/PDF pelo classificador de anexos.
|
|
125
|
-
* - `audio_synthesis`:
|
|
125
|
+
* - `audio_synthesis`: nota de voz gerada pela HubIA (feat-303).
|
|
126
|
+
* - `human_audio_synthesis`: "Enviar como áudio" do atendente (TTS; 1 linha por áudio enviado).
|
|
126
127
|
*/
|
|
127
|
-
export type UsageAiCategory = "hubia" | "attachment_analysis" | "audio_synthesis";
|
|
128
|
+
export type UsageAiCategory = "hubia" | "attachment_analysis" | "audio_synthesis" | "human_audio_synthesis";
|
|
128
129
|
export interface IUsageLlmCategory {
|
|
129
130
|
/** Chamadas ao LLM nesta categoria (execuções/análises, dedup por evento). */
|
|
130
131
|
turnos: number;
|
|
@@ -143,9 +143,10 @@ export interface IUsageLlm {
|
|
|
143
143
|
* `AiUsageCategory` do `@evo/hubia`, sem as internas como `csq_judge`).
|
|
144
144
|
* - `hubia`: atendimento (turnos do LLM, reativação, busca de família).
|
|
145
145
|
* - `attachment_analysis`: leitura de foto/PDF pelo classificador de anexos.
|
|
146
|
-
* - `audio_synthesis`:
|
|
146
|
+
* - `audio_synthesis`: nota de voz gerada pela HubIA (feat-303).
|
|
147
|
+
* - `human_audio_synthesis`: "Enviar como áudio" do atendente (TTS; 1 linha por áudio enviado).
|
|
147
148
|
*/
|
|
148
|
-
export type UsageAiCategory = "hubia" | "attachment_analysis" | "audio_synthesis";
|
|
149
|
+
export type UsageAiCategory = "hubia" | "attachment_analysis" | "audio_synthesis" | "human_audio_synthesis";
|
|
149
150
|
|
|
150
151
|
export interface IUsageLlmCategory {
|
|
151
152
|
/** Chamadas ao LLM nesta categoria (execuções/análises, dedup por evento). */
|