@vitrina/api 17.13.2 → 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 +420 -28
- package/dist/index.d.ts +420 -28
- 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
|
};
|
|
@@ -76551,7 +76577,16 @@ interface paths {
|
|
|
76551
76577
|
* "on": "2026-09-30"
|
|
76552
76578
|
* },
|
|
76553
76579
|
* "opening_balance_editable": true,
|
|
76554
|
-
* "movement_count": 312
|
|
76580
|
+
* "movement_count": 312,
|
|
76581
|
+
* "agent_sharing": {
|
|
76582
|
+
* "shared": true,
|
|
76583
|
+
* "alias": "Banco de Chile ··4821",
|
|
76584
|
+
* "holder_name": "Clínica Ejemplo SpA",
|
|
76585
|
+
* "holder_rut": "76123456-7",
|
|
76586
|
+
* "holder_email": null,
|
|
76587
|
+
* "account_type": "corriente"
|
|
76588
|
+
* },
|
|
76589
|
+
* "can_share_with_agent": true
|
|
76555
76590
|
* }
|
|
76556
76591
|
* ],
|
|
76557
76592
|
* "total_clp": 8450000,
|
|
@@ -76811,7 +76846,151 @@ interface paths {
|
|
|
76811
76846
|
* "on": "2026-09-30"
|
|
76812
76847
|
* },
|
|
76813
76848
|
* "opening_balance_editable": true,
|
|
76814
|
-
* "movement_count": 312
|
|
76849
|
+
* "movement_count": 312,
|
|
76850
|
+
* "agent_sharing": {
|
|
76851
|
+
* "shared": true,
|
|
76852
|
+
* "alias": "Banco de Chile ··4821",
|
|
76853
|
+
* "holder_name": "Clínica Ejemplo SpA",
|
|
76854
|
+
* "holder_rut": "76123456-7",
|
|
76855
|
+
* "holder_email": null,
|
|
76856
|
+
* "account_type": "corriente"
|
|
76857
|
+
* },
|
|
76858
|
+
* "can_share_with_agent": true
|
|
76859
|
+
* }
|
|
76860
|
+
* }
|
|
76861
|
+
*/
|
|
76862
|
+
"application/json": {
|
|
76863
|
+
data: components["schemas"]["FinanzasBankAccount"];
|
|
76864
|
+
};
|
|
76865
|
+
};
|
|
76866
|
+
};
|
|
76867
|
+
/** @description Validation error */
|
|
76868
|
+
400: {
|
|
76869
|
+
headers: {
|
|
76870
|
+
[name: string]: unknown;
|
|
76871
|
+
};
|
|
76872
|
+
content: {
|
|
76873
|
+
"application/json": components["schemas"]["Error"];
|
|
76874
|
+
};
|
|
76875
|
+
};
|
|
76876
|
+
/** @description Unauthorized */
|
|
76877
|
+
401: {
|
|
76878
|
+
headers: {
|
|
76879
|
+
[name: string]: unknown;
|
|
76880
|
+
};
|
|
76881
|
+
content: {
|
|
76882
|
+
"application/json": components["schemas"]["Error"];
|
|
76883
|
+
};
|
|
76884
|
+
};
|
|
76885
|
+
/** @description Forbidden */
|
|
76886
|
+
403: {
|
|
76887
|
+
headers: {
|
|
76888
|
+
[name: string]: unknown;
|
|
76889
|
+
};
|
|
76890
|
+
content: {
|
|
76891
|
+
"application/json": components["schemas"]["Error"];
|
|
76892
|
+
};
|
|
76893
|
+
};
|
|
76894
|
+
/** @description Not found */
|
|
76895
|
+
404: {
|
|
76896
|
+
headers: {
|
|
76897
|
+
[name: string]: unknown;
|
|
76898
|
+
};
|
|
76899
|
+
content: {
|
|
76900
|
+
"application/json": components["schemas"]["Error"];
|
|
76901
|
+
};
|
|
76902
|
+
};
|
|
76903
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
76904
|
+
409: {
|
|
76905
|
+
headers: {
|
|
76906
|
+
[name: string]: unknown;
|
|
76907
|
+
};
|
|
76908
|
+
content: {
|
|
76909
|
+
"application/json": components["schemas"]["Error"];
|
|
76910
|
+
};
|
|
76911
|
+
};
|
|
76912
|
+
/** @description Rate limited */
|
|
76913
|
+
429: {
|
|
76914
|
+
headers: {
|
|
76915
|
+
[name: string]: unknown;
|
|
76916
|
+
};
|
|
76917
|
+
content: {
|
|
76918
|
+
"application/json": components["schemas"]["Error"];
|
|
76919
|
+
};
|
|
76920
|
+
};
|
|
76921
|
+
};
|
|
76922
|
+
};
|
|
76923
|
+
trace?: never;
|
|
76924
|
+
};
|
|
76925
|
+
"/finanzas/bank-accounts/{id}/agent-sharing": {
|
|
76926
|
+
parameters: {
|
|
76927
|
+
query?: never;
|
|
76928
|
+
header?: never;
|
|
76929
|
+
path?: never;
|
|
76930
|
+
cookie?: never;
|
|
76931
|
+
};
|
|
76932
|
+
get?: never;
|
|
76933
|
+
/**
|
|
76934
|
+
* Share a bank account with the AI agent (or stop)
|
|
76935
|
+
* @description One bank-account registry (Finanzas 33): the Finanzas bank accounts are the workspace's accounts, and «el agente comparte esta cuenta» is a flag on one of them. `shared: true` makes the AI agent dictate this account for transfers and matches abonos into it (the same registry `GET /tenant-bank-accounts` lists); `false` stops it, keeping the row. The first share needs `holder_name` (400 `VALIDATION_ERROR`, `details.reason = agent_sharing_holder_required`); `holder_rut` defaults to the workspace's SII RUT. 409 `CONFLICT` with `details.reason = agent_sharing_not_supported` for a card, a credit line, a USD account or a number known only by its last digits. Audited. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write`.
|
|
76936
|
+
*/
|
|
76937
|
+
put: {
|
|
76938
|
+
parameters: {
|
|
76939
|
+
query?: never;
|
|
76940
|
+
header?: never;
|
|
76941
|
+
path: {
|
|
76942
|
+
id: string;
|
|
76943
|
+
};
|
|
76944
|
+
cookie?: never;
|
|
76945
|
+
};
|
|
76946
|
+
requestBody?: {
|
|
76947
|
+
content: {
|
|
76948
|
+
/**
|
|
76949
|
+
* @example {
|
|
76950
|
+
* "shared": true,
|
|
76951
|
+
* "holder_name": "Clínica Ejemplo SpA"
|
|
76952
|
+
* }
|
|
76953
|
+
*/
|
|
76954
|
+
"application/json": components["schemas"]["FinanzasAgentSharingBody"];
|
|
76955
|
+
};
|
|
76956
|
+
};
|
|
76957
|
+
responses: {
|
|
76958
|
+
/** @description The account */
|
|
76959
|
+
200: {
|
|
76960
|
+
headers: {
|
|
76961
|
+
[name: string]: unknown;
|
|
76962
|
+
};
|
|
76963
|
+
content: {
|
|
76964
|
+
/**
|
|
76965
|
+
* @example {
|
|
76966
|
+
* "data": {
|
|
76967
|
+
* "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4a6c",
|
|
76968
|
+
* "name": "Cuenta corriente",
|
|
76969
|
+
* "institution_name": "Banco de Chile",
|
|
76970
|
+
* "number_masked": "****4821",
|
|
76971
|
+
* "type": "cuenta_corriente",
|
|
76972
|
+
* "currency": "CLP",
|
|
76973
|
+
* "source": "manual",
|
|
76974
|
+
* "has_feed": false,
|
|
76975
|
+
* "balance_clp": 8450000,
|
|
76976
|
+
* "balance_original": null,
|
|
76977
|
+
* "balance_as_of": "2026-10-30T08:00:00.000Z",
|
|
76978
|
+
* "balance_source": "computed",
|
|
76979
|
+
* "opening_balance": {
|
|
76980
|
+
* "amount_minor": 5000000,
|
|
76981
|
+
* "on": "2026-09-30"
|
|
76982
|
+
* },
|
|
76983
|
+
* "opening_balance_editable": true,
|
|
76984
|
+
* "movement_count": 312,
|
|
76985
|
+
* "agent_sharing": {
|
|
76986
|
+
* "shared": true,
|
|
76987
|
+
* "alias": "Banco de Chile ··4821",
|
|
76988
|
+
* "holder_name": "Clínica Ejemplo SpA",
|
|
76989
|
+
* "holder_rut": "76123456-7",
|
|
76990
|
+
* "holder_email": null,
|
|
76991
|
+
* "account_type": "corriente"
|
|
76992
|
+
* },
|
|
76993
|
+
* "can_share_with_agent": true
|
|
76815
76994
|
* }
|
|
76816
76995
|
* }
|
|
76817
76996
|
*/
|
|
@@ -76876,6 +77055,11 @@ interface paths {
|
|
|
76876
77055
|
};
|
|
76877
77056
|
};
|
|
76878
77057
|
};
|
|
77058
|
+
post?: never;
|
|
77059
|
+
delete?: never;
|
|
77060
|
+
options?: never;
|
|
77061
|
+
head?: never;
|
|
77062
|
+
patch?: never;
|
|
76879
77063
|
trace?: never;
|
|
76880
77064
|
};
|
|
76881
77065
|
"/finanzas/documents": {
|
|
@@ -76899,7 +77083,7 @@ interface paths {
|
|
|
76899
77083
|
from?: string;
|
|
76900
77084
|
to?: string;
|
|
76901
77085
|
contraparte_id?: string;
|
|
76902
|
-
payment_state?: "por_pagar" | "parcial" | "pagado";
|
|
77086
|
+
payment_state?: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
|
|
76903
77087
|
dte_type?: number;
|
|
76904
77088
|
q?: string;
|
|
76905
77089
|
limit?: number;
|
|
@@ -82691,7 +82875,12 @@ interface paths {
|
|
|
82691
82875
|
* }
|
|
82692
82876
|
* }
|
|
82693
82877
|
* ],
|
|
82694
|
-
* "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
|
+
* }
|
|
82695
82884
|
* }
|
|
82696
82885
|
* }
|
|
82697
82886
|
*/
|
|
@@ -82891,7 +83080,7 @@ interface paths {
|
|
|
82891
83080
|
};
|
|
82892
83081
|
/**
|
|
82893
83082
|
* The «Por resolver» inbox: open cases, biggest first
|
|
82894
|
-
* @description A case is the open money of one Contraparte that Vitrina could not resolve on its own: bank movements nothing explains, cost documents with no account, and money out classified with no document («Falta documento»). Cases are recomputed after every bank, Mercado Pago and SII sync and before every read; only cases whose inputs changed are rewritten. Sorted by the money at stake (`order=needs_person`: the cases a person must answer first). `kind
|
|
83083
|
+
* @description A case is the open money of one Contraparte that Vitrina could not resolve on its own: bank movements nothing explains, cost documents with no account, and money out classified with no document («Falta documento»). Cases are recomputed after every bank, Mercado Pago and SII sync and before every read; only cases whose inputs changed are rewritten. Sorted by the money at stake (`order=needs_person`: the cases a person must answer first). `kind`, `month` (`YYYY-MM`: a case belongs to ONE month, its oldest item's) and `period` (deprecated: `recent` / `history`) filter; `total` and `amount_at_stake_clp` cover every open case of that filter, `counts_by_month` lists every month with open cases (the month filter's options; months «Cerrado en Chipax» hold none), `counts` splits them (needs_person / ready) and `waiting` lists the payments «esperando factura» (no case yet). Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
|
|
82895
83084
|
*/
|
|
82896
83085
|
get: {
|
|
82897
83086
|
parameters: {
|
|
@@ -82900,6 +83089,7 @@ interface paths {
|
|
|
82900
83089
|
limit?: number;
|
|
82901
83090
|
offset?: number | null;
|
|
82902
83091
|
period?: "recent" | "history" | "all";
|
|
83092
|
+
month?: string;
|
|
82903
83093
|
order?: "amount" | "needs_person";
|
|
82904
83094
|
};
|
|
82905
83095
|
header?: never;
|
|
@@ -82956,6 +83146,13 @@ interface paths {
|
|
|
82956
83146
|
* "total": 2,
|
|
82957
83147
|
* "amount_at_stake_clp": 855290,
|
|
82958
83148
|
* "since": "2026-09-01",
|
|
83149
|
+
* "counts_by_month": [
|
|
83150
|
+
* {
|
|
83151
|
+
* "month": "2026-10",
|
|
83152
|
+
* "open": 2,
|
|
83153
|
+
* "amount_clp": 855290
|
|
83154
|
+
* }
|
|
83155
|
+
* ],
|
|
82959
83156
|
* "counts": {
|
|
82960
83157
|
* "recent": 2,
|
|
82961
83158
|
* "history": 0,
|
|
@@ -84403,7 +84600,7 @@ interface paths {
|
|
|
84403
84600
|
};
|
|
84404
84601
|
/**
|
|
84405
84602
|
* Cierre de mes: each month and its state
|
|
84406
|
-
* @description The month selector, newest first: `open` (a «Por resolver» case
|
|
84603
|
+
* @description The month selector, newest first: `open` (a «Por resolver» case belongs to the month, or it has not ended), `ready_to_close` (ended, nothing open), `closed` (a person closed it) or `closed_imported` («Cerrado en Chipax»: the import closed it; it raises no cases and a change asks for a reason; `closed_source` `chipax`, `imported_at`). A case belongs to ONE month: the one of its oldest item (a movement, or a document to classify). Default: the current month and the 11 before; at most 24. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
|
|
84407
84604
|
*/
|
|
84408
84605
|
get: {
|
|
84409
84606
|
parameters: {
|
|
@@ -84436,6 +84633,8 @@ interface paths {
|
|
|
84436
84633
|
* "open_cases": 7,
|
|
84437
84634
|
* "closed_at": null,
|
|
84438
84635
|
* "closed_by": null,
|
|
84636
|
+
* "closed_source": null,
|
|
84637
|
+
* "imported_at": null,
|
|
84439
84638
|
* "adjustment_count": 0
|
|
84440
84639
|
* },
|
|
84441
84640
|
* {
|
|
@@ -84446,6 +84645,8 @@ interface paths {
|
|
|
84446
84645
|
* "open_cases": 0,
|
|
84447
84646
|
* "closed_at": "2026-10-03T14:20:00.000Z",
|
|
84448
84647
|
* "closed_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4f01",
|
|
84648
|
+
* "closed_source": "person",
|
|
84649
|
+
* "imported_at": null,
|
|
84449
84650
|
* "adjustment_count": 1
|
|
84450
84651
|
* },
|
|
84451
84652
|
* {
|
|
@@ -84456,6 +84657,8 @@ interface paths {
|
|
|
84456
84657
|
* "open_cases": 0,
|
|
84457
84658
|
* "closed_at": null,
|
|
84458
84659
|
* "closed_by": null,
|
|
84660
|
+
* "closed_source": null,
|
|
84661
|
+
* "imported_at": null,
|
|
84459
84662
|
* "adjustment_count": 0
|
|
84460
84663
|
* }
|
|
84461
84664
|
* ]
|
|
@@ -84571,6 +84774,8 @@ interface paths {
|
|
|
84571
84774
|
* "open_cases": 0,
|
|
84572
84775
|
* "closed_at": "2026-10-03T14:20:00.000Z",
|
|
84573
84776
|
* "closed_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4f01",
|
|
84777
|
+
* "closed_source": "person",
|
|
84778
|
+
* "imported_at": null,
|
|
84574
84779
|
* "closed_by_name": "Ana Pérez",
|
|
84575
84780
|
* "adjustment_count": 1,
|
|
84576
84781
|
* "can_close": false,
|
|
@@ -84772,6 +84977,8 @@ interface paths {
|
|
|
84772
84977
|
* "open_cases": 0,
|
|
84773
84978
|
* "closed_at": "2026-10-03T14:20:00.000Z",
|
|
84774
84979
|
* "closed_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f4f01",
|
|
84980
|
+
* "closed_source": "person",
|
|
84981
|
+
* "imported_at": null,
|
|
84775
84982
|
* "closed_by_name": "Ana Pérez",
|
|
84776
84983
|
* "adjustment_count": 0,
|
|
84777
84984
|
* "can_close": false,
|
|
@@ -88120,7 +88327,7 @@ interface paths {
|
|
|
88120
88327
|
};
|
|
88121
88328
|
/**
|
|
88122
88329
|
* Flujo de caja: actual, projection, band and lowest point
|
|
88123
|
-
* @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`.
|
|
88124
88331
|
*/
|
|
88125
88332
|
get: {
|
|
88126
88333
|
parameters: {
|
|
@@ -88223,6 +88430,7 @@ interface paths {
|
|
|
88223
88430
|
* "date": "2026-10-30",
|
|
88224
88431
|
* "balance_clp": 4624419,
|
|
88225
88432
|
* "negative": false,
|
|
88433
|
+
* "is_today": false,
|
|
88226
88434
|
* "cause": null
|
|
88227
88435
|
* },
|
|
88228
88436
|
* "month_end": {
|
|
@@ -88258,6 +88466,15 @@ interface paths {
|
|
|
88258
88466
|
* "receivables_clp": 0,
|
|
88259
88467
|
* "receivables_count": 0
|
|
88260
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
|
+
* },
|
|
88261
88478
|
* "typical_income": {
|
|
88262
88479
|
* "basis": "history",
|
|
88263
88480
|
* "weeks": 12
|
|
@@ -88403,7 +88620,7 @@ interface paths {
|
|
|
88403
88620
|
};
|
|
88404
88621
|
/**
|
|
88405
88622
|
* Payments calendar: what is due each day, balance after each
|
|
88406
|
-
* @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`.
|
|
88407
88624
|
*/
|
|
88408
88625
|
get: {
|
|
88409
88626
|
parameters: {
|
|
@@ -88501,6 +88718,7 @@ interface paths {
|
|
|
88501
88718
|
* "date": "2026-11-26",
|
|
88502
88719
|
* "balance_clp": -1840000,
|
|
88503
88720
|
* "negative": true,
|
|
88721
|
+
* "is_today": false,
|
|
88504
88722
|
* "cause": {
|
|
88505
88723
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
88506
88724
|
* "source": "recurring",
|
|
@@ -88661,6 +88879,7 @@ interface paths {
|
|
|
88661
88879
|
* "date": "2026-11-26",
|
|
88662
88880
|
* "balance_clp": -1840000,
|
|
88663
88881
|
* "negative": true,
|
|
88882
|
+
* "is_today": false,
|
|
88664
88883
|
* "cause": {
|
|
88665
88884
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
88666
88885
|
* "source": "recurring",
|
|
@@ -88693,6 +88912,7 @@ interface paths {
|
|
|
88693
88912
|
* "date": "2026-11-26",
|
|
88694
88913
|
* "balance_clp": 3260000,
|
|
88695
88914
|
* "negative": false,
|
|
88915
|
+
* "is_today": false,
|
|
88696
88916
|
* "cause": {
|
|
88697
88917
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
88698
88918
|
* "source": "recurring",
|
|
@@ -88845,6 +89065,7 @@ interface paths {
|
|
|
88845
89065
|
* "date": "2026-11-26",
|
|
88846
89066
|
* "balance_clp": 3260000,
|
|
88847
89067
|
* "negative": false,
|
|
89068
|
+
* "is_today": false,
|
|
88848
89069
|
* "cause": {
|
|
88849
89070
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
88850
89071
|
* "source": "recurring",
|
|
@@ -88877,6 +89098,7 @@ interface paths {
|
|
|
88877
89098
|
* "date": "2026-11-26",
|
|
88878
89099
|
* "balance_clp": -1840000,
|
|
88879
89100
|
* "negative": true,
|
|
89101
|
+
* "is_today": false,
|
|
88880
89102
|
* "cause": {
|
|
88881
89103
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
88882
89104
|
* "source": "recurring",
|
|
@@ -89034,6 +89256,7 @@ interface paths {
|
|
|
89034
89256
|
* "date": "2026-11-26",
|
|
89035
89257
|
* "balance_clp": -1840000,
|
|
89036
89258
|
* "negative": true,
|
|
89259
|
+
* "is_today": false,
|
|
89037
89260
|
* "cause": {
|
|
89038
89261
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
89039
89262
|
* "source": "recurring",
|
|
@@ -89066,6 +89289,7 @@ interface paths {
|
|
|
89066
89289
|
* "date": "2026-11-26",
|
|
89067
89290
|
* "balance_clp": 3260000,
|
|
89068
89291
|
* "negative": false,
|
|
89292
|
+
* "is_today": false,
|
|
89069
89293
|
* "cause": {
|
|
89070
89294
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
89071
89295
|
* "source": "recurring",
|
|
@@ -89131,6 +89355,7 @@ interface paths {
|
|
|
89131
89355
|
* "date": "2026-11-26",
|
|
89132
89356
|
* "balance_clp": -1840000,
|
|
89133
89357
|
* "negative": true,
|
|
89358
|
+
* "is_today": false,
|
|
89134
89359
|
* "cause": {
|
|
89135
89360
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
89136
89361
|
* "source": "recurring",
|
|
@@ -89163,6 +89388,7 @@ interface paths {
|
|
|
89163
89388
|
* "date": "2026-11-26",
|
|
89164
89389
|
* "balance_clp": 3260000,
|
|
89165
89390
|
* "negative": false,
|
|
89391
|
+
* "is_today": false,
|
|
89166
89392
|
* "cause": {
|
|
89167
89393
|
* "key": "recurring:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7b01:2026-11-26",
|
|
89168
89394
|
* "source": "recurring",
|
|
@@ -90531,7 +90757,7 @@ interface paths {
|
|
|
90531
90757
|
put?: never;
|
|
90532
90758
|
/**
|
|
90533
90759
|
* Vitrina's mandato for the representante legal to sign (step 3)
|
|
90534
|
-
* @description Renders Vitrina's mandato (`GET /legal/documents/sii_mandato`, version + SHA-256) for this razón social and opens it in Vitrina's signing service. Returns the representante legal's `signing_url` (also mailed to them unless `send_email: false`). A new request replaces an unsigned one; a signed mandato cannot be replaced. Once signed it is registered at the SII automatically (`sii.mandato.phase`: `connecting` → `connected`). Requires the `finanzas` add-on (402 `ENTITLEMENT_NOT_ACTIVE` otherwise). Requires `finanzas_admin:write`.
|
|
90760
|
+
* @description Renders Vitrina's mandato (`GET /legal/documents/{key}` with key `sii_mandato`, version + SHA-256) for this razón social and opens it in Vitrina's signing service. Returns the representante legal's `signing_url` (also mailed to them unless `send_email: false`). A new request replaces an unsigned one; a signed mandato cannot be replaced. Once signed it is registered at the SII automatically (`sii.mandato.phase`: `connecting` → `connected`). Requires the `finanzas` add-on (402 `ENTITLEMENT_NOT_ACTIVE` otherwise). Requires `finanzas_admin:write`.
|
|
90535
90761
|
*/
|
|
90536
90762
|
post: {
|
|
90537
90763
|
parameters: {
|
|
@@ -91563,6 +91789,12 @@ interface paths {
|
|
|
91563
91789
|
* },
|
|
91564
91790
|
* "hora_sillon": {
|
|
91565
91791
|
* "chairs": 6,
|
|
91792
|
+
* "chairs_source": {
|
|
91793
|
+
* "count": 6,
|
|
91794
|
+
* "source": "resources",
|
|
91795
|
+
* "source_label": "de tu agenda"
|
|
91796
|
+
* },
|
|
91797
|
+
* "lunch_break_minutes": 60,
|
|
91566
91798
|
* "available_hours": [
|
|
91567
91799
|
* 1440,
|
|
91568
91800
|
* 1056
|
|
@@ -91726,6 +91958,8 @@ interface paths {
|
|
|
91726
91958
|
* "effective_professional_account_ids": [
|
|
91727
91959
|
* "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6101"
|
|
91728
91960
|
* ],
|
|
91961
|
+
* "chairs_override": null,
|
|
91962
|
+
* "lunch_break_minutes": null,
|
|
91729
91963
|
* "updated_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6301",
|
|
91730
91964
|
* "updated_at": "2026-10-31T12:00:00.000Z"
|
|
91731
91965
|
* }
|
|
@@ -91799,7 +92033,7 @@ interface paths {
|
|
|
91799
92033
|
head?: never;
|
|
91800
92034
|
/**
|
|
91801
92035
|
* Change the dentist share accounts or the reference line
|
|
91802
|
-
* @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`.
|
|
91803
92037
|
*/
|
|
91804
92038
|
patch: {
|
|
91805
92039
|
parameters: {
|
|
@@ -91819,6 +92053,10 @@ interface paths {
|
|
|
91819
92053
|
reference_share_enabled?: boolean;
|
|
91820
92054
|
reference_share_bps?: number;
|
|
91821
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;
|
|
91822
92060
|
};
|
|
91823
92061
|
};
|
|
91824
92062
|
};
|
|
@@ -91838,6 +92076,8 @@ interface paths {
|
|
|
91838
92076
|
* "effective_professional_account_ids": [
|
|
91839
92077
|
* "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6101"
|
|
91840
92078
|
* ],
|
|
92079
|
+
* "chairs_override": null,
|
|
92080
|
+
* "lunch_break_minutes": null,
|
|
91841
92081
|
* "updated_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6301",
|
|
91842
92082
|
* "updated_at": "2026-10-31T12:00:00.000Z"
|
|
91843
92083
|
* }
|
|
@@ -91972,6 +92212,7 @@ interface paths {
|
|
|
91972
92212
|
* "date": "2026-11-06",
|
|
91973
92213
|
* "balance_clp": -412000,
|
|
91974
92214
|
* "negative": true,
|
|
92215
|
+
* "is_today": false,
|
|
91975
92216
|
* "cause": {
|
|
91976
92217
|
* "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
|
|
91977
92218
|
* "source": "payable",
|
|
@@ -92036,6 +92277,10 @@ interface paths {
|
|
|
92036
92277
|
* "receivables_clp": 380000,
|
|
92037
92278
|
* "receivables_count": 2
|
|
92038
92279
|
* },
|
|
92280
|
+
* "inherited_overdue": {
|
|
92281
|
+
* "count": 0,
|
|
92282
|
+
* "amount_clp": 0
|
|
92283
|
+
* },
|
|
92039
92284
|
* "points": [
|
|
92040
92285
|
* {
|
|
92041
92286
|
* "date": "2026-10-30",
|
|
@@ -92721,6 +92966,7 @@ interface paths {
|
|
|
92721
92966
|
* "charges_synced_at": "2026-10-31T12:26:04.120Z",
|
|
92722
92967
|
* "charges_synced": 40,
|
|
92723
92968
|
* "charges_linked": 38,
|
|
92969
|
+
* "charges_unreconciled": 2,
|
|
92724
92970
|
* "spend_by_month": [
|
|
92725
92971
|
* {
|
|
92726
92972
|
* "month": "2026-10",
|
|
@@ -143836,7 +144082,7 @@ interface paths {
|
|
|
143836
144082
|
*/
|
|
143837
144083
|
"application/json": {
|
|
143838
144084
|
name: string;
|
|
143839
|
-
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")[];
|
|
143840
144086
|
/** Format: date-time */
|
|
143841
144087
|
expires_at?: string | null;
|
|
143842
144088
|
};
|
|
@@ -278902,9 +279148,21 @@ interface components {
|
|
|
278902
279148
|
last_sync_at: string | null;
|
|
278903
279149
|
last_successful_sync_at: string | null;
|
|
278904
279150
|
last_sync_error: string | null;
|
|
278905
|
-
/**
|
|
278906
|
-
|
|
279151
|
+
/**
|
|
279152
|
+
* @description `first_sync`: connected, first read not landed yet (a (re)connect resets it; an empty first read stays `first_sync` for 24 h before it counts as a confirmed empty window). Show «Primera lectura en curso», never «Al día». `pending` is the old name of `first_sync`: never sent any more, kept so existing clients still validate.
|
|
279153
|
+
* @enum {string}
|
|
279154
|
+
*/
|
|
279155
|
+
status: "ok" | "first_sync" | "pending" | "stale" | "error" | "login_required" | "disconnected";
|
|
278907
279156
|
next_refresh_at: string | null;
|
|
279157
|
+
/** @description SII only: the first successful read of documents; null otherwise. */
|
|
279158
|
+
first_read_done_at: string | null;
|
|
279159
|
+
/** @description SII only: every month of the first-sync window was read once; null otherwise. */
|
|
279160
|
+
backfill_done_at: string | null;
|
|
279161
|
+
/**
|
|
279162
|
+
* @description SII only: the emission step, apart from reading. `in_certification` while the certificate / mandato step is pending; `not_needed` when no emission was set up; null for banks and Mercado Pago.
|
|
279163
|
+
* @enum {string|null}
|
|
279164
|
+
*/
|
|
279165
|
+
emission_status: "certified" | "in_certification" | "not_needed" | null;
|
|
278908
279166
|
actions: {
|
|
278909
279167
|
sync_now: boolean;
|
|
278910
279168
|
reconnect: boolean;
|
|
@@ -278915,6 +279173,15 @@ interface components {
|
|
|
278915
279173
|
};
|
|
278916
279174
|
FinanzasConnections: {
|
|
278917
279175
|
connections: components["schemas"]["FinanzasConnection"][];
|
|
279176
|
+
/** @description Sources with imported data but no live connection (ODM Mercado Pago): «Sin conexión · datos hasta el {día}». */
|
|
279177
|
+
unconnected_sources: {
|
|
279178
|
+
/** @enum {string} */
|
|
279179
|
+
kind: "mercado_pago";
|
|
279180
|
+
institution_name: string;
|
|
279181
|
+
/** @description Santiago day (YYYY-MM-DD) of the newest imported movement. */
|
|
279182
|
+
data_until: string;
|
|
279183
|
+
movement_count: number;
|
|
279184
|
+
}[];
|
|
278918
279185
|
fintoc: {
|
|
278919
279186
|
configured: boolean;
|
|
278920
279187
|
entitled: boolean;
|
|
@@ -279022,12 +279289,19 @@ interface components {
|
|
|
279022
279289
|
id: string;
|
|
279023
279290
|
name: string | null;
|
|
279024
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;
|
|
279025
279294
|
movement_count: number;
|
|
279026
279295
|
document_count: number;
|
|
279027
279296
|
/** @description Non-null = merged away; use the survivor. */
|
|
279028
279297
|
merged_into_id: string | null;
|
|
279029
279298
|
/** @description Its own payment terms in days (0–365); null = the workspace default of each document class (Ajustes › Plazos de pago). */
|
|
279030
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;
|
|
279031
279305
|
created_at: string;
|
|
279032
279306
|
updated_at: string;
|
|
279033
279307
|
};
|
|
@@ -279066,6 +279340,11 @@ interface components {
|
|
|
279066
279340
|
days: number;
|
|
279067
279341
|
/** @enum {string} */
|
|
279068
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";
|
|
279069
279348
|
}[];
|
|
279070
279349
|
};
|
|
279071
279350
|
FinanzasContraparteAlias: {
|
|
@@ -279259,10 +279538,10 @@ interface components {
|
|
|
279259
279538
|
};
|
|
279260
279539
|
due_date: string | null;
|
|
279261
279540
|
/**
|
|
279262
|
-
* @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.
|
|
279263
279542
|
* @enum {string}
|
|
279264
279543
|
*/
|
|
279265
|
-
payment_state: "por_pagar" | "parcial" | "pagado";
|
|
279544
|
+
payment_state: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
|
|
279266
279545
|
/** @description REGISTRO | PENDIENTE | NO_INCLUIR | RECLAMADO (purchases). */
|
|
279267
279546
|
sii_estado_contable: string | null;
|
|
279268
279547
|
/** @description The SII register no longer lists it; out of the libro. */
|
|
@@ -279400,6 +279679,11 @@ interface components {
|
|
|
279400
279679
|
label: string;
|
|
279401
279680
|
days: number;
|
|
279402
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";
|
|
279403
279687
|
updated_at: string | null;
|
|
279404
279688
|
};
|
|
279405
279689
|
FinanzasPaymentTermsResult: {
|
|
@@ -279412,6 +279696,14 @@ interface components {
|
|
|
279412
279696
|
honorarios?: number;
|
|
279413
279697
|
expenses?: number;
|
|
279414
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
|
+
};
|
|
279415
279707
|
FinanzasMovementComment: {
|
|
279416
279708
|
id: string;
|
|
279417
279709
|
body: string;
|
|
@@ -279457,6 +279749,19 @@ interface components {
|
|
|
279457
279749
|
} | null;
|
|
279458
279750
|
opening_balance_editable: boolean;
|
|
279459
279751
|
movement_count: number;
|
|
279752
|
+
/** @description Finanzas 33: «el agente comparte esta cuenta», with the holder details the agent dictates. Null = never shared. */
|
|
279753
|
+
agent_sharing: {
|
|
279754
|
+
/** @description true = the AI agent dictates this account for transfers and abonos into it are matched; false = it stopped sharing it. */
|
|
279755
|
+
shared: boolean;
|
|
279756
|
+
alias: string;
|
|
279757
|
+
holder_name: string;
|
|
279758
|
+
holder_rut: string;
|
|
279759
|
+
holder_email: string | null;
|
|
279760
|
+
/** @enum {string} */
|
|
279761
|
+
account_type: "corriente" | "vista" | "ahorro";
|
|
279762
|
+
} | null;
|
|
279763
|
+
/** @description Whether the agent can share it: a CLP corriente / vista / ahorro / Mercado Pago account with its full number (not a card, a credit line, a USD account or a last-4 number). */
|
|
279764
|
+
can_share_with_agent: boolean;
|
|
279460
279765
|
};
|
|
279461
279766
|
FinanzasBankAccounts: {
|
|
279462
279767
|
accounts: components["schemas"]["FinanzasBankAccount"][];
|
|
@@ -279469,6 +279774,23 @@ interface components {
|
|
|
279469
279774
|
amount_minor: number | null;
|
|
279470
279775
|
on?: string;
|
|
279471
279776
|
};
|
|
279777
|
+
FinanzasAgentSharingBody: {
|
|
279778
|
+
/** @description true = the AI agent shares this account for transfers (and abonos into it are matched); false = stop sharing it (the row is kept, never deleted). */
|
|
279779
|
+
shared: boolean;
|
|
279780
|
+
/** @description The label the agent and Ajustes show. Default «‹banco› ··‹últimos 4›». */
|
|
279781
|
+
alias?: string;
|
|
279782
|
+
/** @description Account holder as the bank shows it. Required the first time the account is shared. */
|
|
279783
|
+
holder_name?: string;
|
|
279784
|
+
/** @description Holder RUT (any formatting, check digit validated). Default: the workspace's SII RUT. */
|
|
279785
|
+
holder_rut?: string;
|
|
279786
|
+
/** Format: email */
|
|
279787
|
+
holder_email?: string | null;
|
|
279788
|
+
/**
|
|
279789
|
+
* @description What the agent dictates. Default from the account type (Mercado Pago = vista).
|
|
279790
|
+
* @enum {string}
|
|
279791
|
+
*/
|
|
279792
|
+
account_type?: "corriente" | "vista" | "ahorro";
|
|
279793
|
+
};
|
|
279472
279794
|
FinanzasF29Overview: {
|
|
279473
279795
|
from: string;
|
|
279474
279796
|
to: string;
|
|
@@ -280221,7 +280543,7 @@ interface components {
|
|
|
280221
280543
|
paid_clp: number;
|
|
280222
280544
|
outstanding_clp: number;
|
|
280223
280545
|
/** @enum {string} */
|
|
280224
|
-
payment_state: "por_pagar" | "parcial" | "pagado";
|
|
280546
|
+
payment_state: "por_pagar" | "parcial" | "pagado" | "vencido_heredado";
|
|
280225
280547
|
};
|
|
280226
280548
|
links: components["schemas"]["FinanzasLink"][];
|
|
280227
280549
|
candidates: {
|
|
@@ -280268,6 +280590,7 @@ interface components {
|
|
|
280268
280590
|
};
|
|
280269
280591
|
}[];
|
|
280270
280592
|
total_remaining_clp: number;
|
|
280593
|
+
pending: components["schemas"]["FinanzasCashPendingSummary"] & unknown;
|
|
280271
280594
|
};
|
|
280272
280595
|
FinanzasCommissions: {
|
|
280273
280596
|
items: {
|
|
@@ -280314,6 +280637,13 @@ interface components {
|
|
|
280314
280637
|
amount_at_stake_clp: number;
|
|
280315
280638
|
/** @description First day of last month: `period=recent` keeps the cases touching it or later; older ones are «Historial». */
|
|
280316
280639
|
since: string;
|
|
280640
|
+
/** @description Open cases per month, newest first, all kinds, ignoring `kind`/`month`/`period`: the month filter’s options (the sum is the open total every surface shows). Months «Cerrado en Chipax» are never listed: they hold no case. */
|
|
280641
|
+
counts_by_month: {
|
|
280642
|
+
/** @description `YYYY-MM`. */
|
|
280643
|
+
month: string;
|
|
280644
|
+
open: number;
|
|
280645
|
+
amount_clp: number;
|
|
280646
|
+
}[];
|
|
280317
280647
|
/** @description Open cases by period (every period) and, within the `period` asked, how many need a person vs are ready to confirm. */
|
|
280318
280648
|
counts: {
|
|
280319
280649
|
recent: number;
|
|
@@ -280361,7 +280691,7 @@ interface components {
|
|
|
280361
280691
|
/** @enum {string} */
|
|
280362
280692
|
status: "open" | "resolved";
|
|
280363
280693
|
/** @enum {string|null} */
|
|
280364
|
-
resolution: "confirmed" | "cleared" | null;
|
|
280694
|
+
resolution: "confirmed" | "cleared" | "closed_imported" | null;
|
|
280365
280695
|
resolved_at: string | null;
|
|
280366
280696
|
contraparte: {
|
|
280367
280697
|
id: string;
|
|
@@ -280683,14 +281013,21 @@ interface components {
|
|
|
280683
281013
|
/** @description «septiembre 2026». */
|
|
280684
281014
|
label: string;
|
|
280685
281015
|
/**
|
|
280686
|
-
* @description open = abierto (cases touch it, or it has not ended); ready_to_close = listo para cerrar; closed = cerrado.
|
|
281016
|
+
* @description open = abierto (cases touch it, or it has not ended); ready_to_close = listo para cerrar; closed = cerrado por una persona; closed_imported = «Cerrado en Chipax» (the import closed it: it raises no cases, a change asks for a reason, there is nothing to close).
|
|
280687
281017
|
* @enum {string}
|
|
280688
281018
|
*/
|
|
280689
|
-
state: "open" | "ready_to_close" | "closed";
|
|
281019
|
+
state: "open" | "ready_to_close" | "closed" | "closed_imported";
|
|
280690
281020
|
ended: boolean;
|
|
280691
281021
|
open_cases: number;
|
|
280692
281022
|
closed_at: string | null;
|
|
280693
281023
|
closed_by: string | null;
|
|
281024
|
+
/**
|
|
281025
|
+
* @description Who closed the month: `person` («Cerrar mes») or `chipax` (the import: «Cerrado en Chipax»). Null while open.
|
|
281026
|
+
* @enum {string|null}
|
|
281027
|
+
*/
|
|
281028
|
+
closed_source: "person" | "chipax" | null;
|
|
281029
|
+
/** @description When the import closed it. Null unless `closed_source` is `chipax`. */
|
|
281030
|
+
imported_at: string | null;
|
|
280694
281031
|
/** @description Ajustes posteriores al cierre logged so far. */
|
|
280695
281032
|
adjustment_count: number;
|
|
280696
281033
|
};
|
|
@@ -280703,14 +281040,21 @@ interface components {
|
|
|
280703
281040
|
/** @description «septiembre 2026». */
|
|
280704
281041
|
label: string;
|
|
280705
281042
|
/**
|
|
280706
|
-
* @description open = abierto (cases touch it, or it has not ended); ready_to_close = listo para cerrar; closed = cerrado.
|
|
281043
|
+
* @description open = abierto (cases touch it, or it has not ended); ready_to_close = listo para cerrar; closed = cerrado por una persona; closed_imported = «Cerrado en Chipax» (the import closed it: it raises no cases, a change asks for a reason, there is nothing to close).
|
|
280707
281044
|
* @enum {string}
|
|
280708
281045
|
*/
|
|
280709
|
-
state: "open" | "ready_to_close" | "closed";
|
|
281046
|
+
state: "open" | "ready_to_close" | "closed" | "closed_imported";
|
|
280710
281047
|
ended: boolean;
|
|
280711
281048
|
open_cases: number;
|
|
280712
281049
|
closed_at: string | null;
|
|
280713
281050
|
closed_by: string | null;
|
|
281051
|
+
/**
|
|
281052
|
+
* @description Who closed the month: `person` («Cerrar mes») or `chipax` (the import: «Cerrado en Chipax»). Null while open.
|
|
281053
|
+
* @enum {string|null}
|
|
281054
|
+
*/
|
|
281055
|
+
closed_source: "person" | "chipax" | null;
|
|
281056
|
+
/** @description When the import closed it. Null unless `closed_source` is `chipax`. */
|
|
281057
|
+
imported_at: string | null;
|
|
280714
281058
|
/** @description Ajustes posteriores al cierre logged so far. */
|
|
280715
281059
|
adjustment_count: number;
|
|
280716
281060
|
from: string;
|
|
@@ -280907,7 +281251,11 @@ interface components {
|
|
|
280907
281251
|
id: string;
|
|
280908
281252
|
path: string;
|
|
280909
281253
|
}[];
|
|
281254
|
+
/** @description true = an owner-withdrawals account (name «Retiros…»): imported as non-operating onto the system «Retiros» account, shown below the resultado, never as a gasto. Absent on runs before 2026-11-08. */
|
|
281255
|
+
retiros?: boolean;
|
|
280910
281256
|
}[];
|
|
281257
|
+
/** @description Chipax accounts named «Retiros…» filed below the resultado as non-operating (not a gasto). Absent on runs before 2026-11-08. */
|
|
281258
|
+
retiros?: number;
|
|
280911
281259
|
};
|
|
280912
281260
|
contrapartes: {
|
|
280913
281261
|
/** @description New in Vitrina (dry run: would be created). */
|
|
@@ -281033,6 +281381,19 @@ interface components {
|
|
|
281033
281381
|
rut: string;
|
|
281034
281382
|
days: number;
|
|
281035
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;
|
|
281036
281397
|
}[];
|
|
281037
281398
|
};
|
|
281038
281399
|
aliases: {
|
|
@@ -281395,7 +281756,7 @@ interface components {
|
|
|
281395
281756
|
/** @description Stable item key: document:<uuid>, recurring:<uuid>:<YYYY-MM-DD>, retention:<YYYY-MM>, rescue:<uuid>, cuotas:<day>, appointments:<day>, cash_pending. */
|
|
281396
281757
|
key: string;
|
|
281397
281758
|
/**
|
|
281398
|
-
* @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».
|
|
281399
281760
|
* @enum {string}
|
|
281400
281761
|
*/
|
|
281401
281762
|
source: "payable" | "receivable" | "retention" | "recurring" | "cuotas" | "appointments" | "cash_pending" | "card_settlement" | "rescue";
|
|
@@ -281436,8 +281797,16 @@ interface components {
|
|
|
281436
281797
|
date: string;
|
|
281437
281798
|
balance_clp: number;
|
|
281438
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;
|
|
281439
281802
|
cause: components["schemas"]["FinanzasCashFlowItem"];
|
|
281440
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
|
+
};
|
|
281441
281810
|
FinanzasCashFlowRescue: {
|
|
281442
281811
|
id: string;
|
|
281443
281812
|
planned_on: string;
|
|
@@ -281516,6 +281885,8 @@ interface components {
|
|
|
281516
281885
|
receivables_clp: number;
|
|
281517
281886
|
receivables_count: number;
|
|
281518
281887
|
};
|
|
281888
|
+
inherited_overdue: components["schemas"]["FinanzasInheritedOverdue"];
|
|
281889
|
+
cash_pending: components["schemas"]["FinanzasCashPendingSummary"];
|
|
281519
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. */
|
|
281520
281891
|
typical_income: {
|
|
281521
281892
|
/** @enum {string} */
|
|
@@ -281941,7 +282312,21 @@ interface components {
|
|
|
281941
282312
|
} | null;
|
|
281942
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. */
|
|
281943
282314
|
hora_sillon: {
|
|
282315
|
+
/** @description Total chairs counted (same as `chairs_source.count`). */
|
|
281944
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;
|
|
281945
282330
|
/** @description Hours per entry of `months`, one decimal. */
|
|
281946
282331
|
available_hours: number[];
|
|
281947
282332
|
/** @description Hours per entry of `months`, one decimal. */
|
|
@@ -281986,6 +282371,10 @@ interface components {
|
|
|
281986
282371
|
/** @description The accounts that are the treating dentist’s share (with everything under them); null = detected from the plan de cuentas. */
|
|
281987
282372
|
professional_account_ids: string[] | null;
|
|
281988
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;
|
|
281989
282378
|
updated_by: string | null;
|
|
281990
282379
|
updated_at: string | null;
|
|
281991
282380
|
};
|
|
@@ -282033,6 +282422,7 @@ interface components {
|
|
|
282033
282422
|
receivables_clp: number;
|
|
282034
282423
|
receivables_count: number;
|
|
282035
282424
|
};
|
|
282425
|
+
inherited_overdue: components["schemas"]["FinanzasInheritedOverdue"];
|
|
282036
282426
|
/** @description The runway: one point per day, today … today + 30. */
|
|
282037
282427
|
points: {
|
|
282038
282428
|
date: string;
|
|
@@ -282093,7 +282483,7 @@ interface components {
|
|
|
282093
282483
|
connection_id: string;
|
|
282094
282484
|
institution_name: string | null;
|
|
282095
282485
|
/** @enum {string} */
|
|
282096
|
-
status: "ok" | "pending" | "stale" | "error" | "login_required" | "disconnected";
|
|
282486
|
+
status: "ok" | "first_sync" | "pending" | "stale" | "error" | "login_required" | "disconnected";
|
|
282097
282487
|
} | null;
|
|
282098
282488
|
cash: components["schemas"]["FinanzasResumenCash"];
|
|
282099
282489
|
result: components["schemas"]["FinanzasResumenResult"];
|
|
@@ -282103,7 +282493,7 @@ interface components {
|
|
|
282103
282493
|
month: string;
|
|
282104
282494
|
label: string;
|
|
282105
282495
|
/** @enum {string} */
|
|
282106
|
-
state: "open" | "ready_to_close" | "closed";
|
|
282496
|
+
state: "open" | "ready_to_close" | "closed" | "closed_imported";
|
|
282107
282497
|
open_cases: number;
|
|
282108
282498
|
} | null;
|
|
282109
282499
|
};
|
|
@@ -282280,6 +282670,8 @@ interface components {
|
|
|
282280
282670
|
charges_synced_at: string | null;
|
|
282281
282671
|
charges_synced: number;
|
|
282282
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;
|
|
282283
282675
|
/** @description Spend per month over the last read (92 days), smallest unit of `currency`. */
|
|
282284
282676
|
spend_by_month: {
|
|
282285
282677
|
/** @example 2026-10 */
|