@vitrina/api 17.14.0 → 17.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +154 -14
- package/dist/index.d.ts +154 -14
- package/package.json +1 -1
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 (
|
|
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 (
|
|
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",
|
|
@@ -91739,6 +91789,12 @@ interface paths {
|
|
|
91739
91789
|
* },
|
|
91740
91790
|
* "hora_sillon": {
|
|
91741
91791
|
* "chairs": 6,
|
|
91792
|
+
* "chairs_source": {
|
|
91793
|
+
* "count": 6,
|
|
91794
|
+
* "source": "resources",
|
|
91795
|
+
* "source_label": "de tu agenda"
|
|
91796
|
+
* },
|
|
91797
|
+
* "lunch_break_minutes": 60,
|
|
91742
91798
|
* "available_hours": [
|
|
91743
91799
|
* 1440,
|
|
91744
91800
|
* 1056
|
|
@@ -91902,6 +91958,8 @@ interface paths {
|
|
|
91902
91958
|
* "effective_professional_account_ids": [
|
|
91903
91959
|
* "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6101"
|
|
91904
91960
|
* ],
|
|
91961
|
+
* "chairs_override": null,
|
|
91962
|
+
* "lunch_break_minutes": null,
|
|
91905
91963
|
* "updated_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6301",
|
|
91906
91964
|
* "updated_at": "2026-10-31T12:00:00.000Z"
|
|
91907
91965
|
* }
|
|
@@ -91975,7 +92033,7 @@ interface paths {
|
|
|
91975
92033
|
head?: never;
|
|
91976
92034
|
/**
|
|
91977
92035
|
* 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`.
|
|
92036
|
+
* @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
92037
|
*/
|
|
91980
92038
|
patch: {
|
|
91981
92039
|
parameters: {
|
|
@@ -91995,6 +92053,10 @@ interface paths {
|
|
|
91995
92053
|
reference_share_enabled?: boolean;
|
|
91996
92054
|
reference_share_bps?: number;
|
|
91997
92055
|
professional_account_ids?: string[] | null;
|
|
92056
|
+
/** @description Set the number of chairs, or null to go back to the clinic’s resources. */
|
|
92057
|
+
chairs_override?: number | null;
|
|
92058
|
+
/** @description Weekday lunch break in minutes; null = default (60). */
|
|
92059
|
+
lunch_break_minutes?: number | null;
|
|
91998
92060
|
};
|
|
91999
92061
|
};
|
|
92000
92062
|
};
|
|
@@ -92014,6 +92076,8 @@ interface paths {
|
|
|
92014
92076
|
* "effective_professional_account_ids": [
|
|
92015
92077
|
* "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6101"
|
|
92016
92078
|
* ],
|
|
92079
|
+
* "chairs_override": null,
|
|
92080
|
+
* "lunch_break_minutes": null,
|
|
92017
92081
|
* "updated_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6301",
|
|
92018
92082
|
* "updated_at": "2026-10-31T12:00:00.000Z"
|
|
92019
92083
|
* }
|
|
@@ -92148,6 +92212,7 @@ interface paths {
|
|
|
92148
92212
|
* "date": "2026-11-06",
|
|
92149
92213
|
* "balance_clp": -412000,
|
|
92150
92214
|
* "negative": true,
|
|
92215
|
+
* "is_today": false,
|
|
92151
92216
|
* "cause": {
|
|
92152
92217
|
* "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
|
|
92153
92218
|
* "source": "payable",
|
|
@@ -92212,6 +92277,10 @@ interface paths {
|
|
|
92212
92277
|
* "receivables_clp": 380000,
|
|
92213
92278
|
* "receivables_count": 2
|
|
92214
92279
|
* },
|
|
92280
|
+
* "inherited_overdue": {
|
|
92281
|
+
* "count": 0,
|
|
92282
|
+
* "amount_clp": 0
|
|
92283
|
+
* },
|
|
92215
92284
|
* "points": [
|
|
92216
92285
|
* {
|
|
92217
92286
|
* "date": "2026-10-30",
|
|
@@ -92897,6 +92966,7 @@ interface paths {
|
|
|
92897
92966
|
* "charges_synced_at": "2026-10-31T12:26:04.120Z",
|
|
92898
92967
|
* "charges_synced": 40,
|
|
92899
92968
|
* "charges_linked": 38,
|
|
92969
|
+
* "charges_unreconciled": 2,
|
|
92900
92970
|
* "spend_by_month": [
|
|
92901
92971
|
* {
|
|
92902
92972
|
* "month": "2026-10",
|
|
@@ -144012,7 +144082,7 @@ interface paths {
|
|
|
144012
144082
|
*/
|
|
144013
144083
|
"application/json": {
|
|
144014
144084
|
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")[];
|
|
144085
|
+
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
144086
|
/** Format: date-time */
|
|
144017
144087
|
expires_at?: string | null;
|
|
144018
144088
|
};
|
|
@@ -279219,12 +279289,19 @@ interface components {
|
|
|
279219
279289
|
id: string;
|
|
279220
279290
|
name: string | null;
|
|
279221
279291
|
} | null;
|
|
279292
|
+
/** @description A person on payroll. Without `finanzas_payroll:read` («Ver remuneraciones») the name reads «Persona (remuneraciones)» and the RUT is null. */
|
|
279293
|
+
is_payroll: boolean;
|
|
279222
279294
|
movement_count: number;
|
|
279223
279295
|
document_count: number;
|
|
279224
279296
|
/** @description Non-null = merged away; use the survivor. */
|
|
279225
279297
|
merged_into_id: string | null;
|
|
279226
279298
|
/** @description Its own payment terms in days (0–365); null = the workspace default of each document class (Ajustes › Plazos de pago). */
|
|
279227
279299
|
payment_terms_days: number | null;
|
|
279300
|
+
/**
|
|
279301
|
+
* @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.
|
|
279302
|
+
* @enum {string|null}
|
|
279303
|
+
*/
|
|
279304
|
+
payment_terms_source: "chipax" | "manual" | null;
|
|
279228
279305
|
created_at: string;
|
|
279229
279306
|
updated_at: string;
|
|
279230
279307
|
};
|
|
@@ -279263,6 +279340,11 @@ interface components {
|
|
|
279263
279340
|
days: number;
|
|
279264
279341
|
/** @enum {string} */
|
|
279265
279342
|
source: "contraparte" | "workspace" | "default";
|
|
279343
|
+
/**
|
|
279344
|
+
* @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).
|
|
279345
|
+
* @enum {string}
|
|
279346
|
+
*/
|
|
279347
|
+
origin: "chipax" | "default" | "manual";
|
|
279266
279348
|
}[];
|
|
279267
279349
|
};
|
|
279268
279350
|
FinanzasContraparteAlias: {
|
|
@@ -279456,10 +279538,10 @@ interface components {
|
|
|
279456
279538
|
};
|
|
279457
279539
|
due_date: string | null;
|
|
279458
279540
|
/**
|
|
279459
|
-
* @description por_pagar (a sale: por cobrar) | parcial | pagado. Derived from reconciliation
|
|
279541
|
+
* @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
279542
|
* @enum {string}
|
|
279461
279543
|
*/
|
|
279462
|
-
payment_state: "por_pagar" | "parcial" | "pagado";
|
|
279544
|
+
payment_state: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
|
|
279463
279545
|
/** @description REGISTRO | PENDIENTE | NO_INCLUIR | RECLAMADO (purchases). */
|
|
279464
279546
|
sii_estado_contable: string | null;
|
|
279465
279547
|
/** @description The SII register no longer lists it; out of the libro. */
|
|
@@ -279597,6 +279679,11 @@ interface components {
|
|
|
279597
279679
|
label: string;
|
|
279598
279680
|
days: number;
|
|
279599
279681
|
customized: boolean;
|
|
279682
|
+
/**
|
|
279683
|
+
* @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).
|
|
279684
|
+
* @enum {string}
|
|
279685
|
+
*/
|
|
279686
|
+
source: "chipax" | "default" | "manual";
|
|
279600
279687
|
updated_at: string | null;
|
|
279601
279688
|
};
|
|
279602
279689
|
FinanzasPaymentTermsResult: {
|
|
@@ -279609,6 +279696,14 @@ interface components {
|
|
|
279609
279696
|
honorarios?: number;
|
|
279610
279697
|
expenses?: number;
|
|
279611
279698
|
};
|
|
279699
|
+
FinanzasCashPendingSummary: {
|
|
279700
|
+
/** @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). */
|
|
279701
|
+
amount_clp: number;
|
|
279702
|
+
/** @description The window the amount is read over (60). */
|
|
279703
|
+
window_days: number;
|
|
279704
|
+
/** @description Last day the Flujo expects the deposits (5 business days from today); null when nothing is pending. */
|
|
279705
|
+
expected_until: string | null;
|
|
279706
|
+
};
|
|
279612
279707
|
FinanzasMovementComment: {
|
|
279613
279708
|
id: string;
|
|
279614
279709
|
body: string;
|
|
@@ -280448,7 +280543,7 @@ interface components {
|
|
|
280448
280543
|
paid_clp: number;
|
|
280449
280544
|
outstanding_clp: number;
|
|
280450
280545
|
/** @enum {string} */
|
|
280451
|
-
payment_state: "por_pagar" | "parcial" | "pagado";
|
|
280546
|
+
payment_state: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
|
|
280452
280547
|
};
|
|
280453
280548
|
links: components["schemas"]["FinanzasLink"][];
|
|
280454
280549
|
candidates: {
|
|
@@ -280495,6 +280590,7 @@ interface components {
|
|
|
280495
280590
|
};
|
|
280496
280591
|
}[];
|
|
280497
280592
|
total_remaining_clp: number;
|
|
280593
|
+
pending: components["schemas"]["FinanzasCashPendingSummary"] & unknown;
|
|
280498
280594
|
};
|
|
280499
280595
|
FinanzasCommissions: {
|
|
280500
280596
|
items: {
|
|
@@ -281285,6 +281381,19 @@ interface components {
|
|
|
281285
281381
|
rut: string;
|
|
281286
281382
|
days: number;
|
|
281287
281383
|
documents: number;
|
|
281384
|
+
/**
|
|
281385
|
+
* @description chipax = the supplier's own term in Chipax; inferred = from the due dates of its invoices.
|
|
281386
|
+
* @enum {string}
|
|
281387
|
+
*/
|
|
281388
|
+
origin?: "chipax" | "inferred";
|
|
281389
|
+
}[];
|
|
281390
|
+
/** @description The company's default payment terms per class, as Chipax holds them. */
|
|
281391
|
+
defaults?: {
|
|
281392
|
+
/** @enum {string} */
|
|
281393
|
+
class: "suppliers" | "customers" | "honorarios" | "expenses";
|
|
281394
|
+
days: number;
|
|
281395
|
+
/** @description False when Vitrina already holds that number, or a person set another one (never overwritten). */
|
|
281396
|
+
changed: boolean;
|
|
281288
281397
|
}[];
|
|
281289
281398
|
};
|
|
281290
281399
|
aliases: {
|
|
@@ -281647,7 +281756,7 @@ interface components {
|
|
|
281647
281756
|
/** @description Stable item key: document:<uuid>, recurring:<uuid>:<YYYY-MM-DD>, retention:<YYYY-MM>, rescue:<uuid>, cuotas:<day>, appointments:<day>, cash_pending. */
|
|
281648
281757
|
key: string;
|
|
281649
281758
|
/**
|
|
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
|
|
281759
|
+
* @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
281760
|
* @enum {string}
|
|
281652
281761
|
*/
|
|
281653
281762
|
source: "payable" | "receivable" | "retention" | "recurring" | "cuotas" | "appointments" | "cash_pending" | "card_settlement" | "rescue";
|
|
@@ -281688,8 +281797,16 @@ interface components {
|
|
|
281688
281797
|
date: string;
|
|
281689
281798
|
balance_clp: number;
|
|
281690
281799
|
negative: boolean;
|
|
281800
|
+
/** @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». */
|
|
281801
|
+
is_today: boolean;
|
|
281691
281802
|
cause: components["schemas"]["FinanzasCashFlowItem"];
|
|
281692
281803
|
} | null;
|
|
281804
|
+
/** @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. */
|
|
281805
|
+
FinanzasInheritedOverdue: {
|
|
281806
|
+
count: number;
|
|
281807
|
+
/** @description What is still open on them (total − retención − links). */
|
|
281808
|
+
amount_clp: number;
|
|
281809
|
+
};
|
|
281693
281810
|
FinanzasCashFlowRescue: {
|
|
281694
281811
|
id: string;
|
|
281695
281812
|
planned_on: string;
|
|
@@ -281768,6 +281885,8 @@ interface components {
|
|
|
281768
281885
|
receivables_clp: number;
|
|
281769
281886
|
receivables_count: number;
|
|
281770
281887
|
};
|
|
281888
|
+
inherited_overdue: components["schemas"]["FinanzasInheritedOverdue"];
|
|
281889
|
+
cash_pending: components["schemas"]["FinanzasCashPendingSummary"];
|
|
281771
281890
|
/** @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
281891
|
typical_income: {
|
|
281773
281892
|
/** @enum {string} */
|
|
@@ -282193,7 +282312,21 @@ interface components {
|
|
|
282193
282312
|
} | null;
|
|
282194
282313
|
/** @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
282314
|
hora_sillon: {
|
|
282315
|
+
/** @description Total chairs counted (same as `chairs_source.count`). */
|
|
282196
282316
|
chairs: number;
|
|
282317
|
+
/** @description Where the chair count comes from. */
|
|
282318
|
+
chairs_source: {
|
|
282319
|
+
count: number;
|
|
282320
|
+
/**
|
|
282321
|
+
* @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?»).
|
|
282322
|
+
* @enum {string}
|
|
282323
|
+
*/
|
|
282324
|
+
source: "resources" | "override" | "none";
|
|
282325
|
+
/** @description User-facing origin: «de tu agenda», «de Dentalink», «de Medilink», «elegido por ti»; null when `source` is `none`. */
|
|
282326
|
+
source_label: string | null;
|
|
282327
|
+
};
|
|
282328
|
+
/** @description Weekday (Mon–Fri) lunch break already subtracted from `available_hours` on days open 6 h or more. */
|
|
282329
|
+
lunch_break_minutes: number;
|
|
282197
282330
|
/** @description Hours per entry of `months`, one decimal. */
|
|
282198
282331
|
available_hours: number[];
|
|
282199
282332
|
/** @description Hours per entry of `months`, one decimal. */
|
|
@@ -282238,6 +282371,10 @@ interface components {
|
|
|
282238
282371
|
/** @description The accounts that are the treating dentist’s share (with everything under them); null = detected from the plan de cuentas. */
|
|
282239
282372
|
professional_account_ids: string[] | null;
|
|
282240
282373
|
effective_professional_account_ids: string[];
|
|
282374
|
+
/** @description Chairs the owner says the clinic has (1–200); wins over the resources. Null = count the clinic’s resources. */
|
|
282375
|
+
chairs_override: number | null;
|
|
282376
|
+
/** @description Weekday lunch break in minutes taken off the available chair-hours; null = the default, 60. */
|
|
282377
|
+
lunch_break_minutes: number | null;
|
|
282241
282378
|
updated_by: string | null;
|
|
282242
282379
|
updated_at: string | null;
|
|
282243
282380
|
};
|
|
@@ -282285,6 +282422,7 @@ interface components {
|
|
|
282285
282422
|
receivables_clp: number;
|
|
282286
282423
|
receivables_count: number;
|
|
282287
282424
|
};
|
|
282425
|
+
inherited_overdue: components["schemas"]["FinanzasInheritedOverdue"];
|
|
282288
282426
|
/** @description The runway: one point per day, today … today + 30. */
|
|
282289
282427
|
points: {
|
|
282290
282428
|
date: string;
|
|
@@ -282532,6 +282670,8 @@ interface components {
|
|
|
282532
282670
|
charges_synced_at: string | null;
|
|
282533
282671
|
charges_synced: number;
|
|
282534
282672
|
charges_linked: number;
|
|
282673
|
+
/** @description Billing charges older than a week that no card line has been matched to («por conciliar»). */
|
|
282674
|
+
charges_unreconciled: number;
|
|
282535
282675
|
/** @description Spend per month over the last read (92 days), smallest unit of `currency`. */
|
|
282536
282676
|
spend_by_month: {
|
|
282537
282677
|
/** @example 2026-10 */
|