@vitrina/api 17.14.0 → 17.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -10496,7 +10496,7 @@ interface paths {
10496
10496
  name: string;
10497
10497
  /** Format: uuid */
10498
10498
  tenant_id?: string;
10499
- scopes: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "finanzas:read" | "finanzas:write" | "finanzas_reports:read" | "finanzas:export" | "finanzas_admin:write" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "orders:refund" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
10499
+ scopes: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "finanzas:read" | "finanzas:write" | "finanzas_reports:read" | "finanzas:export" | "finanzas_admin:write" | "finanzas_patients:read" | "finanzas_payroll:read" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "orders:refund" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
10500
10500
  /** Format: date-time */
10501
10501
  expires_at?: string;
10502
10502
  /** @description false mints an `sk_test_` key bound to this workspace's sandbox (409 SANDBOX_NOT_PROVISIONED when it has none yet). Default true. */
@@ -74477,10 +74477,12 @@ interface paths {
74477
74477
  * "source": "movement",
74478
74478
  * "contact": null,
74479
74479
  * "clinic_patient": null,
74480
+ * "is_payroll": false,
74480
74481
  * "movement_count": 14,
74481
74482
  * "document_count": 6,
74482
74483
  * "merged_into_id": null,
74483
74484
  * "payment_terms_days": null,
74485
+ * "payment_terms_source": null,
74484
74486
  * "created_at": "2026-10-01T14:03:00.000Z",
74485
74487
  * "updated_at": "2026-10-30T08:00:00.000Z"
74486
74488
  * }
@@ -74611,10 +74613,12 @@ interface paths {
74611
74613
  * "source": "movement",
74612
74614
  * "contact": null,
74613
74615
  * "clinic_patient": null,
74616
+ * "is_payroll": false,
74614
74617
  * "movement_count": 14,
74615
74618
  * "document_count": 6,
74616
74619
  * "merged_into_id": null,
74617
74620
  * "payment_terms_days": null,
74621
+ * "payment_terms_source": null,
74618
74622
  * "created_at": "2026-10-01T14:03:00.000Z",
74619
74623
  * "updated_at": "2026-10-30T08:00:00.000Z"
74620
74624
  * }
@@ -74729,10 +74733,12 @@ interface paths {
74729
74733
  * "source": "movement",
74730
74734
  * "contact": null,
74731
74735
  * "clinic_patient": null,
74736
+ * "is_payroll": false,
74732
74737
  * "movement_count": 14,
74733
74738
  * "document_count": 6,
74734
74739
  * "merged_into_id": null,
74735
74740
  * "payment_terms_days": null,
74741
+ * "payment_terms_source": null,
74736
74742
  * "created_at": "2026-10-01T14:03:00.000Z",
74737
74743
  * "updated_at": "2026-10-30T08:00:00.000Z"
74738
74744
  * }
@@ -74857,10 +74863,12 @@ interface paths {
74857
74863
  * "source": "movement",
74858
74864
  * "contact": null,
74859
74865
  * "clinic_patient": null,
74866
+ * "is_payroll": false,
74860
74867
  * "movement_count": 14,
74861
74868
  * "document_count": 6,
74862
74869
  * "merged_into_id": null,
74863
74870
  * "payment_terms_days": null,
74871
+ * "payment_terms_source": null,
74864
74872
  * "created_at": "2026-10-01T14:03:00.000Z",
74865
74873
  * "updated_at": "2026-10-30T08:00:00.000Z"
74866
74874
  * },
@@ -74981,10 +74989,12 @@ interface paths {
74981
74989
  * "source": "document",
74982
74990
  * "contact": null,
74983
74991
  * "clinic_patient": null,
74992
+ * "is_payroll": false,
74984
74993
  * "movement_count": 9,
74985
74994
  * "document_count": 12,
74986
74995
  * "merged_into_id": null,
74987
74996
  * "payment_terms_days": 45,
74997
+ * "payment_terms_source": "manual",
74988
74998
  * "created_at": "2026-09-02T14:03:00.000Z",
74989
74999
  * "updated_at": "2026-10-30T08:00:00.000Z"
74990
75000
  * },
@@ -75013,7 +75023,8 @@ interface paths {
75013
75023
  * "class": "suppliers",
75014
75024
  * "label": "Proveedores",
75015
75025
  * "days": 45,
75016
- * "source": "contraparte"
75026
+ * "source": "contraparte",
75027
+ * "origin": "manual"
75017
75028
  * }
75018
75029
  * ]
75019
75030
  * },
@@ -75381,7 +75392,8 @@ interface paths {
75381
75392
  * "class": "suppliers",
75382
75393
  * "label": "Proveedores",
75383
75394
  * "days": 45,
75384
- * "source": "contraparte"
75395
+ * "source": "contraparte",
75396
+ * "origin": "manual"
75385
75397
  * }
75386
75398
  * ]
75387
75399
  * },
@@ -75752,6 +75764,7 @@ interface paths {
75752
75764
  * "label": "Proveedores",
75753
75765
  * "days": 30,
75754
75766
  * "customized": false,
75767
+ * "source": "default",
75755
75768
  * "updated_at": null
75756
75769
  * },
