@vitrina/api 15.2.1 → 15.3.0

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/index.d.cts CHANGED
@@ -2064,6 +2064,25 @@ interface paths {
2064
2064
  specialist_fallback?: boolean;
2065
2065
  /** @description «Handoff silencioso» (#6016). Default false: a handoff always tells the customer a person takes over (a fixed line is added when the model wrote none). true: the handoff turn may end with no customer message, or with the model's own last line; no fixed handoff line is added. Assignment, alerts, team notification and the AI's silence after the handoff are unchanged. */
2066
2066
  silent_handoff?: boolean;
2067
+ voice_note?: {
2068
+ enabled?: boolean;
2069
+ voice_id?: string | null;
2070
+ voice_settings?: {
2071
+ /** @description 0..1. Higher = steadier, less expressive. */
2072
+ stability?: number;
2073
+ similarity_boost?: number;
2074
+ /** @description 0.7..1.2; 1 = normal pace. */
2075
+ speed?: number;
2076
+ style?: number;
2077
+ use_speaker_boost?: boolean;
2078
+ };
2079
+ lexicon?: {
2080
+ /** @description Text as written («GB», «iPhone»). */
2081
+ from: string;
2082
+ /** @description What the voice says instead («gigas», «aifón»). */
2083
+ alias: string;
2084
+ }[];
2085
+ };
2067
2086
  /**
2068
2087
  * @description «Signos de apertura» for this agent. `inherit` (default): the workspace's `voice.opening_marks`. `none`: no opening «¿» «¡» (removed at send time). `keep`: the agent writes them.
2069
2088
  * @enum {string}
@@ -2257,7 +2276,7 @@ interface paths {
2257
2276
  };
2258
2277
  /**
2259
2278
  * Read the agent’s behaviour policies
2260
- * @description Per-agent switches that change what the agent says (#3312/#3314): `treatment_price` (`unset` | `first_ask` | `never`, healthcare) and `far_slot_waitlist`, `urgency_slots` (D72), `specialist_fallback` (D74) and `silent_handoff` (#6016, «Handoff silencioso»: a handoff sends no announcement line; default false). `live` is what runs today, `draft` what is staged (null = nothing staged). Every default is the agent’s behaviour before policies existed: nothing is added to its prompt while a policy is unset. `price_policy_conflicts` lists lines of the agent’s own instructions (draft when staged) and active skills that already state a price rule, so a client can reconcile them before publishing. Change them with `PUT /ai-agents/{id}/draft` (`behavior_policies`) and `POST /ai-agents/{id}/publish`.
2279
+ * @description Per-agent switches that change what the agent says (#3312/#3314): `treatment_price` (`unset` | `first_ask` | `never`, healthcare) and `far_slot_waitlist`, `urgency_slots` (D72), `specialist_fallback` (D74) and `silent_handoff` (#6016, «Handoff silencioso»: a handoff sends no announcement line; default false) and `voice_note` (#6021, «Voz para notas de voz»: `enabled` (default false), `voice_id` (ElevenLabs), `voice_settings` (`stability`, `similarity_boost`, `speed`, `style`, `use_speaker_boost`) and `lexicon` (`[{from, alias}]`); hear it with `POST /ai-agents/{id}/voice-note/preview`). `live` is what runs today, `draft` what is staged (null = nothing staged). Every default is the agent’s behaviour before policies existed: nothing is added to its prompt while a policy is unset. `price_policy_conflicts` lists lines of the agent’s own instructions (draft when staged) and active skills that already state a price rule, so a client can reconcile them before publishing. Change them with `PUT /ai-agents/{id}/draft` (`behavior_policies`) and `POST /ai-agents/{id}/publish`.
2261
2280
  */
2262
2281
  get: {
2263
2282
  parameters: {
@@ -2285,6 +2304,18 @@ interface paths {
2285
2304
  * "urgency_slots": false,
2286
2305
  * "specialist_fallback": false,
2287
2306
  * "silent_handoff": false,
2307
+ * "voice_note": {
2308
+ * "enabled": false,
2309
+ * "voice_id": null,
2310
+ * "voice_settings": {
2311
+ * "stability": 0.9,
2312
+ * "similarity_boost": 0.6,
2313
+ * "speed": 0.95,
2314
+ * "style": 0.6,
2315
+ * "use_speaker_boost": true
2316
+ * },
2317
+ * "lexicon": []
2318
+ * },
2288
2319
  * "opening_marks": "inherit",
2289
2320
  * "register": "inherit"
2290
2321
  * },
@@ -2323,6 +2354,29 @@ interface paths {
2323
2354
  specialist_fallback: boolean;
2324
2355
  /** @description «Handoff silencioso» (#6016). Default false: a handoff always tells the customer a person takes over (a fixed line is added when the model wrote none). true: the handoff turn may end with no customer message, or with the model's own last line; no fixed handoff line is added. Assignment, alerts, team notification and the AI's silence after the handoff are unchanged. */
2325
2356
  silent_handoff: boolean;
2357
+ /** @description «Voz para notas de voz» (#6021): the ElevenLabs voice the agent's synthesized voice notes use, with its lexicon. Off by default. Read always returns every field. */
2358
+ voice_note?: {
2359
+ /** @description «Voz para notas de voz». Default false. On, the agent may answer with a synthesized voice note (it is checked with Whisper first; on any failure the caller sends text). */
2360
+ enabled: boolean;
2361
+ /** @description ElevenLabs voice id (cloned or stock). Null until chosen; enabled without it speaks nothing. */
2362
+ voice_id: string | null;
2363
+ voice_settings: {
2364
+ /** @description 0..1. Higher = steadier, less expressive. */
2365
+ stability: number;
2366
+ similarity_boost: number;
2367
+ /** @description 0.7..1.2; 1 = normal pace. */
2368
+ speed: number;
2369
+ style: number;
2370
+ use_speaker_boost: boolean;
2371
+ };
2372
+ /** @description Alias rules applied after number normalization; the built-in GB/TB/hrs/$/%/N° rules always apply. */
2373
+ lexicon: {
2374
+ /** @description Text as written («GB», «iPhone»). */
2375
+ from: string;
2376
+ /** @description What the voice says instead («gigas», «aifón»). */
2377
+ alias: string;
2378
+ }[];
2379
+ };
2326
2380
  /**
2327
2381
  * @description «Signos de apertura» for this agent. `inherit` (default): the workspace's `voice.opening_marks`. `none`: no opening «¿» «¡» (removed at send time). `keep`: the agent writes them.
2328
2382
  * @enum {string}
@@ -2348,6 +2402,29 @@ interface paths {
2348
2402
  specialist_fallback: boolean;
2349
2403
  /** @description «Handoff silencioso» (#6016). Default false: a handoff always tells the customer a person takes over (a fixed line is added when the model wrote none). true: the handoff turn may end with no customer message, or with the model's own last line; no fixed handoff line is added. Assignment, alerts, team notification and the AI's silence after the handoff are unchanged. */
2350
2404
  silent_handoff: boolean;
2405
+ /** @description «Voz para notas de voz» (#6021): the ElevenLabs voice the agent's synthesized voice notes use, with its lexicon. Off by default. Read always returns every field. */
2406
+ voice_note?: {
2407
+ /** @description «Voz para notas de voz». Default false. On, the agent may answer with a synthesized voice note (it is checked with Whisper first; on any failure the caller sends text). */
2408
+ enabled: boolean;
2409
+ /** @description ElevenLabs voice id (cloned or stock). Null until chosen; enabled without it speaks nothing. */
2410
+ voice_id: string | null;
2411
+ voice_settings: {
2412
+ /** @description 0..1. Higher = steadier, less expressive. */
2413
+ stability: number;
2414
+ similarity_boost: number;
2415
+ /** @description 0.7..1.2; 1 = normal pace. */
2416
+ speed: number;
2417
+ style: number;
2418
+ use_speaker_boost: boolean;
2419
+ };
2420
+ /** @description Alias rules applied after number normalization; the built-in GB/TB/hrs/$/%/N° rules always apply. */
2421
+ lexicon: {
2422
+ /** @description Text as written («GB», «iPhone»). */
2423
+ from: string;
2424
+ /** @description What the voice says instead («gigas», «aifón»). */
2425
+ alias: string;
2426
+ }[];
2427
+ };
2351
2428
  /**
2352
2429
  * @description «Signos de apertura» for this agent. `inherit` (default): the workspace's `voice.opening_marks`. `none`: no opening «¿» «¡» (removed at send time). `keep`: the agent writes them.
2353
2430
  * @enum {string}
@@ -165783,6 +165860,299 @@ interface paths {
165783
165860
  patch?: never;
165784
165861
  trace?: never;
165785
165862
  };
165863
+ "/ai-agents/{id}/voice-note/preview": {
165864
+ parameters: {
165865
+ query?: never;
165866
+ header?: never;
165867
+ path?: never;
165868
+ cookie?: never;
165869
+ };
165870
+ get?: never;
165871
+ put?: never;
165872
+ /**
165873
+ * Hear a test line in the agent’s voice note voice
165874
+ * @description Synthesizes `text` exactly as a real voice note would be (numbers, prices, times and storage are spoken as words, the alias lexicon applies, ElevenLabs Flash v2.5) and runs the Whisper check. Uses the staged (else live) `behavior_policies.voice_note`, with `voice_id`, `voice_settings` and `lexicon` from the body laid over it, so an unsaved editor value can be heard before saving. Works while `enabled` is false. Counts against the workspace’s daily character cap (`GET /ai-agents/{id}/voice-note/usage`). Always 200: a refusal is `ok: false` with a `code` (`check_failed`, `cap_reached`, `not_configured`, `provider_error`, `invalid_text`) and a `message`. On success `audio_base64` is MP3 (`mime_type`).
165875
+ */
165876
+ post: {
165877
+ parameters: {
165878
+ query?: never;
165879
+ header?: {
165880
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
165881
+ "Idempotency-Key"?: string;
165882
+ };
165883
+ path: {
165884
+ id: string;
165885
+ };
165886
+ cookie?: never;
165887
+ };
165888
+ requestBody?: {
165889
+ content: {
165890
+ /**
165891
+ * @example {
165892
+ * "text": "Tengo el iPhone 16 Pro Max 256GB en $830.000"
165893
+ * }
165894
+ */
165895
+ "application/json": {
165896
+ /** @description The test line, as the agent would write it (numbers, prices and times are normalized to words). */
165897
+ text: string;
165898
+ /** @description Unsaved editor value; defaults to the live (else staged) setting. */
165899
+ voice_id?: string;
165900
+ voice_settings?: {
165901
+ /** @description 0..1. Higher = steadier, less expressive. */
165902
+ stability?: number;
165903
+ similarity_boost?: number;
165904
+ /** @description 0.7..1.2; 1 = normal pace. */
165905
+ speed?: number;
165906
+ style?: number;
165907
+ use_speaker_boost?: boolean;
165908
+ };
165909
+ lexicon?: {
165910
+ /** @description Text as written («GB», «iPhone»). */
165911
+ from: string;
165912
+ /** @description What the voice says instead («gigas», «aifón»). */
165913
+ alias: string;
165914
+ }[];
165915
+ };
165916
+ };
165917
+ };
165918
+ responses: {
165919
+ /** @description The synthesized line, or the typed refusal. */
165920
+ 200: {
165921
+ headers: {
165922
+ [name: string]: unknown;
165923
+ };
165924
+ content: {
165925
+ /**
165926
+ * @example {
165927
+ * "data": {
165928
+ * "ok": true,
165929
+ * "audio_base64": "SUQzBAAAAAAA…",
165930
+ * "mime_type": "audio/mpeg",
165931
+ * "duration_seconds": 5.2,
165932
+ * "transcript": "Tengo el iPhone 16 Pro Max 256GB en $830.000",
165933
+ * "normalized_text": "Tengo el iPhone dieciséis Pro Max de doscientos cincuenta y seis en ochocientos treinta mil pesos",
165934
+ * "characters": 98,
165935
+ * "check": {
165936
+ * "passed": true,
165937
+ * "heard": "Tengo el iPhone 16 Pro Max de 256 en 830.000 pesos.",
165938
+ * "word_error_rate": 0,
165939
+ * "mismatches": []
165940
+ * },
165941
+ * "usage": {
165942
+ * "day": "2026-10-28",
165943
+ * "characters_today": 412,
165944
+ * "daily_cap": 10000,
165945
+ * "remaining": 9588
165946
+ * }
165947
+ * }
165948
+ * }
165949
+ */
165950
+ "application/json": {
165951
+ ok: boolean;
165952
+ audio_base64?: string;
165953
+ mime_type?: string;
165954
+ duration_seconds?: number;
165955
+ /** @description The original text. */
165956
+ transcript?: string;
165957
+ normalized_text?: string;
165958
+ /** @description Characters sent to TTS (counted against the daily cap). */
165959
+ characters?: number;
165960
+ check?: {
165961
+ passed: boolean;
165962
+ /** @description What Whisper heard. */
165963
+ heard: string;
165964
+ word_error_rate: number;
165965
+ mismatches: {
165966
+ original: string;
165967
+ expected: string;
165968
+ }[];
165969
+ };
165970
+ /** @enum {string} */
165971
+ code?: "check_failed" | "cap_reached" | "not_configured" | "provider_error" | "invalid_text";
165972
+ message?: string;
165973
+ usage?: {
165974
+ /** @description UTC day, YYYY-MM-DD. */
165975
+ day: string;
165976
+ characters_today: number;
165977
+ daily_cap: number;
165978
+ remaining: number;
165979
+ };
165980
+ };
165981
+ };
165982
+ };
165983
+ /** @description Validation error */
165984
+ 400: {
165985
+ headers: {
165986
+ [name: string]: unknown;
165987
+ };
165988
+ content: {
165989
+ "application/json": components["schemas"]["Error"];
165990
+ };
165991
+ };
165992
+ /** @description Unauthorized */
165993
+ 401: {
165994
+ headers: {
165995
+ [name: string]: unknown;
165996
+ };
165997
+ content: {
165998
+ "application/json": components["schemas"]["Error"];
165999
+ };
166000
+ };
166001
+ /** @description Forbidden */
166002
+ 403: {
166003
+ headers: {
166004
+ [name: string]: unknown;
166005
+ };
166006
+ content: {
166007
+ "application/json": components["schemas"]["Error"];
166008
+ };
166009
+ };
166010
+ /** @description Not found */
166011
+ 404: {
166012
+ headers: {
166013
+ [name: string]: unknown;
166014
+ };
166015
+ content: {
166016
+ "application/json": components["schemas"]["Error"];
166017
+ };
166018
+ };
166019
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
166020
+ 409: {
166021
+ headers: {
166022
+ [name: string]: unknown;
166023
+ };
166024
+ content: {
166025
+ "application/json": components["schemas"]["Error"];
166026
+ };
166027
+ };
166028
+ /** @description Rate limited */
166029
+ 429: {
166030
+ headers: {
166031
+ [name: string]: unknown;
166032
+ };
166033
+ content: {
166034
+ "application/json": components["schemas"]["Error"];
166035
+ };
166036
+ };
166037
+ };
166038
+ };
166039
+ delete?: never;
166040
+ options?: never;
166041
+ head?: never;
166042
+ patch?: never;
166043
+ trace?: never;
166044
+ };
166045
+ "/ai-agents/{id}/voice-note/usage": {
166046
+ parameters: {
166047
+ query?: never;
166048
+ header?: never;
166049
+ path?: never;
166050
+ cookie?: never;
166051
+ };
166052
+ /**
166053
+ * Today’s voice note characters against the daily cap
166054
+ * @description Characters sent to text-to-speech today (UTC day) by this workspace, previews and agent notes together, and the daily cap. At the cap, synthesis fails closed (`cap_reached`) and the agent sends text.
166055
+ */
166056
+ get: {
166057
+ parameters: {
166058
+ query?: never;
166059
+ header?: never;
166060
+ path: {
166061
+ id: string;
166062
+ };
166063
+ cookie?: never;
166064
+ };
166065
+ requestBody?: never;
166066
+ responses: {
166067
+ /** @description Usage */
166068
+ 200: {
166069
+ headers: {
166070
+ [name: string]: unknown;
166071
+ };
166072
+ content: {
166073
+ /**
166074
+ * @example {
166075
+ * "data": {
166076
+ * "day": "2026-10-28",
166077
+ * "characters_today": 412,
166078
+ * "daily_cap": 10000,
166079
+ * "remaining": 9588
166080
+ * }
166081
+ * }
166082
+ */
166083
+ "application/json": {
166084
+ /** @description UTC day, YYYY-MM-DD. */
166085
+ day: string;
166086
+ characters_today: number;
166087
+ daily_cap: number;
166088
+ remaining: number;
166089
+ };
166090
+ };
166091
+ };
166092
+ /** @description Validation error */
166093
+ 400: {
166094
+ headers: {
166095
+ [name: string]: unknown;
166096
+ };
166097
+ content: {
166098
+ "application/json": components["schemas"]["Error"];
166099
+ };
166100
+ };
166101
+ /** @description Unauthorized */
166102
+ 401: {
166103
+ headers: {
166104
+ [name: string]: unknown;
166105
+ };
166106
+ content: {
166107
+ "application/json": components["schemas"]["Error"];
166108
+ };
166109
+ };
166110
+ /** @description Forbidden */
166111
+ 403: {
166112
+ headers: {
166113
+ [name: string]: unknown;
166114
+ };
166115
+ content: {
166116
+ "application/json": components["schemas"]["Error"];
166117
+ };
166118
+ };
166119
+ /** @description Not found */
166120
+ 404: {
166121
+ headers: {
166122
+ [name: string]: unknown;
166123
+ };
166124
+ content: {
166125
+ "application/json": components["schemas"]["Error"];
166126
+ };
166127
+ };
166128
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
166129
+ 409: {
166130
+ headers: {
166131
+ [name: string]: unknown;
166132
+ };
166133
+ content: {
166134
+ "application/json": components["schemas"]["Error"];
166135
+ };
166136
+ };
166137
+ /** @description Rate limited */
166138
+ 429: {
166139
+ headers: {
166140
+ [name: string]: unknown;
166141
+ };
166142
+ content: {
166143
+ "application/json": components["schemas"]["Error"];
166144
+ };
166145
+ };
166146
+ };
166147
+ };
166148
+ put?: never;
166149
+ post?: never;
166150
+ delete?: never;
166151
+ options?: never;
166152
+ head?: never;
166153
+ patch?: never;
166154
+ trace?: never;
166155
+ };
165786
166156
  "/ads/lanzamientos/creative-sets": {
165787
166157
  parameters: {
165788
166158
  query?: never;
@@ -171770,7 +172140,9 @@ interface paths {
171770
172140
  * },
171771
172141
  * "whatsapp": {
171772
172142
  * "messaging_account_id": "7c2d3e4f-5a6b-4c7d-8e9f-a0b1c2d3e4f5",
171773
- * "phone_known": true
172143
+ * "phone_known": true,
172144
+ * "page_link": "unknown",
172145
+ * "page_link_warning": "Antes de lanzar por WhatsApp, el número tiene que estar vinculado a tu página «Tu Automotora» (en la página: Configuración, Cuentas vinculadas, WhatsApp). Desde aquí no podemos comprobarlo; si no lo está, Meta rechaza el canal de WhatsApp y solo se crea el Sitio."
171774
172146
  * },
171775
172147
  * "geo": {
171776
172148
  * "region_codes": [
@@ -171856,6 +172228,13 @@ interface paths {
171856
172228
  whatsapp: {
171857
172229
  messaging_account_id: string | null;
171858
172230
  phone_known: boolean;
172231
+ /**
172232
+ * @description Whether the number is linked to the ad’s Facebook Page. Meta offers no read for it, so `unknown` unless an earlier Lanzamiento got Meta’s answer for this Page and number (`not_linked`: Meta refused the click-to-WhatsApp ad set; `linked`: it built). Never a blocker.
172233
+ * @enum {string}
172234
+ */
172235
+ page_link: "linked" | "not_linked" | "unknown";
172236
+ /** @description Plain words for the dealer when the link is not known to be there; null when `page_link` is `linked`. */
172237
+ page_link_warning: string | null;
171859
172238
  } | null;
171860
172239
  geo: {
171861
172240
  region_codes: string[];
@@ -172859,7 +173238,9 @@ interface paths {
172859
173238
  * },
172860
173239
  * "whatsapp": {
172861
173240
  * "messaging_account_id": "7c2d3e4f-5a6b-4c7d-8e9f-a0b1c2d3e4f5",
172862
- * "phone_known": true
173241
+ * "phone_known": true,
173242
+ * "page_link": "linked",
173243
+ * "page_link_warning": null
172863
173244
  * },
172864
173245
  * "geo": {
172865
173246
  * "region_codes": [
@@ -172918,6 +173299,13 @@ interface paths {
172918
173299
  whatsapp: {
172919
173300
  messaging_account_id: string | null;
172920
173301
  phone_known: boolean;
173302
+ /**
173303
+ * @description Whether the number is linked to the ad’s Facebook Page. Meta offers no read for it, so `unknown` unless an earlier Lanzamiento got Meta’s answer for this Page and number (`not_linked`: Meta refused the click-to-WhatsApp ad set; `linked`: it built). Never a blocker.
173304
+ * @enum {string}
173305
+ */
173306
+ page_link: "linked" | "not_linked" | "unknown";
173307
+ /** @description Plain words for the dealer when the link is not known to be there; null when `page_link` is `linked`. */
173308
+ page_link_warning: string | null;
172921
173309
  } | null;
172922
173310
  geo: {
172923
173311
  region_codes: string[];
package/dist/index.d.ts CHANGED
@@ -2064,6 +2064,25 @@ interface paths {
2064
2064
  specialist_fallback?: boolean;
2065
2065
  /** @description «Handoff silencioso» (#6016). Default false: a handoff always tells the customer a person takes over (a fixed line is added when the model wrote none). true: the handoff turn may end with no customer message, or with the model's own last line; no fixed handoff line is added. Assignment, alerts, team notification and the AI's silence after the handoff are unchanged. */
2066
2066
  silent_handoff?: boolean;
2067
+ voice_note?: {
2068
+ enabled?: boolean;
2069
+ voice_id?: string | null;
2070
+ voice_settings?: {
2071
+ /** @description 0..1. Higher = steadier, less expressive. */
2072
+ stability?: number;
2073
+ similarity_boost?: number;
2074
+ /** @description 0.7..1.2; 1 = normal pace. */
2075
+ speed?: number;
2076
+ style?: number;
2077
+ use_speaker_boost?: boolean;
2078
+ };
2079
+ lexicon?: {
2080
+ /** @description Text as written («GB», «iPhone»). */
2081
+ from: string;
2082
+ /** @description What the voice says instead («gigas», «aifón»). */
2083
+ alias: string;
2084
+ }[];
2085
+ };
2067
2086
  /**
2068
2087
  * @description «Signos de apertura» for this agent. `inherit` (default): the workspace's `voice.opening_marks`. `none`: no opening «¿» «¡» (removed at send time). `keep`: the agent writes them.
2069
2088
  * @enum {string}
@@ -2257,7 +2276,7 @@ interface paths {
2257
2276
  };
2258
2277
  /**
2259
2278
  * Read the agent’s behaviour policies
2260
- * @description Per-agent switches that change what the agent says (#3312/#3314): `treatment_price` (`unset` | `first_ask` | `never`, healthcare) and `far_slot_waitlist`, `urgency_slots` (D72), `specialist_fallback` (D74) and `silent_handoff` (#6016, «Handoff silencioso»: a handoff sends no announcement line; default false). `live` is what runs today, `draft` what is staged (null = nothing staged). Every default is the agent’s behaviour before policies existed: nothing is added to its prompt while a policy is unset. `price_policy_conflicts` lists lines of the agent’s own instructions (draft when staged) and active skills that already state a price rule, so a client can reconcile them before publishing. Change them with `PUT /ai-agents/{id}/draft` (`behavior_policies`) and `POST /ai-agents/{id}/publish`.
2279
+ * @description Per-agent switches that change what the agent says (#3312/#3314): `treatment_price` (`unset` | `first_ask` | `never`, healthcare) and `far_slot_waitlist`, `urgency_slots` (D72), `specialist_fallback` (D74) and `silent_handoff` (#6016, «Handoff silencioso»: a handoff sends no announcement line; default false) and `voice_note` (#6021, «Voz para notas de voz»: `enabled` (default false), `voice_id` (ElevenLabs), `voice_settings` (`stability`, `similarity_boost`, `speed`, `style`, `use_speaker_boost`) and `lexicon` (`[{from, alias}]`); hear it with `POST /ai-agents/{id}/voice-note/preview`). `live` is what runs today, `draft` what is staged (null = nothing staged). Every default is the agent’s behaviour before policies existed: nothing is added to its prompt while a policy is unset. `price_policy_conflicts` lists lines of the agent’s own instructions (draft when staged) and active skills that already state a price rule, so a client can reconcile them before publishing. Change them with `PUT /ai-agents/{id}/draft` (`behavior_policies`) and `POST /ai-agents/{id}/publish`.
2261
2280
  */
2262
2281
  get: {
2263
2282
  parameters: {
@@ -2285,6 +2304,18 @@ interface paths {
2285
2304
  * "urgency_slots": false,
2286
2305
  * "specialist_fallback": false,
2287
2306
  * "silent_handoff": false,
2307
+ * "voice_note": {
2308
+ * "enabled": false,
2309
+ * "voice_id": null,
2310
+ * "voice_settings": {
2311
+ * "stability": 0.9,
2312
+ * "similarity_boost": 0.6,
2313
+ * "speed": 0.95,
2314
+ * "style": 0.6,
2315
+ * "use_speaker_boost": true
2316
+ * },
2317
+ * "lexicon": []
2318
+ * },
2288
2319
  * "opening_marks": "inherit",
2289
2320
  * "register": "inherit"
2290
2321
  * },
@@ -2323,6 +2354,29 @@ interface paths {
2323
2354
  specialist_fallback: boolean;
2324
2355
  /** @description «Handoff silencioso» (#6016). Default false: a handoff always tells the customer a person takes over (a fixed line is added when the model wrote none). true: the handoff turn may end with no customer message, or with the model's own last line; no fixed handoff line is added. Assignment, alerts, team notification and the AI's silence after the handoff are unchanged. */
2325
2356
  silent_handoff: boolean;
2357
+ /** @description «Voz para notas de voz» (#6021): the ElevenLabs voice the agent's synthesized voice notes use, with its lexicon. Off by default. Read always returns every field. */
2358
+ voice_note?: {
2359
+ /** @description «Voz para notas de voz». Default false. On, the agent may answer with a synthesized voice note (it is checked with Whisper first; on any failure the caller sends text). */
2360
+ enabled: boolean;
2361
+ /** @description ElevenLabs voice id (cloned or stock). Null until chosen; enabled without it speaks nothing. */
2362
+ voice_id: string | null;
2363
+ voice_settings: {
2364
+ /** @description 0..1. Higher = steadier, less expressive. */
2365
+ stability: number;
2366
+ similarity_boost: number;
2367
+ /** @description 0.7..1.2; 1 = normal pace. */
2368
+ speed: number;
2369
+ style: number;
2370
+ use_speaker_boost: boolean;
2371
+ };
2372
+ /** @description Alias rules applied after number normalization; the built-in GB/TB/hrs/$/%/N° rules always apply. */
2373
+ lexicon: {
2374
+ /** @description Text as written («GB», «iPhone»). */
2375
+ from: string;
2376
+ /** @description What the voice says instead («gigas», «aifón»). */
2377
+ alias: string;
2378
+ }[];
2379
+ };
2326
2380
  /**
2327
2381
  * @description «Signos de apertura» for this agent. `inherit` (default): the workspace's `voice.opening_marks`. `none`: no opening «¿» «¡» (removed at send time). `keep`: the agent writes them.
2328
2382
  * @enum {string}
@@ -2348,6 +2402,29 @@ interface paths {
2348
2402
  specialist_fallback: boolean;
2349
2403
  /** @description «Handoff silencioso» (#6016). Default false: a handoff always tells the customer a person takes over (a fixed line is added when the model wrote none). true: the handoff turn may end with no customer message, or with the model's own last line; no fixed handoff line is added. Assignment, alerts, team notification and the AI's silence after the handoff are unchanged. */
2350
2404
  silent_handoff: boolean;
2405
+ /** @description «Voz para notas de voz» (#6021): the ElevenLabs voice the agent's synthesized voice notes use, with its lexicon. Off by default. Read always returns every field. */
2406
+ voice_note?: {
2407
+ /** @description «Voz para notas de voz». Default false. On, the agent may answer with a synthesized voice note (it is checked with Whisper first; on any failure the caller sends text). */
2408
+ enabled: boolean;
2409
+ /** @description ElevenLabs voice id (cloned or stock). Null until chosen; enabled without it speaks nothing. */
2410
+ voice_id: string | null;
2411
+ voice_settings: {
2412
+ /** @description 0..1. Higher = steadier, less expressive. */
2413
+ stability: number;
2414
+ similarity_boost: number;
2415
+ /** @description 0.7..1.2; 1 = normal pace. */
2416
+ speed: number;
2417
+ style: number;
2418
+ use_speaker_boost: boolean;
2419
+ };
2420
+ /** @description Alias rules applied after number normalization; the built-in GB/TB/hrs/$/%/N° rules always apply. */
2421
+ lexicon: {
2422
+ /** @description Text as written («GB», «iPhone»). */
2423
+ from: string;
2424
+ /** @description What the voice says instead («gigas», «aifón»). */
2425
+ alias: string;
2426
+ }[];
2427
+ };
2351
2428
  /**
2352
2429
  * @description «Signos de apertura» for this agent. `inherit` (default): the workspace's `voice.opening_marks`. `none`: no opening «¿» «¡» (removed at send time). `keep`: the agent writes them.
2353
2430
  * @enum {string}
@@ -165783,6 +165860,299 @@ interface paths {
165783
165860
  patch?: never;
165784
165861
  trace?: never;
165785
165862
  };
165863
+ "/ai-agents/{id}/voice-note/preview": {
165864
+ parameters: {
165865
+ query?: never;
165866
+ header?: never;
165867
+ path?: never;
165868
+ cookie?: never;
165869
+ };
165870
+ get?: never;
165871
+ put?: never;
165872
+ /**
165873
+ * Hear a test line in the agent’s voice note voice
165874
+ * @description Synthesizes `text` exactly as a real voice note would be (numbers, prices, times and storage are spoken as words, the alias lexicon applies, ElevenLabs Flash v2.5) and runs the Whisper check. Uses the staged (else live) `behavior_policies.voice_note`, with `voice_id`, `voice_settings` and `lexicon` from the body laid over it, so an unsaved editor value can be heard before saving. Works while `enabled` is false. Counts against the workspace’s daily character cap (`GET /ai-agents/{id}/voice-note/usage`). Always 200: a refusal is `ok: false` with a `code` (`check_failed`, `cap_reached`, `not_configured`, `provider_error`, `invalid_text`) and a `message`. On success `audio_base64` is MP3 (`mime_type`).
165875
+ */
165876
+ post: {
165877
+ parameters: {
165878
+ query?: never;
165879
+ header?: {
165880
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
165881
+ "Idempotency-Key"?: string;
165882
+ };
165883
+ path: {
165884
+ id: string;
165885
+ };
165886
+ cookie?: never;
165887
+ };
165888
+ requestBody?: {
165889
+ content: {
165890
+ /**
165891
+ * @example {
165892
+ * "text": "Tengo el iPhone 16 Pro Max 256GB en $830.000"
165893
+ * }
165894
+ */
165895
+ "application/json": {
165896
+ /** @description The test line, as the agent would write it (numbers, prices and times are normalized to words). */
165897
+ text: string;
165898
+ /** @description Unsaved editor value; defaults to the live (else staged) setting. */
165899
+ voice_id?: string;
165900
+ voice_settings?: {
165901
+ /** @description 0..1. Higher = steadier, less expressive. */
165902
+ stability?: number;
165903
+ similarity_boost?: number;
165904
+ /** @description 0.7..1.2; 1 = normal pace. */
165905
+ speed?: number;
165906
+ style?: number;
165907
+ use_speaker_boost?: boolean;
165908
+ };
165909
+ lexicon?: {
165910
+ /** @description Text as written («GB», «iPhone»). */
165911
+ from: string;
165912
+ /** @description What the voice says instead («gigas», «aifón»). */
165913
+ alias: string;
165914
+ }[];
165915
+ };
165916
+ };
165917
+ };
165918
+ responses: {
165919
+ /** @description The synthesized line, or the typed refusal. */
165920
+ 200: {
165921
+ headers: {
165922
+ [name: string]: unknown;
165923
+ };
165924
+ content: {
165925
+ /**
165926
+ * @example {
165927
+ * "data": {
165928
+ * "ok": true,
165929
+ * "audio_base64": "SUQzBAAAAAAA…",
165930
+ * "mime_type": "audio/mpeg",
165931
+ * "duration_seconds": 5.2,
165932
+ * "transcript": "Tengo el iPhone 16 Pro Max 256GB en $830.000",
165933
+ * "normalized_text": "Tengo el iPhone dieciséis Pro Max de doscientos cincuenta y seis en ochocientos treinta mil pesos",
165934
+ * "characters": 98,
165935
+ * "check": {
165936
+ * "passed": true,
165937
+ * "heard": "Tengo el iPhone 16 Pro Max de 256 en 830.000 pesos.",
165938
+ * "word_error_rate": 0,
165939
+ * "mismatches": []
165940
+ * },
165941
+ * "usage": {
165942
+ * "day": "2026-10-28",
165943
+ * "characters_today": 412,
165944
+ * "daily_cap": 10000,
165945
+ * "remaining": 9588
165946
+ * }
165947
+ * }
165948
+ * }
165949
+ */
165950
+ "application/json": {
165951
+ ok: boolean;
165952
+ audio_base64?: string;
165953
+ mime_type?: string;
165954
+ duration_seconds?: number;
165955
+ /** @description The original text. */
165956
+ transcript?: string;
165957
+ normalized_text?: string;
165958
+ /** @description Characters sent to TTS (counted against the daily cap). */
165959
+ characters?: number;
165960
+ check?: {
165961
+ passed: boolean;
165962
+ /** @description What Whisper heard. */
165963
+ heard: string;
165964
+ word_error_rate: number;
165965
+ mismatches: {
165966
+ original: string;
165967
+ expected: string;
165968
+ }[];
165969
+ };
165970
+ /** @enum {string} */
165971
+ code?: "check_failed" | "cap_reached" | "not_configured" | "provider_error" | "invalid_text";
165972
+ message?: string;
165973
+ usage?: {
165974
+ /** @description UTC day, YYYY-MM-DD. */
165975
+ day: string;
165976
+ characters_today: number;
165977
+ daily_cap: number;
165978
+ remaining: number;
165979
+ };
165980
+ };
165981
+ };
165982
+ };
165983
+ /** @description Validation error */
165984
+ 400: {
165985
+ headers: {
165986
+ [name: string]: unknown;
165987
+ };
165988
+ content: {
165989
+ "application/json": components["schemas"]["Error"];
165990
+ };
165991
+ };
165992
+ /** @description Unauthorized */
165993
+ 401: {
165994
+ headers: {
165995
+ [name: string]: unknown;
165996
+ };
165997
+ content: {
165998
+ "application/json": components["schemas"]["Error"];
165999
+ };
166000
+ };
166001
+ /** @description Forbidden */
166002
+ 403: {
166003
+ headers: {
166004
+ [name: string]: unknown;
166005
+ };
166006
+ content: {
166007
+ "application/json": components["schemas"]["Error"];
166008
+ };
166009
+ };
166010
+ /** @description Not found */
166011
+ 404: {
166012
+ headers: {
166013
+ [name: string]: unknown;
166014
+ };
166015
+ content: {
166016
+ "application/json": components["schemas"]["Error"];
166017
+ };
166018
+ };
166019
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
166020
+ 409: {
166021
+ headers: {
166022
+ [name: string]: unknown;
166023
+ };
166024
+ content: {
166025
+ "application/json": components["schemas"]["Error"];
166026
+ };
166027
+ };
166028
+ /** @description Rate limited */
166029
+ 429: {
166030
+ headers: {
166031
+ [name: string]: unknown;
166032
+ };
166033
+ content: {
166034
+ "application/json": components["schemas"]["Error"];
166035
+ };
166036
+ };
166037
+ };
166038
+ };
166039
+ delete?: never;
166040
+ options?: never;
166041
+ head?: never;
166042
+ patch?: never;
166043
+ trace?: never;
166044
+ };
166045
+ "/ai-agents/{id}/voice-note/usage": {
166046
+ parameters: {
166047
+ query?: never;
166048
+ header?: never;
166049
+ path?: never;
166050
+ cookie?: never;
166051
+ };
166052
+ /**
166053
+ * Today’s voice note characters against the daily cap
166054
+ * @description Characters sent to text-to-speech today (UTC day) by this workspace, previews and agent notes together, and the daily cap. At the cap, synthesis fails closed (`cap_reached`) and the agent sends text.
166055
+ */
166056
+ get: {
166057
+ parameters: {
166058
+ query?: never;
166059
+ header?: never;
166060
+ path: {
166061
+ id: string;
166062
+ };
166063
+ cookie?: never;
166064
+ };
166065
+ requestBody?: never;
166066
+ responses: {
166067
+ /** @description Usage */
166068
+ 200: {
166069
+ headers: {
166070
+ [name: string]: unknown;
166071
+ };
166072
+ content: {
166073
+ /**
166074
+ * @example {
166075
+ * "data": {
166076
+ * "day": "2026-10-28",
166077
+ * "characters_today": 412,
166078
+ * "daily_cap": 10000,
166079
+ * "remaining": 9588
166080
+ * }
166081
+ * }
166082
+ */
166083
+ "application/json": {
166084
+ /** @description UTC day, YYYY-MM-DD. */
166085
+ day: string;
166086
+ characters_today: number;
166087
+ daily_cap: number;
166088
+ remaining: number;
166089
+ };
166090
+ };
166091
+ };
166092
+ /** @description Validation error */
166093
+ 400: {
166094
+ headers: {
166095
+ [name: string]: unknown;
166096
+ };
166097
+ content: {
166098
+ "application/json": components["schemas"]["Error"];
166099
+ };
166100
+ };
166101
+ /** @description Unauthorized */
166102
+ 401: {
166103
+ headers: {
166104
+ [name: string]: unknown;
166105
+ };
166106
+ content: {
166107
+ "application/json": components["schemas"]["Error"];
166108
+ };
166109
+ };
166110
+ /** @description Forbidden */
166111
+ 403: {
166112
+ headers: {
166113
+ [name: string]: unknown;
166114
+ };
166115
+ content: {
166116
+ "application/json": components["schemas"]["Error"];
166117
+ };
166118
+ };
166119
+ /** @description Not found */
166120
+ 404: {
166121
+ headers: {
166122
+ [name: string]: unknown;
166123
+ };
166124
+ content: {
166125
+ "application/json": components["schemas"]["Error"];
166126
+ };
166127
+ };
166128
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
166129
+ 409: {
166130
+ headers: {
166131
+ [name: string]: unknown;
166132
+ };
166133
+ content: {
166134
+ "application/json": components["schemas"]["Error"];
166135
+ };
166136
+ };
166137
+ /** @description Rate limited */
166138
+ 429: {
166139
+ headers: {
166140
+ [name: string]: unknown;
166141
+ };
166142
+ content: {
166143
+ "application/json": components["schemas"]["Error"];
166144
+ };
166145
+ };
166146
+ };
166147
+ };
166148
+ put?: never;
166149
+ post?: never;
166150
+ delete?: never;
166151
+ options?: never;
166152
+ head?: never;
166153
+ patch?: never;
166154
+ trace?: never;
166155
+ };
165786
166156
  "/ads/lanzamientos/creative-sets": {
165787
166157
  parameters: {
165788
166158
  query?: never;
@@ -171770,7 +172140,9 @@ interface paths {
171770
172140
  * },
171771
172141
  * "whatsapp": {
171772
172142
  * "messaging_account_id": "7c2d3e4f-5a6b-4c7d-8e9f-a0b1c2d3e4f5",
171773
- * "phone_known": true
172143
+ * "phone_known": true,
172144
+ * "page_link": "unknown",
172145
+ * "page_link_warning": "Antes de lanzar por WhatsApp, el número tiene que estar vinculado a tu página «Tu Automotora» (en la página: Configuración, Cuentas vinculadas, WhatsApp). Desde aquí no podemos comprobarlo; si no lo está, Meta rechaza el canal de WhatsApp y solo se crea el Sitio."
171774
172146
  * },
171775
172147
  * "geo": {
171776
172148
  * "region_codes": [
@@ -171856,6 +172228,13 @@ interface paths {
171856
172228
  whatsapp: {
171857
172229
  messaging_account_id: string | null;
171858
172230
  phone_known: boolean;
172231
+ /**
172232
+ * @description Whether the number is linked to the ad’s Facebook Page. Meta offers no read for it, so `unknown` unless an earlier Lanzamiento got Meta’s answer for this Page and number (`not_linked`: Meta refused the click-to-WhatsApp ad set; `linked`: it built). Never a blocker.
172233
+ * @enum {string}
172234
+ */
172235
+ page_link: "linked" | "not_linked" | "unknown";
172236
+ /** @description Plain words for the dealer when the link is not known to be there; null when `page_link` is `linked`. */
172237
+ page_link_warning: string | null;
171859
172238
  } | null;
171860
172239
  geo: {
171861
172240
  region_codes: string[];
@@ -172859,7 +173238,9 @@ interface paths {
172859
173238
  * },
172860
173239
  * "whatsapp": {
172861
173240
  * "messaging_account_id": "7c2d3e4f-5a6b-4c7d-8e9f-a0b1c2d3e4f5",
172862
- * "phone_known": true
173241
+ * "phone_known": true,
173242
+ * "page_link": "linked",
173243
+ * "page_link_warning": null
172863
173244
  * },
172864
173245
  * "geo": {
172865
173246
  * "region_codes": [
@@ -172918,6 +173299,13 @@ interface paths {
172918
173299
  whatsapp: {
172919
173300
  messaging_account_id: string | null;
172920
173301
  phone_known: boolean;
173302
+ /**
173303
+ * @description Whether the number is linked to the ad’s Facebook Page. Meta offers no read for it, so `unknown` unless an earlier Lanzamiento got Meta’s answer for this Page and number (`not_linked`: Meta refused the click-to-WhatsApp ad set; `linked`: it built). Never a blocker.
173304
+ * @enum {string}
173305
+ */
173306
+ page_link: "linked" | "not_linked" | "unknown";
173307
+ /** @description Plain words for the dealer when the link is not known to be there; null when `page_link` is `linked`. */
173308
+ page_link_warning: string | null;
172921
173309
  } | null;
172922
173310
  geo: {
172923
173311
  region_codes: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "15.2.1",
3
+ "version": "15.3.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",