@vitrina/api 11.27.0 → 11.29.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.ts CHANGED
@@ -10546,6 +10546,124 @@ interface paths {
10546
10546
  patch?: never;
10547
10547
  trace?: never;
10548
10548
  };
10549
+ "/messaging-accounts/email-sender/mine": {
10550
+ parameters: {
10551
+ query?: never;
10552
+ header?: never;
10553
+ path?: never;
10554
+ cookie?: never;
10555
+ };
10556
+ /**
10557
+ * Mailboxes you can send a new email from
10558
+ * @description Lists the mailboxes the signed-in teammate may send a new email from: their own connected mailbox (the one whose address is their login email) and the workspace principal mailbox. `default_id` is the one used when a send or a draft does not set `from_account_id` — their own mailbox if they have one, otherwise the principal. `can_connect_own` is true when they have no mailbox of their own yet. Pass one of these ids as `from_account_id` to `POST /conversations/email` or to an email draft; any other mailbox is refused.
10559
+ */
10560
+ get: {
10561
+ parameters: {
10562
+ query?: never;
10563
+ header?: never;
10564
+ path?: never;
10565
+ cookie?: never;
10566
+ };
10567
+ requestBody?: never;
10568
+ responses: {
10569
+ /** @description Sendable mailboxes */
10570
+ 200: {
10571
+ headers: {
10572
+ [name: string]: unknown;
10573
+ };
10574
+ content: {
10575
+ /**
10576
+ * @example {
10577
+ * "options": [
10578
+ * {
10579
+ * "id": "0b5f4c2e-7d1a-4e9b-9c3f-2a6d8e1f4b70",
10580
+ * "name": "María",
10581
+ * "address": "maria@ejemplo.cl",
10582
+ * "role": "own"
10583
+ * },
10584
+ * {
10585
+ * "id": "5e2a9d14-3c8b-4f60-a1e7-9b4c2d7f0a35",
10586
+ * "name": "Ventas",
10587
+ * "address": "ventas@ejemplo.cl",
10588
+ * "role": "principal"
10589
+ * }
10590
+ * ],
10591
+ * "default_id": "0b5f4c2e-7d1a-4e9b-9c3f-2a6d8e1f4b70",
10592
+ * "can_connect_own": false
10593
+ * }
10594
+ */
10595
+ "application/json": {
10596
+ data?: unknown;
10597
+ meta?: {
10598
+ [key: string]: unknown;
10599
+ };
10600
+ };
10601
+ };
10602
+ };
10603
+ /** @description Validation error */
10604
+ 400: {
10605
+ headers: {
10606
+ [name: string]: unknown;
10607
+ };
10608
+ content: {
10609
+ "application/json": components["schemas"]["Error"];
10610
+ };
10611
+ };
10612
+ /** @description Unauthorized */
10613
+ 401: {
10614
+ headers: {
10615
+ [name: string]: unknown;
10616
+ };
10617
+ content: {
10618
+ "application/json": components["schemas"]["Error"];
10619
+ };
10620
+ };
10621
+ /** @description Forbidden */
10622
+ 403: {
10623
+ headers: {
10624
+ [name: string]: unknown;
10625
+ };
10626
+ content: {
10627
+ "application/json": components["schemas"]["Error"];
10628
+ };
10629
+ };
10630
+ /** @description Not found */
10631
+ 404: {
10632
+ headers: {
10633
+ [name: string]: unknown;
10634
+ };
10635
+ content: {
10636
+ "application/json": components["schemas"]["Error"];
10637
+ };
10638
+ };
10639
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
10640
+ 409: {
10641
+ headers: {
10642
+ [name: string]: unknown;
10643
+ };
10644
+ content: {
10645
+ "application/json": components["schemas"]["Error"];
10646
+ };
10647
+ };
10648
+ /** @description Rate limited */
10649
+ 429: {
10650
+ headers: {
10651
+ [name: string]: unknown;
10652
+ };
10653
+ content: {
10654
+ "application/json": components["schemas"]["Error"];
10655
+ };
10656
+ };
10657
+ };
10658
+ };
10659
+ put?: never;
10660
+ post?: never;
10661
+ delete?: never;
10662
+ options?: never;
10663
+ head?: never;
10664
+ patch?: never;
10665
+ trace?: never;
10666
+ };
10549
10667
  "/webhooks": {
10550
10668
  parameters: {
10551
10669
  query?: never;
@@ -13577,7 +13695,7 @@ interface paths {
13577
13695
  };
13578
13696
  /**
13579
13697
  * Read tenant-level settings
13580
- * @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`; writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it.
13698
+ * @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.
13581
13699
  */
13582
13700
  get: {
13583
13701
  parameters: {
@@ -13612,7 +13730,8 @@ interface paths {
13612
13730
  * },
13613
13731
  * "goal_at": "2026-09-01T12:00:00.000Z",
13614
13732
  * "goal_by": "20000000-0000-4000-8000-000000000001"
13615
- * }
13733
+ * },
13734
+ * "slack_webhook_configured": false
13616
13735
  * }
13617
13736
  * }