75757
75770
  * {
@@ -75759,6 +75772,7 @@ interface paths {
75759
75772
  * "label": "Clientes",
75760
75773
  * "days": 30,
75761
75774
  * "customized": false,
75775
+ * "source": "default",
75762
75776
  * "updated_at": null
75763
75777
  * },
75764
75778
  * {
@@ -75766,6 +75780,7 @@ interface paths {
75766
75780
  * "label": "Honorarios",
75767
75781
  * "days": 15,
75768
75782
  * "customized": true,
75783
+ * "source": "chipax",
75769
75784
  * "updated_at": "2026-10-30T12:00:00.000Z"
75770
75785
  * },
75771
75786
  * {
@@ -75773,6 +75788,7 @@ interface paths {
75773
75788
  * "label": "Gastos",
75774
75789
  * "days": 0,
75775
75790
  * "customized": false,
75791
+ * "source": "default",
75776
75792
  * "updated_at": null
75777
75793
  * }
75778
75794
  * ]
@@ -75881,6 +75897,7 @@ interface paths {
75881
75897
  * "label": "Proveedores",
75882
75898
  * "days": 30,
75883
75899
  * "customized": false,
75900
+ * "source": "default",
75884
75901
  * "updated_at": null
75885
75902
  * },
75886
75903
  * {
@@ -75888,6 +75905,7 @@ interface paths {
75888
75905
  * "label": "Clientes",
75889
75906
  * "days": 30,
75890
75907
  * "customized": false,
75908
+ * "source": "default",
75891
75909
  * "updated_at": null
75892
75910
  * },
75893
75911
  * {
@@ -75895,6 +75913,7 @@ interface paths {
75895
75913
  * "label": "Honorarios",
75896
75914
  * "days": 15,
75897
75915
  * "customized": true,
75916
+ * "source": "chipax",
75898
75917
  * "updated_at": "2026-10-30T12:00:00.000Z"
75899
75918
  * },
75900
75919
  * {
@@ -75902,6 +75921,7 @@ interface paths {
75902
75921
  * "label": "Gastos",
75903
75922
  * "days": 0,
75904
75923
  * "customized": false,
75924
+ * "source": "default",
75905
75925
  * "updated_at": null
75906
75926
  * }
75907
75927
  * ],
@@ -75981,7 +76001,7 @@ interface paths {
75981
76001
  };
75982
76002
  /**
75983
76003
  * List bank and card movements (Movimientos)
75984
- * @description One register of every bank and card movement of the workspace across all its accounts: incoming (`inbound`, abono) and outgoing (`outbound`, cargo), CLP and USD (a USD movement carries its original amount in cents and the CLP equivalent at that day's dólar observado). Each movement has its account, Contraparte, reconciliation `state` (`open` | `partial` | `reconciled`), the amount still to assign (`pending_clp`) and who resolved it. Filters: account, day range, direction, state, amount range (whole CLP), free text, Contraparte. Newest first; offset-paginated; `meta.totals` sums the in and out amounts of every match. A movement is cash, never income. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
76004
+ * @description One register of every bank and card movement of the workspace across all its accounts: incoming (`inbound`, abono) and outgoing (`outbound`, cargo), CLP and USD (a USD movement carries its original amount in cents and the CLP equivalent at that day's dólar observado). Each movement has its account, Contraparte, reconciliation `state` (`open` | `partial` | `reconciled`), the amount still to assign (`pending_clp`) and who resolved it. Filters: account, day range, direction, state, amount range (whole CLP), free text, Contraparte. Newest first; offset-paginated; `meta.totals` sums the in and out amounts of every match; `meta.cash_pending` is «efectivo por depositar», the same object the Flujo de caja returns. A movement is cash, never income. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
75985
76005
  */
75986
76006
  get: {
75987
76007
  parameters: {
@@ -76056,6 +76076,11 @@ interface paths {
76056
76076
  * "totals": {
76057
76077
  * "inbound_clp": 0,
76058
76078
  * "outbound_clp": 1190000
76079
+ * },
76080
+ * "cash_pending": {
76081
+ * "amount_clp": 11648107,
76082
+ * "window_days": 60,
76083
+ * "expected_until": "2026-11-06"
76059
76084
  * }
76060
76085
  * }
76061
76086
  * }
@@ -76072,6 +76097,7 @@ interface paths {
76072
76097
  inbound_clp: number;
76073
76098
  outbound_clp: number;
76074
76099
  };
76100
+ cash_pending: components["schemas"]["FinanzasCashPendingSummary"];
76075
76101
  };
76076
76102
  };
76077
76103
  };
@@ -77057,7 +77083,7 @@ interface paths {
77057
77083
  from?: string;
77058
77084
  to?: string;
77059
77085
  contraparte_id?: string;
77060
- payment_state?: "por_pagar" | "parcial" | "pagado";
77086
+ payment_state?: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
77061
77087
  dte_type?: number;
77062
77088
  q?: string;
77063
77089
  limit?: number;
@@ -82849,7 +82875,12 @@ interface paths {
82849
82875
  * }
82850
82876
  * }
82851
82877
  * ],
82852
- * "total_remaining_clp": 400000
82878
+ * "total_remaining_clp": 400000,
82879
+ * "pending": {
82880
+ * "amount_clp": 400000,
82881
+ * "window_days": 60,
82882
+ * "expected_until": "2026-11-06"
82883
+ * }
82853
82884
  * }
82854
82885
  * }
82855
82886
  */
@@ -88296,7 +88327,7 @@ interface paths {
88296
88327
  };
