@vitrina/api 15.17.0 → 15.18.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 +310 -1
- package/dist/index.d.ts +310 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -88531,6 +88531,272 @@ interface paths {
|
|
|
88531
88531
|
patch?: never;
|
|
88532
88532
|
trace?: never;
|
|
88533
88533
|
};
|
|
88534
|
+
"/finanzas/contador-export": {
|
|
88535
|
+
parameters: {
|
|
88536
|
+
query?: never;
|
|
88537
|
+
header?: never;
|
|
88538
|
+
path?: never;
|
|
88539
|
+
cookie?: never;
|
|
88540
|
+
};
|
|
88541
|
+
/**
|
|
88542
|
+
* Download the Contador package for a month (zip)
|
|
88543
|
+
* @description One zip, `paquete-contador-<period>.zip`, with seven xlsx: `01-libro-de-compras`, `02-libro-de-ventas`, `03-honorarios`, `04-movimientos-por-cuenta` (one sheet per bank account), `05-clasificaciones-por-cuenta` (net, as the Resultado counts), `06-resultado` and `07-ajustes-posteriores-al-cierre`, each `<name>-<period>.xlsx`, built by the same code as each screen and its export. Read-only. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
|
|
88544
|
+
*/
|
|
88545
|
+
get: {
|
|
88546
|
+
parameters: {
|
|
88547
|
+
query?: {
|
|
88548
|
+
period?: string;
|
|
88549
|
+
};
|
|
88550
|
+
header?: never;
|
|
88551
|
+
path?: never;
|
|
88552
|
+
cookie?: never;
|
|
88553
|
+
};
|
|
88554
|
+
requestBody?: never;
|
|
88555
|
+
responses: {
|
|
88556
|
+
/** @description The package, as an attachment */
|
|
88557
|
+
200: {
|
|
88558
|
+
headers: {
|
|
88559
|
+
[name: string]: unknown;
|
|
88560
|
+
};
|
|
88561
|
+
content: {
|
|
88562
|
+
"application/zip": string;
|
|
88563
|
+
};
|
|
88564
|
+
};
|
|
88565
|
+
/** @description Validation error */
|
|
88566
|
+
400: {
|
|
88567
|
+
headers: {
|
|
88568
|
+
[name: string]: unknown;
|
|
88569
|
+
};
|
|
88570
|
+
content: {
|
|
88571
|
+
"application/json": components["schemas"]["Error"];
|
|
88572
|
+
};
|
|
88573
|
+
};
|
|
88574
|
+
/** @description Unauthorized */
|
|
88575
|
+
401: {
|
|
88576
|
+
headers: {
|
|
88577
|
+
[name: string]: unknown;
|
|
88578
|
+
};
|
|
88579
|
+
content: {
|
|
88580
|
+
"application/json": components["schemas"]["Error"];
|
|
88581
|
+
};
|
|
88582
|
+
};
|
|
88583
|
+
/** @description Forbidden */
|
|
88584
|
+
403: {
|
|
88585
|
+
headers: {
|
|
88586
|
+
[name: string]: unknown;
|
|
88587
|
+
};
|
|
88588
|
+
content: {
|
|
88589
|
+
"application/json": components["schemas"]["Error"];
|
|
88590
|
+
};
|
|
88591
|
+
};
|
|
88592
|
+
/** @description Not found */
|
|
88593
|
+
404: {
|
|
88594
|
+
headers: {
|
|
88595
|
+
[name: string]: unknown;
|
|
88596
|
+
};
|
|
88597
|
+
content: {
|
|
88598
|
+
"application/json": components["schemas"]["Error"];
|
|
88599
|
+
};
|
|
88600
|
+
};
|
|
88601
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
88602
|
+
409: {
|
|
88603
|
+
headers: {
|
|
88604
|
+
[name: string]: unknown;
|
|
88605
|
+
};
|
|
88606
|
+
content: {
|
|
88607
|
+
"application/json": components["schemas"]["Error"];
|
|
88608
|
+
};
|
|
88609
|
+
};
|
|
88610
|
+
/** @description Rate limited */
|
|
88611
|
+
429: {
|
|
88612
|
+
headers: {
|
|
88613
|
+
[name: string]: unknown;
|
|
88614
|
+
};
|
|
88615
|
+
content: {
|
|
88616
|
+
"application/json": components["schemas"]["Error"];
|
|
88617
|
+
};
|
|
88618
|
+
};
|
|
88619
|
+
};
|
|
88620
|
+
};
|
|
88621
|
+
put?: never;
|
|
88622
|
+
post?: never;
|
|
88623
|
+
delete?: never;
|
|
88624
|
+
options?: never;
|
|
88625
|
+
head?: never;
|
|
88626
|
+
patch?: never;
|
|
88627
|
+
trace?: never;
|
|
88628
|
+
};
|
|
88629
|
+
"/finanzas/contador-export/manifest": {
|
|
88630
|
+
parameters: {
|
|
88631
|
+
query?: never;
|
|
88632
|
+
header?: never;
|
|
88633
|
+
path?: never;
|
|
88634
|
+
cookie?: never;
|
|
88635
|
+
};
|
|
88636
|
+
/**
|
|
88637
|
+
* What the Contador package for a month holds
|
|
88638
|
+
* @description The same package as the download, without the bytes: the period, the zip name and each file (key, label, name, rows, size). Over MCP this is the read that generates and checks the package; the zip itself downloads over HTTPS. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
|
|
88639
|
+
*/
|
|
88640
|
+
get: {
|
|
88641
|
+
parameters: {
|
|
88642
|
+
query?: {
|
|
88643
|
+
period?: string;
|
|
88644
|
+
};
|
|
88645
|
+
header?: never;
|
|
88646
|
+
path?: never;
|
|
88647
|
+
cookie?: never;
|
|
88648
|
+
};
|
|
88649
|
+
requestBody?: never;
|
|
88650
|
+
responses: {
|
|
88651
|
+
/** @description The manifest */
|
|
88652
|
+
200: {
|
|
88653
|
+
headers: {
|
|
88654
|
+
[name: string]: unknown;
|
|
88655
|
+
};
|
|
88656
|
+
content: {
|
|
88657
|
+
/**
|
|
88658
|
+
* @example {
|
|
88659
|
+
* "data": {
|
|
88660
|
+
* "period": "2026-09",
|
|
88661
|
+
* "filename": "paquete-contador-2026-09.zip",
|
|
88662
|
+
* "files": [
|
|
88663
|
+
* {
|
|
88664
|
+
* "key": "libro_compras",
|
|
88665
|
+
* "label": "Libro de compras",
|
|
88666
|
+
* "filename": "01-libro-de-compras-2026-09.xlsx",
|
|
88667
|
+
* "rows": 84,
|
|
88668
|
+
* "size_bytes": 14210
|
|
88669
|
+
* },
|
|
88670
|
+
* {
|
|
88671
|
+
* "key": "libro_ventas",
|
|
88672
|
+
* "label": "Libro de ventas",
|
|
88673
|
+
* "filename": "02-libro-de-ventas-2026-09.xlsx",
|
|
88674
|
+
* "rows": 1312,
|
|
88675
|
+
* "size_bytes": 61904
|
|
88676
|
+
* },
|
|
88677
|
+
* {
|
|
88678
|
+
* "key": "honorarios",
|
|
88679
|
+
* "label": "Honorarios",
|
|
88680
|
+
* "filename": "03-honorarios-2026-09.xlsx",
|
|
88681
|
+
* "rows": 12,
|
|
88682
|
+
* "size_bytes": 7480
|
|
88683
|
+
* },
|
|
88684
|
+
* {
|
|
88685
|
+
* "key": "movimientos",
|
|
88686
|
+
* "label": "Movimientos por cuenta",
|
|
88687
|
+
* "filename": "04-movimientos-por-cuenta-2026-09.xlsx",
|
|
88688
|
+
* "rows": 640,
|
|
88689
|
+
* "size_bytes": 38112
|
|
88690
|
+
* },
|
|
88691
|
+
* {
|
|
88692
|
+
* "key": "clasificaciones",
|
|
88693
|
+
* "label": "Clasificaciones por cuenta",
|
|
88694
|
+
* "filename": "05-clasificaciones-por-cuenta-2026-09.xlsx",
|
|
88695
|
+
* "rows": 702,
|
|
88696
|
+
* "size_bytes": 40356
|
|
88697
|
+
* },
|
|
88698
|
+
* {
|
|
88699
|
+
* "key": "resultado",
|
|
88700
|
+
* "label": "Resultado",
|
|
88701
|
+
* "filename": "06-resultado-2026-09.xlsx",
|
|
88702
|
+
* "rows": 1398,
|
|
88703
|
+
* "size_bytes": 52018
|
|
88704
|
+
* },
|
|
88705
|
+
* {
|
|
88706
|
+
* "key": "ajustes",
|
|
88707
|
+
* "label": "Ajustes posteriores al cierre",
|
|
88708
|
+
* "filename": "07-ajustes-posteriores-al-cierre-2026-09.xlsx",
|
|
88709
|
+
* "rows": 3,
|
|
88710
|
+
* "size_bytes": 6920
|
|
88711
|
+
* }
|
|
88712
|
+
* ]
|
|
88713
|
+
* }
|
|
88714
|
+
* }
|
|
88715
|
+
*/
|
|
88716
|
+
"application/json": {
|
|
88717
|
+
data: {
|
|
88718
|
+
/** @description The month, `YYYY-MM`. */
|
|
88719
|
+
period: string;
|
|
88720
|
+
/** @description The zip the download serves. */
|
|
88721
|
+
filename: string;
|
|
88722
|
+
files: {
|
|
88723
|
+
/** @enum {string} */
|
|
88724
|
+
key: "libro_compras" | "libro_ventas" | "honorarios" | "movimientos" | "clasificaciones" | "resultado" | "ajustes";
|
|
88725
|
+
label: string;
|
|
88726
|
+
/** @description The xlsx inside the zip. */
|
|
88727
|
+
filename: string;
|
|
88728
|
+
/** @description Rows of its «Detalle» sheet (documents, items) when it has one, else of its first sheet (movements, adjustments). */
|
|
88729
|
+
rows: number;
|
|
88730
|
+
size_bytes: number;
|
|
88731
|
+
}[];
|
|
88732
|
+
};
|
|
88733
|
+
};
|
|
88734
|
+
};
|
|
88735
|
+
};
|
|
88736
|
+
/** @description Validation error */
|
|
88737
|
+
400: {
|
|
88738
|
+
headers: {
|
|
88739
|
+
[name: string]: unknown;
|
|
88740
|
+
};
|
|
88741
|
+
content: {
|
|
88742
|
+
"application/json": components["schemas"]["Error"];
|
|
88743
|
+
};
|
|
88744
|
+
};
|
|
88745
|
+
/** @description Unauthorized */
|
|
88746
|
+
401: {
|
|
88747
|
+
headers: {
|
|
88748
|
+
[name: string]: unknown;
|
|
88749
|
+
};
|
|
88750
|
+
content: {
|
|
88751
|
+
"application/json": components["schemas"]["Error"];
|
|
88752
|
+
};
|
|
88753
|
+
};
|
|
88754
|
+
/** @description Forbidden */
|
|
88755
|
+
403: {
|
|
88756
|
+
headers: {
|
|
88757
|
+
[name: string]: unknown;
|
|
88758
|
+
};
|
|
88759
|
+
content: {
|
|
88760
|
+
"application/json": components["schemas"]["Error"];
|
|
88761
|
+
};
|
|
88762
|
+
};
|
|
88763
|
+
/** @description Not found */
|
|
88764
|
+
404: {
|
|
88765
|
+
headers: {
|
|
88766
|
+
[name: string]: unknown;
|
|
88767
|
+
};
|
|
88768
|
+
content: {
|
|
88769
|
+
"application/json": components["schemas"]["Error"];
|
|
88770
|
+
};
|
|
88771
|
+
};
|
|
88772
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
88773
|
+
409: {
|
|
88774
|
+
headers: {
|
|
88775
|
+
[name: string]: unknown;
|
|
88776
|
+
};
|
|
88777
|
+
content: {
|
|
88778
|
+
"application/json": components["schemas"]["Error"];
|
|
88779
|
+
};
|
|
88780
|
+
};
|
|
88781
|
+
/** @description Rate limited */
|
|
88782
|
+
429: {
|
|
88783
|
+
headers: {
|
|
88784
|
+
[name: string]: unknown;
|
|
88785
|
+
};
|
|
88786
|
+
content: {
|
|
88787
|
+
"application/json": components["schemas"]["Error"];
|
|
88788
|
+
};
|
|
88789
|
+
};
|
|
88790
|
+
};
|
|
88791
|
+
};
|
|
88792
|
+
put?: never;
|
|
88793
|
+
post?: never;
|
|
88794
|
+
delete?: never;
|
|
88795
|
+
options?: never;
|
|
88796
|
+
head?: never;
|
|
88797
|
+
patch?: never;
|
|
88798
|
+
trace?: never;
|
|
88799
|
+
};
|
|
88534
88800
|
"/clinic/evidence-cards": {
|
|
88535
88801
|
parameters: {
|
|
88536
88802
|
query?: never;
|
|
@@ -237700,6 +237966,8 @@ interface paths {
|
|
|
237700
237966
|
* This car’s lead timeline
|
|
237701
237967
|
* @description Every named lead that asked about this vehicle, merged with its anonymous Yapo phone-reveals, newest first. This is the car’s HISTORY, so unlike `/interest` a sold vehicle keeps its timeline.
|
|
237702
237968
|
*
|
|
237969
|
+
* Each lead row carries `conversation_id`: the chat to open for that person (the lead's own conversation, else the contact's most recent one, e.g. the first-touch WhatsApp after a portal inquiry). Null when there is none.
|
|
237970
|
+
*
|
|
237703
237971
|
* The Stock detail screen merges this with `/vehicles/{id}/history` (the change log) into one "Leads y cambios" feed — they are two endpoints because they are two different kinds of event. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
|
|
237704
237972
|
*/
|
|
237705
237973
|
get: {
|
|
@@ -237728,6 +237996,7 @@ interface paths {
|
|
|
237728
237996
|
* "kind": "lead",
|
|
237729
237997
|
* "contact_id": "22222222-0000-4000-8000-000000000001",
|
|
237730
237998
|
* "lead_id": "99999999-0000-4000-8000-000000000002",
|
|
237999
|
+
* "conversation_id": "99999999-0000-4000-8000-000000000003",
|
|
237731
238000
|
* "portal": "website",
|
|
237732
238001
|
* "at": "2026-09-19T15:30:00.000Z"
|
|
237733
238002
|
* }
|
|
@@ -254595,7 +254864,7 @@ interface components {
|
|
|
254595
254864
|
perfect_battery_pct?: number;
|
|
254596
254865
|
currency?: string;
|
|
254597
254866
|
};
|
|
254598
|
-
/** @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. */
|
|
254867
|
+
/** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`, `reminder_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. */
|
|
254599
254868
|
notifications?: {
|
|
254600
254869
|
staff_whatsapp?: {
|
|
254601
254870
|
enabled?: boolean;
|
|
@@ -254611,6 +254880,16 @@ interface components {
|
|
|
254611
254880
|
template_name?: string;
|
|
254612
254881
|
template_language?: string;
|
|
254613
254882
|
user_ids?: string[];
|
|
254883
|
+
/** @description Minutes of open time a conversation waits on the team before the supervisors get the WhatsApp, once per episode. Unset = 60. */
|
|
254884
|
+
delay_minutes?: number;
|
|
254885
|
+
};
|
|
254886
|
+
/** @description Staff WhatsApp on every «sin respuesta» reminder, to the assignee (template aviso_sigue_esperando_v1). Opt-in: each send costs a WhatsApp conversation. */
|
|
254887
|
+
reminder_whatsapp?: {
|
|
254888
|
+
enabled?: boolean;
|
|
254889
|
+
/** Format: uuid */
|
|
254890
|
+
account_id?: string;
|
|
254891
|
+
template_name?: string;
|
|
254892
|
+
template_language?: string;
|
|
254614
254893
|
};
|
|
254615
254894
|
booking_whatsapp?: {
|
|
254616
254895
|
enabled?: boolean;
|
|
@@ -254687,6 +254966,26 @@ interface components {
|
|
|
254687
254966
|
rejection_reason: string | null;
|
|
254688
254967
|
}[];
|
|
254689
254968
|
};
|
|
254969
|
+
reminder_whatsapp: {
|
|
254970
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
254971
|
+
armed: boolean;
|
|
254972
|
+
/**
|
|
254973
|
+
* @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.
|
|
254974
|
+
* @enum {string}
|
|
254975
|
+
*/
|
|
254976
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
254977
|
+
reason: string | null;
|
|
254978
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
254979
|
+
wired: boolean;
|
|
254980
|
+
templates: {
|
|
254981
|
+
key: string;
|
|
254982
|
+
name: string;
|
|
254983
|
+
language: string;
|
|
254984
|
+
/** @enum {string} */
|
|
254985
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
254986
|
+
rejection_reason: string | null;
|
|
254987
|
+
}[];
|
|
254988
|
+
};
|
|
254690
254989
|
};
|
|
254691
254990
|
/** @description Workspace display name. */
|
|
254692
254991
|
name?: string;
|
|
@@ -254899,6 +255198,16 @@ interface components {
|
|
|
254899
255198
|
template_name?: string;
|
|
254900
255199
|
template_language?: string;
|
|
254901
255200
|
user_ids?: string[];
|
|
255201
|
+
/** @description Minutes of open time a conversation waits on the team before the supervisors get the WhatsApp, once per episode. Unset = 60. */
|
|
255202
|
+
delay_minutes?: number;
|
|
255203
|
+
};
|
|
255204
|
+
/** @description Staff WhatsApp on every «sin respuesta» reminder, to the assignee (template aviso_sigue_esperando_v1). Opt-in: each send costs a WhatsApp conversation. */
|
|
255205
|
+
reminder_whatsapp?: {
|
|
255206
|
+
enabled?: boolean;
|
|
255207
|
+
/** Format: uuid */
|
|
255208
|
+
account_id?: string;
|
|
255209
|
+
template_name?: string;
|
|
255210
|
+
template_language?: string;
|
|
254902
255211
|
};
|
|
254903
255212
|
booking_whatsapp?: {
|
|
254904
255213
|
enabled?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -88531,6 +88531,272 @@ interface paths {
|
|
|
88531
88531
|
patch?: never;
|
|
88532
88532
|
trace?: never;
|
|
88533
88533
|
};
|
|
88534
|
+
"/finanzas/contador-export": {
|
|
88535
|
+
parameters: {
|
|
88536
|
+
query?: never;
|
|
88537
|
+
header?: never;
|
|
88538
|
+
path?: never;
|
|
88539
|
+
cookie?: never;
|
|
88540
|
+
};
|
|
88541
|
+
/**
|
|
88542
|
+
* Download the Contador package for a month (zip)
|
|
88543
|
+
* @description One zip, `paquete-contador-<period>.zip`, with seven xlsx: `01-libro-de-compras`, `02-libro-de-ventas`, `03-honorarios`, `04-movimientos-por-cuenta` (one sheet per bank account), `05-clasificaciones-por-cuenta` (net, as the Resultado counts), `06-resultado` and `07-ajustes-posteriores-al-cierre`, each `<name>-<period>.xlsx`, built by the same code as each screen and its export. Read-only. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
|
|
88544
|
+
*/
|
|
88545
|
+
get: {
|
|
88546
|
+
parameters: {
|
|
88547
|
+
query?: {
|
|
88548
|
+
period?: string;
|
|
88549
|
+
};
|
|
88550
|
+
header?: never;
|
|
88551
|
+
path?: never;
|
|
88552
|
+
cookie?: never;
|
|
88553
|
+
};
|
|
88554
|
+
requestBody?: never;
|
|
88555
|
+
responses: {
|
|
88556
|
+
/** @description The package, as an attachment */
|
|
88557
|
+
200: {
|
|
88558
|
+
headers: {
|
|
88559
|
+
[name: string]: unknown;
|
|
88560
|
+
};
|
|
88561
|
+
content: {
|
|
88562
|
+
"application/zip": string;
|
|
88563
|
+
};
|
|
88564
|
+
};
|
|
88565
|
+
/** @description Validation error */
|
|
88566
|
+
400: {
|
|
88567
|
+
headers: {
|
|
88568
|
+
[name: string]: unknown;
|
|
88569
|
+
};
|
|
88570
|
+
content: {
|
|
88571
|
+
"application/json": components["schemas"]["Error"];
|
|
88572
|
+
};
|
|
88573
|
+
};
|
|
88574
|
+
/** @description Unauthorized */
|
|
88575
|
+
401: {
|
|
88576
|
+
headers: {
|
|
88577
|
+
[name: string]: unknown;
|
|
88578
|
+
};
|
|
88579
|
+
content: {
|
|
88580
|
+
"application/json": components["schemas"]["Error"];
|
|
88581
|
+
};
|
|
88582
|
+
};
|
|
88583
|
+
/** @description Forbidden */
|
|
88584
|
+
403: {
|
|
88585
|
+
headers: {
|
|
88586
|
+
[name: string]: unknown;
|
|
88587
|
+
};
|
|
88588
|
+
content: {
|
|
88589
|
+
"application/json": components["schemas"]["Error"];
|
|
88590
|
+
};
|
|
88591
|
+
};
|
|
88592
|
+
/** @description Not found */
|
|
88593
|
+
404: {
|
|
88594
|
+
headers: {
|
|
88595
|
+
[name: string]: unknown;
|
|
88596
|
+
};
|
|
88597
|
+
content: {
|
|
88598
|
+
"application/json": components["schemas"]["Error"];
|
|
88599
|
+
};
|
|
88600
|
+
};
|
|
88601
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
88602
|
+
409: {
|
|
88603
|
+
headers: {
|
|
88604
|
+
[name: string]: unknown;
|
|
88605
|
+
};
|
|
88606
|
+
content: {
|
|
88607
|
+
"application/json": components["schemas"]["Error"];
|
|
88608
|
+
};
|
|
88609
|
+
};
|
|
88610
|
+
/** @description Rate limited */
|
|
88611
|
+
429: {
|
|
88612
|
+
headers: {
|
|
88613
|
+
[name: string]: unknown;
|
|
88614
|
+
};
|
|
88615
|
+
content: {
|
|
88616
|
+
"application/json": components["schemas"]["Error"];
|
|
88617
|
+
};
|
|
88618
|
+
};
|
|
88619
|
+
};
|
|
88620
|
+
};
|
|
88621
|
+
put?: never;
|
|
88622
|
+
post?: never;
|
|
88623
|
+
delete?: never;
|
|
88624
|
+
options?: never;
|
|
88625
|
+
head?: never;
|
|
88626
|
+
patch?: never;
|
|
88627
|
+
trace?: never;
|
|
88628
|
+
};
|
|
88629
|
+
"/finanzas/contador-export/manifest": {
|
|
88630
|
+
parameters: {
|
|
88631
|
+
query?: never;
|
|
88632
|
+
header?: never;
|
|
88633
|
+
path?: never;
|
|
88634
|
+
cookie?: never;
|
|
88635
|
+
};
|
|
88636
|
+
/**
|
|
88637
|
+
* What the Contador package for a month holds
|
|
88638
|
+
* @description The same package as the download, without the bytes: the period, the zip name and each file (key, label, name, rows, size). Over MCP this is the read that generates and checks the package; the zip itself downloads over HTTPS. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
|
|
88639
|
+
*/
|
|
88640
|
+
get: {
|
|
88641
|
+
parameters: {
|
|
88642
|
+
query?: {
|
|
88643
|
+
period?: string;
|
|
88644
|
+
};
|
|
88645
|
+
header?: never;
|
|
88646
|
+
path?: never;
|
|
88647
|
+
cookie?: never;
|
|
88648
|
+
};
|
|
88649
|
+
requestBody?: never;
|
|
88650
|
+
responses: {
|
|
88651
|
+
/** @description The manifest */
|
|
88652
|
+
200: {
|
|
88653
|
+
headers: {
|
|
88654
|
+
[name: string]: unknown;
|
|
88655
|
+
};
|
|
88656
|
+
content: {
|
|
88657
|
+
/**
|
|
88658
|
+
* @example {
|
|
88659
|
+
* "data": {
|
|
88660
|
+
* "period": "2026-09",
|
|
88661
|
+
* "filename": "paquete-contador-2026-09.zip",
|
|
88662
|
+
* "files": [
|
|
88663
|
+
* {
|
|
88664
|
+
* "key": "libro_compras",
|
|
88665
|
+
* "label": "Libro de compras",
|
|
88666
|
+
* "filename": "01-libro-de-compras-2026-09.xlsx",
|
|
88667
|
+
* "rows": 84,
|
|
88668
|
+
* "size_bytes": 14210
|
|
88669
|
+
* },
|
|
88670
|
+
* {
|
|
88671
|
+
* "key": "libro_ventas",
|
|
88672
|
+
* "label": "Libro de ventas",
|
|
88673
|
+
* "filename": "02-libro-de-ventas-2026-09.xlsx",
|
|
88674
|
+
* "rows": 1312,
|
|
88675
|
+
* "size_bytes": 61904
|
|
88676
|
+
* },
|
|
88677
|
+
* {
|
|
88678
|
+
* "key": "honorarios",
|
|
88679
|
+
* "label": "Honorarios",
|
|
88680
|
+
* "filename": "03-honorarios-2026-09.xlsx",
|
|
88681
|
+
* "rows": 12,
|
|
88682
|
+
* "size_bytes": 7480
|
|
88683
|
+
* },
|
|
88684
|
+
* {
|
|
88685
|
+
* "key": "movimientos",
|
|
88686
|
+
* "label": "Movimientos por cuenta",
|
|
88687
|
+
* "filename": "04-movimientos-por-cuenta-2026-09.xlsx",
|
|
88688
|
+
* "rows": 640,
|
|
88689
|
+
* "size_bytes": 38112
|
|
88690
|
+
* },
|
|
88691
|
+
* {
|
|
88692
|
+
* "key": "clasificaciones",
|
|
88693
|
+
* "label": "Clasificaciones por cuenta",
|
|
88694
|
+
* "filename": "05-clasificaciones-por-cuenta-2026-09.xlsx",
|
|
88695
|
+
* "rows": 702,
|
|
88696
|
+
* "size_bytes": 40356
|
|
88697
|
+
* },
|
|
88698
|
+
* {
|
|
88699
|
+
* "key": "resultado",
|
|
88700
|
+
* "label": "Resultado",
|
|
88701
|
+
* "filename": "06-resultado-2026-09.xlsx",
|
|
88702
|
+
* "rows": 1398,
|
|
88703
|
+
* "size_bytes": 52018
|
|
88704
|
+
* },
|
|
88705
|
+
* {
|
|
88706
|
+
* "key": "ajustes",
|
|
88707
|
+
* "label": "Ajustes posteriores al cierre",
|
|
88708
|
+
* "filename": "07-ajustes-posteriores-al-cierre-2026-09.xlsx",
|
|
88709
|
+
* "rows": 3,
|
|
88710
|
+
* "size_bytes": 6920
|
|
88711
|
+
* }
|
|
88712
|
+
* ]
|
|
88713
|
+
* }
|
|
88714
|
+
* }
|
|
88715
|
+
*/
|
|
88716
|
+
"application/json": {
|
|
88717
|
+
data: {
|
|
88718
|
+
/** @description The month, `YYYY-MM`. */
|
|
88719
|
+
period: string;
|
|
88720
|
+
/** @description The zip the download serves. */
|
|
88721
|
+
filename: string;
|
|
88722
|
+
files: {
|
|
88723
|
+
/** @enum {string} */
|
|
88724
|
+
key: "libro_compras" | "libro_ventas" | "honorarios" | "movimientos" | "clasificaciones" | "resultado" | "ajustes";
|
|
88725
|
+
label: string;
|
|
88726
|
+
/** @description The xlsx inside the zip. */
|
|
88727
|
+
filename: string;
|
|
88728
|
+
/** @description Rows of its «Detalle» sheet (documents, items) when it has one, else of its first sheet (movements, adjustments). */
|
|
88729
|
+
rows: number;
|
|
88730
|
+
size_bytes: number;
|
|
88731
|
+
}[];
|
|
88732
|
+
};
|
|
88733
|
+
};
|
|
88734
|
+
};
|
|
88735
|
+
};
|
|
88736
|
+
/** @description Validation error */
|
|
88737
|
+
400: {
|
|
88738
|
+
headers: {
|
|
88739
|
+
[name: string]: unknown;
|
|
88740
|
+
};
|
|
88741
|
+
content: {
|
|
88742
|
+
"application/json": components["schemas"]["Error"];
|
|
88743
|
+
};
|
|
88744
|
+
};
|
|
88745
|
+
/** @description Unauthorized */
|
|
88746
|
+
401: {
|
|
88747
|
+
headers: {
|
|
88748
|
+
[name: string]: unknown;
|
|
88749
|
+
};
|
|
88750
|
+
content: {
|
|
88751
|
+
"application/json": components["schemas"]["Error"];
|
|
88752
|
+
};
|
|
88753
|
+
};
|
|
88754
|
+
/** @description Forbidden */
|
|
88755
|
+
403: {
|
|
88756
|
+
headers: {
|
|
88757
|
+
[name: string]: unknown;
|
|
88758
|
+
};
|
|
88759
|
+
content: {
|
|
88760
|
+
"application/json": components["schemas"]["Error"];
|
|
88761
|
+
};
|
|
88762
|
+
};
|
|
88763
|
+
/** @description Not found */
|
|
88764
|
+
404: {
|
|
88765
|
+
headers: {
|
|
88766
|
+
[name: string]: unknown;
|
|
88767
|
+
};
|
|
88768
|
+
content: {
|
|
88769
|
+
"application/json": components["schemas"]["Error"];
|
|
88770
|
+
};
|
|
88771
|
+
};
|
|
88772
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
88773
|
+
409: {
|
|
88774
|
+
headers: {
|
|
88775
|
+
[name: string]: unknown;
|
|
88776
|
+
};
|
|
88777
|
+
content: {
|
|
88778
|
+
"application/json": components["schemas"]["Error"];
|
|
88779
|
+
};
|
|
88780
|
+
};
|
|
88781
|
+
/** @description Rate limited */
|
|
88782
|
+
429: {
|
|
88783
|
+
headers: {
|
|
88784
|
+
[name: string]: unknown;
|
|
88785
|
+
};
|
|
88786
|
+
content: {
|
|
88787
|
+
"application/json": components["schemas"]["Error"];
|
|
88788
|
+
};
|
|
88789
|
+
};
|
|
88790
|
+
};
|
|
88791
|
+
};
|
|
88792
|
+
put?: never;
|
|
88793
|
+
post?: never;
|
|
88794
|
+
delete?: never;
|
|
88795
|
+
options?: never;
|
|
88796
|
+
head?: never;
|
|
88797
|
+
patch?: never;
|
|
88798
|
+
trace?: never;
|
|
88799
|
+
};
|
|
88534
88800
|
"/clinic/evidence-cards": {
|
|
88535
88801
|
parameters: {
|
|
88536
88802
|
query?: never;
|
|
@@ -237700,6 +237966,8 @@ interface paths {
|
|
|
237700
237966
|
* This car’s lead timeline
|
|
237701
237967
|
* @description Every named lead that asked about this vehicle, merged with its anonymous Yapo phone-reveals, newest first. This is the car’s HISTORY, so unlike `/interest` a sold vehicle keeps its timeline.
|
|
237702
237968
|
*
|
|
237969
|
+
* Each lead row carries `conversation_id`: the chat to open for that person (the lead's own conversation, else the contact's most recent one, e.g. the first-touch WhatsApp after a portal inquiry). Null when there is none.
|
|
237970
|
+
*
|
|
237703
237971
|
* The Stock detail screen merges this with `/vehicles/{id}/history` (the change log) into one "Leads y cambios" feed — they are two endpoints because they are two different kinds of event. Automotive-vertical only: a workspace on another vertical gets 403 here however its scopes are set.
|
|
237704
237972
|
*/
|
|
237705
237973
|
get: {
|
|
@@ -237728,6 +237996,7 @@ interface paths {
|
|
|
237728
237996
|
* "kind": "lead",
|
|
237729
237997
|
* "contact_id": "22222222-0000-4000-8000-000000000001",
|
|
237730
237998
|
* "lead_id": "99999999-0000-4000-8000-000000000002",
|
|
237999
|
+
* "conversation_id": "99999999-0000-4000-8000-000000000003",
|
|
237731
238000
|
* "portal": "website",
|
|
237732
238001
|
* "at": "2026-09-19T15:30:00.000Z"
|
|
237733
238002
|
* }
|
|
@@ -254595,7 +254864,7 @@ interface components {
|
|
|
254595
254864
|
perfect_battery_pct?: number;
|
|
254596
254865
|
currency?: string;
|
|
254597
254866
|
};
|
|
254598
|
-
/** @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. */
|
|
254867
|
+
/** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`, `reminder_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. */
|
|
254599
254868
|
notifications?: {
|
|
254600
254869
|
staff_whatsapp?: {
|
|
254601
254870
|
enabled?: boolean;
|
|
@@ -254611,6 +254880,16 @@ interface components {
|
|
|
254611
254880
|
template_name?: string;
|
|
254612
254881
|
template_language?: string;
|
|
254613
254882
|
user_ids?: string[];
|
|
254883
|
+
/** @description Minutes of open time a conversation waits on the team before the supervisors get the WhatsApp, once per episode. Unset = 60. */
|
|
254884
|
+
delay_minutes?: number;
|
|
254885
|
+
};
|
|
254886
|
+
/** @description Staff WhatsApp on every «sin respuesta» reminder, to the assignee (template aviso_sigue_esperando_v1). Opt-in: each send costs a WhatsApp conversation. */
|
|
254887
|
+
reminder_whatsapp?: {
|
|
254888
|
+
enabled?: boolean;
|
|
254889
|
+
/** Format: uuid */
|
|
254890
|
+
account_id?: string;
|
|
254891
|
+
template_name?: string;
|
|
254892
|
+
template_language?: string;
|
|
254614
254893
|
};
|
|
254615
254894
|
booking_whatsapp?: {
|
|
254616
254895
|
enabled?: boolean;
|
|
@@ -254687,6 +254966,26 @@ interface components {
|
|
|
254687
254966
|
rejection_reason: string | null;
|
|
254688
254967
|
}[];
|
|
254689
254968
|
};
|
|
254969
|
+
reminder_whatsapp: {
|
|
254970
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
254971
|
+
armed: boolean;
|
|
254972
|
+
/**
|
|
254973
|
+
* @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.
|
|
254974
|
+
* @enum {string}
|
|
254975
|
+
*/
|
|
254976
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
254977
|
+
reason: string | null;
|
|
254978
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
254979
|
+
wired: boolean;
|
|
254980
|
+
templates: {
|
|
254981
|
+
key: string;
|
|
254982
|
+
name: string;
|
|
254983
|
+
language: string;
|
|
254984
|
+
/** @enum {string} */
|
|
254985
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
254986
|
+
rejection_reason: string | null;
|
|
254987
|
+
}[];
|
|
254988
|
+
};
|
|
254690
254989
|
};
|
|
254691
254990
|
/** @description Workspace display name. */
|
|
254692
254991
|
name?: string;
|
|
@@ -254899,6 +255198,16 @@ interface components {
|
|
|
254899
255198
|
template_name?: string;
|
|
254900
255199
|
template_language?: string;
|
|
254901
255200
|
user_ids?: string[];
|
|
255201
|
+
/** @description Minutes of open time a conversation waits on the team before the supervisors get the WhatsApp, once per episode. Unset = 60. */
|
|
255202
|
+
delay_minutes?: number;
|
|
255203
|
+
};
|
|
255204
|
+
/** @description Staff WhatsApp on every «sin respuesta» reminder, to the assignee (template aviso_sigue_esperando_v1). Opt-in: each send costs a WhatsApp conversation. */
|
|
255205
|
+
reminder_whatsapp?: {
|
|
255206
|
+
enabled?: boolean;
|
|
255207
|
+
/** Format: uuid */
|
|
255208
|
+
account_id?: string;
|
|
255209
|
+
template_name?: string;
|
|
255210
|
+
template_language?: string;
|
|
254902
255211
|
};
|
|
254903
255212
|
booking_whatsapp?: {
|
|
254904
255213
|
enabled?: boolean;
|
package/package.json
CHANGED