13618
13737
  */
@@ -13679,7 +13798,7 @@ interface paths {
13679
13798
  };
13680
13799
  /**
13681
13800
  * Patch tenant-level settings
13682
- * @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`; writing `••••` back keeps the stored webhook, a new URL replaces it, and `null` or an empty string clears it.
13801
+ * @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.
13683
13802
  */
13684
13803
  put: {
13685
13804
  parameters: {
@@ -13718,7 +13837,8 @@ interface paths {
13718
13837
  * "ads": {
13719
13838
  * "tag_choice": "site",
13720
13839
  * "tag_choice_at": "2026-09-24T12:00:00.000Z"
13721
- * }
13840
+ * },
13841
+ * "slack_webhook_configured": false
13722
13842
  * }
13723
13843
  * }
13724
13844
  */
@@ -66734,6 +66854,258 @@ interface paths {
66734
66854
  };
66735
66855
  trace?: never;
66736
66856
  };
66857
+ "/clinic/insights/comercial": {
66858
+ parameters: {
66859
+ query?: never;
66860
+ header?: never;
66861
+ path?: never;
66862
+ cookie?: never;
66863
+ };
66864
+ /**
66865
+ * Commercial numbers: presupuesto acceptance, cierres, cash, botados
66866
+ * @description The clinic's commercial numbers, aggregates only (counts, CLP, percentages, months and professional names; never a patient). `regime` says how acceptance is read: `evidencia` when the revenue mirror is on (a non-entry line performed, or a cita booked after the presupuesto, inside its window), `explicita` otherwise (the acceptance the clinic recorded). Acceptance is by COUNT of presupuestos, one per lineage; $0 and entry-only presupuestos are out of both sides; the window is 60 days (90 for ortodoncia and implantología); the rate goes to the professional who issued the presupuesto. Presupuestos ISSUED in the window form the acceptance cohort (`cohorts` by issue month with 30- and 60-day reads). A cierre is the first payment on an accepted presupuesto: once per presupuesto, dated on that payment, valued at the full accepted value. `headline` is the cash collected in the window against the previous window of the same length. `first_visit`, `second_visit` and `botados` carry `formula: propuesta`; `botados` is a live worklist over the last six months. Every KPI carries its `formula` and a printable `rule`; a rate with no denominator is `null`, never 0. `state` is `empty`, `settling` (presupuesto lines still being read; `state_reason` says so) or `ready`. Requires `clinic_money:read` (or `clinic_insights:read`, which reads the same aggregates). Accepts `from` / `to` (bare `YYYY-MM-DD`, `to` INCLUSIVE; default the 90 days ending today in the clinic's zone), `location_id` and `professional_id`. With `professional_id`, cash (`headline`, `months[].collected_clp`) is `null`: a payment belongs to the patient, not to a professional.
66867
+ *
66868
+ * **Connected apps:** every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, `"M.F. · #1001"` — unless the clinic allowed patient names, with RUT, phone and email masked in free text and `meta.patient_privacy` saying so. Clinical alerts (`flags`) are withheld in both modes, and a non-JSON body (an export, a file) is refused with `403 CONNECTED_APP_SENSITIVE_DATA`.
66869
+ */
66870
+ get: {
66871
+ parameters: {
66872
+ query?: {
66873
+ /** @description First day of the window, inclusive. Defaults to 90 days before `to`. */
66874
+ from?: string;
66875
+ /** @description Last day of the window, INCLUSIVE. Defaults to today in the clinic's zone. */
66876
+ to?: string;
66877
+ /** @description One sucursal. Omit for all of them. */
66878
+ location_id?: string;
66879
+ /** @description One profesional. A foreign id is a 404, never an empty report. */
66880
+ professional_id?: string;
66881
+ };
66882
+ header?: never;
66883
+ path?: never;
66884
+ cookie?: never;
66885
+ };
66886
+ requestBody?: never;
66887
+ responses: {
66888
+ /** @description Clinic commercial numbers */
66889
+ 200: {
66890
+ headers: {
66891
+ [name: string]: unknown;
66892
+ };
66893
+ content: {
66894
+ /**
66895
+ * @example {
66896
+ * "data": {
66897
+ * "from": "2026-06-01",
66898
+ * "to": "2026-08-29",
66899
+ * "timezone": "America/Santiago",
66900
+ * "location_id": null,
66901
+ * "professional_id": null,
66902
+ * "state": "ready",
66903
+ * "state_reason": null,
66904
+ * "regime": "evidencia",
66905
+ * "regime_label": "Aceptación por evidencia",
66906
+ * "regime_rule": "Leído desde tu software de agenda: un presupuesto cuenta como aceptado cuando se realizó una de sus prestaciones o el paciente agendó una cita después de recibirlo.",
66907
+ * "source": {
66908
+ * "kind": "mirror",
66909
+ * "synced_at": "2026-08-30T03:10:00.000Z"
66910
+ * },
66911
+ * "formulas": {
66912
+ * "acceptance": "mentores_2026_09_25",
66913
+ * "cierre": "cierre_2026_09_25",
66914
+ * "first_visit": "propuesta",
66915
+ * "second_visit": "propuesta",
66916
+ * "botados": "propuesta"
66917
+ * },
66918
+ * "headline": {
66919
+ * "collected_clp": 48500000,
66920
+ * "previous_collected_clp": 44100000,
66921
+ * "delta_pct": 10,
66922
+ * "previous_from": "2026-03-03",
66923
+ * "previous_to": "2026-05-31",
66924
+ * "rule": "Lo cobrado en el período: todos los pagos recibidos, sin los anulados. Se compara con el período anterior del mismo largo."
66925
+ * },
66926
+ * "acceptance": {
66927
+ * "presented": 420,
66928
+ * "accepted": 231,
66929
+ * "rate": 55,
66930
+ * "same_day": 118,
66931
+ * "later": 113,
66932
+ * "cita_only": 14,
66933
+ * "pending": 36,
66934
+ * "presented_clp": 142000000,
66935
+ * "accepted_clp": 71300000,
66936
+ * "rate_30d": 47.2,
66937
+ * "rate_60d": 53.8,
66938
+ * "formula": "mentores_2026_09_25",
66939
+ * "window_days": 60,
66940
+ * "long_window_days": 90,
66941
+ * "rule": "Presupuestos aceptados ÷ presupuestos presentados, cada presupuesto una vez."
66942
+ * },
66943
+ * "cierres": {
66944
+ * "count": 180,
66945
+ * "value_clp": 58900000,
66946
+ * "accepted_without_payment": 51,
66947
+ * "formula": "cierre_2026_09_25",
66948
+ * "rule": "Un cierre es el primer pago de un presupuesto aceptado."
66949
+ * },
66950
+ * "cohorts": [
66951
+ * {
66952
+ * "month": "2026-06",
66953
+ * "presented": 140,
66954
+ * "accepted": 80,
66955
+ * "rate": 57.1,
66956
+ * "same_day": 41,
66957
+ * "later": 39,
66958
+ * "cita_only": 2,
66959
+ * "pending": 0,
66960
+ * "presented_clp": 47000000,
66961
+ * "accepted_clp": 24800000,
66962
+ * "rate_30d": 49.3,
66963
+ * "rate_60d": 56.4,
66964
+ * "mature": true
66965
+ * }
66966
+ * ],
66967
+ * "by_professional": [
66968
+ * {
66969
+ * "professional_id": "0f3c2a9e-5b1d-4c7e-9a42-6d8e1f2b3c4d",
66970
+ * "professional_name": "Dra. Camila Soto",
66971
+ * "presented": 96,
66972
+ * "accepted": 61,
66973
+ * "rate": 63.5,
66974
+ * "same_day": 30,
66975
+ * "later": 31,
66976
+ * "cita_only": 3,
66977
+ * "pending": 8,
66978
+ * "presented_clp": 33400000,
66979
+ * "accepted_clp": 19900000,
66980
+ * "cierres": 47,
66981
+ * "cierres_clp": 15100000
66982
+ * }
66983
+ * ],
66984
+ * "unassigned_presented": 0,
66985
+ * "unassigned_cierres": 0,
66986
+ * "months": [
66987
+ * {
66988
+ * "month": "2026-06",
66989
+ * "accepted_clp": 24100000,
66990
+ * "produced_clp": 19700000,
66991
+ * "collected_clp": 16200000,
66992
+ * "cierres": 62,
66993
+ * "cierres_clp": 20300000
66994
+ * }
66995
+ * ],
66996
+ * "first_visit": {
66997
+ * "formula": "propuesta",
66998
+ * "patients": 210,
66999
+ * "paid": 97,
67000
+ * "rate": 46.2,
67001
+ * "rule": "Fórmula propuesta."
67002
+ * },
67003
+ * "second_visit": {
67004
+ * "formula": "propuesta",
67005
+ * "eligible": 113,
67006
+ * "converted": 29,
67007
+ * "rate": 25.7,
67008
+ * "rule": "Fórmula propuesta."
67009
+ * },
67010
+ * "botados": {
67011
+ * "unaccepted": {
67012
+ * "count": 88,
67013
+ * "clp": 31200000
67014
+ * },
67015
+ * "accepted_unscheduled": {
67016
+ * "count": 17,
67017
+ * "clp": 6400000
67018
+ * },
67019
+ * "mid_treatment_no_future_cita": {
67020
+ * "count": 23,
67021
+ * "clp": 9800000
67022
+ * },
67023
+ * "formula": "propuesta",
67024
+ * "basis": "live_last_6_months",
67025
+ * "total": {
67026
+ * "count": 128,
67027
+ * "clp": 47400000
67028
+ * },
67029
+ * "focus": "unaccepted",
67030
+ * "rule": "Fórmula propuesta."
67031
+ * },
67032
+ * "coverage": {
67033
+ * "plans_without_lines": 0,
67034
+ * "excluded_zero": 301,
67035
+ * "excluded_entry_only": 92
67036
+ * }
67037
+ * }
67038
+ * }
67039
+ */
67040
+ "application/json": {
67041
+ data: components["schemas"]["ClinicComercialReport"];
67042
+ };
67043
+ };
67044
+ };
67045
+ /** @description Validation error */
67046
+ 400: {
67047
+ headers: {
67048
+ [name: string]: unknown;
67049
+ };
67050
+ content: {
67051
+ "application/json": components["schemas"]["Error"];
67052
+ };
67053
+ };
67054
+ /** @description Unauthorized */
67055
+ 401: {
67056
+ headers: {
67057
+ [name: string]: unknown;
67058
+ };
67059
+ content: {
67060
+ "application/json": components["schemas"]["Error"];
67061
+ };
67062
+ };
67063
+ /** @description Forbidden */
67064
+ 403: {
67065
+ headers: {
67066
+ [name: string]: unknown;
67067
+ };
67068
+ content: {
67069
+ "application/json": components["schemas"]["Error"];
67070
+ };
67071
+ };
67072
+ /** @description Not found */
67073
+ 404: {
67074
+ headers: {
67075
+ [name: string]: unknown;
67076
+ };
67077
+ content: {
67078
+ "application/json": components["schemas"]["Error"];
67079
+ };
67080
+ };
67081
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
67082
+ 409: {
67083
+ headers: {
67084
+ [name: string]: unknown;
67085
+ };
67086
+ content: {
67087
+ "application/json": components["schemas"]["Error"];
67088
+ };
67089
+ };
67090
+ /** @description Rate limited */
67091
+ 429: {
67092
+ headers: {
67093
+ [name: string]: unknown;
67094
+ };
67095
+ content: {
67096
+ "application/json": components["schemas"]["Error"];
67097
+ };
67098
+ };
67099
+ };
67100
+ };
67101
+ put?: never;
67102
+ post?: never;
67103
+ delete?: never;
67104
+ options?: never;
67105
+ head?: never;
67106
+ patch?: never;
67107
+ trace?: never;
67108
+ };
66737
67109
  "/ads/state": {
66738
67110
  parameters: {
66739
67111
  query?: never;
@@ -74921,6 +75293,8 @@ interface paths {
74921
75293
  html?: string;
74922
75294
  /** Format: uuid */
74923
75295
  signature_id?: string | null;
75296
+ /** Format: uuid */
75297
+ from_account_id?: string;
74924
75298
  };
74925
75299
  };
74926
75300
  };