88297
88328
  /**
88298
88329
  * Flujo de caja: actual, projection, band and lowest point
88299
- * @description Per day (or ISO week): what came in and went out (actual, before today) and what is expected (projected, today on), with the closing balance of each period. The projection starts from today's balance of the operating accounts (every bank account except savings accounts) and adds known items on their dates: open payables and receivables by due date (outstanding = total − retención − live reconciliation links), the retención of honorarios received (due with the F29 on the 20th of the next month), recurring items, patient cuotas, booked appointments with a price, the efectivo por depositar (today) and planned rescues. An overdue payable due in the last 90 days is placed today; older ones and overdue receivables stay out (`overdue`). From tomorrow each day also earns its typical income: the median of that weekday's bank income over the last 90 days, counted only above the day's known income; `band` uses the weekday minimum and maximum instead. Past days are actual bank movements; transfers between operating accounts are neither in nor out. `lowest` is the lowest projected balance in the range (its `cause` = the biggest payment that day); `month_end` is the projected balance at the end of the current month («¿cuánto me queda a fin de mes?»), computed even when `to` is earlier. Range: up to a year back and a year ahead, at most 366 days. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read`.
88330
+ * @description Per day (or ISO week): what came in and went out (actual, before today) and what is expected (projected, today on), with the closing balance of each period. The projection starts from today's balance of the operating accounts (every bank account except savings accounts) and adds known items on their dates: open payables and receivables by due date (outstanding = total − retención − live reconciliation links), the retención of honorarios received (due with the F29 on the 20th of the next month), recurring items, patient cuotas, booked appointments with a price, the efectivo por depositar (`cash_pending`, spread over its expected deposit days) and planned rescues. An overdue payable due in the last 90 days is placed today; older ones, the «vencido heredado» ones (`inherited_overdue`) and overdue receivables stay out (`overdue`). The lowest point (`lowest`) includes today's balance and is never above it (`lowest.is_today`). From tomorrow each day also earns its typical income: the median of that weekday's bank income over the last 90 days, counted only above the day's known income; `band` uses the weekday minimum and maximum instead. Past days are actual bank movements; transfers between operating accounts are neither in nor out. `lowest` is the lowest projected balance in the range (its `cause` = the biggest payment that day); `month_end` is the projected balance at the end of the current month («¿cuánto me queda a fin de mes?»), computed even when `to` is earlier. Range: up to a year back and a year ahead, at most 366 days. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read`.
88300
88331
  */
