@vitrina/api 14.30.0 → 14.31.1

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
@@ -16009,7 +16009,7 @@ interface paths {
16009
16009
  };
16010
16010
  /**
16011
16011
  * Read tenant-level settings
16012
- * @description The stored settings object, as saved through `PUT /tenant/settings`. Among its keys, `ads` holds the Vitrina Ads wizard choice: `{ tag_choice: "site" | "no_site" | null, tag_choice_at: string | null }` (`tag_choice_at` is stamped by the server on every write); absent when the workspace never answered the «Instalar el tag» step. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`. Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16012
+ * @description The stored settings object, as saved through `PUT /tenant/settings`. Among its keys, `ads` holds the Vitrina Ads wizard choice: `{ tag_choice: "site" | "no_site" | null, tag_choice_at: string | null }` (`tag_choice_at` is stamped by the server on every write); absent when the workspace never answered the «Instalar el tag» step. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`, the template voice under `voice`, and the notification rails under `notifications` (arming a staff WhatsApp rail submits its template to Meta and wires it on approval; the read-only `staff_rails` reports each rail template state). Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`, `voice` and `notifications`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16013
16013
  */
16014
16014
  get: {
16015
16015
  parameters: {
@@ -16112,7 +16112,7 @@ interface paths {
16112
16112
  };
16113
16113
  /**
16114
16114
  * Patch tenant-level settings
16115
- * @description Shallow-merges the body into the stored settings and answers the result. `ads` is merged key by key (a write that sends only `ads.tag_choice` keeps `ads.goal`), and the server stamps `tag_choice_at` / `goal_at` / `goal_by` — a client never sends them (400). A connected app may write only `ads`; any other key is refused with 403 and nothing is written. Requires `tenant:write`, or `ads:write` for a body that carries only `ads`. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`. Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16115
+ * @description Shallow-merges the body into the stored settings and answers the result. `ads` is merged key by key (a write that sends only `ads.tag_choice` keeps `ads.goal`), and the server stamps `tag_choice_at` / `goal_at` / `goal_by` — a client never sends them (400). A connected app may write only `ads`; any other key is refused with 403 and nothing is written. Requires `tenant:write`, or `ads:write` for a body that carries only `ads`. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`, the template voice under `voice`, and the notification rails under `notifications` (arming a staff WhatsApp rail submits its template to Meta and wires it on approval; the read-only `staff_rails` reports each rail template state). Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`, `voice` and `notifications`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16116
16116
  */
16117
16117
  put: {
16118
16118
  parameters: {
@@ -115856,7 +115856,7 @@ interface paths {
115856
115856
  *
115857
115857
  * Carry your own `contact.external_id` for anyone you may open a second thread with: it is the only key that cannot drift. An email address and a phone number can both be reassigned to a different person, which is exactly why they are consulted after it and not before.
115858
115858
  *
115859
- * ⚠ The thread is addressable only if the channel can work out where to send. On `web` the address IS the visitor session, so a conversation opened here gets a synthetic `manual:<uuid>` external id and sending on it answers 422 `no_channel_identity` — open a web thread from the widget instead. On `whatsapp` and `email` the contact's phone or address is the address, and the thread is sendable as soon as `messaging_account_id` names a connected account.
115859
+ * ⚠ The thread is addressable only if the channel can work out where to send. On `web` the address IS the visitor session, so a conversation opened here gets a synthetic `manual:<uuid>` external id and sending on it answers 422 `no_channel_identity` — open a web thread from the widget instead. On `whatsapp` and `email` the contact's phone or address is the address, and the thread is sendable as soon as `messaging_account_id` names a connected account. A WhatsApp thread is keyed on the number (its wa_id), so when that number already has an open thread, that thread is returned instead of a second one.
115860
115860
  */
115861
115861
  post: {
115862
115862
  parameters: {
@@ -122296,6 +122296,361 @@ interface paths {
122296
122296
  patch?: never;
122297
122297
  trace?: never;
122298
122298
  };
122299
+ "/conversations/{id}/linked-conversations": {
122300
+ parameters: {
122301
+ query?: never;
122302
+ header?: never;
122303
+ path?: never;
122304
+ cookie?: never;
122305
+ };
122306
+ /**
122307
+ * List a conversation's linked conversations
122308
+ * @description Conversaciones enlazadas: the same customer in ONE exchange over two channels — a source conversation (e.g. Facebook Marketplace) and its continuation (e.g. WhatsApp). Each conversation keeps its own control. Every link is returned from THIS conversation's side: `role` says whether it is the `source` or the `continuation`, and `linked_conversation` is the other one. `context_card` is what the continuation carries from the source (the car, what was agreed, what is pending); it is never a message. Newest link first; empty when the conversation has no links. A member who sees only their own conversations does not get a link whose other conversation they cannot see.
122309
+ */
122310
+ get: {
122311
+ parameters: {
122312
+ query?: never;
122313
+ header?: never;
122314
+ path: {
122315
+ id: string;
122316
+ };
122317
+ cookie?: never;
122318
+ };
122319
+ requestBody?: never;
122320
+ responses: {
122321
+ /** @description Links */
122322
+ 200: {
122323
+ headers: {
122324
+ [name: string]: unknown;
122325
+ };
122326
+ content: {
122327
+ /**
122328
+ * @example {
122329
+ * "data": [
122330
+ * {
122331
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122332
+ * "role": "source",
122333
+ * "origin": "manual",
122334
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122335
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122336
+ * "context_card": {
122337
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122338
+ * "vehicle": {
122339
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122340
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122341
+ * },
122342
+ * "agreements": [
122343
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122344
+ * ],
122345
+ * "pending_asks": [
122346
+ * "Fotos del interior y del tablero"
122347
+ * ],
122348
+ * "pending_promises": [
122349
+ * "Enviar la ficha técnica por WhatsApp"
122350
+ * ],
122351
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122352
+ * },
122353
+ * "created_by_user_id": null,
122354
+ * "created_at": "2026-10-15T14:02:11.000Z",
122355
+ * "linked_conversation": {
122356
+ * "id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122357
+ * "display_id": "C-3061",
122358
+ * "channel": "whatsapp",
122359
+ * "status": "open",
122360
+ * "last_message_date": "2026-10-15T14:05:40.000Z"
122361
+ * }
122362
+ * }
122363
+ * ],
122364
+ * "meta": {
122365
+ * "total": 1
122366
+ * }
122367
+ * }
122368
+ */
122369
+ "application/json": {
122370
+ data?: unknown;
122371
+ meta?: {
122372
+ [key: string]: unknown;
122373
+ };
122374
+ };
122375
+ };
122376
+ };
122377
+ /** @description Validation error */
122378
+ 400: {
122379
+ headers: {
122380
+ [name: string]: unknown;
122381
+ };
122382
+ content: {
122383
+ "application/json": components["schemas"]["Error"];
122384
+ };
122385
+ };
122386
+ /** @description Unauthorized */
122387
+ 401: {
122388
+ headers: {
122389
+ [name: string]: unknown;
122390
+ };
122391
+ content: {
122392
+ "application/json": components["schemas"]["Error"];
122393
+ };
122394
+ };
122395
+ /** @description Forbidden */
122396
+ 403: {
122397
+ headers: {
122398
+ [name: string]: unknown;
122399
+ };
122400
+ content: {
122401
+ "application/json": components["schemas"]["Error"];
122402
+ };
122403
+ };
122404
+ /** @description Not found */
122405
+ 404: {
122406
+ headers: {
122407
+ [name: string]: unknown;
122408
+ };
122409
+ content: {
122410
+ "application/json": components["schemas"]["Error"];
122411
+ };
122412
+ };
122413
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122414
+ 409: {
122415
+ headers: {
122416
+ [name: string]: unknown;
122417
+ };
122418
+ content: {
122419
+ "application/json": components["schemas"]["Error"];
122420
+ };
122421
+ };
122422
+ /** @description Rate limited */
122423
+ 429: {
122424
+ headers: {
122425
+ [name: string]: unknown;
122426
+ };
122427
+ content: {
122428
+ "application/json": components["schemas"]["Error"];
122429
+ };
122430
+ };
122431
+ };
122432
+ };
122433
+ put?: never;
122434
+ /**
122435
+ * Link a conversation to its continuation on another channel
122436
+ * @description `{id}` is the SOURCE conversation; `continuation_conversation_id` is where the exchange continues. Both must belong to the same contact (merge the contacts first) and run on different channels. Idempotent per pair, in either direction: `201` when the link is created, `200` with the existing link when the two were already linked — a `context_card` in the body then replaces the stored one. Nothing is sent to the customer. Both conversations must be visible to the caller: one they cannot see is a 404, like one that does not exist.
122437
+ */
122438
+ post: {
122439
+ parameters: {
122440
+ query?: never;
122441
+ header?: {
122442
+ /** @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. */
122443
+ "Idempotency-Key"?: string;
122444
+ };
122445
+ path: {
122446
+ id: string;
122447
+ };
122448
+ cookie?: never;
122449
+ };
122450
+ requestBody?: {
122451
+ content: {
122452
+ /**
122453
+ * @example {
122454
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122455
+ * "context_card": {
122456
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122457
+ * "vehicle": {
122458
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122459
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122460
+ * },
122461
+ * "agreements": [
122462
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122463
+ * ],
122464
+ * "pending_asks": [
122465
+ * "Fotos del interior y del tablero"
122466
+ * ],
122467
+ * "pending_promises": [
122468
+ * "Enviar la ficha técnica por WhatsApp"
122469
+ * ],
122470
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122471
+ * }
122472
+ * }
122473
+ */
122474
+ "application/json": {
122475
+ /** Format: uuid */
122476
+ continuation_conversation_id: string;
122477
+ context_card?: {
122478
+ summary?: string | null;
122479
+ vehicle?: {
122480
+ /** Format: uuid */
122481
+ vehicle_id?: string | null;
122482
+ label: string;
122483
+ } | null;
122484
+ agreements?: string[];
122485
+ pending_asks?: string[];
122486
+ pending_promises?: string[];
122487
+ trade_in?: string | null;
122488
+ };
122489
+ };
122490
+ };
122491
+ };
122492
+ responses: {
122493
+ /** @description The existing link */
122494
+ 200: {
122495
+ headers: {
122496
+ [name: string]: unknown;
122497
+ };
122498
+ content: {
122499
+ /**
122500
+ * @example {
122501
+ * "data": {
122502
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122503
+ * "role": "source",
122504
+ * "origin": "manual",
122505
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122506
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122507
+ * "context_card": {
122508
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122509
+ * "vehicle": {
122510
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122511
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122512
+ * },
122513
+ * "agreements": [
122514
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122515
+ * ],
122516
+ * "pending_asks": [
122517
+ * "Fotos del interior y del tablero"
122518
+ * ],
122519
+ * "pending_promises": [
122520
+ * "Enviar la ficha técnica por WhatsApp"
122521
+ * ],
122522
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122523
+ * },
122524
+ * "created_by_user_id": null,
122525
+ * "created_at": "2026-10-15T14:02:11.000Z",
122526
+ * "linked_conversation": {
122527
+ * "id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122528
+ * "display_id": "C-3061",
122529
+ * "channel": "whatsapp",
122530
+ * "status": "open",
122531
+ * "last_message_date": "2026-10-15T14:05:40.000Z"
122532
+ * }
122533
+ * }
122534
+ * }
122535
+ */
122536
+ "application/json": {
122537
+ data?: unknown;
122538
+ meta?: {
122539
+ [key: string]: unknown;
122540
+ };
122541
+ };
122542
+ };
122543
+ };
122544
+ /** @description The created link */
122545
+ 201: {
122546
+ headers: {
122547
+ [name: string]: unknown;
122548
+ };
122549
+ content: {
122550
+ /**
122551
+ * @example {
122552
+ * "data": {
122553
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122554
+ * "role": "source",
122555
+ * "origin": "manual",
122556
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122557
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122558
+ * "context_card": {
122559
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122560
+ * "vehicle": {
122561
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122562
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122563
+ * },
122564
+ * "agreements": [
122565
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122566
+ * ],
122567
+ * "pending_asks": [
122568
+ * "Fotos del interior y del tablero"
122569
+ * ],
122570
+ * "pending_promises": [
122571
+ * "Enviar la ficha técnica por WhatsApp"
122572
+ * ],
122573
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122574
+ * },
122575
+ * "created_by_user_id": null,
122576
+ * "created_at": "2026-10-15T14:02:11.000Z",
122577
+ * "linked_conversation": {
122578
+ * "id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122579
+ * "display_id": "C-3061",
122580
+ * "channel": "whatsapp",
122581
+ * "status": "open",
122582
+ * "last_message_date": "2026-10-15T14:05:40.000Z"
122583
+ * }
122584
+ * }
122585
+ * }
122586
+ */
122587
+ "application/json": {
122588
+ data?: unknown;
122589
+ };
122590
+ };
122591
+ };
122592
+ /** @description Validation error */
122593
+ 400: {
122594
+ headers: {
122595
+ [name: string]: unknown;
122596
+ };
122597
+ content: {
122598
+ "application/json": components["schemas"]["Error"];
122599
+ };
122600
+ };
122601
+ /** @description Unauthorized */
122602
+ 401: {
122603
+ headers: {
122604
+ [name: string]: unknown;
122605
+ };
122606
+ content: {
122607
+ "application/json": components["schemas"]["Error"];
122608
+ };
122609
+ };
122610
+ /** @description Forbidden */
122611
+ 403: {
122612
+ headers: {
122613
+ [name: string]: unknown;
122614
+ };
122615
+ content: {
122616
+ "application/json": components["schemas"]["Error"];
122617
+ };
122618
+ };
122619
+ /** @description Not found */
122620
+ 404: {
122621
+ headers: {
122622
+ [name: string]: unknown;
122623
+ };
122624
+ content: {
122625
+ "application/json": components["schemas"]["Error"];
122626
+ };
122627
+ };
122628
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122629
+ 409: {
122630
+ headers: {
122631
+ [name: string]: unknown;
122632
+ };
122633
+ content: {
122634
+ "application/json": components["schemas"]["Error"];
122635
+ };
122636
+ };
122637
+ /** @description Rate limited */
122638
+ 429: {
122639
+ headers: {
122640
+ [name: string]: unknown;
122641
+ };
122642
+ content: {
122643
+ "application/json": components["schemas"]["Error"];
122644
+ };
122645
+ };
122646
+ };
122647
+ };
122648
+ delete?: never;
122649
+ options?: never;
122650
+ head?: never;
122651
+ patch?: never;
122652
+ trace?: never;
122653
+ };
122299
122654
  "/conversations/{id}/agent-turn": {
122300
122655
  parameters: {
122301
122656
  query?: never;
@@ -185291,6 +185646,95 @@ interface components {
185291
185646
  push_enabled?: boolean;
185292
185647
  };
185293
185648
  TenantSettingsPublic: {
185649
+ /** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`) are opt-in: arming one (`enabled: true` with an `account_id`) submits its template to Meta on that number and wires it on approval. Each rail sent replaces that rail whole; rails not sent are kept. */
185650
+ notifications?: {
185651
+ staff_whatsapp?: {
185652
+ enabled?: boolean;
185653
+ /** Format: uuid */
185654
+ account_id?: string;
185655
+ template_name?: string;
185656
+ template_language?: string;
185657
+ };
185658
+ unanswered_supervisor_whatsapp?: {
185659
+ enabled?: boolean;
185660
+ /** Format: uuid */
185661
+ account_id?: string;
185662
+ template_name?: string;
185663
+ template_language?: string;
185664
+ user_ids?: string[];
185665
+ };
185666
+ booking_whatsapp?: {
185667
+ enabled?: boolean;
185668
+ /** Format: uuid */
185669
+ account_id?: string;
185670
+ template_name?: string;
185671
+ template_language?: string;
185672
+ change_template_name?: string;
185673
+ };
185674
+ };
185675
+ /** @description Read-only: the template state of each staff WhatsApp rail. Ignored on write. */
185676
+ staff_rails?: {
185677
+ staff_whatsapp: {
185678
+ /** @description The rail is switched on (`enabled: true`). */
185679
+ armed: boolean;
185680
+ /**
185681
+ * @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
185682
+ * @enum {string}
185683
+ */
185684
+ template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
185685
+ reason: string | null;
185686
+ /** @description The rail has its template name set (by an admin or on approval). */
185687
+ wired: boolean;
185688
+ templates: {
185689
+ key: string;
185690
+ name: string;
185691
+ language: string;
185692
+ /** @enum {string} */
185693
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
185694
+ rejection_reason: string | null;
185695
+ }[];
185696
+ };
185697
+ unanswered_supervisor_whatsapp: {
185698
+ /** @description The rail is switched on (`enabled: true`). */
185699
+ armed: boolean;
185700
+ /**
185701
+ * @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
185702
+ * @enum {string}
185703
+ */
185704
+ template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
185705
+ reason: string | null;
185706
+ /** @description The rail has its template name set (by an admin or on approval). */
185707
+ wired: boolean;
185708
+ templates: {
185709
+ key: string;
185710
+ name: string;
185711
+ language: string;
185712
+ /** @enum {string} */
185713
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
185714
+ rejection_reason: string | null;
185715
+ }[];
185716
+ };
185717
+ booking_whatsapp: {
185718
+ /** @description The rail is switched on (`enabled: true`). */
185719
+ armed: boolean;
185720
+ /**
185721
+ * @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
185722
+ * @enum {string}
185723
+ */
185724
+ template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
185725
+ reason: string | null;
185726
+ /** @description The rail has its template name set (by an admin or on approval). */
185727
+ wired: boolean;
185728
+ templates: {
185729
+ key: string;
185730
+ name: string;
185731
+ language: string;
185732
+ /** @enum {string} */
185733
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
185734
+ rejection_reason: string | null;
185735
+ }[];
185736
+ };
185737
+ };
185294
185738
  /** @description Workspace display name. */
185295
185739
  name?: string;
185296
185740
  /** @description IANA time zone, e.g. `America/Santiago`. */
@@ -185427,6 +185871,31 @@ interface components {
185427
185871
  */
185428
185872
  register?: "tu" | "usted";
185429
185873
  } | null;
185874
+ notifications?: {
185875
+ staff_whatsapp?: {
185876
+ enabled?: boolean;
185877
+ /** Format: uuid */
185878
+ account_id?: string;
185879
+ template_name?: string;
185880
+ template_language?: string;
185881
+ };
185882
+ unanswered_supervisor_whatsapp?: {
185883
+ enabled?: boolean;
185884
+ /** Format: uuid */
185885
+ account_id?: string;
185886
+ template_name?: string;
185887
+ template_language?: string;
185888
+ user_ids?: string[];
185889
+ };
185890
+ booking_whatsapp?: {
185891
+ enabled?: boolean;
185892
+ /** Format: uuid */
185893
+ account_id?: string;
185894
+ template_name?: string;
185895
+ template_language?: string;
185896
+ change_template_name?: string;
185897
+ };
185898
+ };
185430
185899
  };
185431
185900
  LiveUsage: {
185432
185901
  as_of: string;
package/dist/index.d.ts CHANGED
@@ -16009,7 +16009,7 @@ interface paths {
16009
16009
  };
16010
16010
  /**
16011
16011
  * Read tenant-level settings
16012
- * @description The stored settings object, as saved through `PUT /tenant/settings`. Among its keys, `ads` holds the Vitrina Ads wizard choice: `{ tag_choice: "site" | "no_site" | null, tag_choice_at: string | null }` (`tag_choice_at` is stamped by the server on every write); absent when the workspace never answered the «Instalar el tag» step. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`. Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16012
+ * @description The stored settings object, as saved through `PUT /tenant/settings`. Among its keys, `ads` holds the Vitrina Ads wizard choice: `{ tag_choice: "site" | "no_site" | null, tag_choice_at: string | null }` (`tag_choice_at` is stamped by the server on every write); absent when the workspace never answered the «Instalar el tag» step. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`, the template voice under `voice`, and the notification rails under `notifications` (arming a staff WhatsApp rail submits its template to Meta and wires it on approval; the read-only `staff_rails` reports each rail template state). Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`, `voice` and `notifications`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16013
16013
  */
16014
16014
  get: {
16015
16015
  parameters: {
@@ -16112,7 +16112,7 @@ interface paths {
16112
16112
  };
16113
16113
  /**
16114
16114
  * Patch tenant-level settings
16115
- * @description Shallow-merges the body into the stored settings and answers the result. `ads` is merged key by key (a write that sends only `ads.tag_choice` keeps `ads.goal`), and the server stamps `tag_choice_at` / `goal_at` / `goal_by` — a client never sends them (400). A connected app may write only `ads`; any other key is refused with 403 and nothing is written. Requires `tenant:write`, or `ads:write` for a body that carries only `ads`. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`. Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16115
+ * @description Shallow-merges the body into the stored settings and answers the result. `ads` is merged key by key (a write that sends only `ads.tag_choice` keeps `ads.goal`), and the server stamps `tag_choice_at` / `goal_at` / `goal_by` — a client never sends them (400). A connected app may write only `ads`; any other key is refused with 403 and nothing is written. Requires `tenant:write`, or `ads:write` for a body that carries only `ads`. Only the keys documented here are part of the API pública: the workspace's general identity (`name`, `timezone`, `language`, `currency`, `date_format`, `website`) and the Vitrina Ads choices under `ads`, the template voice under `voice`, and the notification rails under `notifications` (arming a staff WhatsApp rail submits its template to Meta and wires it on approval; the read-only `staff_rails` reports each rail template state). Every API credential (API key, personal token, connected app, and the MCP) receives exactly those keys. Secrets are write-only: `slack_webhook_url` is never returned — a read answers `••••` plus `slack_webhook_configured`. Connected apps write only `ads`, `voice` and `notifications`: any other key, `slack_webhook_url` included, is refused with 403, so a connected app cannot send the mask back either. For a workspace's own API key or personal token with `tenant:write`, writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it. The webhook receives only the workspace's own alerts (pricing alerts and digests, reminders about its listings, consignments, credit applications and post-sale obligations, SLA breaches and safety holds); Vitrina never posts its internal alerts to it.
16116
16116
  */
16117
16117
  put: {
16118
16118
  parameters: {
@@ -115856,7 +115856,7 @@ interface paths {
115856
115856
  *
115857
115857
  * Carry your own `contact.external_id` for anyone you may open a second thread with: it is the only key that cannot drift. An email address and a phone number can both be reassigned to a different person, which is exactly why they are consulted after it and not before.
115858
115858
  *
115859
- * ⚠ The thread is addressable only if the channel can work out where to send. On `web` the address IS the visitor session, so a conversation opened here gets a synthetic `manual:<uuid>` external id and sending on it answers 422 `no_channel_identity` — open a web thread from the widget instead. On `whatsapp` and `email` the contact's phone or address is the address, and the thread is sendable as soon as `messaging_account_id` names a connected account.
115859
+ * ⚠ The thread is addressable only if the channel can work out where to send. On `web` the address IS the visitor session, so a conversation opened here gets a synthetic `manual:<uuid>` external id and sending on it answers 422 `no_channel_identity` — open a web thread from the widget instead. On `whatsapp` and `email` the contact's phone or address is the address, and the thread is sendable as soon as `messaging_account_id` names a connected account. A WhatsApp thread is keyed on the number (its wa_id), so when that number already has an open thread, that thread is returned instead of a second one.
115860
115860
  */
115861
115861
  post: {
115862
115862
  parameters: {
@@ -122296,6 +122296,361 @@ interface paths {
122296
122296
  patch?: never;
122297
122297
  trace?: never;
122298
122298
  };
122299
+ "/conversations/{id}/linked-conversations": {
122300
+ parameters: {
122301
+ query?: never;
122302
+ header?: never;
122303
+ path?: never;
122304
+ cookie?: never;
122305
+ };
122306
+ /**
122307
+ * List a conversation's linked conversations
122308
+ * @description Conversaciones enlazadas: the same customer in ONE exchange over two channels — a source conversation (e.g. Facebook Marketplace) and its continuation (e.g. WhatsApp). Each conversation keeps its own control. Every link is returned from THIS conversation's side: `role` says whether it is the `source` or the `continuation`, and `linked_conversation` is the other one. `context_card` is what the continuation carries from the source (the car, what was agreed, what is pending); it is never a message. Newest link first; empty when the conversation has no links. A member who sees only their own conversations does not get a link whose other conversation they cannot see.
122309
+ */
122310
+ get: {
122311
+ parameters: {
122312
+ query?: never;
122313
+ header?: never;
122314
+ path: {
122315
+ id: string;
122316
+ };
122317
+ cookie?: never;
122318
+ };
122319
+ requestBody?: never;
122320
+ responses: {
122321
+ /** @description Links */
122322
+ 200: {
122323
+ headers: {
122324
+ [name: string]: unknown;
122325
+ };
122326
+ content: {
122327
+ /**
122328
+ * @example {
122329
+ * "data": [
122330
+ * {
122331
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122332
+ * "role": "source",
122333
+ * "origin": "manual",
122334
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122335
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122336
+ * "context_card": {
122337
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122338
+ * "vehicle": {
122339
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122340
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122341
+ * },
122342
+ * "agreements": [
122343
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122344
+ * ],
122345
+ * "pending_asks": [
122346
+ * "Fotos del interior y del tablero"
122347
+ * ],
122348
+ * "pending_promises": [
122349
+ * "Enviar la ficha técnica por WhatsApp"
122350
+ * ],
122351
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122352
+ * },
122353
+ * "created_by_user_id": null,
122354
+ * "created_at": "2026-10-15T14:02:11.000Z",
122355
+ * "linked_conversation": {
122356
+ * "id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122357
+ * "display_id": "C-3061",
122358
+ * "channel": "whatsapp",
122359
+ * "status": "open",
122360
+ * "last_message_date": "2026-10-15T14:05:40.000Z"
122361
+ * }
122362
+ * }
122363
+ * ],
122364
+ * "meta": {
122365
+ * "total": 1
122366
+ * }
122367
+ * }
122368
+ */
122369
+ "application/json": {
122370
+ data?: unknown;
122371
+ meta?: {
122372
+ [key: string]: unknown;
122373
+ };
122374
+ };
122375
+ };
122376
+ };
122377
+ /** @description Validation error */
122378
+ 400: {
122379
+ headers: {
122380
+ [name: string]: unknown;
122381
+ };
122382
+ content: {
122383
+ "application/json": components["schemas"]["Error"];
122384
+ };
122385
+ };
122386
+ /** @description Unauthorized */
122387
+ 401: {
122388
+ headers: {
122389
+ [name: string]: unknown;
122390
+ };
122391
+ content: {
122392
+ "application/json": components["schemas"]["Error"];
122393
+ };
122394
+ };
122395
+ /** @description Forbidden */
122396
+ 403: {
122397
+ headers: {
122398
+ [name: string]: unknown;
122399
+ };
122400
+ content: {
122401
+ "application/json": components["schemas"]["Error"];
122402
+ };
122403
+ };
122404
+ /** @description Not found */
122405
+ 404: {
122406
+ headers: {
122407
+ [name: string]: unknown;
122408
+ };
122409
+ content: {
122410
+ "application/json": components["schemas"]["Error"];
122411
+ };
122412
+ };
122413
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122414
+ 409: {
122415
+ headers: {
122416
+ [name: string]: unknown;
122417
+ };
122418
+ content: {
122419
+ "application/json": components["schemas"]["Error"];
122420
+ };
122421
+ };
122422
+ /** @description Rate limited */
122423
+ 429: {
122424
+ headers: {
122425
+ [name: string]: unknown;
122426
+ };
122427
+ content: {
122428
+ "application/json": components["schemas"]["Error"];
122429
+ };
122430
+ };
122431
+ };
122432
+ };
122433
+ put?: never;
122434
+ /**
122435
+ * Link a conversation to its continuation on another channel
122436
+ * @description `{id}` is the SOURCE conversation; `continuation_conversation_id` is where the exchange continues. Both must belong to the same contact (merge the contacts first) and run on different channels. Idempotent per pair, in either direction: `201` when the link is created, `200` with the existing link when the two were already linked — a `context_card` in the body then replaces the stored one. Nothing is sent to the customer. Both conversations must be visible to the caller: one they cannot see is a 404, like one that does not exist.
122437
+ */
122438
+ post: {
122439
+ parameters: {
122440
+ query?: never;
122441
+ header?: {
122442
+ /** @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. */
122443
+ "Idempotency-Key"?: string;
122444
+ };
122445
+ path: {
122446
+ id: string;
122447
+ };
122448
+ cookie?: never;
122449
+ };
122450
+ requestBody?: {
122451
+ content: {
122452
+ /**
122453
+ * @example {
122454
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122455
+ * "context_card": {
122456
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122457
+ * "vehicle": {
122458
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122459
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122460
+ * },
122461
+ * "agreements": [
122462
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122463
+ * ],
122464
+ * "pending_asks": [
122465
+ * "Fotos del interior y del tablero"
122466
+ * ],
122467
+ * "pending_promises": [
122468
+ * "Enviar la ficha técnica por WhatsApp"
122469
+ * ],
122470
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122471
+ * }
122472
+ * }
122473
+ */
122474
+ "application/json": {
122475
+ /** Format: uuid */
122476
+ continuation_conversation_id: string;
122477
+ context_card?: {
122478
+ summary?: string | null;
122479
+ vehicle?: {
122480
+ /** Format: uuid */
122481
+ vehicle_id?: string | null;
122482
+ label: string;
122483
+ } | null;
122484
+ agreements?: string[];
122485
+ pending_asks?: string[];
122486
+ pending_promises?: string[];
122487
+ trade_in?: string | null;
122488
+ };
122489
+ };
122490
+ };
122491
+ };
122492
+ responses: {
122493
+ /** @description The existing link */
122494
+ 200: {
122495
+ headers: {
122496
+ [name: string]: unknown;
122497
+ };
122498
+ content: {
122499
+ /**
122500
+ * @example {
122501
+ * "data": {
122502
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122503
+ * "role": "source",
122504
+ * "origin": "manual",
122505
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122506
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122507
+ * "context_card": {
122508
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122509
+ * "vehicle": {
122510
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122511
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122512
+ * },
122513
+ * "agreements": [
122514
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122515
+ * ],
122516
+ * "pending_asks": [
122517
+ * "Fotos del interior y del tablero"
122518
+ * ],
122519
+ * "pending_promises": [
122520
+ * "Enviar la ficha técnica por WhatsApp"
122521
+ * ],
122522
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122523
+ * },
122524
+ * "created_by_user_id": null,
122525
+ * "created_at": "2026-10-15T14:02:11.000Z",
122526
+ * "linked_conversation": {
122527
+ * "id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122528
+ * "display_id": "C-3061",
122529
+ * "channel": "whatsapp",
122530
+ * "status": "open",
122531
+ * "last_message_date": "2026-10-15T14:05:40.000Z"
122532
+ * }
122533
+ * }
122534
+ * }
122535
+ */
122536
+ "application/json": {
122537
+ data?: unknown;
122538
+ meta?: {
122539
+ [key: string]: unknown;
122540
+ };
122541
+ };
122542
+ };
122543
+ };
122544
+ /** @description The created link */
122545
+ 201: {
122546
+ headers: {
122547
+ [name: string]: unknown;
122548
+ };
122549
+ content: {
122550
+ /**
122551
+ * @example {
122552
+ * "data": {
122553
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122554
+ * "role": "source",
122555
+ * "origin": "manual",
122556
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122557
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122558
+ * "context_card": {
122559
+ * "summary": "Pregunta por la Hilux 2021 publicada en Marketplace; quiere verla el sábado.",
122560
+ * "vehicle": {
122561
+ * "vehicle_id": "8d1b6e3a-4c27-4f90-b5a8-1e7c3d9f2a64",
122562
+ * "label": "Toyota Hilux 2.8 SRX 4x4 2021"
122563
+ * },
122564
+ * "agreements": [
122565
+ * "Visita el sábado a las 11:00 en la sucursal Las Condes"
122566
+ * ],
122567
+ * "pending_asks": [
122568
+ * "Fotos del interior y del tablero"
122569
+ * ],
122570
+ * "pending_promises": [
122571
+ * "Enviar la ficha técnica por WhatsApp"
122572
+ * ],
122573
+ * "trade_in": "Entrega en parte de pago un Suzuki Swift 2017, 98.000 km"
122574
+ * },
122575
+ * "created_by_user_id": null,
122576
+ * "created_at": "2026-10-15T14:02:11.000Z",
122577
+ * "linked_conversation": {
122578
+ * "id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122579
+ * "display_id": "C-3061",
122580
+ * "channel": "whatsapp",
122581
+ * "status": "open",
122582
+ * "last_message_date": "2026-10-15T14:05:40.000Z"
122583
+ * }
122584
+ * }
122585
+ * }
122586
+ */
122587
+ "application/json": {
122588
+ data?: unknown;
122589
+ };
122590
+ };
122591
+ };
122592
+ /** @description Validation error */
122593
+ 400: {
122594
+ headers: {
122595
+ [name: string]: unknown;
122596
+ };
122597
+ content: {
122598
+ "application/json": components["schemas"]["Error"];
122599
+ };
122600
+ };
122601
+ /** @description Unauthorized */
122602
+ 401: {
122603
+ headers: {
122604
+ [name: string]: unknown;
122605
+ };
122606
+ content: {
122607
+ "application/json": components["schemas"]["Error"];
122608
+ };
122609
+ };
122610
+ /** @description Forbidden */
122611
+ 403: {
122612
+ headers: {
122613
+ [name: string]: unknown;
122614
+ };
122615
+ content: {
122616
+ "application/json": components["schemas"]["Error"];
122617
+ };
122618
+ };
122619
+ /** @description Not found */
122620
+ 404: {
122621
+ headers: {
122622
+ [name: string]: unknown;
122623
+ };
122624
+ content: {
122625
+ "application/json": components["schemas"]["Error"];
122626
+ };
122627
+ };
122628
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122629
+ 409: {
122630
+ headers: {
122631
+ [name: string]: unknown;
122632
+ };
122633
+ content: {
122634
+ "application/json": components["schemas"]["Error"];
122635
+ };
122636
+ };
122637
+ /** @description Rate limited */
122638
+ 429: {
122639
+ headers: {
122640
+ [name: string]: unknown;
122641
+ };
122642
+ content: {
122643
+ "application/json": components["schemas"]["Error"];
122644
+ };
122645
+ };
122646
+ };
122647
+ };
122648
+ delete?: never;
122649
+ options?: never;
122650
+ head?: never;
122651
+ patch?: never;
122652
+ trace?: never;
122653
+ };
122299
122654
  "/conversations/{id}/agent-turn": {
122300
122655
  parameters: {
122301
122656
  query?: never;
@@ -185291,6 +185646,95 @@ interface components {
185291
185646
  push_enabled?: boolean;
185292
185647
  };
185293
185648
  TenantSettingsPublic: {
185649
+ /** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`) are opt-in: arming one (`enabled: true` with an `account_id`) submits its template to Meta on that number and wires it on approval. Each rail sent replaces that rail whole; rails not sent are kept. */
185650
+ notifications?: {
185651
+ staff_whatsapp?: {
185652
+ enabled?: boolean;
185653
+ /** Format: uuid */
185654
+ account_id?: string;
185655
+ template_name?: string;
185656
+ template_language?: string;
185657
+ };
185658
+ unanswered_supervisor_whatsapp?: {
185659
+ enabled?: boolean;
185660
+ /** Format: uuid */
185661
+ account_id?: string;
185662
+ template_name?: string;
185663
+ template_language?: string;
185664
+ user_ids?: string[];
185665
+ };
185666
+ booking_whatsapp?: {
185667
+ enabled?: boolean;
185668
+ /** Format: uuid */
185669
+ account_id?: string;
185670
+ template_name?: string;
185671
+ template_language?: string;
185672
+ change_template_name?: string;
185673
+ };
185674
+ };
185675
+ /** @description Read-only: the template state of each staff WhatsApp rail. Ignored on write. */
185676
+ staff_rails?: {
185677
+ staff_whatsapp: {
185678
+ /** @description The rail is switched on (`enabled: true`). */
185679
+ armed: boolean;
185680
+ /**
185681
+ * @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
185682
+ * @enum {string}
185683
+ */
185684
+ template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
185685
+ reason: string | null;
185686
+ /** @description The rail has its template name set (by an admin or on approval). */
185687
+ wired: boolean;
185688
+ templates: {
185689
+ key: string;
185690
+ name: string;
185691
+ language: string;
185692
+ /** @enum {string} */
185693
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
185694
+ rejection_reason: string | null;
185695
+ }[];
185696
+ };
185697
+ unanswered_supervisor_whatsapp: {
185698
+ /** @description The rail is switched on (`enabled: true`). */
185699
+ armed: boolean;
185700
+ /**
185701
+ * @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
185702
+ * @enum {string}
185703
+ */
185704
+ template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
185705
+ reason: string | null;
185706
+ /** @description The rail has its template name set (by an admin or on approval). */
185707
+ wired: boolean;
185708
+ templates: {
185709
+ key: string;
185710
+ name: string;
185711
+ language: string;
185712
+ /** @enum {string} */
185713
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
185714
+ rejection_reason: string | null;
185715
+ }[];
185716
+ };
185717
+ booking_whatsapp: {
185718
+ /** @description The rail is switched on (`enabled: true`). */
185719
+ armed: boolean;
185720
+ /**
185721
+ * @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
185722
+ * @enum {string}
185723
+ */
185724
+ template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
185725
+ reason: string | null;
185726
+ /** @description The rail has its template name set (by an admin or on approval). */
185727
+ wired: boolean;
185728
+ templates: {
185729
+ key: string;
185730
+ name: string;
185731
+ language: string;
185732
+ /** @enum {string} */
185733
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
185734
+ rejection_reason: string | null;
185735
+ }[];
185736
+ };
185737
+ };
185294
185738
  /** @description Workspace display name. */
185295
185739
  name?: string;
185296
185740
  /** @description IANA time zone, e.g. `America/Santiago`. */
@@ -185427,6 +185871,31 @@ interface components {
185427
185871
  */
185428
185872
  register?: "tu" | "usted";
185429
185873
  } | null;
185874
+ notifications?: {
185875
+ staff_whatsapp?: {
185876
+ enabled?: boolean;
185877
+ /** Format: uuid */
185878
+ account_id?: string;
185879
+ template_name?: string;
185880
+ template_language?: string;
185881
+ };
185882
+ unanswered_supervisor_whatsapp?: {
185883
+ enabled?: boolean;
185884
+ /** Format: uuid */
185885
+ account_id?: string;
185886
+ template_name?: string;
185887
+ template_language?: string;
185888
+ user_ids?: string[];
185889
+ };
185890
+ booking_whatsapp?: {
185891
+ enabled?: boolean;
185892
+ /** Format: uuid */
185893
+ account_id?: string;
185894
+ template_name?: string;
185895
+ template_language?: string;
185896
+ change_template_name?: string;
185897
+ };
185898
+ };
185430
185899
  };
185431
185900
  LiveUsage: {
185432
185901
  as_of: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.30.0",
3
+ "version": "14.31.1",
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",