@@ -81991,6 +82365,8 @@ interface paths {
81991
82365
  body_text?: string;
81992
82366
  signature_id?: string | "none" | null;
81993
82367
  /** Format: uuid */
82368
+ from_account_id?: string | null;
82369
+ /** Format: uuid */
81994
82370
  conversation_id?: string | null;
81995
82371
  };
81996
82372
  };
@@ -82330,6 +82706,8 @@ interface paths {
82330
82706
  body_html?: string;
82331
82707
  body_text?: string;
82332
82708
  signature_id?: string | "none" | null;
82709
+ /** Format: uuid */
82710
+ from_account_id?: string | null;
82333
82711
  };
82334
82712
  };
82335
82713
  };
@@ -93087,7 +93465,7 @@ interface paths {
93087
93465
  * ],
93088
93466
  * "primary": false,
93089
93467
  * "title": "Corregir los enlaces de tus anuncios",
93090
- * "why": "Los parámetros de URL de **2** anuncios pasan a los estándar para que cada clic diga qué anuncio lo trajo («utm_content={{ad.id}}»); hoy sus resultados no se le pueden atribuir a ningún anuncio. Cambian «utm_source», «utm_medium», «utm_campaign», «utm_term», «utm_content» y «utm_id»: la vista previa muestra, anuncio por anuncio, lo que tiene hoy y lo que queda.",
93468
+ * "why": "Así sabrás qué anuncio trajo cada paciente: hoy los clics de **2** anuncios llegan sin decir de cuál vienen.",
93091
93469
  * "effect": "Meta puede reiniciar el aprendizaje de los conjuntos afectados; los anuncios siguen activos. Puedes deshacerlo.",