88301
88332
  get: {
88302
88333
  parameters: {
@@ -88399,6 +88430,7 @@ interface paths {
88399
88430
  * "date": "2026-10-30",
88400
88431
  * "balance_clp": 4624419,
88401
88432
  * "negative": false,
88433
+ * "is_today": false,
88402
88434
  * "cause": null
88403
88435
  * },
88404
88436
  * "month_end": {
@@ -88434,6 +88466,15 @@ interface paths {
88434
88466
  * "receivables_clp": 0,
88435
88467
  * "receivables_count": 0
88436
88468
  * },
88469
+ * "inherited_overdue": {
88470
+ * "count": 468,
88471
+ * "amount_clp": 59722052
88472
+ * },
88473
+ * "cash_pending": {
88474
+ * "amount_clp": 11648107,
88475
+ * "window_days": 60,
88476
+ * "expected_until": "2026-11-06"
88477
+ * },
88437
88478
  * "typical_income": {
88438
88479
  * "basis": "history",
88439
88480
  * "weeks": 12
@@ -88579,7 +88620,7 @@ interface paths {
88579
88620
  };
88580
88621
  /**
88581
88622
  * Payments calendar: what is due each day, balance after each
88582
- * @description The projected items from today, grouped by day, each with the expected balance right after it (money in first, then the biggest payments). The day's typical income lands after its items. `direction` keeps only money in or only payments (balances still count everything). The projection starts from today's balance of the operating accounts (every bank account except savings accounts) and adds known items on their dates: open payables and receivables by due date (outstanding = total − retención − live reconciliation links), the retención of honorarios received (due with the F29 on the 20th of the next month), recurring items, patient cuotas, booked appointments with a price, the efectivo por depositar (today) and planned rescues. An overdue payable due in the last 90 days is placed today; older ones and overdue receivables stay out (`overdue`). From tomorrow each day also earns its typical income: the median of that weekday's bank income over the last 90 days, counted only above the day's known income; `band` uses the weekday minimum and maximum instead. Past days are actual bank movements; transfers between operating accounts are neither in nor out. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read`.
88623
+ * @description The projected items from today, grouped by day, each with the expected balance right after it (money in first, then the biggest payments). The day's typical income lands after its items. `direction` keeps only money in or only payments (balances still count everything). The projection starts from today's balance of the operating accounts (every bank account except savings accounts) and adds known items on their dates: open payables and receivables by due date (outstanding = total − retención − live reconciliation links), the retención of honorarios received (due with the F29 on the 20th of the next month), recurring items, patient cuotas, booked appointments with a price, the efectivo por depositar (`cash_pending`, spread over its expected deposit days) and planned rescues. An overdue payable due in the last 90 days is placed today; older ones, the «vencido heredado» ones (`inherited_overdue`) and overdue receivables stay out (`overdue`). The lowest point (`lowest`) includes today's balance and is never above it (`lowest.is_today`). From tomorrow each day also earns its typical income: the median of that weekday's bank income over the last 90 days, counted only above the day's known income; `band` uses the weekday minimum and maximum instead. Past days are actual bank movements; transfers between operating accounts are neither in nor out. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read`.
88583
88624
  */
88584
88625
  get: {
88585
88626
  parameters: {
@@ -88677,6 +88718,7 @@ interface paths {
88677
88718
  * "date": "2026-11-26",
88678
88719
  * "balance_clp": -1840000,
88679
88720
  * "negative": true,
88721
+ * "is_today": false,
88680
88722
  * "cause": {
88681
88723
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
88682
88724
  * "source": "recurring",
@@ -88837,6 +88879,7 @@ interface paths {
88837
88879
  * "date": "2026-11-26",
88838
88880
  * "balance_clp": -1840000,
88839
88881
  * "negative": true,
88882
+ * "is_today": false,
88840
88883
  * "cause": {
88841
88884
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
88842
88885
  * "source": "recurring",
@@ -88869,6 +88912,7 @@ interface paths {
88869
88912
  * "date": "2026-11-26",
88870
88913
  * "balance_clp": 3260000,
88871
88914
  * "negative": false,
88915
+ * "is_today": false,
88872
88916
  * "cause": {
88873
88917
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
88874
88918
  * "source": "recurring",
@@ -89021,6 +89065,7 @@ interface paths {
89021
89065
  * "date": "2026-11-26",
89022
89066
  * "balance_clp": 3260000,
89023
89067
  * "negative": false,
89068
+ * "is_today": false,
89024
89069
  * "cause": {
89025
89070
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
89026
89071
  * "source": "recurring",
@@ -89053,6 +89098,7 @@ interface paths {
89053
89098
  * "date": "2026-11-26",
89054
89099
  * "balance_clp": -1840000,
89055
89100
  * "negative": true,
89101
+ * "is_today": false,
89056
89102
  * "cause": {
89057
89103
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
89058
89104
  * "source": "recurring",
@@ -89210,6 +89256,7 @@ interface paths {
89210
89256
  * "date": "2026-11-26",
89211
89257
  * "balance_clp": -1840000,
89212
89258
  * "negative": true,
89259
+ * "is_today": false,
89213
89260
  * "cause": {
89214
89261
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
89215
89262
  * "source": "recurring",
@@ -89242,6 +89289,7 @@ interface paths {
89242
89289
  * "date": "2026-11-26",
89243
89290
  * "balance_clp": 3260000,
89244
89291
  * "negative": false,
89292
+ * "is_today": false,
89245
89293
  * "cause": {
89246
89294
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
89247
89295
  * "source": "recurring",
@@ -89307,6 +89355,7 @@ interface paths {
89307
89355
  * "date": "2026-11-26",
89308
89356
  * "balance_clp": -1840000,
89309
89357
  * "negative": true,
89358
+ * "is_today": false,
89310
89359
  * "cause": {
89311
89360
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
89312
89361
  * "source": "recurring",
@@ -89339,6 +89388,7 @@ interface paths {
89339
89388
  * "date": "2026-11-26",
89340
89389
  * "balance_clp": 3260000,
89341
89390
  * "negative": false,
89391
+ * "is_today": false,
89342
89392
  * "cause": {
89343
89393
  * "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
89344
89394
  * "source": "recurring",
@@ -90299,6 +90349,10 @@ interface paths {
90299
90349
  state: "todo" | "done" | "problem";
90300
90350
  /** @description The workspace keeps a Mercado Pago account (e.g. from a Chipax import) or has a Mercado Pago connection: only then is the optional «Mercado Pago» row shown and counted. Never part of `onboarding.mode` `done`. */
90301
90351
  relevant: boolean;
90352
+ /** @description The workspace shows signs of using Mercado Pago: an account, a connection, or bank movements from any source naming it. With `state` `todo` and no `dismissed_at`, Resumen keeps a card with just this row. */
90353
+ evidence: boolean;
90354
+ /** @description When «Descartar» was pressed (`dismiss_mercado_pago`). Permanent per workspace; an unconnected, dismissed row is no longer `relevant`. */
90355
+ dismissed_at: string | null;
90302
90356
  nickname: string | null;
90303
90357
  connected_at: string | null;
90304
90358
  };
@@ -91067,6 +91121,10 @@ interface paths {
91067
91121
  state: "todo" | "done" | "problem";
91068
91122
  /** @description The workspace keeps a Mercado Pago account (e.g. from a Chipax import) or has a Mercado Pago connection: only then is the optional «Mercado Pago» row shown and counted. Never part of `onboarding.mode` `done`. */
91069
91123
  relevant: boolean;
91124
+ /** @description The workspace shows signs of using Mercado Pago: an account, a connection, or bank movements from any source naming it. With `state` `todo` and no `dismissed_at`, Resumen keeps a card with just this row. */
91125
+ evidence: boolean;
91126
+ /** @description When «Descartar» was pressed (`dismiss_mercado_pago`). Permanent per workspace; an unconnected, dismissed row is no longer `relevant`. */
91127
+ dismissed_at: string | null;
91070
91128
  nickname: string | null;
91071
91129
  connected_at: string | null;
91072
91130
  };
@@ -91204,7 +91262,7 @@ interface paths {
91204
91262
  put?: never;
91205
91263
  /**
91206
91264
  * Onboarding state: start, defer, or «no recibe boletas de honorarios»
91207
- * @description Per workspace. `start` keeps the guided start while things get connected; `defer` («Lo hago después») collapses it to the checklist on Resumen; `no_honorarios` marks the honorarios step skipped (409 while honorarios documents are on record); `has_honorarios` undoes it. Answers the setup. Requires the `finanzas` add-on (402 `ENTITLEMENT_NOT_ACTIVE` otherwise). Requires `finanzas_admin:write`.
91265
+ * @description Per workspace. `start` keeps the guided start while things get connected; `defer` («Lo hago después») collapses it to the checklist on Resumen; `no_honorarios` marks the honorarios step skipped (409 while honorarios documents are on record); `has_honorarios` undoes it; `dismiss_mercado_pago` hides the optional Mercado Pago card for good (per workspace, every device). Answers the setup. Requires the `finanzas` add-on (402 `ENTITLEMENT_NOT_ACTIVE` otherwise). Requires `finanzas_admin:write`.
91208
91266
  */
91209
91267
  post: {
91210
91268
  parameters: {
@@ -91225,7 +91283,7 @@ interface paths {
91225
91283
  */
91226
91284
  "application/json": {
91227
91285
  /** @enum {string} */
91228
- action: "start" | "defer" | "no_honorarios" | "has_honorarios";
91286
+ action: "start" | "defer" | "no_honorarios" | "has_honorarios" | "dismiss_mercado_pago";
91229
91287
  };
91230
91288
  };
91231
91289
  };
@@ -91321,6 +91379,10 @@ interface paths {
91321
91379
  state: "todo" | "done" | "problem";
91322
91380
  /** @description The workspace keeps a Mercado Pago account (e.g. from a Chipax import) or has a Mercado Pago connection: only then is the optional «Mercado Pago» row shown and counted. Never part of `onboarding.mode` `done`. */
91323
91381
  relevant: boolean;
91382
+ /** @description The workspace shows signs of using Mercado Pago: an account, a connection, or bank movements from any source naming it. With `state` `todo` and no `dismissed_at`, Resumen keeps a card with just this row. */
91383
+ evidence: boolean;
91384
+ /** @description When «Descartar» was pressed (`dismiss_mercado_pago`). Permanent per workspace; an unconnected, dismissed row is no longer `relevant`. */
91385
+ dismissed_at: string | null;
91324
91386
  nickname: string | null;
91325
91387
  connected_at: string | null;
91326
91388
  };
@@ -91739,6 +91801,12 @@ interface paths {
91739
91801
  * },
91740
91802
  * "hora_sillon": {
91741
91803
  * "chairs": 6,
91804
+ * "chairs_source": {
91805
+ * "count": 6,
91806
+ * "source": "resources",
91807
+ * "source_label": "de tu agenda"
91808
+ * },
91809
+ * "lunch_break_minutes": 60,
91742
91810
  * "available_hours": [
91743
91811
  * 1440,
91744
91812
  * 1056
@@ -91902,6 +91970,8 @@ interface paths {
91902
91970
  * "effective_professional_account_ids": [
91903
91971
  * "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6101"
91904
91972
  * ],
91973
+ * "chairs_override": null,
91974
+ * "lunch_break_minutes": null,
91905
91975
  * "updated_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6301",
91906
91976
  * "updated_at": "2026-10-31T12:00:00.000Z"
91907
91977
  * }
@@ -91975,7 +92045,7 @@ interface paths {
91975
92045
  head?: never;
91976
92046
  /**
91977
92047
  * Change the dentist share accounts or the reference line
91978
- * @description Send only what changes. `professional_account_ids`: costo or gasto accounts of the plan de cuentas (null goes back to detection); `reference_share_enabled` toggles the line; `reference_share_bps` is its share of income (1–10000). 400 `VALIDATION_ERROR` with `details.reason` `account_not_found` or `account_not_cost`. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
92048
+ * @description Send only what changes. `professional_account_ids`: costo or gasto accounts of the plan de cuentas (null goes back to detection); `reference_share_enabled` toggles the line; `reference_share_bps` is its share of income (1–10000). `chairs_override` (1–200) sets the clinic’s chair count, shown as «elegido por ti»; null goes back to the clinic’s resources. `lunch_break_minutes` (0–240; null = 60) is the weekday break taken off the available hours. 400 `VALIDATION_ERROR` with `details.reason` `account_not_found` or `account_not_cost`. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
91979
92049
  */
91980
92050
  patch: {
91981
92051
  parameters: {
@@ -91995,6 +92065,10 @@ interface paths {
91995
92065
  reference_share_enabled?: boolean;
91996
92066
  reference_share_bps?: number;
91997
92067
  professional_account_ids?: string[] | null;
92068
+ /** @description Set the number of chairs, or null to go back to the clinic’s resources. */
92069
+ chairs_override?: number | null;
92070
+ /** @description Weekday lunch break in minutes; null = default (60). */
92071
+ lunch_break_minutes?: number | null;
91998
92072
  };
91999
92073
  };
92000
92074
  };
@@ -92014,6 +92088,8 @@ interface paths {
92014
92088
  * "effective_professional_account_ids": [
92015
92089
  * "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6101"
92016
92090
  * ],
92091
+ * "chairs_override": null,
92092
+ * "lunch_break_minutes": null,
92017
92093
  * "updated_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6301",
92018
92094
  * "updated_at": "2026-10-31T12:00:00.000Z"
92019
92095
  * }
@@ -92148,6 +92224,7 @@ interface paths {
92148
92224
  * "date": "2026-11-06",
92149
92225
  * "balance_clp": -412000,
92150
92226
  * "negative": true,
92227
+ * "is_today": false,
92151
92228
  * "cause": {
92152
92229
  * "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
92153
92230
  * "source": "payable",
@@ -92212,6 +92289,10 @@ interface paths {
92212
92289
  * "receivables_clp": 380000,
92213
92290
  * "receivables_count": 2
92214
92291
  * },
92292
+ * "inherited_overdue": {
92293
+ * "count": 0,
92294
+ * "amount_clp": 0
92295
+ * },
92215
92296
  * "points": [
92216
92297
  * {
92217
92298
  * "date": "2026-10-30",
@@ -92897,6 +92978,7 @@ interface paths {
92897
92978
  * "charges_synced_at": "2026-10-31T12:26:04.120Z",
92898
92979
  * "charges_synced": 40,
92899
92980
  * "charges_linked": 38,
92981
+ * "charges_unreconciled": 2,
92900
92982
  * "spend_by_month": [
92901
92983
  * {
92902
92984
  * "month": "2026-10",
@@ -144012,7 +144094,7 @@ interface paths {
144012
144094
  */
144013
144095
  "application/json": {
144014
144096
  name: string;
144015
- scopes?: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "finanzas:read" | "finanzas:write" | "finanzas_reports:read" | "finanzas:export" | "finanzas_admin:write" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "orders:refund" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
144097
+ scopes?: ("ai_agents:read" | "ai_agents:write" | "ai_agents:simulate" | "conversations:read" | "conversations:write" | "contacts:read" | "contacts:write" | "tickets:read" | "tickets:write" | "tickets:claim" | "leads:read" | "leads:write" | "leads:intake" | "pipelines:read" | "pipelines:write" | "stages:read" | "stages:write" | "functions:read" | "functions:write" | "kb:read" | "kb:write" | "messages:read" | "messages:write" | "messages:send" | "tools:read" | "tags:read" | "tags:write" | "api_keys:read" | "api_keys:write" | "personal_tokens:read" | "personal_tokens:write" | "notifications:read" | "notifications:write" | "audit:read" | "analytics:read" | "analytics:write" | "dealer_reports:read" | "tenant:read" | "tenant:write" | "tenant:delete" | "webhooks:read" | "webhooks:write" | "messaging_accounts:read" | "messaging_accounts:write" | "provisioning:read" | "provisioning:write" | "voice_drift:read" | "worker_failures:read" | "worker_failures:write" | "dealer_sites:read" | "dealer_sites:write" | "mcp_servers:read" | "mcp_servers:write" | "memberships:read" | "memberships:write" | "teams:read" | "teams:write" | "help_centers:read" | "help_centers:write" | "labels:read" | "labels:write" | "macros:read" | "macros:write" | "slas:read" | "slas:write" | "routing:read" | "routing:write" | "triggers:read" | "triggers:write" | "followups:read" | "followups:write" | "followups:manage" | "custom_attributes:read" | "custom_attributes:write" | "companies:read" | "companies:write" | "roles:read" | "roles:write" | "integrations:read" | "integrations:write" | "clinic:read" | "clinic:write" | "clinic_patients:read" | "clinic_patients:write" | "clinic_record:read" | "clinic_record:write" | "clinic_money:read" | "clinic_money:write" | "clinic_admin:write" | "clinic_insights:read" | "finanzas:read" | "finanzas:write" | "finanzas_reports:read" | "finanzas:export" | "finanzas_admin:write" | "finanzas_patients:read" | "finanzas_payroll:read" | "sandbox:read" | "sandbox:write" | "ads:read" | "ads:write" | "healthatom:read" | "healthatom:write" | "reservo:read" | "reservo:write" | "rexplus:read" | "rexplus:write" | "billing:read" | "billing:write" | "copilot:read" | "copilot:write" | "erp_copilot:use" | "tool_credentials:read" | "tool_credentials:write" | "tool_invocations:read" | "corrections:read" | "corrections:write" | "marketplace:read" | "marketplace:write" | "stock:read" | "storefront_events:write" | "pricing:read" | "pricing:write" | "roi:read" | "appointments:read" | "appointments:write" | "appointments:delete" | "schedule_config:write" | "appointments:intake" | "appointment_types:read" | "appointment_types:write" | "service_lifecycle:read" | "service_lifecycle:write" | "outbound_approvals:read" | "outbound_approvals:write" | "outbound_holds:read" | "outbound_holds:write" | "campaigns:read" | "campaigns:write" | "consignments:read" | "consignments:write" | "stock_dedup:read" | "stock_dedup:write" | "stock_photo_mirror:read" | "stock_photo_mirror:write" | "stock_retirement:read" | "stock_retirement:write" | "dealership_economics:read" | "dealership_economics:write" | "document_templates:read" | "document_templates:write" | "vehicle_registry:read" | "vehicle_registry:write" | "vehicle_pipeline:read" | "vehicle_pipeline:write" | "sale_notes:read" | "sale_notes:write" | "sale_notes:void" | "transfer_cases:read" | "transfer_cases:write" | "credit_applications:read" | "credit_applications:write" | "seller_compensation:read" | "seller_compensation:write" | "sales_leaderboard:read" | "quotes:read" | "quotes:write" | "quotes:void" | "reservations:read" | "reservations:write" | "reservations:void" | "reservations:dispose_abono" | "organization_legal:read" | "organization_legal:write" | "purchase_notes:read" | "purchase_notes:write" | "purchase_notes:void" | "document_payments:read" | "document_payments:write" | "tenant_bank_accounts:read" | "tenant_bank_accounts:write" | "bank_movements:read" | "bank_movements:write" | "payments:read" | "payments:write" | "payments:reverse" | "orders:read" | "orders:write" | "orders:checkout" | "orders:refund" | "price_approval:read" | "price_approval:request" | "price_approval:approve" | "cotizacion_discount:approve" | "legal:read" | "legal:write")[];
144016
144098
  /** Format: date-time */
144017
144099
  expires_at?: string | null;
144018
144100
  };
@@ -279219,12 +279301,19 @@ interface components {
279219
279301
  id: string;
279220
279302
  name: string | null;
279221
279303
  } | null;
279304
+ /** @description A person on payroll. Without `finanzas_payroll:read` («Ver remuneraciones») the name reads «Persona (remuneraciones)» and the RUT is null. */
279305
+ is_payroll: boolean;
279222
279306
  movement_count: number;
279223
279307
  document_count: number;
279224
279308
  /** @description Non-null = merged away; use the survivor. */
279225
279309
  merged_into_id: string | null;
279226
279310
  /** @description Its own payment terms in days (0–365); null = the workspace default of each document class (Ajustes › Plazos de pago). */
279227
279311
  payment_terms_days: number | null;
279312
+ /**
279313
+ * @description Where `payment_terms_days` came from: chipax (the importer read it) or manual (a person set it); null when it has no terms of its own.
279314
+ * @enum {string|null}
279315
+ */
279316
+ payment_terms_source: "chipax" | "manual" | null;
279228
279317
  created_at: string;
279229
279318
  updated_at: string;
279230
279319
  };
@@ -279263,6 +279352,11 @@ interface components {
279263
279352
  days: number;
279264
279353
  /** @enum {string} */
279265
279354
  source: "contraparte" | "workspace" | "default";
279355
+ /**
279356
+ * @description Where the number comes from: chipax (read from the Chipax company by the importer), manual (set by a person in Ajustes or on the Contraparte), default (the built-in 30 / 30 / 0 / 0).
279357
+ * @enum {string}
279358
+ */
279359
+ origin: "chipax" | "default" | "manual";
279266
279360
  }[];
279267
279361
  };
279268
279362
  FinanzasContraparteAlias: {
@@ -279456,10 +279550,10 @@ interface components {
279456
279550
  };
279457
279551
  due_date: string | null;
279458
279552
  /**
279459
- * @description por_pagar (a sale: por cobrar) | parcial | pagado. Derived from reconciliation by later slices.
279553
+ * @description por_pagar (a sale: por cobrar) | parcial | pagado | vencido_heredado. Derived from reconciliation; vencido_heredado = a payable imported more than 90 days overdue (Finanzas 39): out of the cash-flow projection, the Contraparte balances and «Le debemos» until someone marks it pagado or anulado.
279460
279554
  * @enum {string}
279461
279555
  */
279462
- payment_state: "por_pagar" | "parcial" | "pagado";
279556
+ payment_state: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
279463
279557
  /** @description REGISTRO | PENDIENTE | NO_INCLUIR | RECLAMADO (purchases). */
279464
279558
  sii_estado_contable: string | null;
279465
279559
  /** @description The SII register no longer lists it; out of the libro. */
@@ -279597,6 +279691,11 @@ interface components {
279597
279691
  label: string;
279598
279692
  days: number;
279599
279693
  customized: boolean;
279694
+ /**
279695
+ * @description Where the number comes from: chipax (read from the Chipax company by the importer), manual (set by a person in Ajustes or on the Contraparte), default (the built-in 30 / 30 / 0 / 0).
279696
+ * @enum {string}
279697
+ */
279698
+ source: "chipax" | "default" | "manual";
279600
279699
  updated_at: string | null;
279601
279700
  };
279602
279701
  FinanzasPaymentTermsResult: {
@@ -279609,6 +279708,14 @@ interface components {
279609
279708
  honorarios?: number;
279610
279709
  expenses?: number;
279611
279710
  };
279711
+ FinanzasCashPendingSummary: {
279712
+ /** @description Whole CLP of cash still to deposit (the standing list of the last `window_days` days up to yesterday, minus what deposits already cover). */
279713
+ amount_clp: number;
279714
+ /** @description The window the amount is read over (60). */
279715
+ window_days: number;
279716
+ /** @description Last day the Flujo expects the deposits (5 business days from today); null when nothing is pending. */
279717
+ expected_until: string | null;
279718
+ };
279612
279719
  FinanzasMovementComment: {
279613
279720
  id: string;
279614
279721
  body: string;
@@ -280448,7 +280555,7 @@ interface components {
280448
280555
  paid_clp: number;
280449
280556
  outstanding_clp: number;
280450
280557
  /** @enum {string} */
280451
- payment_state: "por_pagar" | "parcial" | "pagado";
280558
+ payment_state: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
280452
280559
  };
280453
280560
  links: components["schemas"]["FinanzasLink"][];
280454
280561
  candidates: {
@@ -280495,6 +280602,7 @@ interface components {
280495
280602
  };
280496
280603
  }[];
280497
280604
  total_remaining_clp: number;
280605
+ pending: components["schemas"]["FinanzasCashPendingSummary"] & unknown;
280498
280606
  };
280499
280607
  FinanzasCommissions: {
280500
280608
  items: {
@@ -281285,6 +281393,19 @@ interface components {
281285
281393
  rut: string;
281286
281394
  days: number;
281287
281395
  documents: number;
281396
+ /**
281397
+ * @description chipax = the supplier's own term in Chipax; inferred = from the due dates of its invoices.
281398
+ * @enum {string}
281399
+ */
281400
+ origin?: "chipax" | "inferred";
281401
+ }[];
281402
+ /** @description The company's default payment terms per class, as Chipax holds them. */
281403
+ defaults?: {
281404
+ /** @enum {string} */
281405
+ class: "suppliers" | "customers" | "honorarios" | "expenses";
281406
+ days: number;
281407
+ /** @description False when Vitrina already holds that number, or a person set another one (never overwritten). */
281408
+ changed: boolean;
281288
281409
  }[];
281289
281410
  };
281290
281411
  aliases: {
@@ -281647,7 +281768,7 @@ interface components {
281647
281768
  /** @description Stable item key: document:<uuid>, recurring:<uuid>:<YYYY-MM-DD>, retention:<YYYY-MM>, rescue:<uuid>, cuotas:<day>, appointments:<day>, cash_pending. */
281648
281769
  key: string;
281649
281770
  /**
281650
- * @description payable = a purchase, honorario or gasto by due date; receivable = a sale or issued honorario by due date; retention = the retención of honorarios received, due with the F29; recurring = a recurring item occurrence; cuotas = patient cuotas of the day; appointments = booked appointments with a price of the day; cash_pending = efectivo por depositar: only payments made in cash, still to deposit, today; card_settlement = card payments a processor has not paid out yet, on their payout day (2 business days, Chile holidays skipped); a transfer with no bank match is not projected (it is a Por resolver case); rescue = a planned «Rescatar fondo».
281771
+ * @description payable = a purchase, honorario or gasto by due date; receivable = a sale or issued honorario by due date; retention = the retención of honorarios received, due with the F29; recurring = a recurring item occurrence; cuotas = patient cuotas of the day; appointments = booked appointments with a price of the day; cash_pending = efectivo por depositar (the one shared amount, `cash_pending`), spread over its expected deposit days (the next 5 business days), never all on today; card_settlement = card payments a processor has not paid out yet, on their payout day (2 business days, Chile holidays skipped); a transfer with no bank match is not projected (it is a Por resolver case); rescue = a planned «Rescatar fondo».
281651
281772
  * @enum {string}
281652
281773
  */
281653
281774
  source: "payable" | "receivable" | "retention" | "recurring" | "cuotas" | "appointments" | "cash_pending" | "card_settlement" | "rescue";
@@ -281688,8 +281809,16 @@ interface components {
281688
281809
  date: string;
281689
281810
  balance_clp: number;
281690
281811
  negative: boolean;
281812
+ /** @description True when the lowest point is today (today's real balance, or a projected today lower than it): the screen says «Hoy es el punto más bajo». The balance is never above «Caja hoy». */
281813
+ is_today: boolean;
281691
281814
  cause: components["schemas"]["FinanzasCashFlowItem"];
281692
281815
  } | null;
281816
+ /** @description Payables imported more than 90 days overdue («Vencido heredado»): not in the projection nor in the balances; reviewed in bulk in Mes en paralelo. */
281817
+ FinanzasInheritedOverdue: {
281818
+ count: number;
281819
+ /** @description What is still open on them (total − retención − links). */
281820
+ amount_clp: number;
281821
+ };
281693
281822
  FinanzasCashFlowRescue: {
281694
281823
  id: string;
281695
281824
  planned_on: string;
@@ -281768,6 +281897,8 @@ interface components {
281768
281897
  receivables_clp: number;
281769
281898
  receivables_count: number;
281770
281899
  };
281900
+ inherited_overdue: components["schemas"]["FinanzasInheritedOverdue"];
281901
+ cash_pending: components["schemas"]["FinanzasCashPendingSummary"];
281771
281902
  /** @description What the typical weekday income stands on. `insufficient_history` = fewer than 4 weeks of bank history: no typical income is projected (every `typical_inflow_clp` is 0 and there is no band) and the page should say so. */
281772
281903
  typical_income: {
281773
281904
  /** @enum {string} */
@@ -282193,7 +282324,21 @@ interface components {
282193
282324
  } | null;
282194
282325
  /** @description Costo hora sillón (clinics only): fijos ÷ available chair-hours (chairs × opening hours), all costs ÷ attended hours, occupancy and production per attended hour, per branch and total. */
282195
282326
  hora_sillon: {
282327
+ /** @description Total chairs counted (same as `chairs_source.count`). */
282196
282328
  chairs: number;
282329
+ /** @description Where the chair count comes from. */
282330
+ chairs_source: {
282331
+ count: number;
282332
+ /**
282333
+ * @description `resources`: the clinic’s active boxes/sillones (native or mirrored from its previous system); `override`: the owner’s count; `none`: no chairs known (ask «¿Cuántos sillones tienes?»).
282334
+ * @enum {string}
282335
+ */
282336
+ source: "resources" | "override" | "none";
282337
+ /** @description User-facing origin: «de tu agenda», «de Dentalink», «de Medilink», «elegido por ti»; null when `source` is `none`. */
282338
+ source_label: string | null;
282339
+ };
282340
+ /** @description Weekday (Mon–Fri) lunch break already subtracted from `available_hours` on days open 6 h or more. */
282341
+ lunch_break_minutes: number;
282197
282342
  /** @description Hours per entry of `months`, one decimal. */
282198
282343
  available_hours: number[];
282199
282344
  /** @description Hours per entry of `months`, one decimal. */
@@ -282238,6 +282383,10 @@ interface components {
282238
282383
  /** @description The accounts that are the treating dentist’s share (with everything under them); null = detected from the plan de cuentas. */
282239
282384
  professional_account_ids: string[] | null;
282240
282385
  effective_professional_account_ids: string[];
282386
+ /** @description Chairs the owner says the clinic has (1–200); wins over the resources. Null = count the clinic’s resources. */
282387
+ chairs_override: number | null;
282388
+ /** @description Weekday lunch break in minutes taken off the available chair-hours; null = the default, 60. */
282389
+ lunch_break_minutes: number | null;
282241
282390
  updated_by: string | null;
282242
282391
  updated_at: string | null;
282243
282392
  };
@@ -282285,6 +282434,7 @@ interface components {
282285
282434
  receivables_clp: number;
282286
282435
  receivables_count: number;
282287
282436
  };
282437
+ inherited_overdue: components["schemas"]["FinanzasInheritedOverdue"];
282288
282438
  /** @description The runway: one point per day, today … today + 30. */
282289
282439
  points: {
282290
282440
  date: string;
@@ -282532,6 +282682,8 @@ interface components {
282532
282682
  charges_synced_at: string | null;
282533
282683
  charges_synced: number;
282534
282684
  charges_linked: number;
282685
+ /** @description Billing charges older than a week that no card line has been matched to («por conciliar»). */
282686
+ charges_unreconciled: number;
282535
282687
  /** @description Spend per month over the last read (92 days), smallest unit of `currency`. */
282536
282688
  spend_by_month: {
282537
282689
  /** @example 2026-10 */