@vitrina/api 15.20.0 → 15.21.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 +35 -18
- package/dist/index.d.ts +35 -18
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -74388,6 +74388,7 @@ interface paths {
|
|
|
74388
74388
|
* "operation_id": null,
|
|
74389
74389
|
* "payer": null,
|
|
74390
74390
|
* "comment_count": 0,
|
|
74391
|
+
* "ads_document_id": null,
|
|
74391
74392
|
* "created_at": "2026-10-28T09:00:00.000Z"
|
|
74392
74393
|
* }
|
|
74393
74394
|
* },
|
|
@@ -75229,6 +75230,7 @@ interface paths {
|
|
|
75229
75230
|
* "operation_id": null,
|
|
75230
75231
|
* "payer": null,
|
|
75231
75232
|
* "comment_count": 1,
|
|
75233
|
+
* "ads_document_id": null,
|
|
75232
75234
|
* "created_at": "2026-10-30T08:00:00.000Z"
|
|
75233
75235
|
* }
|
|
75234
75236
|
* ],
|
|
@@ -75385,6 +75387,7 @@ interface paths {
|
|
|
75385
75387
|
* "operation_id": null,
|
|
75386
75388
|
* "payer": null,
|
|
75387
75389
|
* "comment_count": 1,
|
|
75390
|
+
* "ads_document_id": null,
|
|
75388
75391
|
* "created_at": "2026-10-30T08:00:00.000Z",
|
|
75389
75392
|
* "comments": [
|
|
75390
75393
|
* {
|
|
@@ -80942,6 +80945,7 @@ interface paths {
|
|
|
80942
80945
|
* "operation_id": null,
|
|
80943
80946
|
* "payer": null,
|
|
80944
80947
|
* "comment_count": 0,
|
|
80948
|
+
* "ads_document_id": null,
|
|
80945
80949
|
* "created_at": "2026-10-30T08:00:00.000Z"
|
|
80946
80950
|
* },
|
|
80947
80951
|
* "money_mirrored": false,
|
|
@@ -81477,6 +81481,7 @@ interface paths {
|
|
|
81477
81481
|
* "operation_id": null,
|
|
81478
81482
|
* "payer": null,
|
|
81479
81483
|
* "comment_count": 0,
|
|
81484
|
+
* "ads_document_id": null,
|
|
81480
81485
|
* "created_at": "2026-10-30T08:00:00.000Z"
|
|
81481
81486
|
* },
|
|
81482
81487
|
* "money_mirrored": false,
|
|
@@ -84112,7 +84117,7 @@ interface paths {
|
|
|
84112
84117
|
cookie?: never;
|
|
84113
84118
|
};
|
|
84114
84119
|
/**
|
|
84115
|
-
* Mes en
|
|
84120
|
+
* Mes en paralelo: the months read from Chipax
|
|
84116
84121
|
* @description Each month with a Chipax read, newest first: its newest read (any status) and when it was last read successfully. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read` and `finanzas_reports:read` (the Contador seat, owners and admins).
|
|
84117
84122
|
*/
|
|
84118
84123
|
get: {
|
|
@@ -84238,8 +84243,8 @@ interface paths {
|
|
|
84238
84243
|
};
|
|
84239
84244
|
put?: never;
|
|
84240
84245
|
/**
|
|
84241
|
-
* Mes en
|
|
84242
|
-
* @description Queues a read of Chipax for the month (bank lines and balances, open payables, classified items, Resultado Operacional), over the documents issued since `history_from`. Takes minutes (Chipax's rate limit). One read at a time; refused while a Chipax import runs (409 `import_running`) or another read runs (409 `read_running`); 409 `not_connected` without Chipax credentials. Vitrina only READS Chipax: it logs in and sends GET requests; it never creates, edits or deletes anything in the Chipax account. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
|
|
84246
|
+
* Mes en paralelo: read Chipax's side of a month
|
|
84247
|
+
* @description Queues a read of Chipax for the month (bank lines and balances, open payables, classified items, Resultado Operacional), over the documents issued since `history_from`. Takes minutes (Chipax's rate limit). One read at a time; refused while a Chipax import runs (409 `import_running`) or another read runs (409 `read_running`); 409 `not_connected` without Chipax credentials; 409 `chipax_credential_unreadable` when the stored credential cannot be decrypted (connect Chipax again). Vitrina only READS Chipax: it logs in and sends GET requests; it never creates, edits or deletes anything in the Chipax account. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
|
|
84243
84248
|
*/
|
|
84244
84249
|
post: {
|
|
84245
84250
|
parameters: {
|
|
@@ -84377,7 +84382,7 @@ interface paths {
|
|
|
84377
84382
|
cookie?: never;
|
|
84378
84383
|
};
|
|
84379
84384
|
/**
|
|
84380
|
-
* Mes en
|
|
84385
|
+
* Mes en paralelo: the diff against Chipax for a month
|
|
84381
84386
|
* @description Balances (per bank account, at month end), payables (per Contraparte, open at month end) and costs (per costo / gasto account, NET as the Resultado counts) must match to the peso. Income is a bridge: Chipax counts it when cashed, Vitrina the documents issued in the month, so the gap is explained line by line. Vitrina's side is computed live; Chipax's side is the newest finished read. `clean` = all three match and the bridge is explained (the exit criterion). Each row's `key` drills down to its items. Before a finished read: `status` not_read / reading / failed and null dimensions. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT and no glosa, on both sides; Chipax 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` and `finanzas_reports:read` (the Contador seat, owners and admins).
|
|
84382
84387
|
*/
|
|
84383
84388
|
get: {
|
|
@@ -84807,7 +84812,7 @@ interface paths {
|
|
|
84807
84812
|
cookie?: never;
|
|
84808
84813
|
};
|
|
84809
84814
|
/**
|
|
84810
|
-
* Mes en
|
|
84815
|
+
* Mes en paralelo: the items behind a row
|
|
84811
84816
|
* @description The items of one row of the diff (`key` from the diff; `bridge:<line>` for an income bridge line), both sides side by side, biggest difference first. By default only the items that do not match. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT and no glosa, on both sides; Chipax 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` and `finanzas_reports:read` (the Contador seat, owners and admins). 404 before a finished read.
|
|
84812
84817
|
*/
|
|
84813
84818
|
get: {
|
|
@@ -85006,7 +85011,7 @@ interface paths {
|
|
|
85006
85011
|
cookie?: never;
|
|
85007
85012
|
};
|
|
85008
85013
|
/**
|
|
85009
|
-
* Mes en
|
|
85014
|
+
* Mes en paralelo: download the diff (xlsx)
|
|
85010
85015
|
* @description One workbook: «Resumen», «Saldos bancarios», «Por pagar», «Costos y gastos», «Puente de ingresos» and «Diferencias» (every item that does not match, all dimensions). A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT and no glosa, on both sides; Chipax 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`. 404 before a finished read.
|
|
85011
85016
|
*/
|
|
85012
85017
|
get: {
|
|
@@ -89667,7 +89672,7 @@ interface paths {
|
|
|
89667
89672
|
};
|
|
89668
89673
|
/**
|
|
89669
89674
|
* Resumen: the Finanzas home, three answers and the context
|
|
89670
|
-
* @description The Finanzas home in one read, every figure from its detail screen: **cash** («¿cuánto me queda a fin de mes?») = the Flujo de caja projection — today’s balance of the operating accounts, the month-end and 30-day balance, the lowest point and `runs_out` (the first day under zero within 30 days, with its biggest payment); **result** («¿cuánto gasto? / ¿este mes gana plata?») = Costos y equilibrio for the current month at net amounts (ingresos, gastos = variables + fijos, «sin clasificar» apart and counted as variable, resultado operacional) against the punto de equilibrio of the last closed month; **inbox** («Te necesita») = the open «Por resolver» cases and the previous month’s close state; **automatic** = this month’s «Hecho por Vitrina» totals and the newest 3; **accounts** with their balances. `problem` is the one thing shown in red (cash running out, else a bank connection that needs a person). A caller without `finanzas_reports:read` gets `cash` and `
|
|
89675
|
+
* @description The Finanzas home in one read, every figure from its detail screen: **cash** («¿cuánto me queda a fin de mes?») = the Flujo de caja projection — today’s balance of the operating accounts, the month-end and 30-day balance, the lowest point and `runs_out` (the first day under zero within 30 days, with its biggest payment); **result** («¿cuánto gasto? / ¿este mes gana plata?») = Costos y equilibrio for the current month at net amounts (ingresos, gastos = variables + fijos, «sin clasificar» apart and counted as variable, resultado operacional) against the punto de equilibrio of the last closed month; **inbox** («Te necesita») = the open «Por resolver» cases and the previous month’s close state; **automatic** = this month’s «Hecho por Vitrina» totals and the newest 3; **accounts** with their balances. `problem` is the one thing shown in red (cash running out, else a bank connection that needs a person). A caller without `finanzas_reports:read` gets `cash`, `result` and every account balance (`balance_clp`, `balance_as_of`) null; account names stay (`reports_visible: false`). A Contador sees patients as initials. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
|
|
89671
89676
|
*/
|
|
89672
89677
|
get: {
|
|
89673
89678
|
parameters: {
|
|
@@ -90483,7 +90488,7 @@ interface paths {
|
|
|
90483
90488
|
* }
|
|
90484
90489
|
* ],
|
|
90485
90490
|
* "without_connection": "Sin la conexión, los cargos de Meta quedan en Por resolver hasta que reenvíes el recibo.",
|
|
90486
|
-
* "connect_path": "/
|
|
90491
|
+
* "connect_path": "/settings/integrations"
|
|
90487
90492
|
* },
|
|
90488
90493
|
* {
|
|
90489
90494
|
* "platform": "google_ads",
|
|
@@ -90491,7 +90496,7 @@ interface paths {
|
|
|
90491
90496
|
* "status": "none",
|
|
90492
90497
|
* "accounts": [],
|
|
90493
90498
|
* "without_connection": "Sin la conexión, los cargos de Google Ads quedan en Por resolver hasta que reenvíes el recibo.",
|
|
90494
|
-
* "connect_path": "/
|
|
90499
|
+
* "connect_path": "/settings/integrations"
|
|
90495
90500
|
* }
|
|
90496
90501
|
* ]
|
|
90497
90502
|
* }
|
|
@@ -141423,7 +141428,7 @@ interface paths {
|
|
|
141423
141428
|
*
|
|
141424
141429
|
* Each row also carries `campaign_origin` — the newest campaign send stored in the thread (`null` when none): its campaign, when it left, whether the send created the thread, and whether it is still the newest message (`awaiting_reply`). `fromCampaign=true` lists every such thread, closed ones included.
|
|
141425
141430
|
*
|
|
141426
|
-
* Each row also carries `waiting_since` — when its customer started waiting on a human, `null` when nobody waits (the «Esperando respuesta» rule; see the `waiting` parameter). `waiting=true` lists only waiting conversations, team-wide; `sort=wait` orders urgent first, then the longest wait.
|
|
141431
|
+
* Each row also carries `waiting_since` — when its customer started waiting on a human, `null` when nobody waits (the «Esperando respuesta» rule; see the `waiting` parameter). `waiting=true` lists only waiting conversations, team-wide; `sort=wait` orders urgent first, then the longest wait. `waiting_state` says why: `owed` (waiting), `closed_by_customer` (the customer only acknowledged, thanked or closed after we answered), `nothing_owed` (they declined, or the message is not for us), `paid_or_in_store` (a transfer receipt right after we sent our bank details, or «llegué» / «voy subiendo»: a suggestion for a person to confirm — nothing moves a lead or records a payment) or `promised_later` (we promised to write on a later day: a dated «Recordatorio acordado» follow-up, due at `waiting_due_at`, after which the thread is waiting again) — the ones left out of the queue by a confident verdict on the newest unanswered customer message, voice notes read as their transcript — and `null` when nobody waits at all. `waiting=closed` lists those left-out threads (still live: resolving stays a person’s click).
|
|
141427
141432
|
*
|
|
141428
141433
|
* Rows here do NOT carry `ad_origin_nudge` — that field is single-conversation-read only, to avoid a per-row integration lookup on every page of the inbox.
|
|
141429
141434
|
*
|
|
@@ -141456,8 +141461,8 @@ interface paths {
|
|
|
141456
141461
|
aiReplied?: boolean | null;
|
|
141457
141462
|
fromAd?: boolean | null;
|
|
141458
141463
|
fromCampaign?: boolean | null;
|
|
141459
|
-
/** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out. Each row carries `waiting_since`. Pair with `sort=wait` for the queue order. */
|
|
141460
|
-
waiting?: boolean | null;
|
|
141464
|
+
/** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why, `waiting_due_at` when a promised follow-up falls due. Each row carries `waiting_since`, `waiting_state` and `waiting_due_at`. Pair with `sort=wait` for the queue order. */
|
|
141465
|
+
waiting?: boolean | "closed" | null;
|
|
141461
141466
|
/** @description `wait`: urgent (`handoff_urgent`) first, then by `waiting_since` — `order=desc` (default) is the longest wait first, `asc` the newest; conversations that are not waiting go last. */
|
|
141462
141467
|
sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
|
|
141463
141468
|
order?: "asc" | "desc";
|
|
@@ -141599,7 +141604,9 @@ interface paths {
|
|
|
141599
141604
|
* ],
|
|
141600
141605
|
* "last_call": null,
|
|
141601
141606
|
* "handoff_urgent": false,
|
|
141602
|
-
* "waiting_since": null
|
|
141607
|
+
* "waiting_since": null,
|
|
141608
|
+
* "waiting_state": null,
|
|
141609
|
+
* "waiting_due_at": null
|
|
141603
141610
|
* },
|
|
141604
141611
|
* {
|
|
141605
141612
|
* "id": "bbbbbbbb-0000-4000-8000-000000000002",
|
|
@@ -141737,7 +141744,9 @@ interface paths {
|
|
|
141737
141744
|
* "tags": [],
|
|
141738
141745
|
* "last_call": null,
|
|
141739
141746
|
* "handoff_urgent": false,
|
|
141740
|
-
* "waiting_since": null
|
|
141747
|
+
* "waiting_since": null,
|
|
141748
|
+
* "waiting_state": null,
|
|
141749
|
+
* "waiting_due_at": null
|
|
141741
141750
|
* }
|
|
141742
141751
|
* ],
|
|
141743
141752
|
* "meta": {
|
|
@@ -142029,7 +142038,7 @@ interface paths {
|
|
|
142029
142038
|
* Inbox badge counts (my open / unread / mentions / unassigned / waiting)
|
|
142030
142039
|
* @description The four badge counts on their own, scoped to the calling principal: `myOpen` and `myUnread` are the conversations assigned to the member behind the credential, `myMentions` the ones that @-mention them, `unassigned` the whole workspace’s unowned queue. An API key has no member behind it, so its three "my" counts read 0 and only `unassigned` is meaningful — use a personal token to get a person’s badges.
|
|
142031
142040
|
*
|
|
142032
|
-
* «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h
|
|
142041
|
+
* «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h»; `waitingClosed` how many live threads were left out because the customer closed the chat, nothing is owed, they paid or are in the store, or a follow-up we promised is not due yet (the list `waiting=closed`).
|
|
142033
142042
|
*
|
|
142034
142043
|
* `GET /conversations?include=counts` returns the same payload beside a page of conversations; this route exists for the caller that wants the badges without one.
|
|
142035
142044
|
*/
|
|
@@ -142058,7 +142067,8 @@ interface paths {
|
|
|
142058
142067
|
* "waiting": 3,
|
|
142059
142068
|
* "waitingUrgent": 1,
|
|
142060
142069
|
* "waitingMine": 1,
|
|
142061
|
-
* "waitingOldestSince": "2026-10-31T13:05:00.000Z"
|
|
142070
|
+
* "waitingOldestSince": "2026-10-31T13:05:00.000Z",
|
|
142071
|
+
* "waitingClosed": 4
|
|
142062
142072
|
* }
|
|
142063
142073
|
* }
|
|
142064
142074
|
*/
|
|
@@ -142298,6 +142308,8 @@ interface paths {
|
|
|
142298
142308
|
* "last_call": null,
|
|
142299
142309
|
* "handoff_urgent": false,
|
|
142300
142310
|
* "waiting_since": null,
|
|
142311
|
+
* "waiting_state": null,
|
|
142312
|
+
* "waiting_due_at": null,
|
|
142301
142313
|
* "ad_origin_nudge": null,
|
|
142302
142314
|
* "handoff_resolved_suggested": false,
|
|
142303
142315
|
* "message": [
|
|
@@ -258984,6 +258996,11 @@ interface components {
|
|
|
258984
258996
|
email: string | null;
|
|
258985
258997
|
} | null;
|
|
258986
258998
|
comment_count: number;
|
|
258999
|
+
/**
|
|
259000
|
+
* Format: uuid
|
|
259001
|
+
* @description Finanzas 30: the ad document (`GET /finanzas/documents/{id}`, `origin = ads`) of this movement when it is an ad charge or refund; null otherwise.
|
|
259002
|
+
*/
|
|
259003
|
+
ads_document_id: string | null;
|
|
258987
259004
|
created_at: string;
|
|
258988
259005
|
};
|
|
258989
259006
|
FinanzasDocument: {
|
|
@@ -261317,10 +261334,10 @@ interface components {
|
|
|
261317
261334
|
/** @description Next Monday's 09:00 workspace time (ISO). */
|
|
261318
261335
|
next_send_at: string;
|
|
261319
261336
|
/**
|
|
261320
|
-
* @description This week's digest: `pending` (not
|
|
261337
|
+
* @description This week's digest: `pending` (Monday's send window has not closed and nothing went out yet), `sent`, `empty` (no finance data, nothing went out) or `missed` (the window closed without a digest: the workspace had data but it did not go, e.g. it joined mid-week or the send failed; the next one is `next_send_at`).
|
|
261321
261338
|
* @enum {string}
|
|
261322
261339
|
*/
|
|
261323
|
-
status: "pending" | "sent" | "empty";
|
|
261340
|
+
status: "pending" | "sent" | "empty" | "missed";
|
|
261324
261341
|
sent_at: string | null;
|
|
261325
261342
|
/** @description The workspace has finance data now; false = no digest would go out. */
|
|
261326
261343
|
will_send: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -74388,6 +74388,7 @@ interface paths {
|
|
|
74388
74388
|
* "operation_id": null,
|
|
74389
74389
|
* "payer": null,
|
|
74390
74390
|
* "comment_count": 0,
|
|
74391
|
+
* "ads_document_id": null,
|
|
74391
74392
|
* "created_at": "2026-10-28T09:00:00.000Z"
|
|
74392
74393
|
* }
|
|
74393
74394
|
* },
|
|
@@ -75229,6 +75230,7 @@ interface paths {
|
|
|
75229
75230
|
* "operation_id": null,
|
|
75230
75231
|
* "payer": null,
|
|
75231
75232
|
* "comment_count": 1,
|
|
75233
|
+
* "ads_document_id": null,
|
|
75232
75234
|
* "created_at": "2026-10-30T08:00:00.000Z"
|
|
75233
75235
|
* }
|
|
75234
75236
|
* ],
|
|
@@ -75385,6 +75387,7 @@ interface paths {
|
|
|
75385
75387
|
* "operation_id": null,
|
|
75386
75388
|
* "payer": null,
|
|
75387
75389
|
* "comment_count": 1,
|
|
75390
|
+
* "ads_document_id": null,
|
|
75388
75391
|
* "created_at": "2026-10-30T08:00:00.000Z",
|
|
75389
75392
|
* "comments": [
|
|
75390
75393
|
* {
|
|
@@ -80942,6 +80945,7 @@ interface paths {
|
|
|
80942
80945
|
* "operation_id": null,
|
|
80943
80946
|
* "payer": null,
|
|
80944
80947
|
* "comment_count": 0,
|
|
80948
|
+
* "ads_document_id": null,
|
|
80945
80949
|
* "created_at": "2026-10-30T08:00:00.000Z"
|
|
80946
80950
|
* },
|
|
80947
80951
|
* "money_mirrored": false,
|
|
@@ -81477,6 +81481,7 @@ interface paths {
|
|
|
81477
81481
|
* "operation_id": null,
|
|
81478
81482
|
* "payer": null,
|
|
81479
81483
|
* "comment_count": 0,
|
|
81484
|
+
* "ads_document_id": null,
|
|
81480
81485
|
* "created_at": "2026-10-30T08:00:00.000Z"
|
|
81481
81486
|
* },
|
|
81482
81487
|
* "money_mirrored": false,
|
|
@@ -84112,7 +84117,7 @@ interface paths {
|
|
|
84112
84117
|
cookie?: never;
|
|
84113
84118
|
};
|
|
84114
84119
|
/**
|
|
84115
|
-
* Mes en
|
|
84120
|
+
* Mes en paralelo: the months read from Chipax
|
|
84116
84121
|
* @description Each month with a Chipax read, newest first: its newest read (any status) and when it was last read successfully. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read` and `finanzas_reports:read` (the Contador seat, owners and admins).
|
|
84117
84122
|
*/
|
|
84118
84123
|
get: {
|
|
@@ -84238,8 +84243,8 @@ interface paths {
|
|
|
84238
84243
|
};
|
|
84239
84244
|
put?: never;
|
|
84240
84245
|
/**
|
|
84241
|
-
* Mes en
|
|
84242
|
-
* @description Queues a read of Chipax for the month (bank lines and balances, open payables, classified items, Resultado Operacional), over the documents issued since `history_from`. Takes minutes (Chipax's rate limit). One read at a time; refused while a Chipax import runs (409 `import_running`) or another read runs (409 `read_running`); 409 `not_connected` without Chipax credentials. Vitrina only READS Chipax: it logs in and sends GET requests; it never creates, edits or deletes anything in the Chipax account. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
|
|
84246
|
+
* Mes en paralelo: read Chipax's side of a month
|
|
84247
|
+
* @description Queues a read of Chipax for the month (bank lines and balances, open payables, classified items, Resultado Operacional), over the documents issued since `history_from`. Takes minutes (Chipax's rate limit). One read at a time; refused while a Chipax import runs (409 `import_running`) or another read runs (409 `read_running`); 409 `not_connected` without Chipax credentials; 409 `chipax_credential_unreadable` when the stored credential cannot be decrypted (connect Chipax again). Vitrina only READS Chipax: it logs in and sends GET requests; it never creates, edits or deletes anything in the Chipax account. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
|
|
84243
84248
|
*/
|
|
84244
84249
|
post: {
|
|
84245
84250
|
parameters: {
|
|
@@ -84377,7 +84382,7 @@ interface paths {
|
|
|
84377
84382
|
cookie?: never;
|
|
84378
84383
|
};
|
|
84379
84384
|
/**
|
|
84380
|
-
* Mes en
|
|
84385
|
+
* Mes en paralelo: the diff against Chipax for a month
|
|
84381
84386
|
* @description Balances (per bank account, at month end), payables (per Contraparte, open at month end) and costs (per costo / gasto account, NET as the Resultado counts) must match to the peso. Income is a bridge: Chipax counts it when cashed, Vitrina the documents issued in the month, so the gap is explained line by line. Vitrina's side is computed live; Chipax's side is the newest finished read. `clean` = all three match and the bridge is explained (the exit criterion). Each row's `key` drills down to its items. Before a finished read: `status` not_read / reading / failed and null dimensions. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT and no glosa, on both sides; Chipax 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` and `finanzas_reports:read` (the Contador seat, owners and admins).
|
|
84382
84387
|
*/
|
|
84383
84388
|
get: {
|
|
@@ -84807,7 +84812,7 @@ interface paths {
|
|
|
84807
84812
|
cookie?: never;
|
|
84808
84813
|
};
|
|
84809
84814
|
/**
|
|
84810
|
-
* Mes en
|
|
84815
|
+
* Mes en paralelo: the items behind a row
|
|
84811
84816
|
* @description The items of one row of the diff (`key` from the diff; `bridge:<line>` for an income bridge line), both sides side by side, biggest difference first. By default only the items that do not match. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT and no glosa, on both sides; Chipax 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` and `finanzas_reports:read` (the Contador seat, owners and admins). 404 before a finished read.
|
|
84812
84817
|
*/
|
|
84813
84818
|
get: {
|
|
@@ -85006,7 +85011,7 @@ interface paths {
|
|
|
85006
85011
|
cookie?: never;
|
|
85007
85012
|
};
|
|
85008
85013
|
/**
|
|
85009
|
-
* Mes en
|
|
85014
|
+
* Mes en paralelo: download the diff (xlsx)
|
|
85010
85015
|
* @description One workbook: «Resumen», «Saldos bancarios», «Por pagar», «Costos y gastos», «Puente de ingresos» and «Diferencias» (every item that does not match, all dimensions). A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT and no glosa, on both sides; Chipax 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`. 404 before a finished read.
|
|
85011
85016
|
*/
|
|
85012
85017
|
get: {
|
|
@@ -89667,7 +89672,7 @@ interface paths {
|
|
|
89667
89672
|
};
|
|
89668
89673
|
/**
|
|
89669
89674
|
* Resumen: the Finanzas home, three answers and the context
|
|
89670
|
-
* @description The Finanzas home in one read, every figure from its detail screen: **cash** («¿cuánto me queda a fin de mes?») = the Flujo de caja projection — today’s balance of the operating accounts, the month-end and 30-day balance, the lowest point and `runs_out` (the first day under zero within 30 days, with its biggest payment); **result** («¿cuánto gasto? / ¿este mes gana plata?») = Costos y equilibrio for the current month at net amounts (ingresos, gastos = variables + fijos, «sin clasificar» apart and counted as variable, resultado operacional) against the punto de equilibrio of the last closed month; **inbox** («Te necesita») = the open «Por resolver» cases and the previous month’s close state; **automatic** = this month’s «Hecho por Vitrina» totals and the newest 3; **accounts** with their balances. `problem` is the one thing shown in red (cash running out, else a bank connection that needs a person). A caller without `finanzas_reports:read` gets `cash` and `
|
|
89675
|
+
* @description The Finanzas home in one read, every figure from its detail screen: **cash** («¿cuánto me queda a fin de mes?») = the Flujo de caja projection — today’s balance of the operating accounts, the month-end and 30-day balance, the lowest point and `runs_out` (the first day under zero within 30 days, with its biggest payment); **result** («¿cuánto gasto? / ¿este mes gana plata?») = Costos y equilibrio for the current month at net amounts (ingresos, gastos = variables + fijos, «sin clasificar» apart and counted as variable, resultado operacional) against the punto de equilibrio of the last closed month; **inbox** («Te necesita») = the open «Por resolver» cases and the previous month’s close state; **automatic** = this month’s «Hecho por Vitrina» totals and the newest 3; **accounts** with their balances. `problem` is the one thing shown in red (cash running out, else a bank connection that needs a person). A caller without `finanzas_reports:read` gets `cash`, `result` and every account balance (`balance_clp`, `balance_as_of`) null; account names stay (`reports_visible: false`). A Contador sees patients as initials. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
|
|
89671
89676
|
*/
|
|
89672
89677
|
get: {
|
|
89673
89678
|
parameters: {
|
|
@@ -90483,7 +90488,7 @@ interface paths {
|
|
|
90483
90488
|
* }
|
|
90484
90489
|
* ],
|
|
90485
90490
|
* "without_connection": "Sin la conexión, los cargos de Meta quedan en Por resolver hasta que reenvíes el recibo.",
|
|
90486
|
-
* "connect_path": "/
|
|
90491
|
+
* "connect_path": "/settings/integrations"
|
|
90487
90492
|
* },
|
|
90488
90493
|
* {
|
|
90489
90494
|
* "platform": "google_ads",
|
|
@@ -90491,7 +90496,7 @@ interface paths {
|
|
|
90491
90496
|
* "status": "none",
|
|
90492
90497
|
* "accounts": [],
|
|
90493
90498
|
* "without_connection": "Sin la conexión, los cargos de Google Ads quedan en Por resolver hasta que reenvíes el recibo.",
|
|
90494
|
-
* "connect_path": "/
|
|
90499
|
+
* "connect_path": "/settings/integrations"
|
|
90495
90500
|
* }
|
|
90496
90501
|
* ]
|
|
90497
90502
|
* }
|
|
@@ -141423,7 +141428,7 @@ interface paths {
|
|
|
141423
141428
|
*
|
|
141424
141429
|
* Each row also carries `campaign_origin` — the newest campaign send stored in the thread (`null` when none): its campaign, when it left, whether the send created the thread, and whether it is still the newest message (`awaiting_reply`). `fromCampaign=true` lists every such thread, closed ones included.
|
|
141425
141430
|
*
|
|
141426
|
-
* Each row also carries `waiting_since` — when its customer started waiting on a human, `null` when nobody waits (the «Esperando respuesta» rule; see the `waiting` parameter). `waiting=true` lists only waiting conversations, team-wide; `sort=wait` orders urgent first, then the longest wait.
|
|
141431
|
+
* Each row also carries `waiting_since` — when its customer started waiting on a human, `null` when nobody waits (the «Esperando respuesta» rule; see the `waiting` parameter). `waiting=true` lists only waiting conversations, team-wide; `sort=wait` orders urgent first, then the longest wait. `waiting_state` says why: `owed` (waiting), `closed_by_customer` (the customer only acknowledged, thanked or closed after we answered), `nothing_owed` (they declined, or the message is not for us), `paid_or_in_store` (a transfer receipt right after we sent our bank details, or «llegué» / «voy subiendo»: a suggestion for a person to confirm — nothing moves a lead or records a payment) or `promised_later` (we promised to write on a later day: a dated «Recordatorio acordado» follow-up, due at `waiting_due_at`, after which the thread is waiting again) — the ones left out of the queue by a confident verdict on the newest unanswered customer message, voice notes read as their transcript — and `null` when nobody waits at all. `waiting=closed` lists those left-out threads (still live: resolving stays a person’s click).
|
|
141427
141432
|
*
|
|
141428
141433
|
* Rows here do NOT carry `ad_origin_nudge` — that field is single-conversation-read only, to avoid a per-row integration lookup on every page of the inbox.
|
|
141429
141434
|
*
|
|
@@ -141456,8 +141461,8 @@ interface paths {
|
|
|
141456
141461
|
aiReplied?: boolean | null;
|
|
141457
141462
|
fromAd?: boolean | null;
|
|
141458
141463
|
fromCampaign?: boolean | null;
|
|
141459
|
-
/** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out. Each row carries `waiting_since`. Pair with `sort=wait` for the queue order. */
|
|
141460
|
-
waiting?: boolean | null;
|
|
141464
|
+
/** @description true: only conversations where a customer is waiting on a human («Esperando respuesta»), team-wide. Waiting = open or pending, not filtered, on a channel you can reply in, and either an AI handoff nobody on the team has answered yet (a reply from ANY teammate clears it, including WhatsApp Business / Instagram app replies; a silent «Visita acordada» notice needs no answer) or a human-handled thread whose last message is the customer’s; waits older than 7 days are left out; and what the customer wrote still asks for a reply: a thread whose newest unanswered customer message was judged, with high confidence, as the customer closing the chat («ok», «gracias», 👍 after we answered) or owing nothing, a customer who paid (a transfer receipt after our bank details) or is at the store («llegué», «voy subiendo»), or a follow-up we promised for a later day that is not due yet, is left out (any other open promise of ours always stays). `closed`: exactly those left-out threads, still live (not resolved) — `waiting_state` says why, `waiting_due_at` when a promised follow-up falls due. Each row carries `waiting_since`, `waiting_state` and `waiting_due_at`. Pair with `sort=wait` for the queue order. */
|
|
141465
|
+
waiting?: boolean | "closed" | null;
|
|
141461
141466
|
/** @description `wait`: urgent (`handoff_urgent`) first, then by `waiting_since` — `order=desc` (default) is the longest wait first, `asc` the newest; conversations that are not waiting go last. */
|
|
141462
141467
|
sort?: "created_at" | "updated_at" | "last_message_date" | "wait";
|
|
141463
141468
|
order?: "asc" | "desc";
|
|
@@ -141599,7 +141604,9 @@ interface paths {
|
|
|
141599
141604
|
* ],
|
|
141600
141605
|
* "last_call": null,
|
|
141601
141606
|
* "handoff_urgent": false,
|
|
141602
|
-
* "waiting_since": null
|
|
141607
|
+
* "waiting_since": null,
|
|
141608
|
+
* "waiting_state": null,
|
|
141609
|
+
* "waiting_due_at": null
|
|
141603
141610
|
* },
|
|
141604
141611
|
* {
|
|
141605
141612
|
* "id": "bbbbbbbb-0000-4000-8000-000000000002",
|
|
@@ -141737,7 +141744,9 @@ interface paths {
|
|
|
141737
141744
|
* "tags": [],
|
|
141738
141745
|
* "last_call": null,
|
|
141739
141746
|
* "handoff_urgent": false,
|
|
141740
|
-
* "waiting_since": null
|
|
141747
|
+
* "waiting_since": null,
|
|
141748
|
+
* "waiting_state": null,
|
|
141749
|
+
* "waiting_due_at": null
|
|
141741
141750
|
* }
|
|
141742
141751
|
* ],
|
|
141743
141752
|
* "meta": {
|
|
@@ -142029,7 +142038,7 @@ interface paths {
|
|
|
142029
142038
|
* Inbox badge counts (my open / unread / mentions / unassigned / waiting)
|
|
142030
142039
|
* @description The four badge counts on their own, scoped to the calling principal: `myOpen` and `myUnread` are the conversations assigned to the member behind the credential, `myMentions` the ones that @-mention them, `unassigned` the whole workspace’s unowned queue. An API key has no member behind it, so its three "my" counts read 0 and only `unassigned` is meaningful — use a personal token to get a person’s badges.
|
|
142031
142040
|
*
|
|
142032
|
-
* «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h
|
|
142041
|
+
* «Esperando respuesta» (the waiting queue): `waiting` is how many conversations have a customer waiting on a human, team-wide (the list `GET /conversations?waiting=true` returns exactly these); `waitingUrgent` how many of them are flagged urgent; `waitingMine` how many are assigned to the caller (0 for an API key); `waitingOldestSince` when the longest wait started (ISO, `null` when nobody waits) — render it as «el más antiguo 2 h»; `waitingClosed` how many live threads were left out because the customer closed the chat, nothing is owed, they paid or are in the store, or a follow-up we promised is not due yet (the list `waiting=closed`).
|
|
142033
142042
|
*
|
|
142034
142043
|
* `GET /conversations?include=counts` returns the same payload beside a page of conversations; this route exists for the caller that wants the badges without one.
|
|
142035
142044
|
*/
|
|
@@ -142058,7 +142067,8 @@ interface paths {
|
|
|
142058
142067
|
* "waiting": 3,
|
|
142059
142068
|
* "waitingUrgent": 1,
|
|
142060
142069
|
* "waitingMine": 1,
|
|
142061
|
-
* "waitingOldestSince": "2026-10-31T13:05:00.000Z"
|
|
142070
|
+
* "waitingOldestSince": "2026-10-31T13:05:00.000Z",
|
|
142071
|
+
* "waitingClosed": 4
|
|
142062
142072
|
* }
|
|
142063
142073
|
* }
|
|
142064
142074
|
*/
|
|
@@ -142298,6 +142308,8 @@ interface paths {
|
|
|
142298
142308
|
* "last_call": null,
|
|
142299
142309
|
* "handoff_urgent": false,
|
|
142300
142310
|
* "waiting_since": null,
|
|
142311
|
+
* "waiting_state": null,
|
|
142312
|
+
* "waiting_due_at": null,
|
|
142301
142313
|
* "ad_origin_nudge": null,
|
|
142302
142314
|
* "handoff_resolved_suggested": false,
|
|
142303
142315
|
* "message": [
|
|
@@ -258984,6 +258996,11 @@ interface components {
|
|
|
258984
258996
|
email: string | null;
|
|
258985
258997
|
} | null;
|
|
258986
258998
|
comment_count: number;
|
|
258999
|
+
/**
|
|
259000
|
+
* Format: uuid
|
|
259001
|
+
* @description Finanzas 30: the ad document (`GET /finanzas/documents/{id}`, `origin = ads`) of this movement when it is an ad charge or refund; null otherwise.
|
|
259002
|
+
*/
|
|
259003
|
+
ads_document_id: string | null;
|
|
258987
259004
|
created_at: string;
|
|
258988
259005
|
};
|
|
258989
259006
|
FinanzasDocument: {
|
|
@@ -261317,10 +261334,10 @@ interface components {
|
|
|
261317
261334
|
/** @description Next Monday's 09:00 workspace time (ISO). */
|
|
261318
261335
|
next_send_at: string;
|
|
261319
261336
|
/**
|
|
261320
|
-
* @description This week's digest: `pending` (not
|
|
261337
|
+
* @description This week's digest: `pending` (Monday's send window has not closed and nothing went out yet), `sent`, `empty` (no finance data, nothing went out) or `missed` (the window closed without a digest: the workspace had data but it did not go, e.g. it joined mid-week or the send failed; the next one is `next_send_at`).
|
|
261321
261338
|
* @enum {string}
|
|
261322
261339
|
*/
|
|
261323
|
-
status: "pending" | "sent" | "empty";
|
|
261340
|
+
status: "pending" | "sent" | "empty" | "missed";
|
|
261324
261341
|
sent_at: string | null;
|
|
261325
261342
|
/** @description The workspace has finance data now; false = no digest would go out. */
|
|
261326
261343
|
will_send: boolean;
|
package/package.json
CHANGED