@vitrina/api 15.20.0 → 15.22.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.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +269 -21
- package/dist/index.d.ts +269 -21
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- 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
|
|
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`, `waiting_due_at` and `waiting_subject_id` (the message, or handoff event, the wait is about — `POST /conversations/{id}/no-reply-needed` takes it as `subject_id`). 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,10 @@ 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,
|
|
141610
|
+
* "waiting_subject_id": null
|
|
141603
141611
|
* },
|
|
141604
141612
|
* {
|
|
141605
141613
|
* "id": "bbbbbbbb-0000-4000-8000-000000000002",
|
|
@@ -141737,7 +141745,10 @@ interface paths {
|
|
|
141737
141745
|
* "tags": [],
|
|
141738
141746
|
* "last_call": null,
|
|
141739
141747
|
* "handoff_urgent": false,
|
|
141740
|
-
* "waiting_since": null
|
|
141748
|
+
* "waiting_since": null,
|
|
141749
|
+
* "waiting_state": null,
|
|
141750
|
+
* "waiting_due_at": null,
|
|
141751
|
+
* "waiting_subject_id": null
|
|
141741
141752
|
* }
|
|
141742
141753
|
* ],
|
|
141743
141754
|
* "meta": {
|
|
@@ -142029,7 +142040,7 @@ interface paths {
|
|
|
142029
142040
|
* Inbox badge counts (my open / unread / mentions / unassigned / waiting)
|
|
142030
142041
|
* @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
142042
|
*
|
|
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
|
|
142043
|
+
* «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
142044
|
*
|
|
142034
142045
|
* `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
142046
|
*/
|
|
@@ -142058,7 +142069,8 @@ interface paths {
|
|
|
142058
142069
|
* "waiting": 3,
|
|
142059
142070
|
* "waitingUrgent": 1,
|
|
142060
142071
|
* "waitingMine": 1,
|
|
142061
|
-
* "waitingOldestSince": "2026-10-31T13:05:00.000Z"
|
|
142072
|
+
* "waitingOldestSince": "2026-10-31T13:05:00.000Z",
|
|
142073
|
+
* "waitingClosed": 4
|
|
142062
142074
|
* }
|
|
142063
142075
|
* }
|
|
142064
142076
|
*/
|
|
@@ -142298,6 +142310,9 @@ interface paths {
|
|
|
142298
142310
|
* "last_call": null,
|
|
142299
142311
|
* "handoff_urgent": false,
|
|
142300
142312
|
* "waiting_since": null,
|
|
142313
|
+
* "waiting_state": null,
|
|
142314
|
+
* "waiting_due_at": null,
|
|
142315
|
+
* "waiting_subject_id": null,
|
|
142301
142316
|
* "ad_origin_nudge": null,
|
|
142302
142317
|
* "handoff_resolved_suggested": false,
|
|
142303
142318
|
* "message": [
|
|
@@ -147016,6 +147031,229 @@ interface paths {
|
|
|
147016
147031
|
patch?: never;
|
|
147017
147032
|
trace?: never;
|
|
147018
147033
|
};
|
|
147034
|
+
"/conversations/{id}/no-reply-needed": {
|
|
147035
|
+
parameters: {
|
|
147036
|
+
query?: never;
|
|
147037
|
+
header?: never;
|
|
147038
|
+
path?: never;
|
|
147039
|
+
cookie?: never;
|
|
147040
|
+
};
|
|
147041
|
+
get?: never;
|
|
147042
|
+
put?: never;
|
|
147043
|
+
/**
|
|
147044
|
+
* Mark the current wait as needing no reply («No requiere respuesta»)
|
|
147045
|
+
* @description Takes the conversation out of «Esperando respuesta» for the wait the person saw: `subject_id` is the row’s `waiting_subject_id` (the newest customer message nobody on the team answered; with none pending, the open handoff’s event). If the customer wrote again since, the call answers 409 `WAITING_SUBJECT_CHANGED` (`details.subject_id` = the current one) and records nothing. The customer’s next message starts a new wait. Recorded as a correction of the `reply_owed` verdict on that subject (label `nothing_owed`); a click outranks any verdict on the same subject, and this workspace’s later verdicts read recent clicks as examples — never another workspace’s. Idempotent (one click per verdict, concurrent clicks included): already out of the queue → `changed: false`. Other 409s carry `details.reason`: `not_waiting`, or one the queue never hides — `urgent`, `payment_obligation` (a payment held open), `promised_human_contact` (the AI told the customer a person would contact them). `subject_kind` is `message` or `handoff`; `waiting_state` is the thread’s state after the call.
|
|
147046
|
+
*/
|
|
147047
|
+
post: {
|
|
147048
|
+
parameters: {
|
|
147049
|
+
query?: never;
|
|
147050
|
+
header?: {
|
|
147051
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
147052
|
+
"Idempotency-Key"?: string;
|
|
147053
|
+
};
|
|
147054
|
+
path: {
|
|
147055
|
+
id: string;
|
|
147056
|
+
};
|
|
147057
|
+
cookie?: never;
|
|
147058
|
+
};
|
|
147059
|
+
requestBody?: {
|
|
147060
|
+
content: {
|
|
147061
|
+
/**
|
|
147062
|
+
* @example {
|
|
147063
|
+
* "subject_id": "01a17d4e-c0de-7a11-9d0e-5e1a7e5b0c11"
|
|
147064
|
+
* }
|
|
147065
|
+
*/
|
|
147066
|
+
"application/json": {
|
|
147067
|
+
/** Format: uuid */
|
|
147068
|
+
subject_id: string;
|
|
147069
|
+
};
|
|
147070
|
+
};
|
|
147071
|
+
};
|
|
147072
|
+
responses: {
|
|
147073
|
+
/** @description `{ conversation_id, subject_id, subject_kind, waiting_state, changed }` */
|
|
147074
|
+
200: {
|
|
147075
|
+
headers: {
|
|
147076
|
+
[name: string]: unknown;
|
|
147077
|
+
};
|
|
147078
|
+
content: {
|
|
147079
|
+
/**
|
|
147080
|
+
* @example {
|
|
147081
|
+
* "data": {
|
|
147082
|
+
* "conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
|
|
147083
|
+
* "subject_id": "01a17d4e-c0de-7a11-9d0e-5e1a7e5b0c11",
|
|
147084
|
+
* "subject_kind": "message",
|
|
147085
|
+
* "waiting_state": "nothing_owed",
|
|
147086
|
+
* "changed": true
|
|
147087
|
+
* }
|
|
147088
|
+
* }
|
|
147089
|
+
*/
|
|
147090
|
+
"application/json": {
|
|
147091
|
+
data?: unknown;
|
|
147092
|
+
meta?: {
|
|
147093
|
+
[key: string]: unknown;
|
|
147094
|
+
};
|
|
147095
|
+
};
|
|
147096
|
+
};
|
|
147097
|
+
};
|
|
147098
|
+
/** @description Validation error */
|
|
147099
|
+
400: {
|
|
147100
|
+
headers: {
|
|
147101
|
+
[name: string]: unknown;
|
|
147102
|
+
};
|
|
147103
|
+
content: {
|
|
147104
|
+
"application/json": components["schemas"]["Error"];
|
|
147105
|
+
};
|
|
147106
|
+
};
|
|
147107
|
+
/** @description Unauthorized */
|
|
147108
|
+
401: {
|
|
147109
|
+
headers: {
|
|
147110
|
+
[name: string]: unknown;
|
|
147111
|
+
};
|
|
147112
|
+
content: {
|
|
147113
|
+
"application/json": components["schemas"]["Error"];
|
|
147114
|
+
};
|
|
147115
|
+
};
|
|
147116
|
+
/** @description Forbidden */
|
|
147117
|
+
403: {
|
|
147118
|
+
headers: {
|
|
147119
|
+
[name: string]: unknown;
|
|
147120
|
+
};
|
|
147121
|
+
content: {
|
|
147122
|
+
"application/json": components["schemas"]["Error"];
|
|
147123
|
+
};
|
|
147124
|
+
};
|
|
147125
|
+
/** @description Not found */
|
|
147126
|
+
404: {
|
|
147127
|
+
headers: {
|
|
147128
|
+
[name: string]: unknown;
|
|
147129
|
+
};
|
|
147130
|
+
content: {
|
|
147131
|
+
"application/json": components["schemas"]["Error"];
|
|
147132
|
+
};
|
|
147133
|
+
};
|
|
147134
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
147135
|
+
409: {
|
|
147136
|
+
headers: {
|
|
147137
|
+
[name: string]: unknown;
|
|
147138
|
+
};
|
|
147139
|
+
content: {
|
|
147140
|
+
"application/json": components["schemas"]["Error"];
|
|
147141
|
+
};
|
|
147142
|
+
};
|
|
147143
|
+
/** @description Rate limited */
|
|
147144
|
+
429: {
|
|
147145
|
+
headers: {
|
|
147146
|
+
[name: string]: unknown;
|
|
147147
|
+
};
|
|
147148
|
+
content: {
|
|
147149
|
+
"application/json": components["schemas"]["Error"];
|
|
147150
|
+
};
|
|
147151
|
+
};
|
|
147152
|
+
};
|
|
147153
|
+
};
|
|
147154
|
+
/**
|
|
147155
|
+
* Undo «No requiere respuesta»
|
|
147156
|
+
* @description Removes the click `POST /no-reply-needed` recorded on the current wait (and the verdict row it created), so the conversation waits again as before. `subject_id` (optional) names the wait the undo is for: when the conversation now waits on another message, nothing changes. Nothing to undo → `changed: false`.
|
|
147157
|
+
*/
|
|
147158
|
+
delete: {
|
|
147159
|
+
parameters: {
|
|
147160
|
+
query?: {
|
|
147161
|
+
subject_id?: string;
|
|
147162
|
+
};
|
|
147163
|
+
header?: never;
|
|
147164
|
+
path: {
|
|
147165
|
+
id: string;
|
|
147166
|
+
};
|
|
147167
|
+
cookie?: never;
|
|
147168
|
+
};
|
|
147169
|
+
requestBody?: never;
|
|
147170
|
+
responses: {
|
|
147171
|
+
/** @description `{ conversation_id, subject_id, subject_kind, waiting_state, changed }` */
|
|
147172
|
+
200: {
|
|
147173
|
+
headers: {
|
|
147174
|
+
[name: string]: unknown;
|
|
147175
|
+
};
|
|
147176
|
+
content: {
|
|
147177
|
+
/**
|
|
147178
|
+
* @example {
|
|
147179
|
+
* "data": {
|
|
147180
|
+
* "conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
|
|
147181
|
+
* "subject_id": "01a17d4e-c0de-7a11-9d0e-5e1a7e5b0c11",
|
|
147182
|
+
* "subject_kind": "message",
|
|
147183
|
+
* "waiting_state": "nothing_owed",
|
|
147184
|
+
* "changed": true
|
|
147185
|
+
* }
|
|
147186
|
+
* }
|
|
147187
|
+
*/
|
|
147188
|
+
"application/json": {
|
|
147189
|
+
data?: unknown;
|
|
147190
|
+
meta?: {
|
|
147191
|
+
[key: string]: unknown;
|
|
147192
|
+
};
|
|
147193
|
+
};
|
|
147194
|
+
};
|
|
147195
|
+
};
|
|
147196
|
+
/** @description Validation error */
|
|
147197
|
+
400: {
|
|
147198
|
+
headers: {
|
|
147199
|
+
[name: string]: unknown;
|
|
147200
|
+
};
|
|
147201
|
+
content: {
|
|
147202
|
+
"application/json": components["schemas"]["Error"];
|
|
147203
|
+
};
|
|
147204
|
+
};
|
|
147205
|
+
/** @description Unauthorized */
|
|
147206
|
+
401: {
|
|
147207
|
+
headers: {
|
|
147208
|
+
[name: string]: unknown;
|
|
147209
|
+
};
|
|
147210
|
+
content: {
|
|
147211
|
+
"application/json": components["schemas"]["Error"];
|
|
147212
|
+
};
|
|
147213
|
+
};
|
|
147214
|
+
/** @description Forbidden */
|
|
147215
|
+
403: {
|
|
147216
|
+
headers: {
|
|
147217
|
+
[name: string]: unknown;
|
|
147218
|
+
};
|
|
147219
|
+
content: {
|
|
147220
|
+
"application/json": components["schemas"]["Error"];
|
|
147221
|
+
};
|
|
147222
|
+
};
|
|
147223
|
+
/** @description Not found */
|
|
147224
|
+
404: {
|
|
147225
|
+
headers: {
|
|
147226
|
+
[name: string]: unknown;
|
|
147227
|
+
};
|
|
147228
|
+
content: {
|
|
147229
|
+
"application/json": components["schemas"]["Error"];
|
|
147230
|
+
};
|
|
147231
|
+
};
|
|
147232
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
147233
|
+
409: {
|
|
147234
|
+
headers: {
|
|
147235
|
+
[name: string]: unknown;
|
|
147236
|
+
};
|
|
147237
|
+
content: {
|
|
147238
|
+
"application/json": components["schemas"]["Error"];
|
|
147239
|
+
};
|
|
147240
|
+
};
|
|
147241
|
+
/** @description Rate limited */
|
|
147242
|
+
429: {
|
|
147243
|
+
headers: {
|
|
147244
|
+
[name: string]: unknown;
|
|
147245
|
+
};
|
|
147246
|
+
content: {
|
|
147247
|
+
"application/json": components["schemas"]["Error"];
|
|
147248
|
+
};
|
|
147249
|
+
};
|
|
147250
|
+
};
|
|
147251
|
+
};
|
|
147252
|
+
options?: never;
|
|
147253
|
+
head?: never;
|
|
147254
|
+
patch?: never;
|
|
147255
|
+
trace?: never;
|
|
147256
|
+
};
|
|
147019
147257
|
"/conversations/{id}/filter-sender": {
|
|
147020
147258
|
parameters: {
|
|
147021
147259
|
query?: never;
|
|
@@ -166641,7 +166879,7 @@ interface paths {
|
|
|
166641
166879
|
};
|
|
166642
166880
|
/**
|
|
166643
166881
|
* Conversation volume and resolution
|
|
166644
|
-
* @description Volume, resolution and handling time over the window — the top-level view the other reports break down.
|
|
166882
|
+
* @description Volume, resolution and handling time over the window — the top-level view the other reports break down. `waiting_clears` counts how «Esperando respuesta» was cleared in the window: `by_jev` (the `reply_owed` verdict took a wait out), `by_button` («No requiere respuesta», `POST /conversations/{id}/no-reply-needed`; undone clicks excluded) and `corrected_to_owed` (a person answered a thread Jev had taken out, so it was owed after all); `null` when it could not be read.
|
|
166645
166883
|
*/
|
|
166646
166884
|
get: {
|
|
166647
166885
|
parameters: {
|
|
@@ -166749,7 +166987,12 @@ interface paths {
|
|
|
166749
166987
|
* ]
|
|
166750
166988
|
* },
|
|
166751
166989
|
* "facturables": 4,
|
|
166752
|
-
* "solo_humano": 14
|
|
166990
|
+
* "solo_humano": 14,
|
|
166991
|
+
* "waiting_clears": {
|
|
166992
|
+
* "by_jev": 9,
|
|
166993
|
+
* "by_button": 2,
|
|
166994
|
+
* "corrected_to_owed": 1
|
|
166995
|
+
* }
|
|
166753
166996
|
* },
|
|
166754
166997
|
* "meta": {
|
|
166755
166998
|
* "window": {
|
|
@@ -258984,6 +259227,11 @@ interface components {
|
|
|
258984
259227
|
email: string | null;
|
|
258985
259228
|
} | null;
|
|
258986
259229
|
comment_count: number;
|
|
259230
|
+
/**
|
|
259231
|
+
* Format: uuid
|
|
259232
|
+
* @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.
|
|
259233
|
+
*/
|
|
259234
|
+
ads_document_id: string | null;
|
|
258987
259235
|
created_at: string;
|
|
258988
259236
|
};
|
|
258989
259237
|
FinanzasDocument: {
|
|
@@ -261317,10 +261565,10 @@ interface components {
|
|
|
261317
261565
|
/** @description Next Monday's 09:00 workspace time (ISO). */
|
|
261318
261566
|
next_send_at: string;
|
|
261319
261567
|
/**
|
|
261320
|
-
* @description This week's digest: `pending` (not
|
|
261568
|
+
* @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
261569
|
* @enum {string}
|
|
261322
261570
|
*/
|
|
261323
|
-
status: "pending" | "sent" | "empty";
|
|
261571
|
+
status: "pending" | "sent" | "empty" | "missed";
|
|
261324
261572
|
sent_at: string | null;
|
|
261325
261573
|
/** @description The workspace has finance data now; false = no digest would go out. */
|
|
261326
261574
|
will_send: boolean;
|
|
@@ -272192,7 +272440,7 @@ declare function createClient(opts: CreateClientOptions): VitrinaClient;
|
|
|
272192
272440
|
* is regenerated — narrow on the ones you handle, never assume this
|
|
272193
272441
|
* list is exhaustive at runtime.
|
|
272194
272442
|
*/
|
|
272195
|
-
type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'ACCOUNT_DELETION_BLOCKED' | 'CONFIRMATION_REQUIRED' | 'VERSION_CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'MODULE_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'VEHICLE_VALUE_OUT_OF_RANGE' | 'PRICE_CHANGE_CONFIRMATION_REQUIRED' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'FINANZAS_SYNC_THROTTLED' | 'FINANZAS_CLAVE_ERROR' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'COPILOT_DISABLED' | 'COPILOT_BUDGET_EXCEEDED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STAGE_QUALIFIES_LEAD_NOT_ALLOWED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'SHARE_IMAGE_UNAVAILABLE' | 'AUDIO_RENDITION_PENDING' | 'MEDIA_SIGNING_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'DOCUMENT_LOGO_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_READ_UNAVAILABLE' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'GTM_NOT_CONFIGURED' | 'GTM_NOT_CONNECTED' | 'GTM_CONSENT_REQUIRED' | 'GTM_PERMISSION_DENIED' | 'GTM_CONTAINER_REQUIRED' | 'GTM_PENDING_CHANGES' | 'GTM_WORKSPACE_CONFLICT' | 'GTM_WORKSPACE_LIMIT' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED';
|
|
272443
|
+
type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'ACCOUNT_DELETION_BLOCKED' | 'CONFIRMATION_REQUIRED' | 'VERSION_CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'MODULE_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'VEHICLE_VALUE_OUT_OF_RANGE' | 'PRICE_CHANGE_CONFIRMATION_REQUIRED' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'FINANZAS_SYNC_THROTTLED' | 'FINANZAS_CLAVE_ERROR' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'COPILOT_DISABLED' | 'COPILOT_BUDGET_EXCEEDED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STAGE_QUALIFIES_LEAD_NOT_ALLOWED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'SHARE_IMAGE_UNAVAILABLE' | 'AUDIO_RENDITION_PENDING' | 'MEDIA_SIGNING_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'DOCUMENT_LOGO_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_READ_UNAVAILABLE' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'GTM_NOT_CONFIGURED' | 'GTM_NOT_CONNECTED' | 'GTM_CONSENT_REQUIRED' | 'GTM_PERMISSION_DENIED' | 'GTM_CONTAINER_REQUIRED' | 'GTM_PENDING_CHANGES' | 'GTM_WORKSPACE_CONFLICT' | 'GTM_WORKSPACE_LIMIT' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED' | 'WAITING_SUBJECT_CHANGED';
|
|
272196
272444
|
declare const ERROR_CODES: readonly ErrorCode[];
|
|
272197
272445
|
|
|
272198
272446
|
/**
|