93092
93470
  * "target": {
93093
93471
  * "level": "profile",
@@ -105049,6 +105427,8 @@ interface paths {
105049
105427
  * "name": "seguimiento_stock",
105050
105428
  * "language": "es_CL",
105051
105429
  * "category": "MARKETING",
105430
+ * "submitted_category": "UTILITY",
105431
+ * "category_reclassified_at": "2026-09-16T09:00:00.000Z",
105052
105432
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
105053
105433
  * "header_text": null,
105054
105434
  * "footer_text": "Autos del Valle",
@@ -105235,6 +105615,8 @@ interface paths {
105235
105615
  * "name": "seguimiento_stock",
105236
105616
  * "language": "es_CL",
105237
105617
  * "category": "MARKETING",
105618
+ * "submitted_category": "MARKETING",
105619
+ * "category_reclassified_at": null,
105238
105620
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
105239
105621
  * "header_text": null,
105240
105622
  * "footer_text": "Autos del Valle",
@@ -105401,6 +105783,8 @@ interface paths {
105401
105783
  * "name": "seguimiento_stock",
105402
105784
  * "language": "es_CL",
105403
105785
  * "category": "MARKETING",
105786
+ * "submitted_category": "UTILITY",
105787
+ * "category_reclassified_at": "2026-09-16T09:00:00.000Z",
105404
105788
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
105405
105789
  * "header_text": null,
105406
105790
  * "footer_text": "Autos del Valle",
@@ -105558,6 +105942,8 @@ interface paths {
105558
105942
  * "name": "seguimiento_stock",
105559
105943
  * "language": "es_CL",
105560
105944
  * "category": "MARKETING",
105945
+ * "submitted_category": "UTILITY",
105946
+ * "category_reclassified_at": "2026-09-16T09:00:00.000Z",
105561
105947
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
105562
105948
  * "header_text": null,
105563
105949
  * "footer_text": "Autos del Valle",
@@ -106431,6 +106817,8 @@ interface paths {
106431
106817
  * "name": "seguimiento_stock",
106432
106818
  * "language": "es_CL",
106433
106819
  * "category": "MARKETING",
106820
+ * "submitted_category": "UTILITY",
106821
+ * "category_reclassified_at": "2026-09-16T09:00:00.000Z",
106434
106822
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
106435
106823
  * "header_text": null,
106436
106824
  * "footer_text": "Autos del Valle",
@@ -106576,6 +106964,8 @@ interface paths {
106576
106964
  * "name": "seguimiento_stock",
106577
106965
  * "language": "es_CL",
106578
106966
  * "category": "MARKETING",
106967
+ * "submitted_category": "UTILITY",
106968
+ * "category_reclassified_at": "2026-09-16T09:00:00.000Z",
106579
106969
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
106580
106970
  * "header_text": null,
106581
106971
  * "footer_text": "Autos del Valle",
@@ -106842,6 +107232,8 @@ interface paths {
106842
107232
  * "name": "seguimiento_stock",
106843
107233
  * "language": "es_CL",
106844
107234
  * "category": "MARKETING",
107235
+ * "submitted_category": "UTILITY",
107236
+ * "category_reclassified_at": "2026-09-16T09:00:00.000Z",
106845
107237
  * "body_text": "Hola {{1}}, el {{2}} que consultaste sigue disponible. ¿Seguimos viéndolo?",
106846
107238
  * "header_text": null,
106847
107239
  * "footer_text": "Autos del Valle",
@@ -114803,6 +115195,189 @@ interface components {
114803
115195
  from: string;
114804
115196
  to: string;
114805
115197
  };
115198
+ ClinicComercialReport: {
115199
+ from: string;
115200
+ to: string;
115201
+ timezone: string;
115202
+ /** Format: uuid */
115203
+ location_id: string | null;
115204
+ /** Format: uuid */
115205
+ professional_id: string | null;
115206
+ /** @enum {string} */
115207
+ state: "ready" | "settling" | "empty";
115208
+ state_reason: string | null;
115209
+ /** @enum {string} */
115210
+ regime: "evidencia" | "explicita";
115211
+ regime_label: string;
115212
+ regime_rule: string;
115213
+ source: {
115214
+ /** @enum {string} */
115215
+ kind: "mirror" | "native";
115216
+ /** Format: date-time */
115217
+ synced_at: string | null;
115218
+ };
115219
+ formulas: {
115220
+ /** @enum {string} */
115221
+ acceptance: "mentores_2026_09_25";
115222
+ /** @enum {string} */
115223
+ cierre: "cierre_2026_09_25";
115224
+ /** @enum {string} */
115225
+ first_visit: "propuesta";
115226
+ /** @enum {string} */
115227
+ second_visit: "propuesta";
115228
+ /** @enum {string} */
115229
+ botados: "propuesta";
115230
+ };
115231
+ headline: {
115232
+ /** @description Cash collected in the window. `null` with a professional filter: a payment has no professional. */
115233
+ collected_clp: number | null;
115234
+ previous_collected_clp: number | null;
115235
+ delta_pct: number | null;
115236
+ previous_from: string;
115237
+ previous_to: string;
115238
+ rule: string;
115239
+ };
115240
+ acceptance: {
115241
+ /** @description Presupuestos presented (issued), one per lineage. */
115242
+ presented: number;
115243
+ accepted: number;
115244
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115245
+ rate: number | null;
115246
+ /** @description Accepted the day they were issued. */
115247
+ same_day: number;
115248
+ later: number;
115249
+ /** @description Accepted only through a cita still ahead — may drop if it is cancelled. */
115250
+ cita_only: number;
115251
+ /** @description Not accepted yet, window still open. */
115252
+ pending: number;
115253
+ /** @description CLP presented, entry lines excluded. */
115254
+ presented_clp: number;
115255
+ accepted_clp: number;
115256
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115257
+ rate_30d: number | null;
115258
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115259
+ rate_60d: number | null;
115260
+ /** @enum {string} */
115261
+ formula: "mentores_2026_09_25";
115262
+ window_days: number;
115263
+ long_window_days: number;
115264
+ rule: string;
115265
+ };
115266
+ cierres: {
115267
+ count: number;
115268
+ /** @description The accepted value of the presupuestos that closed — never the payments. */
115269
+ value_clp: number;
115270
+ accepted_without_payment: number;
115271
+ /** @enum {string} */
115272
+ formula: "cierre_2026_09_25";
115273
+ rule: string;
115274
+ };
115275
+ cohorts: {
115276
+ /** @description Issue month, `YYYY-MM`. */
115277
+ month: string;
115278
+ /** @description Presupuestos presented (issued), one per lineage. */
115279
+ presented: number;
115280
+ accepted: number;
115281
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115282
+ rate: number | null;
115283
+ /** @description Accepted the day they were issued. */
115284
+ same_day: number;
115285
+ later: number;
115286
+ /** @description Accepted only through a cita still ahead — may drop if it is cancelled. */
115287
+ cita_only: number;
115288
+ /** @description Not accepted yet, window still open. */
115289
+ pending: number;
115290
+ /** @description CLP presented, entry lines excluded. */
115291
+ presented_clp: number;
115292
+ accepted_clp: number;
115293
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115294
+ rate_30d: number | null;
115295
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115296
+ rate_60d: number | null;
115297
+ /** @description Every presupuesto of the month is past its window. */
115298
+ mature: boolean;
115299
+ }[];
115300
+ by_professional: {
115301
+ /** Format: uuid */
115302
+ professional_id: string;
115303
+ professional_name: string;
115304
+ /** @description Presupuestos presented (issued), one per lineage. */
115305
+ presented: number;
115306
+ accepted: number;
115307
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115308
+ rate: number | null;
115309
+ /** @description Accepted the day they were issued. */
115310
+ same_day: number;
115311
+ later: number;
115312
+ /** @description Accepted only through a cita still ahead — may drop if it is cancelled. */
115313
+ cita_only: number;
115314
+ /** @description Not accepted yet, window still open. */
115315
+ pending: number;
115316
+ /** @description CLP presented, entry lines excluded. */
115317
+ presented_clp: number;
115318
+ accepted_clp: number;
115319
+ cierres: number;
115320
+ cierres_clp: number;
115321
+ }[];
115322
+ unassigned_presented: number;
115323
+ unassigned_cierres: number;
115324
+ months: {
115325
+ month: string;
115326
+ accepted_clp: number;
115327
+ produced_clp: number;
115328
+ collected_clp: number | null;
115329
+ cierres: number;
115330
+ cierres_clp: number;
115331
+ }[];
115332
+ first_visit: {
115333
+ /** @enum {string} */
115334
+ formula: "propuesta";
115335
+ patients: number;
115336
+ paid: number;
115337
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115338
+ rate: number | null;
115339
+ rule: string;
115340
+ };
115341
+ second_visit: {
115342
+ /** @enum {string} */
115343
+ formula: "propuesta";
115344
+ eligible: number;
115345
+ converted: number;
115346
+ /** @description Percent, one decimal. `null` when there was nothing to divide — never 0. */
115347
+ rate: number | null;
115348
+ rule: string;
115349
+ };
115350
+ botados: {
115351
+ unaccepted: {
115352
+ count: number;
115353
+ clp: number;
115354
+ };
115355
+ accepted_unscheduled: {
115356
+ count: number;
115357
+ clp: number;
115358
+ };
115359
+ mid_treatment_no_future_cita: {
115360
+ count: number;
115361
+ clp: number;
115362
+ };
115363
+ /** @enum {string} */
115364
+ formula: "propuesta";
115365
+ /** @enum {string} */
115366
+ basis: "live_last_6_months";
115367
+ total: {
115368
+ count: number;
115369
+ clp: number;
115370
+ };
115371
+ /** @enum {string|null} */
115372
+ focus: "unaccepted" | "accepted_unscheduled" | "mid_treatment_no_future_cita" | null;
115373
+ rule: string;
115374
+ };
115375
+ coverage: {
115376
+ plans_without_lines: number;
115377
+ excluded_zero: number;
115378
+ excluded_entry_only: number;
115379
+ };
115380
+ };
114806
115381
  AdsState: {
114807
115382
  /** @enum {string} */
114808
115383
  entitlement: "off" | "pending_on" | "on" | "pending_off";