@vitrina/api 17.117.0 → 17.118.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.
Files changed (3) hide show
  1. package/dist/index.d.cts +1869 -242
  2. package/dist/index.d.ts +1869 -242
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -86890,6 +86890,7 @@ interface paths {
86890
86890
  * "kind": "gasto",
86891
86891
  * "behavior": "fijo",
86892
86892
  * "no_document": false,
86893
+ * "tax_role": "other_deductible",
86893
86894
  * "position": 2,
86894
86895
  * "depth": 1,
86895
86896
  * "path": "Gastos de administración",
@@ -86907,6 +86908,7 @@ interface paths {
86907
86908
  * "kind": "gasto",
86908
86909
  * "behavior": "fijo",
86909
86910
  * "no_document": false,
86911
+ * "tax_role": "rent",
86910
86912
  * "position": 0,
86911
86913
  * "depth": 2,
86912
86914
  * "path": "Gastos de administración > Arriendo de oficina",
@@ -87025,6 +87027,7 @@ interface paths {
87025
87027
  * "kind": "gasto",
87026
87028
  * "behavior": "fijo",
87027
87029
  * "no_document": false,
87030
+ * "tax_role": "rent",
87028
87031
  * "position": 0,
87029
87032
  * "depth": 2,
87030
87033
  * "path": "Gastos de administración > Arriendo de oficina",
@@ -87495,6 +87498,7 @@ interface paths {
87495
87498
  * "kind": "gasto",
87496
87499
  * "behavior": "fijo",
87497
87500
  * "no_document": false,
87501
+ * "tax_role": "rent",
87498
87502
  * "position": 1,
87499
87503
  * "depth": 2,
87500
87504
  * "path": "Gastos de administración > Arriendo de oficina",
@@ -87612,6 +87616,7 @@ interface paths {
87612
87616
  * "kind": "gasto",
87613
87617
  * "behavior": "fijo",
87614
87618
  * "no_document": false,
87619
+ * "tax_role": "rent",
87615
87620
  * "position": 0,
87616
87621
  * "depth": 2,
87617
87622
  * "path": "Gastos de administración > Arriendo de oficina",
@@ -87733,6 +87738,7 @@ interface paths {
87733
87738
  * "kind": "gasto",
87734
87739
  * "behavior": "fijo",
87735
87740
  * "no_document": false,
87741
+ * "tax_role": "rent",
87736
87742
  * "position": 0,
87737
87743
  * "depth": 2,
87738
87744
  * "path": "Gastos de administración > Arriendo de oficina",
@@ -105480,7 +105486,9 @@ interface paths {
105480
105486
  * "kind": "ingreso",
105481
105487
  * "path": "Ingresos › Ingresos de explotación",
105482
105488
  * "archived": false,
105483
- * "has_children": true
105489
+ * "has_children": true,
105490
+ * "tax_role": null,
105491
+ * "tax_role_label": null
105484
105492
  * },
105485
105493
  * "sign": 1,
105486
105494
  * "values": [
@@ -105509,7 +105517,9 @@ interface paths {
105509
105517
  * "kind": "ingreso",
105510
105518
  * "path": "Ingresos › Ingresos de explotación › Atención odontológica",
105511
105519
  * "archived": false,
105512
- * "has_children": false
105520
+ * "has_children": false,
105521
+ * "tax_role": null,
105522
+ * "tax_role_label": null
105513
105523
  * },
105514
105524
  * "sign": 1,
105515
105525
  * "values": [
@@ -105587,7 +105597,9 @@ interface paths {
105587
105597
  * "kind": "costo",
105588
105598
  * "path": "Costos de explotación",
105589
105599
  * "archived": false,
105590
- * "has_children": true
105600
+ * "has_children": true,
105601
+ * "tax_role": null,
105602
+ * "tax_role_label": null
105591
105603
  * },
105592
105604
  * "sign": -1,
105593
105605
  * "values": [
@@ -105616,7 +105628,9 @@ interface paths {
105616
105628
  * "kind": "costo",
105617
105629
  * "path": "Costos de explotación › Laboratorios",
105618
105630
  * "archived": false,
105619
- * "has_children": false
105631
+ * "has_children": false,
105632
+ * "tax_role": null,
105633
+ * "tax_role_label": null
105620
105634
  * },
105621
105635
  * "sign": -1,
105622
105636
  * "values": [
@@ -105694,7 +105708,9 @@ interface paths {
105694
105708
  * "kind": "gasto",
105695
105709
  * "path": "Gastos de administración y venta",
105696
105710
  * "archived": false,
105697
- * "has_children": true
105711
+ * "has_children": true,
105712
+ * "tax_role": null,
105713
+ * "tax_role_label": null
105698
105714
  * },
105699
105715
  * "sign": -1,
105700
105716
  * "values": [
@@ -105723,7 +105739,9 @@ interface paths {
105723
105739
  * "kind": "gasto",
105724
105740
  * "path": "Gastos de administración y venta › Gastos generales › Arriendo",
105725
105741
  * "archived": false,
105726
- * "has_children": false
105742
+ * "has_children": false,
105743
+ * "tax_role": null,
105744
+ * "tax_role_label": null
105727
105745
  * },
105728
105746
  * "sign": -1,
105729
105747
  * "values": [
@@ -105862,6 +105880,20 @@ interface paths {
105862
105880
  * "drillable": true
105863
105881
  * }
105864
105882
  * ],
105883
+ * "by_role": [
105884
+ * {
105885
+ * "tax_role": null,
105886
+ * "tax_role_label": null,
105887
+ * "section": null,
105888
+ * "total": 0,
105889
+ * "count": 0,
105890
+ * "non_deductible": {
105891
+ * "tax_40": 0,
105892
+ * "owner": 0,
105893
+ * "left_out": 0
105894
+ * }
105895
+ * }
105896
+ * ],
105865
105897
  * "summary": {
105866
105898
  * "resultado_operacional_clp": 23100000,
105867
105899
  * "ingresos_clp": 49650000,
@@ -106319,11 +106351,15 @@ interface paths {
106319
106351
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8102",
106320
106352
  * "name": "Atención odontológica",
106321
106353
  * "kind": "ingreso",
106322
- * "no_document": false
106354
+ * "no_document": false,
106355
+ * "tax_role": "business_income"
106323
106356
  * },
106324
106357
  * "no_vat_breakdown": false,
106325
106358
  * "undocumented": false,
106326
106359
  * "non_result_kind": null,
106360
+ * "tax_role": "business_income",
106361
+ * "tax_role_source": "account",
106362
+ * "non_deductible": null,
106327
106363
  * "settled_clp": 1190000,
106328
106364
  * "gross_clp": 1190000,
106329
106365
  * "base_clp": 1000000,
@@ -106366,11 +106402,15 @@ interface paths {
106366
106402
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8108",
106367
106403
  * "name": "Sueldos",
106368
106404
  * "kind": "gasto",
106369
- * "no_document": true
106405
+ * "no_document": true,
106406
+ * "tax_role": "remunerations"
106370
106407
  * },
106371
106408
  * "no_vat_breakdown": false,
106372
106409
  * "undocumented": false,
106373
106410
  * "non_result_kind": null,
106411
+ * "tax_role": "remunerations",
106412
+ * "tax_role_source": "account",
106413
+ * "non_deductible": null,
106374
106414
  * "settled_clp": 850000,
106375
106415
  * "gross_clp": 850000,
106376
106416
  * "base_clp": 850000,
@@ -106611,7 +106651,8 @@ interface paths {
106611
106651
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8102",
106612
106652
  * "name": "Atención odontológica",
106613
106653
  * "kind": "ingreso",
106614
- * "no_document": false
106654
+ * "no_document": false,
106655
+ * "tax_role": "business_income"
106615
106656
  * },
106616
106657
  * "undocumented": false,
106617
106658
  * "non_result_kind": null,
@@ -106631,7 +106672,8 @@ interface paths {
106631
106672
  * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8108",
106632
106673
  * "name": "Sueldos",
106633
106674
  * "kind": "gasto",
106634
- * "no_document": true
106675
+ * "no_document": true,
106676
+ * "tax_role": "remunerations"
106635
106677
  * },
106636
106678
  * "undocumented": false,
106637
106679
  * "non_result_kind": null,
@@ -106645,6 +106687,44 @@ interface paths {
106645
106687
  * "retention_clp": 0
106646
106688
  * }
106647
106689
  * ],
106690
+ * "by_role": [
106691
+ * {
106692
+ * "side": "collection",
106693
+ * "document_year": "earlier",
106694
+ * "tax_role": "business_income",
106695
+ * "tax_role_label": "Ingresos del giro",
106696
+ * "section": "income",
106697
+ * "non_result": false,
106698
+ * "non_deductible": null,
106699
+ * "owner": null,
106700
+ * "lines": 1,
106701
+ * "settled_clp": 1190000,
106702
+ * "gross_clp": 1190000,
106703
+ * "base_clp": 1000000,
106704
+ * "net_clp": 1000000,
106705
+ * "exempt_clp": 0,
106706
+ * "vat_excluded_clp": 190000,
106707
+ * "retention_clp": 0
106708
+ * },
106709
+ * {
106710
+ * "side": "payment",
106711
+ * "document_year": "current",
106712
+ * "tax_role": "remunerations",
106713
+ * "tax_role_label": "Remuneraciones",
106714
+ * "section": "outlay",
106715
+ * "non_result": false,
106716
+ * "non_deductible": null,
106717
+ * "owner": null,
106718
+ * "lines": 1,
106719
+ * "settled_clp": 850000,
106720
+ * "gross_clp": 850000,
106721
+ * "base_clp": 850000,
106722
+ * "net_clp": 0,
106723
+ * "exempt_clp": 0,
106724
+ * "vat_excluded_clp": 0,
106725
+ * "retention_clp": 0
106726
+ * }
106727
+ * ],
106648
106728
  * "by_kind": [
106649
106729
  * {
106650
106730
  * "side": "collection",
@@ -113113,7 +113193,7 @@ interface paths {
113113
113193
  patch?: never;
113114
113194
  trace?: never;
113115
113195
  };
113116
- "/finanzas/resumen": {
113196
+ "/finanzas/tax-tags/roles": {
113117
113197
  parameters: {
113118
113198
  query?: never;
113119
113199
  header?: never;
@@ -113121,19 +113201,21 @@ interface paths {
113121
113201
  cookie?: never;
113122
113202
  };
113123
113203
  /**
113124
- * Resumen: the Finanzas home, three answers and the context
113125
- * @description The Finanzas home in one read, every figure from its detail screen: **cash** («¿cuánto me queda a fin de mes?») = the Flujo de caja projection — today’s balance of the operating accounts, the month-end and 30-day balance, the lowest point and `runs_out` (the first day under zero within 30 days, with its biggest payment); **result** («¿cuánto gasto? / ¿este mes gana plata?») = Costos y equilibrio for the current month at net amounts (ingresos, gastos = variables + fijos, «sin clasificar» apart and counted as variable, resultado operacional) against the punto de equilibrio of the last closed month; **inbox** («Te necesita») = the open «Por resolver» cases and the previous month’s close state; **automatic** = this month’s «Hecho por Vitrina» totals and the newest 3; **accounts** with their balances. `problem` is the one thing shown in red (cash running out, else a bank connection that needs a person). A caller without `finanzas_reports:read` gets `cash`, `result` and every account balance (`balance_clp`, `balance_as_of`) null; account names stay (`reports_visible: false`). A Contador sees patients as initials. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
113204
+ * Tax roles of accounts, the F22 codes they feed, and art. 21 outcomes
113205
+ * @description The vocabulary an account's tax meaning is chosen from, and, for the tax year, the F22 code each role feeds in 14 A, 14 D N°3 and 14 D N°8 (`earlier` is the twin code for documents of an earlier year paid in this one). A role names what the money is for in plain words; the code derives from it, so a new tax year re-tags nothing. Also the art. 21 outcomes of a non-deductible mark and the regimes where each applies (14 D N°8 has only `left_out`), and the reasons a movement is non-deductible by default. 404 for a tax year with no code table. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read` (owner, admin, Contador seat).
113126
113206
  */
113127
113207
  get: {
113128
113208
  parameters: {
113129
- query?: never;
113209
+ query?: {
113210
+ tax_year?: number;
113211
+ };
113130
113212
  header?: never;
113131
113213
  path?: never;
113132
113214
  cookie?: never;
113133
113215
  };
113134
113216
  requestBody?: never;
113135
113217
  responses: {
113136
- /** @description The Resumen */
113218
+ /** @description Roles and outcomes */
113137
113219
  200: {
113138
113220
  headers: {
113139
113221
  [name: string]: unknown;
@@ -113142,243 +113224,1200 @@ interface paths {
113142
113224
  /**
113143
113225
  * @example {
113144
113226
  * "data": {
113145
- * "as_of": "2026-10-30",
113146
- * "month": "2026-10",
113147
- * "month_label": "octubre 2026",
113148
- * "currency": "CLP",
113149
- * "reports_visible": true,
113150
- * "synced_at": "2026-10-30T11:02:00.000Z",
113151
- * "problem": {
113152
- * "kind": "cash_runs_out",
113153
- * "date": "2026-11-06",
113154
- * "balance_clp": -412000
113155
- * },
113156
- * "cash": {
113157
- * "today_clp": 4917109,
113158
- * "balance_as_of": "2026-10-30T11:02:00.000Z",
113159
- * "accounts_count": 3,
113160
- * "unknown_count": 0,
113161
- * "savings_clp": 12000000,
113162
- * "month_end": {
113163
- * "date": "2026-10-31",
113164
- * "balance_clp": 5102000,
113165
- * "band": {
113166
- * "low_clp": 4980000,
113167
- * "high_clp": 5260000
113168
- * }
113169
- * },
113170
- * "in_30_days": {
113171
- * "date": "2026-11-29",
113172
- * "balance_clp": 3880000,
113173
- * "band": {
113174
- * "low_clp": 2100000,
113175
- * "high_clp": 5400000
113176
- * }
113177
- * },
113178
- * "lowest": {
113179
- * "date": "2026-11-06",
113180
- * "balance_clp": -412000,
113181
- * "negative": true,
113182
- * "is_today": false,
113183
- * "cause": {
113184
- * "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
113185
- * "source": "payable",
113186
- * "direction": "outflow",
113187
- * "label": "Factura 4410 · Laboratorio Andes SpA",
113188
- * "amount_clp": 5800000,
113189
- * "date": "2026-11-06",
113190
- * "due_date": "2026-11-06",
113191
- * "overdue": false,
113192
- * "movable": true,
113193
- * "move": null,
113194
- * "document": {
113195
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
113196
- * "kind": "purchase",
113197
- * "dte_type": 33,
113198
- * "folio": "4410"
113199
- * },
113200
- * "contraparte": {
113201
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6601",
113202
- * "name": "Laboratorio Andes SpA"
113203
- * },
113204
- * "recurring_item_id": null,
113205
- * "rescue_id": null,
113206
- * "count": null
113207
- * }
113208
- * },
113209
- * "runs_out": {
113210
- * "date": "2026-11-06",
113211
- * "covered_until": "2026-11-05",
113212
- * "balance_clp": -412000,
113213
- * "cause": {
113214
- * "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
113215
- * "source": "payable",
113216
- * "direction": "outflow",
113217
- * "label": "Factura 4410 · Laboratorio Andes SpA",
113218
- * "amount_clp": 5800000,
113219
- * "date": "2026-11-06",
113220
- * "due_date": "2026-11-06",
113221
- * "overdue": false,
113222
- * "movable": true,
113223
- * "move": null,
113224
- * "document": {
113225
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
113226
- * "kind": "purchase",
113227
- * "dte_type": 33,
113228
- * "folio": "4410"
113227
+ * "tax_year": 2026,
113228
+ * "tax_years": [
113229
+ * 2026
113230
+ * ],
113231
+ * "roles": [
113232
+ * {
113233
+ * "role": "rent",
113234
+ * "label_es": "Arriendos",
113235
+ * "section": "outlay",
113236
+ * "hint_es": "Arriendo del local, oficina o equipos.",
113237
+ * "codes": {
113238
+ * "14A": {
113239
+ * "code": 1140,
113240
+ * "earlier": null
113229
113241
  * },
113230
- * "contraparte": {
113231
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6601",
113232
- * "name": "Laboratorio Andes SpA"
113242
+ * "14D3": {
113243
+ * "code": 1415,
113244
+ * "earlier": null
113233
113245
  * },
113234
- * "recurring_item_id": null,
113235
- * "rescue_id": null,
113236
- * "count": null
113237
- * }
113238
- * },
113239
- * "overdue": {
113240
- * "payables_clp": 0,
113241
- * "payables_count": 0,
113242
- * "stale_payables_clp": 0,
113243
- * "stale_payables_count": 0,
113244
- * "receivables_clp": 380000,
113245
- * "receivables_count": 2
113246
- * },
113247
- * "inherited_overdue": {
113248
- * "count": 0,
113249
- * "amount_clp": 0
113250
- * },
113251
- * "points": [
113252
- * {
113253
- * "date": "2026-10-30",
113254
- * "balance_clp": 4917109,
113255
- * "band": {
113256
- * "low_clp": 4917109,
113257
- * "high_clp": 4917109
113258
- * }
113259
- * },
113260
- * {
113261
- * "date": "2026-10-31",
113262
- * "balance_clp": 5102000,
113263
- * "band": {
113264
- * "low_clp": 4980000,
113265
- * "high_clp": 5260000
113246
+ * "14D8": {
113247
+ * "code": 1620,
113248
+ * "earlier": null
113266
113249
  * }
113267
113250
  * }
113268
- * ]
113269
- * },
113270
- * "result": {
113271
- * "month": "2026-10",
113272
- * "label": "octubre 2026",
113273
- * "proforma": true,
113274
- * "ingresos_clp": 41200000,
113275
- * "gastos_clp": 38900000,
113276
- * "variables_clp": 17400000,
113277
- * "fijos_clp": 21500000,
113278
- * "sin_clasificar_clp": 900000,
113279
- * "resultado_clp": 2300000,
113280
- * "equilibrio": {
113281
- * "month": "2026-09",
113282
- * "label": "septiembre 2026",
113283
- * "equilibrio_clp": 44600000,
113284
- * "sin_calculo": null,
113285
- * "produccion": null,
113286
- * "skipped_incompleto": null
113287
- * },
113288
- * "target_clp": 44600000,
113289
- * "cobertura_pct": 92.4,
113290
- * "brecha_clp": -3400000
113291
- * },
113292
- * "inbox": {
113293
- * "open": 4,
113294
- * "amount_at_stake_clp": 2860000,
113295
- * "by_kind": {
113296
- * "reconcile": 2,
113297
- * "transfer": 0,
113298
- * "classify": 1,
113299
- * "missing_document": 1,
113300
- * "unknown": 0
113301
- * },
113302
- * "close": {
113303
- * "month": "2026-09",
113304
- * "label": "septiembre 2026",
113305
- * "state": "closed",
113306
- * "open_cases": 0
113307
113251
  * }
113308
- * },
113309
- * "automatic": {
113310
- * "month": "2026-10",
113311
- * "count": 240,
113312
- * "total_clp": 61200000,
113313
- * "unreviewed_count": 31,
113314
- * "by_actor": {
113315
- * "rule": 150,
113316
- * "match": 72,
113317
- * "ai": 18
113318
- * },
113319
- * "recent": [
113320
- * {
113321
- * "kind": "link",
113322
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6701",
113323
- * "actor": "match",
113324
- * "label": "Pago de la factura 4388 de Laboratorio Andes SpA",
113325
- * "day": "2026-10-29",
113326
- * "amount_clp": 1240000,
113327
- * "applied_at": "2026-10-29T14:10:00.000Z",
113328
- * "movement": {
113329
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6801",
113330
- * "day": "2026-10-29",
113331
- * "amount_clp": 1240000,
113332
- * "direction": "outbound",
113333
- * "description": "Transferencia a Laboratorio Andes"
113334
- * },
113335
- * "document": null,
113336
- * "target": "document",
113337
- * "reasons": [
113338
- * "rut",
113339
- * "amount"
113340
- * ],
113341
- * "account": null,
113342
- * "split": false,
113343
- * "rule": null,
113344
- * "reviewed_at": null,
113345
- * "reviewed_by": null,
113346
- * "group_name": "Laboratorio Andes SpA",
113347
- * "group_key": "contraparte:3f6c1d2e-5b7a-4c1e-9d0f-2a8b6c4e1f70",
113348
- * "group_count": 1,
113349
- * "group_total_clp": 1240000
113350
- * }
113351
- * ]
113352
- * },
113353
- * "accounts": [
113252
+ * ],
113253
+ * "outcomes": [
113354
113254
  * {
113355
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6401",
113356
- * "name": "Cuenta corriente",
113357
- * "institution_name": "Banco de Chile",
113358
- * "number_masked": "··4821",
113359
- * "type": "cuenta_corriente",
113360
- * "currency": "CLP",
113361
- * "balance_clp": 3719083,
113362
- * "balance_as_of": "2026-10-30T11:02:00.000Z",
113363
- * "in_cash": true
113364
- * },
113255
+ * "outcome": "left_out",
113256
+ * "label_es": "Solo se excluye de la base",
113257
+ * "hint_es": "No se descuenta de la base y no paga impuesto aparte.",
113258
+ * "regimes": [
113259
+ * "14A",
113260
+ * "14D3",
113261
+ * "14D8"
113262
+ * ]
113263
+ * }
113264
+ * ],
113265
+ * "default_reasons": [
113365
113266
  * {
113366
- * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6402",
113367
- * "name": "Ahorro",
113368
- * "institution_name": "Banco de Chile",
113369
- * "number_masked": "··0057",
113370
- * "type": "cuenta_ahorro",
113371
- * "currency": "CLP",
113372
- * "balance_clp": 12000000,
113373
- * "balance_as_of": "2026-10-30T11:02:00.000Z",
113374
- * "in_cash": false
113267
+ * "reason": "fine",
113268
+ * "label_es": "Multa"
113375
113269
  * }
113376
113270
  * ]
113377
113271
  * }
113378
113272
  * }
113379
113273
  */
113380
113274
  "application/json": {
113381
- data: components["schemas"]["FinanzasResumen"];
113275
+ data: components["schemas"]["FinanzasTaxRoles"];
113276
+ };
113277
+ };
113278
+ };
113279
+ /** @description Validation error */
113280
+ 400: {
113281
+ headers: {
113282
+ [name: string]: unknown;
113283
+ };
113284
+ content: {
113285
+ "application/json": components["schemas"]["Error"];
113286
+ };
113287
+ };
113288
+ /** @description Unauthorized */
113289
+ 401: {
113290
+ headers: {
113291
+ [name: string]: unknown;
113292
+ };
113293
+ content: {
113294
+ "application/json": components["schemas"]["Error"];
113295
+ };
113296
+ };
113297
+ /** @description Forbidden */
113298
+ 403: {
113299
+ headers: {
113300
+ [name: string]: unknown;
113301
+ };
113302
+ content: {
113303
+ "application/json": components["schemas"]["Error"];
113304
+ };
113305
+ };
113306
+ /** @description Not found */
113307
+ 404: {
113308
+ headers: {
113309
+ [name: string]: unknown;
113310
+ };
113311
+ content: {
113312
+ "application/json": components["schemas"]["Error"];
113313
+ };
113314
+ };
113315
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113316
+ 409: {
113317
+ headers: {
113318
+ [name: string]: unknown;
113319
+ };
113320
+ content: {
113321
+ "application/json": components["schemas"]["Error"];
113322
+ };
113323
+ };
113324
+ /** @description Rate limited */
113325
+ 429: {
113326
+ headers: {
113327
+ [name: string]: unknown;
113328
+ };
113329
+ content: {
113330
+ "application/json": components["schemas"]["Error"];
113331
+ };
113332
+ };
113333
+ };
113334
+ };
113335
+ put?: never;
113336
+ post?: never;
113337
+ delete?: never;
113338
+ options?: never;
113339
+ head?: never;
113340
+ patch?: never;
113341
+ trace?: never;
113342
+ };
113343
+ "/finanzas/tax-tags/accounts": {
113344
+ parameters: {
113345
+ query?: never;
113346
+ header?: never;
113347
+ path?: never;
113348
+ cookie?: never;
113349
+ };
113350
+ /**
113351
+ * Every account with its tax meaning
113352
+ * @description The plan de cuentas with each account's role (`tax_role`), the F22 code it feeds per regime for `tax_year`, and, for an account with none (`without_tax_meaning`), a `suggestion` from its name. The accounts of the starter charts carry their role; a tenant-created or imported account is «sin significado tributario» until an owner sets one: consumers show its amounts apart, never drop them. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read` (owner, admin, Contador seat).
113353
+ */
113354
+ get: {
113355
+ parameters: {
113356
+ query?: {
113357
+ tax_year?: number;
113358
+ include_archived?: "true" | "false";
113359
+ };
113360
+ header?: never;
113361
+ path?: never;
113362
+ cookie?: never;
113363
+ };
113364
+ requestBody?: never;
113365
+ responses: {
113366
+ /** @description Accounts with their tax meaning */
113367
+ 200: {
113368
+ headers: {
113369
+ [name: string]: unknown;
113370
+ };
113371
+ content: {
113372
+ /**
113373
+ * @example {
113374
+ * "data": {
113375
+ * "tax_year": 2026,
113376
+ * "without_tax_meaning": 1,
113377
+ * "accounts": [
113378
+ * {
113379
+ * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8201",
113380
+ * "name": "Arriendo",
113381
+ * "path": "Gastos de administración y venta › Gastos generales › Arriendo",
113382
+ * "kind": "gasto",
113383
+ * "archived": false,
113384
+ * "seeded": true,
113385
+ * "tax_role": "rent",
113386
+ * "tax_role_label": "Arriendos",
113387
+ * "without_tax_meaning": false,
113388
+ * "codes": {
113389
+ * "14A": {
113390
+ * "code": 1140,
113391
+ * "earlier": null
113392
+ * },
113393
+ * "14D3": {
113394
+ * "code": 1415,
113395
+ * "earlier": null
113396
+ * },
113397
+ * "14D8": {
113398
+ * "code": 1620,
113399
+ * "earlier": null
113400
+ * }
113401
+ * },
113402
+ * "suggestion": null
113403
+ * }
113404
+ * ]
113405
+ * }
113406
+ * }
113407
+ */
113408
+ "application/json": {
113409
+ data: components["schemas"]["FinanzasAccountTaxList"];
113410
+ };
113411
+ };
113412
+ };
113413
+ /** @description Validation error */
113414
+ 400: {
113415
+ headers: {
113416
+ [name: string]: unknown;
113417
+ };
113418
+ content: {
113419
+ "application/json": components["schemas"]["Error"];
113420
+ };
113421
+ };
113422
+ /** @description Unauthorized */
113423
+ 401: {
113424
+ headers: {
113425
+ [name: string]: unknown;
113426
+ };
113427
+ content: {
113428
+ "application/json": components["schemas"]["Error"];
113429
+ };
113430
+ };
113431
+ /** @description Forbidden */
113432
+ 403: {
113433
+ headers: {
113434
+ [name: string]: unknown;
113435
+ };
113436
+ content: {
113437
+ "application/json": components["schemas"]["Error"];
113438
+ };
113439
+ };
113440
+ /** @description Not found */
113441
+ 404: {
113442
+ headers: {
113443
+ [name: string]: unknown;
113444
+ };
113445
+ content: {
113446
+ "application/json": components["schemas"]["Error"];
113447
+ };
113448
+ };
113449
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113450
+ 409: {
113451
+ headers: {
113452
+ [name: string]: unknown;
113453
+ };
113454
+ content: {
113455
+ "application/json": components["schemas"]["Error"];
113456
+ };
113457
+ };
113458
+ /** @description Rate limited */
113459
+ 429: {
113460
+ headers: {
113461
+ [name: string]: unknown;
113462
+ };
113463
+ content: {
113464
+ "application/json": components["schemas"]["Error"];
113465
+ };
113466
+ };
113467
+ };
113468
+ };
113469
+ put?: never;
113470
+ post?: never;
113471
+ delete?: never;
113472
+ options?: never;
113473
+ head?: never;
113474
+ patch?: never;
113475
+ trace?: never;
113476
+ };
113477
+ "/finanzas/tax-tags/accounts/{accountId}": {
113478
+ parameters: {
113479
+ query?: never;
113480
+ header?: never;
113481
+ path?: never;
113482
+ cookie?: never;
113483
+ };
113484
+ get?: never;
113485
+ /**
113486
+ * Set or clear an account's tax role
113487
+ * @description Sets the role of an account (null clears it). The role must fit the account's type: 422 `FINANZAS_ACCOUNT_INVALID` (`tax_role_kind_mismatch`) otherwise. Sub-accounts do not inherit it: set each one. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write` (owner, admin). Audited.
113488
+ */
113489
+ put: {
113490
+ parameters: {
113491
+ query?: never;
113492
+ header?: never;
113493
+ path: {
113494
+ accountId: string;
113495
+ };
113496
+ cookie?: never;
113497
+ };
113498
+ requestBody?: {
113499
+ content: {
113500
+ /**
113501
+ * @example {
113502
+ * "tax_role": "rent"
113503
+ * }
113504
+ */
113505
+ "application/json": components["schemas"]["FinanzasAccountTaxBody"];
113506
+ };
113507
+ };
113508
+ responses: {
113509
+ /** @description The account's role */
113510
+ 200: {
113511
+ headers: {
113512
+ [name: string]: unknown;
113513
+ };
113514
+ content: {
113515
+ /**
113516
+ * @example {
113517
+ * "data": {
113518
+ * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8201",
113519
+ * "tax_role": "rent",
113520
+ * "tax_role_label": "Arriendos"
113521
+ * }
113522
+ * }
113523
+ */
113524
+ "application/json": {
113525
+ data: {
113526
+ /** Format: uuid */
113527
+ account_id: string;
113528
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
113529
+ tax_role_label: string | null;
113530
+ };
113531
+ };
113532
+ };
113533
+ };
113534
+ /** @description Validation error */
113535
+ 400: {
113536
+ headers: {
113537
+ [name: string]: unknown;
113538
+ };
113539
+ content: {
113540
+ "application/json": components["schemas"]["Error"];
113541
+ };
113542
+ };
113543
+ /** @description Unauthorized */
113544
+ 401: {
113545
+ headers: {
113546
+ [name: string]: unknown;
113547
+ };
113548
+ content: {
113549
+ "application/json": components["schemas"]["Error"];
113550
+ };
113551
+ };
113552
+ /** @description Forbidden */
113553
+ 403: {
113554
+ headers: {
113555
+ [name: string]: unknown;
113556
+ };
113557
+ content: {
113558
+ "application/json": components["schemas"]["Error"];
113559
+ };
113560
+ };
113561
+ /** @description Not found */
113562
+ 404: {
113563
+ headers: {
113564
+ [name: string]: unknown;
113565
+ };
113566
+ content: {
113567
+ "application/json": components["schemas"]["Error"];
113568
+ };
113569
+ };
113570
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113571
+ 409: {
113572
+ headers: {
113573
+ [name: string]: unknown;
113574
+ };
113575
+ content: {
113576
+ "application/json": components["schemas"]["Error"];
113577
+ };
113578
+ };
113579
+ /** @description Rate limited */
113580
+ 429: {
113581
+ headers: {
113582
+ [name: string]: unknown;
113583
+ };
113584
+ content: {
113585
+ "application/json": components["schemas"]["Error"];
113586
+ };
113587
+ };
113588
+ };
113589
+ };
113590
+ post?: never;
113591
+ delete?: never;
113592
+ options?: never;
113593
+ head?: never;
113594
+ patch?: never;
113595
+ trace?: never;
113596
+ };
113597
+ "/finanzas/tax-tags/non-deductible": {
113598
+ parameters: {
113599
+ query?: never;
113600
+ header?: never;
113601
+ path?: never;
113602
+ cookie?: never;
113603
+ };
113604
+ /**
113605
+ * Non-deductible marks of a year
113606
+ * @description The documents (by issue date) and bank movements (by day) of the commercial year that a person marked, and `defaults`: the fines and income-tax payments (`idpc` kind of `GET /finanzas/tax/payments`) that are non-deductible until a person says otherwise. A mark whose `overrides_default` is true says «deductible» over a default. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_reports:read` (owner, admin, Contador seat).
113607
+ */
113608
+ get: {
113609
+ parameters: {
113610
+ query: {
113611
+ year: number;
113612
+ };
113613
+ header?: never;
113614
+ path?: never;
113615
+ cookie?: never;
113616
+ };
113617
+ requestBody?: never;
113618
+ responses: {
113619
+ /** @description Marks and defaults */
113620
+ 200: {
113621
+ headers: {
113622
+ [name: string]: unknown;
113623
+ };
113624
+ content: {
113625
+ /**
113626
+ * @example {
113627
+ * "data": {
113628
+ * "year": 2025,
113629
+ * "items": [
113630
+ * {
113631
+ * "target": "document",
113632
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8202",
113633
+ * "date": "2025-06-12",
113634
+ * "amount_clp": 119000,
113635
+ * "label": "Restaurante X",
113636
+ * "non_deductible": {
113637
+ * "outcome": "tax_40",
113638
+ * "outcome_label": "Paga impuesto único de 40 % la empresa",
113639
+ * "owner": null,
113640
+ * "note": null,
113641
+ * "source": "person",
113642
+ * "reason": null,
113643
+ * "reason_label": null
113644
+ * },
113645
+ * "overrides_default": false
113646
+ * }
113647
+ * ],
113648
+ * "defaults": []
113649
+ * }
113650
+ * }
113651
+ */
113652
+ "application/json": {
113653
+ data: components["schemas"]["FinanzasNonDeductibleList"];
113654
+ };
113655
+ };
113656
+ };
113657
+ /** @description Validation error */
113658
+ 400: {
113659
+ headers: {
113660
+ [name: string]: unknown;
113661
+ };
113662
+ content: {
113663
+ "application/json": components["schemas"]["Error"];
113664
+ };
113665
+ };
113666
+ /** @description Unauthorized */
113667
+ 401: {
113668
+ headers: {
113669
+ [name: string]: unknown;
113670
+ };
113671
+ content: {
113672
+ "application/json": components["schemas"]["Error"];
113673
+ };
113674
+ };
113675
+ /** @description Forbidden */
113676
+ 403: {
113677
+ headers: {
113678
+ [name: string]: unknown;
113679
+ };
113680
+ content: {
113681
+ "application/json": components["schemas"]["Error"];
113682
+ };
113683
+ };
113684
+ /** @description Not found */
113685
+ 404: {
113686
+ headers: {
113687
+ [name: string]: unknown;
113688
+ };
113689
+ content: {
113690
+ "application/json": components["schemas"]["Error"];
113691
+ };
113692
+ };
113693
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113694
+ 409: {
113695
+ headers: {
113696
+ [name: string]: unknown;
113697
+ };
113698
+ content: {
113699
+ "application/json": components["schemas"]["Error"];
113700
+ };
113701
+ };
113702
+ /** @description Rate limited */
113703
+ 429: {
113704
+ headers: {
113705
+ [name: string]: unknown;
113706
+ };
113707
+ content: {
113708
+ "application/json": components["schemas"]["Error"];
113709
+ };
113710
+ };
113711
+ };
113712
+ };
113713
+ put?: never;
113714
+ post?: never;
113715
+ delete?: never;
113716
+ options?: never;
113717
+ head?: never;
113718
+ patch?: never;
113719
+ trace?: never;
113720
+ };
113721
+ "/finanzas/tax-tags/non-deductible/documents/{id}": {
113722
+ parameters: {
113723
+ query?: never;
113724
+ header?: never;
113725
+ path?: never;
113726
+ cookie?: never;
113727
+ };
113728
+ get?: never;
113729
+ /**
113730
+ * Mark a document as not deductible
113731
+ * @description Marks the document (whole) as not deductible with its art. 21 outcome: `tax_40` (the company pays the 40 % single tax), `owner` (taxed on the owner named by `owner_id`, one of the workspace's owners) or `left_out` (only left out of the base). `deductible` overrides a default (a fine, an income-tax payment). Replaces a previous mark. The regime field does not exist yet (#8087): the outcome is stored as chosen and the draft applies the regime rule (14 D N°8: only `left_out`). 422 `FINANZAS_OWNER_INVALID` for `owner` without a valid owner. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write` (owner, admin). Audited.
113732
+ */
113733
+ put: {
113734
+ parameters: {
113735
+ query?: never;
113736
+ header?: never;
113737
+ path: {
113738
+ id: string;
113739
+ };
113740
+ cookie?: never;
113741
+ };
113742
+ requestBody?: {
113743
+ content: {
113744
+ /**
113745
+ * @example {
113746
+ * "outcome": "left_out",
113747
+ * "note": "Multa del banco"
113748
+ * }
113749
+ */
113750
+ "application/json": components["schemas"]["FinanzasNonDeductibleBody"];
113751
+ };
113752
+ };
113753
+ responses: {
113754
+ /** @description The mark */
113755
+ 200: {
113756
+ headers: {
113757
+ [name: string]: unknown;
113758
+ };
113759
+ content: {
113760
+ /**
113761
+ * @example {
113762
+ * "data": {
113763
+ * "target": "document",
113764
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8202",
113765
+ * "non_deductible": {
113766
+ * "outcome": "tax_40",
113767
+ * "outcome_label": "Paga impuesto único de 40 % la empresa",
113768
+ * "owner": null,
113769
+ * "note": null,
113770
+ * "source": "person",
113771
+ * "reason": null,
113772
+ * "reason_label": null
113773
+ * }
113774
+ * }
113775
+ * }
113776
+ */
113777
+ "application/json": {
113778
+ data: components["schemas"]["FinanzasNonDeductibleResult"];
113779
+ };
113780
+ };
113781
+ };
113782
+ /** @description Validation error */
113783
+ 400: {
113784
+ headers: {
113785
+ [name: string]: unknown;
113786
+ };
113787
+ content: {
113788
+ "application/json": components["schemas"]["Error"];
113789
+ };
113790
+ };
113791
+ /** @description Unauthorized */
113792
+ 401: {
113793
+ headers: {
113794
+ [name: string]: unknown;
113795
+ };
113796
+ content: {
113797
+ "application/json": components["schemas"]["Error"];
113798
+ };
113799
+ };
113800
+ /** @description Forbidden */
113801
+ 403: {
113802
+ headers: {
113803
+ [name: string]: unknown;
113804
+ };
113805
+ content: {
113806
+ "application/json": components["schemas"]["Error"];
113807
+ };
113808
+ };
113809
+ /** @description Not found */
113810
+ 404: {
113811
+ headers: {
113812
+ [name: string]: unknown;
113813
+ };
113814
+ content: {
113815
+ "application/json": components["schemas"]["Error"];
113816
+ };
113817
+ };
113818
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113819
+ 409: {
113820
+ headers: {
113821
+ [name: string]: unknown;
113822
+ };
113823
+ content: {
113824
+ "application/json": components["schemas"]["Error"];
113825
+ };
113826
+ };
113827
+ /** @description Rate limited */
113828
+ 429: {
113829
+ headers: {
113830
+ [name: string]: unknown;
113831
+ };
113832
+ content: {
113833
+ "application/json": components["schemas"]["Error"];
113834
+ };
113835
+ };
113836
+ };
113837
+ };
113838
+ post?: never;
113839
+ /**
113840
+ * Remove the non-deductible mark of a document
113841
+ * @description Removes the person's mark: the document goes back to its default (deductible, unless it is a fine or an income-tax payment). `removed` is false when there was none. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write` (owner, admin). Audited.
113842
+ */
113843
+ delete: {
113844
+ parameters: {
113845
+ query?: never;
113846
+ header?: never;
113847
+ path: {
113848
+ id: string;
113849
+ };
113850
+ cookie?: never;
113851
+ };
113852
+ requestBody?: never;
113853
+ responses: {
113854
+ /** @description The mark removed */
113855
+ 200: {
113856
+ headers: {
113857
+ [name: string]: unknown;
113858
+ };
113859
+ content: {
113860
+ /**
113861
+ * @example {
113862
+ * "data": {
113863
+ * "target": "document",
113864
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8202",
113865
+ * "non_deductible": null,
113866
+ * "removed": true
113867
+ * }
113868
+ * }
113869
+ */
113870
+ "application/json": {
113871
+ data: components["schemas"]["FinanzasNonDeductibleResult"] & {
113872
+ removed: boolean;
113873
+ };
113874
+ };
113875
+ };
113876
+ };
113877
+ /** @description Validation error */
113878
+ 400: {
113879
+ headers: {
113880
+ [name: string]: unknown;
113881
+ };
113882
+ content: {
113883
+ "application/json": components["schemas"]["Error"];
113884
+ };
113885
+ };
113886
+ /** @description Unauthorized */
113887
+ 401: {
113888
+ headers: {
113889
+ [name: string]: unknown;
113890
+ };
113891
+ content: {
113892
+ "application/json": components["schemas"]["Error"];
113893
+ };
113894
+ };
113895
+ /** @description Forbidden */
113896
+ 403: {
113897
+ headers: {
113898
+ [name: string]: unknown;
113899
+ };
113900
+ content: {
113901
+ "application/json": components["schemas"]["Error"];
113902
+ };
113903
+ };
113904
+ /** @description Not found */
113905
+ 404: {
113906
+ headers: {
113907
+ [name: string]: unknown;
113908
+ };
113909
+ content: {
113910
+ "application/json": components["schemas"]["Error"];
113911
+ };
113912
+ };
113913
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113914
+ 409: {
113915
+ headers: {
113916
+ [name: string]: unknown;
113917
+ };
113918
+ content: {
113919
+ "application/json": components["schemas"]["Error"];
113920
+ };
113921
+ };
113922
+ /** @description Rate limited */
113923
+ 429: {
113924
+ headers: {
113925
+ [name: string]: unknown;
113926
+ };
113927
+ content: {
113928
+ "application/json": components["schemas"]["Error"];
113929
+ };
113930
+ };
113931
+ };
113932
+ };
113933
+ options?: never;
113934
+ head?: never;
113935
+ patch?: never;
113936
+ trace?: never;
113937
+ };
113938
+ "/finanzas/tax-tags/non-deductible/movements/{id}": {
113939
+ parameters: {
113940
+ query?: never;
113941
+ header?: never;
113942
+ path?: never;
113943
+ cookie?: never;
113944
+ };
113945
+ get?: never;
113946
+ /**
113947
+ * Mark a bank movement as not deductible
113948
+ * @description Marks the bank movement (whole) as not deductible with its art. 21 outcome: `tax_40` (the company pays the 40 % single tax), `owner` (taxed on the owner named by `owner_id`, one of the workspace's owners) or `left_out` (only left out of the base). `deductible` overrides a default (a fine, an income-tax payment). Replaces a previous mark. The regime field does not exist yet (#8087): the outcome is stored as chosen and the draft applies the regime rule (14 D N°8: only `left_out`). 422 `FINANZAS_OWNER_INVALID` for `owner` without a valid owner. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write` (owner, admin). Audited.
113949
+ */
113950
+ put: {
113951
+ parameters: {
113952
+ query?: never;
113953
+ header?: never;
113954
+ path: {
113955
+ id: string;
113956
+ };
113957
+ cookie?: never;
113958
+ };
113959
+ requestBody?: {
113960
+ content: {
113961
+ /**
113962
+ * @example {
113963
+ * "outcome": "left_out",
113964
+ * "note": "Multa del banco"
113965
+ * }
113966
+ */
113967
+ "application/json": components["schemas"]["FinanzasNonDeductibleBody"];
113968
+ };
113969
+ };
113970
+ responses: {
113971
+ /** @description The mark */
113972
+ 200: {
113973
+ headers: {
113974
+ [name: string]: unknown;
113975
+ };
113976
+ content: {
113977
+ /**
113978
+ * @example {
113979
+ * "data": {
113980
+ * "target": "movement",
113981
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8203",
113982
+ * "non_deductible": {
113983
+ * "outcome": "tax_40",
113984
+ * "outcome_label": "Paga impuesto único de 40 % la empresa",
113985
+ * "owner": null,
113986
+ * "note": null,
113987
+ * "source": "person",
113988
+ * "reason": null,
113989
+ * "reason_label": null
113990
+ * }
113991
+ * }
113992
+ * }
113993
+ */
113994
+ "application/json": {
113995
+ data: components["schemas"]["FinanzasNonDeductibleResult"];
113996
+ };
113997
+ };
113998
+ };
113999
+ /** @description Validation error */
114000
+ 400: {
114001
+ headers: {
114002
+ [name: string]: unknown;
114003
+ };
114004
+ content: {
114005
+ "application/json": components["schemas"]["Error"];
114006
+ };
114007
+ };
114008
+ /** @description Unauthorized */
114009
+ 401: {
114010
+ headers: {
114011
+ [name: string]: unknown;
114012
+ };
114013
+ content: {
114014
+ "application/json": components["schemas"]["Error"];
114015
+ };
114016
+ };
114017
+ /** @description Forbidden */
114018
+ 403: {
114019
+ headers: {
114020
+ [name: string]: unknown;
114021
+ };
114022
+ content: {
114023
+ "application/json": components["schemas"]["Error"];
114024
+ };
114025
+ };
114026
+ /** @description Not found */
114027
+ 404: {
114028
+ headers: {
114029
+ [name: string]: unknown;
114030
+ };
114031
+ content: {
114032
+ "application/json": components["schemas"]["Error"];
114033
+ };
114034
+ };
114035
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
114036
+ 409: {
114037
+ headers: {
114038
+ [name: string]: unknown;
114039
+ };
114040
+ content: {
114041
+ "application/json": components["schemas"]["Error"];
114042
+ };
114043
+ };
114044
+ /** @description Rate limited */
114045
+ 429: {
114046
+ headers: {
114047
+ [name: string]: unknown;
114048
+ };
114049
+ content: {
114050
+ "application/json": components["schemas"]["Error"];
114051
+ };
114052
+ };
114053
+ };
114054
+ };
114055
+ post?: never;
114056
+ /**
114057
+ * Remove the non-deductible mark of a bank movement
114058
+ * @description Removes the person's mark: the bank movement goes back to its default (deductible, unless it is a fine or an income-tax payment). `removed` is false when there was none. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas_admin:write` (owner, admin). Audited.
114059
+ */
114060
+ delete: {
114061
+ parameters: {
114062
+ query?: never;
114063
+ header?: never;
114064
+ path: {
114065
+ id: string;
114066
+ };
114067
+ cookie?: never;
114068
+ };
114069
+ requestBody?: never;
114070
+ responses: {
114071
+ /** @description The mark removed */
114072
+ 200: {
114073
+ headers: {
114074
+ [name: string]: unknown;
114075
+ };
114076
+ content: {
114077
+ /**
114078
+ * @example {
114079
+ * "data": {
114080
+ * "target": "movement",
114081
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8203",
114082
+ * "non_deductible": null,
114083
+ * "removed": true
114084
+ * }
114085
+ * }
114086
+ */
114087
+ "application/json": {
114088
+ data: components["schemas"]["FinanzasNonDeductibleResult"] & {
114089
+ removed: boolean;
114090
+ };
114091
+ };
114092
+ };
114093
+ };
114094
+ /** @description Validation error */
114095
+ 400: {
114096
+ headers: {
114097
+ [name: string]: unknown;
114098
+ };
114099
+ content: {
114100
+ "application/json": components["schemas"]["Error"];
114101
+ };
114102
+ };
114103
+ /** @description Unauthorized */
114104
+ 401: {
114105
+ headers: {
114106
+ [name: string]: unknown;
114107
+ };
114108
+ content: {
114109
+ "application/json": components["schemas"]["Error"];
114110
+ };
114111
+ };
114112
+ /** @description Forbidden */
114113
+ 403: {
114114
+ headers: {
114115
+ [name: string]: unknown;
114116
+ };
114117
+ content: {
114118
+ "application/json": components["schemas"]["Error"];
114119
+ };
114120
+ };
114121
+ /** @description Not found */
114122
+ 404: {
114123
+ headers: {
114124
+ [name: string]: unknown;
114125
+ };
114126
+ content: {
114127
+ "application/json": components["schemas"]["Error"];
114128
+ };
114129
+ };
114130
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
114131
+ 409: {
114132
+ headers: {
114133
+ [name: string]: unknown;
114134
+ };
114135
+ content: {
114136
+ "application/json": components["schemas"]["Error"];
114137
+ };
114138
+ };
114139
+ /** @description Rate limited */
114140
+ 429: {
114141
+ headers: {
114142
+ [name: string]: unknown;
114143
+ };
114144
+ content: {
114145
+ "application/json": components["schemas"]["Error"];
114146
+ };
114147
+ };
114148
+ };
114149
+ };
114150
+ options?: never;
114151
+ head?: never;
114152
+ patch?: never;
114153
+ trace?: never;
114154
+ };
114155
+ "/finanzas/resumen": {
114156
+ parameters: {
114157
+ query?: never;
114158
+ header?: never;
114159
+ path?: never;
114160
+ cookie?: never;
114161
+ };
114162
+ /**
114163
+ * Resumen: the Finanzas home, three answers and the context
114164
+ * @description The Finanzas home in one read, every figure from its detail screen: **cash** («¿cuánto me queda a fin de mes?») = the Flujo de caja projection — today’s balance of the operating accounts, the month-end and 30-day balance, the lowest point and `runs_out` (the first day under zero within 30 days, with its biggest payment); **result** («¿cuánto gasto? / ¿este mes gana plata?») = Costos y equilibrio for the current month at net amounts (ingresos, gastos = variables + fijos, «sin clasificar» apart and counted as variable, resultado operacional) against the punto de equilibrio of the last closed month; **inbox** («Te necesita») = the open «Por resolver» cases and the previous month’s close state; **automatic** = this month’s «Hecho por Vitrina» totals and the newest 3; **accounts** with their balances. `problem` is the one thing shown in red (cash running out, else a bank connection that needs a person). A caller without `finanzas_reports:read` gets `cash`, `result` and every account balance (`balance_clp`, `balance_as_of`) null; account names stay (`reports_visible: false`). A Contador sees patients as initials. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`.
114165
+ */
114166
+ get: {
114167
+ parameters: {
114168
+ query?: never;
114169
+ header?: never;
114170
+ path?: never;
114171
+ cookie?: never;
114172
+ };
114173
+ requestBody?: never;
114174
+ responses: {
114175
+ /** @description The Resumen */
114176
+ 200: {
114177
+ headers: {
114178
+ [name: string]: unknown;
114179
+ };
114180
+ content: {
114181
+ /**
114182
+ * @example {
114183
+ * "data": {
114184
+ * "as_of": "2026-10-30",
114185
+ * "month": "2026-10",
114186
+ * "month_label": "octubre 2026",
114187
+ * "currency": "CLP",
114188
+ * "reports_visible": true,
114189
+ * "synced_at": "2026-10-30T11:02:00.000Z",
114190
+ * "problem": {
114191
+ * "kind": "cash_runs_out",
114192
+ * "date": "2026-11-06",
114193
+ * "balance_clp": -412000
114194
+ * },
114195
+ * "cash": {
114196
+ * "today_clp": 4917109,
114197
+ * "balance_as_of": "2026-10-30T11:02:00.000Z",
114198
+ * "accounts_count": 3,
114199
+ * "unknown_count": 0,
114200
+ * "savings_clp": 12000000,
114201
+ * "month_end": {
114202
+ * "date": "2026-10-31",
114203
+ * "balance_clp": 5102000,
114204
+ * "band": {
114205
+ * "low_clp": 4980000,
114206
+ * "high_clp": 5260000
114207
+ * }
114208
+ * },
114209
+ * "in_30_days": {
114210
+ * "date": "2026-11-29",
114211
+ * "balance_clp": 3880000,
114212
+ * "band": {
114213
+ * "low_clp": 2100000,
114214
+ * "high_clp": 5400000
114215
+ * }
114216
+ * },
114217
+ * "lowest": {
114218
+ * "date": "2026-11-06",
114219
+ * "balance_clp": -412000,
114220
+ * "negative": true,
114221
+ * "is_today": false,
114222
+ * "cause": {
114223
+ * "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
114224
+ * "source": "payable",
114225
+ * "direction": "outflow",
114226
+ * "label": "Factura 4410 · Laboratorio Andes SpA",
114227
+ * "amount_clp": 5800000,
114228
+ * "date": "2026-11-06",
114229
+ * "due_date": "2026-11-06",
114230
+ * "overdue": false,
114231
+ * "movable": true,
114232
+ * "move": null,
114233
+ * "document": {
114234
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
114235
+ * "kind": "purchase",
114236
+ * "dte_type": 33,
114237
+ * "folio": "4410"
114238
+ * },
114239
+ * "contraparte": {
114240
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6601",
114241
+ * "name": "Laboratorio Andes SpA"
114242
+ * },
114243
+ * "recurring_item_id": null,
114244
+ * "rescue_id": null,
114245
+ * "count": null
114246
+ * }
114247
+ * },
114248
+ * "runs_out": {
114249
+ * "date": "2026-11-06",
114250
+ * "covered_until": "2026-11-05",
114251
+ * "balance_clp": -412000,
114252
+ * "cause": {
114253
+ * "key": "document:0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
114254
+ * "source": "payable",
114255
+ * "direction": "outflow",
114256
+ * "label": "Factura 4410 · Laboratorio Andes SpA",
114257
+ * "amount_clp": 5800000,
114258
+ * "date": "2026-11-06",
114259
+ * "due_date": "2026-11-06",
114260
+ * "overdue": false,
114261
+ * "movable": true,
114262
+ * "move": null,
114263
+ * "document": {
114264
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6501",
114265
+ * "kind": "purchase",
114266
+ * "dte_type": 33,
114267
+ * "folio": "4410"
114268
+ * },
114269
+ * "contraparte": {
114270
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6601",
114271
+ * "name": "Laboratorio Andes SpA"
114272
+ * },
114273
+ * "recurring_item_id": null,
114274
+ * "rescue_id": null,
114275
+ * "count": null
114276
+ * }
114277
+ * },
114278
+ * "overdue": {
114279
+ * "payables_clp": 0,
114280
+ * "payables_count": 0,
114281
+ * "stale_payables_clp": 0,
114282
+ * "stale_payables_count": 0,
114283
+ * "receivables_clp": 380000,
114284
+ * "receivables_count": 2
114285
+ * },
114286
+ * "inherited_overdue": {
114287
+ * "count": 0,
114288
+ * "amount_clp": 0
114289
+ * },
114290
+ * "points": [
114291
+ * {
114292
+ * "date": "2026-10-30",
114293
+ * "balance_clp": 4917109,
114294
+ * "band": {
114295
+ * "low_clp": 4917109,
114296
+ * "high_clp": 4917109
114297
+ * }
114298
+ * },
114299
+ * {
114300
+ * "date": "2026-10-31",
114301
+ * "balance_clp": 5102000,
114302
+ * "band": {
114303
+ * "low_clp": 4980000,
114304
+ * "high_clp": 5260000
114305
+ * }
114306
+ * }
114307
+ * ]
114308
+ * },
114309
+ * "result": {
114310
+ * "month": "2026-10",
114311
+ * "label": "octubre 2026",
114312
+ * "proforma": true,
114313
+ * "ingresos_clp": 41200000,
114314
+ * "gastos_clp": 38900000,
114315
+ * "variables_clp": 17400000,
114316
+ * "fijos_clp": 21500000,
114317
+ * "sin_clasificar_clp": 900000,
114318
+ * "resultado_clp": 2300000,
114319
+ * "equilibrio": {
114320
+ * "month": "2026-09",
114321
+ * "label": "septiembre 2026",
114322
+ * "equilibrio_clp": 44600000,
114323
+ * "sin_calculo": null,
114324
+ * "produccion": null,
114325
+ * "skipped_incompleto": null
114326
+ * },
114327
+ * "target_clp": 44600000,
114328
+ * "cobertura_pct": 92.4,
114329
+ * "brecha_clp": -3400000
114330
+ * },
114331
+ * "inbox": {
114332
+ * "open": 4,
114333
+ * "amount_at_stake_clp": 2860000,
114334
+ * "by_kind": {
114335
+ * "reconcile": 2,
114336
+ * "transfer": 0,
114337
+ * "classify": 1,
114338
+ * "missing_document": 1,
114339
+ * "unknown": 0
114340
+ * },
114341
+ * "close": {
114342
+ * "month": "2026-09",
114343
+ * "label": "septiembre 2026",
114344
+ * "state": "closed",
114345
+ * "open_cases": 0
114346
+ * }
114347
+ * },
114348
+ * "automatic": {
114349
+ * "month": "2026-10",
114350
+ * "count": 240,
114351
+ * "total_clp": 61200000,
114352
+ * "unreviewed_count": 31,
114353
+ * "by_actor": {
114354
+ * "rule": 150,
114355
+ * "match": 72,
114356
+ * "ai": 18
114357
+ * },
114358
+ * "recent": [
114359
+ * {
114360
+ * "kind": "link",
114361
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6701",
114362
+ * "actor": "match",
114363
+ * "label": "Pago de la factura 4388 de Laboratorio Andes SpA",
114364
+ * "day": "2026-10-29",
114365
+ * "amount_clp": 1240000,
114366
+ * "applied_at": "2026-10-29T14:10:00.000Z",
114367
+ * "movement": {
114368
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6801",
114369
+ * "day": "2026-10-29",
114370
+ * "amount_clp": 1240000,
114371
+ * "direction": "outbound",
114372
+ * "description": "Transferencia a Laboratorio Andes"
114373
+ * },
114374
+ * "document": null,
114375
+ * "target": "document",
114376
+ * "reasons": [
114377
+ * "rut",
114378
+ * "amount"
114379
+ * ],
114380
+ * "account": null,
114381
+ * "split": false,
114382
+ * "rule": null,
114383
+ * "reviewed_at": null,
114384
+ * "reviewed_by": null,
114385
+ * "group_name": "Laboratorio Andes SpA",
114386
+ * "group_key": "contraparte:3f6c1d2e-5b7a-4c1e-9d0f-2a8b6c4e1f70",
114387
+ * "group_count": 1,
114388
+ * "group_total_clp": 1240000
114389
+ * }
114390
+ * ]
114391
+ * },
114392
+ * "accounts": [
114393
+ * {
114394
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6401",
114395
+ * "name": "Cuenta corriente",
114396
+ * "institution_name": "Banco de Chile",
114397
+ * "number_masked": "··4821",
114398
+ * "type": "cuenta_corriente",
114399
+ * "currency": "CLP",
114400
+ * "balance_clp": 3719083,
114401
+ * "balance_as_of": "2026-10-30T11:02:00.000Z",
114402
+ * "in_cash": true
114403
+ * },
114404
+ * {
114405
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f6402",
114406
+ * "name": "Ahorro",
114407
+ * "institution_name": "Banco de Chile",
114408
+ * "number_masked": "··0057",
114409
+ * "type": "cuenta_ahorro",
114410
+ * "currency": "CLP",
114411
+ * "balance_clp": 12000000,
114412
+ * "balance_as_of": "2026-10-30T11:02:00.000Z",
114413
+ * "in_cash": false
114414
+ * }
114415
+ * ]
114416
+ * }
114417
+ * }
114418
+ */
114419
+ "application/json": {
114420
+ data: components["schemas"]["FinanzasResumen"];
113382
114421
  };
113383
114422
  };
113384
114423
  };
@@ -113661,13 +114700,14 @@ interface paths {
113661
114700
  cookie?: never;
113662
114701
  };
113663
114702
  /**
113664
- * Download the Contador package for a month (zip)
113665
- * @description One zip, `paquete-contador-<period>.zip`, with seven xlsx: `01-libro-de-compras`, `02-libro-de-ventas`, `03-honorarios`, `04-movimientos-por-cuenta` (one sheet per bank account), `05-clasificaciones-por-cuenta` (net, as the Resultado counts), `06-resultado` and `07-ajustes-posteriores-al-cierre`, each `<name>-<period>.xlsx`, built by the same code as each screen and its export. Read-only. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
114703
+ * Download the Contador package for a month or a year (zip)
114704
+ * @description One zip, `paquete-contador-<period>.zip`, with seven xlsx: `01-libro-de-compras`, `02-libro-de-ventas`, `03-honorarios`, `04-movimientos-por-cuenta` (one sheet per bank account), `05-clasificaciones-por-cuenta` (net, as the Resultado counts), `06-resultado` and `07-ajustes-posteriores-al-cierre`, each `<name>-<period>.xlsx`, built by the same code as each screen and its export. With `year=YYYY` (instead of `period`) it is the Paquete anual of that commercial year: `paquete-contador-<year>.zip`, eight xlsx: `00-estado-del-ano` (what makes the year incomplete), `01-resultado-por-cuenta` (a column per month and the total), `02-base-de-caja` (collected and paid by account, `no_operacional` money apart, undated items listed), `03-iva-y-ppm` (each F29, proposal or filed), `04-honorarios-y-retenciones` (with the comparison against F29 code 151), `05-libro-de-compras`, `06-libro-de-ventas` and `07-pagos-de-impuestos`, each `<name>-<year>.xlsx`. The year is never summed silently as complete: the estado file and the manifest name the months not closed, not read by the SII sync, with unclassified movements or documents, F29 periods with no filing, undated collections and payments and money out nothing explains. A future year answers 400, and so does the current year until a month of it has closed; a workspace with more than one sociedad answers 409. Read-only. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
113666
114705
  */
113667
114706
  get: {
113668
114707
  parameters: {
113669
114708
  query?: {
113670
114709
  period?: string;
114710
+ year?: number;
113671
114711
  };
113672
114712
  header?: never;
113673
114713
  path?: never;
@@ -113757,7 +114797,7 @@ interface paths {
113757
114797
  };
113758
114798
  /**
113759
114799
  * What the Contador package for a month holds
113760
- * @description The same package as the download, without the bytes: the period, the zip name and each file (key, label, name, rows, size). Over MCP this is the read that generates and checks the package; the zip itself downloads over HTTPS. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
114800
+ * @description The same package as the download, without the bytes: the period, the zip name and each file (key, label, name, rows, size). For a year, see `GET /finanzas/contador-export/annual-manifest`. Over MCP this is the read that generates and checks the package; the zip itself downloads over HTTPS. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
113761
114801
  */
113762
114802
  get: {
113763
114803
  parameters: {
@@ -113919,6 +114959,376 @@ interface paths {
113919
114959
  patch?: never;
113920
114960
  trace?: never;
113921
114961
  };
114962
+ "/finanzas/contador-export/annual-manifest": {
114963
+ parameters: {
114964
+ query?: never;
114965
+ header?: never;
114966
+ path?: never;
114967
+ cookie?: never;
114968
+ };
114969
+ /**
114970
+ * What the Paquete anual of a year holds and what it is missing
114971
+ * @description The Paquete anual's manifest, without the bytes: the files (key, label, name, rows, size), `complete` (true only when nothing is missing), `incomplete` (the months not closed, not read by the SII sync, with unclassified movements or documents, F29 periods with no filing, undated collections and payments, money out nothing explains: Spanish sentences, ready to show), `warnings` (retention declared versus the boletas) and one row per month. The zip downloads from `GET /finanzas/contador-export?year=`. `00-estado-del-ano` (what makes the year incomplete), `01-resultado-por-cuenta` (a column per month and the total), `02-base-de-caja` (collected and paid by account, `no_operacional` money apart, undated items listed), `03-iva-y-ppm` (each F29, proposal or filed), `04-honorarios-y-retenciones` (with the comparison against F29 code 151), `05-libro-de-compras`, `06-libro-de-ventas` and `07-pagos-de-impuestos`, each `<name>-<year>.xlsx`. A future year answers 400, and so does the current year until a month of it has closed; a workspace with more than one sociedad answers 409. A caller without the patient register (the Contador) sees a patient as «Paciente A. P.» with no RUT; the libro de ventas keeps the patient RUT on facturas and on notas de crédito or débito that cite one, and boletas carry neither RUT nor name. Requires the `finanzas` add-on — without it every Finanzas operation answers `402 ENTITLEMENT_NOT_ACTIVE` (`details.required = ["finanzas"]`). Requires `finanzas:read`, `finanzas_reports:read` and `finanzas:export` (the Contador seat, owners and admins).
114972
+ */
114973
+ get: {
114974
+ parameters: {
114975
+ query: {
114976
+ year: number;
114977
+ };
114978
+ header?: never;
114979
+ path?: never;
114980
+ cookie?: never;
114981
+ };
114982
+ requestBody?: never;
114983
+ responses: {
114984
+ /** @description The annual manifest */
114985
+ 200: {
114986
+ headers: {
114987
+ [name: string]: unknown;
114988
+ };
114989
+ content: {
114990
+ /**
114991
+ * @example {
114992
+ * "data": {
114993
+ * "kind": "annual",
114994
+ * "year": 2025,
114995
+ * "filename": "paquete-contador-2025.zip",
114996
+ * "in_progress": false,
114997
+ * "complete": true,
114998
+ * "sociedad": {
114999
+ * "connection_id": "0194f3a0-7c1e-7a52-9d1b-3c5e8f2a6b41",
115000
+ * "rut": "76.123.456-7",
115001
+ * "legal_name": "Clínica Ejemplo SpA"
115002
+ * },
115003
+ * "incomplete": [],
115004
+ * "warnings": [],
115005
+ * "months": [
115006
+ * {
115007
+ * "month": "2025-01",
115008
+ * "label": "Enero 2025",
115009
+ * "state": "closed",
115010
+ * "state_label": "Cerrado",
115011
+ * "in_progress": false,
115012
+ * "open_cases": 0,
115013
+ * "sii_read": true,
115014
+ * "f29": "filed",
115015
+ * "f29_label": "Presentado",
115016
+ * "issues": []
115017
+ * },
115018
+ * {
115019
+ * "month": "2025-02",
115020
+ * "label": "Febrero 2025",
115021
+ * "state": "closed",
115022
+ * "state_label": "Cerrado",
115023
+ * "in_progress": false,
115024
+ * "open_cases": 0,
115025
+ * "sii_read": true,
115026
+ * "f29": "filed",
115027
+ * "f29_label": "Presentado",
115028
+ * "issues": []
115029
+ * },
115030
+ * {
115031
+ * "month": "2025-03",
115032
+ * "label": "Marzo 2025",
115033
+ * "state": "closed",
115034
+ * "state_label": "Cerrado",
115035
+ * "in_progress": false,
115036
+ * "open_cases": 0,
115037
+ * "sii_read": true,
115038
+ * "f29": "filed",
115039
+ * "f29_label": "Presentado",
115040
+ * "issues": []
115041
+ * },
115042
+ * {
115043
+ * "month": "2025-04",
115044
+ * "label": "Abril 2025",
115045
+ * "state": "closed",
115046
+ * "state_label": "Cerrado",
115047
+ * "in_progress": false,
115048
+ * "open_cases": 0,
115049
+ * "sii_read": true,
115050
+ * "f29": "filed",
115051
+ * "f29_label": "Presentado",
115052
+ * "issues": []
115053
+ * },
115054
+ * {
115055
+ * "month": "2025-05",
115056
+ * "label": "Mayo 2025",
115057
+ * "state": "closed",
115058
+ * "state_label": "Cerrado",
115059
+ * "in_progress": false,
115060
+ * "open_cases": 0,
115061
+ * "sii_read": true,
115062
+ * "f29": "filed",
115063
+ * "f29_label": "Presentado",
115064
+ * "issues": []
115065
+ * },
115066
+ * {
115067
+ * "month": "2025-06",
115068
+ * "label": "Junio 2025",
115069
+ * "state": "closed",
115070
+ * "state_label": "Cerrado",
115071
+ * "in_progress": false,
115072
+ * "open_cases": 0,
115073
+ * "sii_read": true,
115074
+ * "f29": "filed",
115075
+ * "f29_label": "Presentado",
115076
+ * "issues": []
115077
+ * },
115078
+ * {
115079
+ * "month": "2025-07",
115080
+ * "label": "Julio 2025",
115081
+ * "state": "closed",
115082
+ * "state_label": "Cerrado",
115083
+ * "in_progress": false,
115084
+ * "open_cases": 0,
115085
+ * "sii_read": true,
115086
+ * "f29": "filed",
115087
+ * "f29_label": "Presentado",
115088
+ * "issues": []
115089
+ * },
115090
+ * {
115091
+ * "month": "2025-08",
115092
+ * "label": "Agosto 2025",
115093
+ * "state": "closed",
115094
+ * "state_label": "Cerrado",
115095
+ * "in_progress": false,
115096
+ * "open_cases": 0,
115097
+ * "sii_read": true,
115098
+ * "f29": "filed",
115099
+ * "f29_label": "Presentado",
115100
+ * "issues": []
115101
+ * },
115102
+ * {
115103
+ * "month": "2025-09",
115104
+ * "label": "Septiembre 2025",
115105
+ * "state": "closed",
115106
+ * "state_label": "Cerrado",
115107
+ * "in_progress": false,
115108
+ * "open_cases": 0,
115109
+ * "sii_read": true,
115110
+ * "f29": "filed",
115111
+ * "f29_label": "Presentado",
115112
+ * "issues": []
115113
+ * },
115114
+ * {
115115
+ * "month": "2025-10",
115116
+ * "label": "Octubre 2025",
115117
+ * "state": "closed",
115118
+ * "state_label": "Cerrado",
115119
+ * "in_progress": false,
115120
+ * "open_cases": 0,
115121
+ * "sii_read": true,
115122
+ * "f29": "filed",
115123
+ * "f29_label": "Presentado",
115124
+ * "issues": []
115125
+ * },
115126
+ * {
115127
+ * "month": "2025-11",
115128
+ * "label": "Noviembre 2025",
115129
+ * "state": "closed",
115130
+ * "state_label": "Cerrado",
115131
+ * "in_progress": false,
115132
+ * "open_cases": 0,
115133
+ * "sii_read": true,
115134
+ * "f29": "filed",
115135
+ * "f29_label": "Presentado",
115136
+ * "issues": []
115137
+ * },
115138
+ * {
115139
+ * "month": "2025-12",
115140
+ * "label": "Diciembre 2025",
115141
+ * "state": "closed",
115142
+ * "state_label": "Cerrado",
115143
+ * "in_progress": false,
115144
+ * "open_cases": 0,
115145
+ * "sii_read": true,
115146
+ * "f29": "filed",
115147
+ * "f29_label": "Presentado",
115148
+ * "issues": []
115149
+ * }
115150
+ * ],
115151
+ * "files": [
115152
+ * {
115153
+ * "key": "estado",
115154
+ * "label": "Estado del año",
115155
+ * "filename": "00-estado-del-ano-2025.xlsx",
115156
+ * "rows": 0,
115157
+ * "size_bytes": 7904
115158
+ * },
115159
+ * {
115160
+ * "key": "resultado",
115161
+ * "label": "Resultado por cuenta",
115162
+ * "filename": "01-resultado-por-cuenta-2025.xlsx",
115163
+ * "rows": 96,
115164
+ * "size_bytes": 21350
115165
+ * },
115166
+ * {
115167
+ * "key": "base_caja",
115168
+ * "label": "Base de caja",
115169
+ * "filename": "02-base-de-caja-2025.xlsx",
115170
+ * "rows": 7412,
115171
+ * "size_bytes": 412880
115172
+ * },
115173
+ * {
115174
+ * "key": "iva_ppm",
115175
+ * "label": "IVA y PPM",
115176
+ * "filename": "03-iva-y-ppm-2025.xlsx",
115177
+ * "rows": 12,
115178
+ * "size_bytes": 8120
115179
+ * },
115180
+ * {
115181
+ * "key": "honorarios",
115182
+ * "label": "Honorarios y retenciones",
115183
+ * "filename": "04-honorarios-y-retenciones-2025.xlsx",
115184
+ * "rows": 148,
115185
+ * "size_bytes": 15660
115186
+ * },
115187
+ * {
115188
+ * "key": "libro_compras",
115189
+ * "label": "Libro de compras",
115190
+ * "filename": "05-libro-de-compras-2025.xlsx",
115191
+ * "rows": 1004,
115192
+ * "size_bytes": 88410
115193
+ * },
115194
+ * {
115195
+ * "key": "libro_ventas",
115196
+ * "label": "Libro de ventas",
115197
+ * "filename": "06-libro-de-ventas-2025.xlsx",
115198
+ * "rows": 14820,
115199
+ * "size_bytes": 702330
115200
+ * },
115201
+ * {
115202
+ * "key": "pagos_impuestos",
115203
+ * "label": "Pagos de impuestos",
115204
+ * "filename": "07-pagos-de-impuestos-2025.xlsx",
115205
+ * "rows": 24,
115206
+ * "size_bytes": 9240
115207
+ * }
115208
+ * ]
115209
+ * }
115210
+ * }
115211
+ */
115212
+ "application/json": {
115213
+ data: {
115214
+ /** @enum {string} */
115215
+ kind: "annual";
115216
+ year: number;
115217
+ /** @description The zip the download serves. */
115218
+ filename: string;
115219
+ /** @description The current year: figures still moving, future months missing. */
115220
+ in_progress: boolean;
115221
+ /** @description True only when `incomplete` is empty. Anything else: the year is NOT complete and nothing in it should be read as final. */
115222
+ complete: boolean;
115223
+ sociedad: {
115224
+ connection_id: string;
115225
+ rut: string;
115226
+ legal_name: string | null;
115227
+ } | null;
115228
+ incomplete: {
115229
+ /** @enum {string} */
115230
+ code: "month_not_closed" | "month_in_progress" | "month_not_started" | "sii_not_connected" | "sii_backfill_pending" | "sii_not_read" | "sii_not_read_previous_year" | "unclassified" | "incomplete_month" | "f29_missing" | "f29_not_filed" | "undated_collections" | "undated_payments" | "unexplained_outflows" | "rows_truncated";
115231
+ /** @description `YYYY-MM`, or null for an item about the whole year. */
115232
+ month: string | null;
115233
+ /** @description Spanish, ready to show. */
115234
+ message: string;
115235
+ }[];
115236
+ warnings: {
115237
+ /** @enum {string} */
115238
+ code: "honorarios_retention_differs" | "honorarios_no_declared_code";
115239
+ month: string | null;
115240
+ message: string;
115241
+ }[];
115242
+ months: {
115243
+ month: string;
115244
+ label: string;
115245
+ /** @enum {string} */
115246
+ state: "open" | "ready_to_close" | "closed" | "closed_imported" | "upcoming";
115247
+ state_label: string;
115248
+ in_progress: boolean;
115249
+ open_cases: number;
115250
+ sii_read: boolean;
115251
+ /** @enum {string} */
115252
+ f29: "filed" | "proposal" | "missing" | "not_due";
115253
+ f29_label: string;
115254
+ issues: ("month_not_closed" | "month_in_progress" | "month_not_started" | "sii_not_connected" | "sii_backfill_pending" | "sii_not_read" | "sii_not_read_previous_year" | "unclassified" | "incomplete_month" | "f29_missing" | "f29_not_filed" | "undated_collections" | "undated_payments" | "unexplained_outflows" | "rows_truncated")[];
115255
+ }[];
115256
+ files: {
115257
+ /** @enum {string} */
115258
+ key: "estado" | "resultado" | "base_caja" | "iva_ppm" | "honorarios" | "libro_compras" | "libro_ventas" | "pagos_impuestos";
115259
+ label: string;
115260
+ filename: string;
115261
+ rows: number;
115262
+ size_bytes: number;
115263
+ }[];
115264
+ };
115265
+ };
115266
+ };
115267
+ };
115268
+ /** @description Validation error */
115269
+ 400: {
115270
+ headers: {
115271
+ [name: string]: unknown;
115272
+ };
115273
+ content: {
115274
+ "application/json": components["schemas"]["Error"];
115275
+ };
115276
+ };
115277
+ /** @description Unauthorized */
115278
+ 401: {
115279
+ headers: {
115280
+ [name: string]: unknown;
115281
+ };
115282
+ content: {
115283
+ "application/json": components["schemas"]["Error"];
115284
+ };
115285
+ };
115286
+ /** @description Forbidden */
115287
+ 403: {
115288
+ headers: {
115289
+ [name: string]: unknown;
115290
+ };
115291
+ content: {
115292
+ "application/json": components["schemas"]["Error"];
115293
+ };
115294
+ };
115295
+ /** @description Not found */
115296
+ 404: {
115297
+ headers: {
115298
+ [name: string]: unknown;
115299
+ };
115300
+ content: {
115301
+ "application/json": components["schemas"]["Error"];
115302
+ };
115303
+ };
115304
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
115305
+ 409: {
115306
+ headers: {
115307
+ [name: string]: unknown;
115308
+ };
115309
+ content: {
115310
+ "application/json": components["schemas"]["Error"];
115311
+ };
115312
+ };
115313
+ /** @description Rate limited */
115314
+ 429: {
115315
+ headers: {
115316
+ [name: string]: unknown;
115317
+ };
115318
+ content: {
115319
+ "application/json": components["schemas"]["Error"];
115320
+ };
115321
+ };
115322
+ };
115323
+ };
115324
+ put?: never;
115325
+ post?: never;
115326
+ delete?: never;
115327
+ options?: never;
115328
+ head?: never;
115329
+ patch?: never;
115330
+ trace?: never;
115331
+ };
113922
115332
  "/finanzas/ads-connections": {
113923
115333
  parameters: {
113924
115334
  query?: never;
@@ -332539,6 +333949,11 @@ interface components {
332539
333949
  FinanzasAccountKind: "ingreso" | "costo" | "gasto" | "no_operacional";
332540
333950
  /** @enum {string|null} */
332541
333951
  FinanzasAccountBehavior: "fijo" | "variable" | null;
333952
+ /**
333953
+ * @description What the account's money is for the tax return (#8104); null = «sin significado tributario». Set it with `PUT /finanzas/tax-tags/accounts/{accountId}`.
333954
+ * @enum {string|null}
333955
+ */
333956
+ FinanzasTaxRole: "business_income" | "other_income" | "interest_income" | "goods_and_inputs" | "business_services" | "remunerations" | "honorarios" | "rent" | "interest" | "financial_charges" | "donations" | "related_party_expenses" | "income_tax" | "other_deductible" | "withdrawal" | "fixed_asset" | "loan" | "capital" | "own_funds" | "other_non_result" | null;
332542
333957
  /** @description Present only when the list was asked with `usage_month`. */
332543
333958
  FinanzasAccountUsage: {
332544
333959
  /** @example 2026-10 */
@@ -332563,6 +333978,7 @@ interface components {
332563
333978
  behavior: components["schemas"]["FinanzasAccountBehavior"];
332564
333979
  /** @description «No lleva documento»: money out classified here never has a legal document. It opens no «Falta documento» case and is not counted in «Egresos sin documento». */
332565
333980
  no_document: boolean;
333981
+ tax_role: components["schemas"]["FinanzasTaxRole"];
332566
333982
  position: number;
332567
333983
  depth: number;
332568
333984
  path: string;
@@ -335436,6 +336852,8 @@ interface components {
335436
336852
  path: string;
335437
336853
  archived: boolean;
335438
336854
  has_children: boolean;
336855
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
336856
+ tax_role_label: string | null;
335439
336857
  } | null;
335440
336858
  /** @description +1 adds to the operating result, −1 subtracts, 0 = a subtotal or outside the result (Retiros). */
335441
336859
  sign: 1 | -1 | 0;
@@ -335496,6 +336914,20 @@ interface components {
335496
336914
  } | null;
335497
336915
  }[];
335498
336916
  rows: components["schemas"]["FinanzasResultadoRow"][];
336917
+ /** @description The range by tax role (#8104), same sign and basis as the account rows: `total` of the accounts with the role, and the part marked non-deductible by art. 21 outcome (a fine or income-tax payment counts by default). `tax_role` null gathers the accounts without tax meaning, apart. */
336918
+ by_role: {
336919
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
336920
+ tax_role_label: string | null;
336921
+ /** @enum {string|null} */
336922
+ section: "income" | "outlay" | "non_result" | null;
336923
+ total: number;
336924
+ count: number;
336925
+ non_deductible: {
336926
+ tax_40: number;
336927
+ owner: number;
336928
+ left_out: number;
336929
+ };
336930
+ }[];
335499
336931
  summary: {
335500
336932
  resultado_operacional_clp: number;
335501
336933
  ingresos_clp: number;
@@ -335579,6 +337011,30 @@ interface components {
335579
337011
  counterparty_name: string | null;
335580
337012
  contraparte_id: string | null;
335581
337013
  } | null;
337014
+ /**
337015
+ * @description Art. 21 outcome: `tax_40` (the company pays the 40 % single tax), `owner` (taxed on an owner), `left_out` (only left out of the base). 14 D N°8 has no 40 % tax: only `left_out` applies there; the regime field does not exist yet (#8087), so the value a person chose is stored as is and consumers apply the regime rule (`outcomes[].regimes`).
337016
+ * @enum {string}
337017
+ */
337018
+ FinanzasNonDeductibleOutcome: "tax_40" | "owner" | "left_out";
337019
+ /** @description The non-deductible mark of the line's document (document lines) or bank movement (movement lines), a person's or a default (a fine, an income-tax payment); null = deductible. Consumers apply the regime rule (14 D N°8: only `left_out`). */
337020
+ FinanzasNonDeductible: {
337021
+ outcome: components["schemas"]["FinanzasNonDeductibleOutcome"];
337022
+ outcome_label: string;
337023
+ owner: {
337024
+ /** Format: uuid */
337025
+ id: string;
337026
+ name: string;
337027
+ } | null;
337028
+ note: string | null;
337029
+ /**
337030
+ * @description `person`: someone marked it. `default`: a fine or an income-tax payment (`idpc` tax-payment kind), non-deductible until a person says otherwise.
337031
+ * @enum {string}
337032
+ */
337033
+ source: "person" | "default";
337034
+ /** @enum {string|null} */
337035
+ reason: "fine" | "prior_year_income_tax" | null;
337036
+ reason_label: string | null;
337037
+ } | null;
335582
337038
  FinanzasCashLine: {
335583
337039
  /** @description `<payment_id>:<account_id | unclassified>`; a classified movement `<movement_id>:<account_id>`; a processor fee `<movement_id>:fee`. Stable across reads. */
335584
337040
  line_key: string;
@@ -335652,6 +337108,7 @@ interface components {
335652
337108
  kind: string;
335653
337109
  /** @description «No lleva documento»: money out on this account never has a legal document (sueldos, Previred, gastos financieros, retiros). */
335654
337110
  no_document: boolean;
337111
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
335655
337112
  } | null;
335656
337113
  /** @description The document has only a total (e.g. a gasto created from a movement): base = gross, VAT unknown. */
335657
337114
  no_vat_breakdown: boolean;
@@ -335662,6 +337119,10 @@ interface components {
335662
337119
  * @enum {string|null}
335663
337120
  */
335664
337121
  non_result_kind: "withdrawal" | "loan" | "fixed_asset" | "capital" | "own_funds" | "other" | null;
337122
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
337123
+ /** @enum {string|null} */
337124
+ tax_role_source: "account" | "clinic_payment" | null;
337125
+ non_deductible: components["schemas"]["FinanzasNonDeductible"];
335665
337126
  /** @description What this line settles of the document (link amount + rounding), signed: a refund is negative. */
335666
337127
  settled_clp: number;
335667
337128
  /** @description Its share of the document total after credit notes; honorarios: GROSS. */
@@ -335747,6 +337208,7 @@ interface components {
335747
337208
  kind: string;
335748
337209
  /** @description «No lleva documento»: money out on this account never has a legal document (sueldos, Previred, gastos financieros, retiros). */
335749
337210
  no_document: boolean;
337211
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
335750
337212
  }[];
335751
337213
  /** @description What this line settles of the document (link amount + rounding), signed: a refund is negative. */
335752
337214
  settled_clp: number;
@@ -336158,6 +337620,7 @@ interface components {
336158
337620
  kind: string;
336159
337621
  /** @description «No lleva documento»: money out on this account never has a legal document (sueldos, Previred, gastos financieros, retiros). */
336160
337622
  no_document: boolean;
337623
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
336161
337624
  } | null;
336162
337625
  undocumented: boolean;
336163
337626
  /**
@@ -336181,6 +337644,42 @@ interface components {
336181
337644
  /** @description Honorarios: the retención (gross − settled), shown apart; 0 otherwise. */
336182
337645
  retention_clp: number;
336183
337646
  }[];
337647
+ /** @description Always returned: one subtotal per (side, document year, tax role, non-deductible outcome and owner) over `collections`, `payments` and `non_result`, so the F22 draft maps roles to codes (`GET /finanzas/tax-tags/roles`) without re-reading accounts. `tax_role` null = without tax meaning, apart. Lines marked non-deductible are subtotalled apart from the deductible ones. */
337648
+ by_role: {
337649
+ /** @enum {string} */
337650
+ side: "collection" | "payment";
337651
+ /**
337652
+ * @description `current` = issued in the year asked (F22 1400 / 1409…); `earlier` = issued in an earlier year (1817 / 1818…); `later` = issued after the year (paid in advance).
337653
+ * @enum {string}
337654
+ */
337655
+ document_year: "current" | "earlier" | "later";
337656
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
337657
+ tax_role_label: string | null;
337658
+ /** @enum {string|null} */
337659
+ section: "income" | "outlay" | "non_result" | null;
337660
+ non_result: boolean;
337661
+ /** @enum {string|null} */
337662
+ non_deductible: "tax_40" | "owner" | "left_out" | null;
337663
+ owner: {
337664
+ id: string;
337665
+ name: string;
337666
+ } | null;
337667
+ lines: number;
337668
+ /** @description What this line settles of the document (link amount + rounding), signed: a refund is negative. */
337669
+ settled_clp: number;
337670
+ /** @description Its share of the document total after credit notes; honorarios: GROSS. */
337671
+ gross_clp: number;
337672
+ /** @description What counts in the cash base, by the Resultado net rule: a sale without IVA débito and specific taxes; a purchase with crédito fiscal without its recoverable IVA and specific taxes; anything else (boletas, gastos with only a total, honorarios) in full. */
337673
+ base_clp: number;
337674
+ /** @description Its share of the document's neto. */
337675
+ net_clp: number;
337676
+ /** @description Its share of the document's exento. */
337677
+ exempt_clp: number;
337678
+ /** @description `gross_clp − base_clp`: IVA and specific taxes left out. */
337679
+ vat_excluded_clp: number;
337680
+ /** @description Honorarios: the retención (gross − settled), shown apart; 0 otherwise. */
337681
+ retention_clp: number;
337682
+ }[];
336184
337683
  /** @description Always returned: one subtotal per (side, line kind, documented or not), over `collections` and `payments`. */
336185
337684
  by_kind: {
336186
337685
  /** @enum {string} */
@@ -337193,6 +338692,134 @@ interface components {
337193
338692
  /** Format: uuid */
337194
338693
  owner_id: string;
337195
338694
  };
338695
+ FinanzasTaxRoles: {
338696
+ tax_year: number;
338697
+ tax_years: number[];
338698
+ roles: {
338699
+ role: components["schemas"]["FinanzasTaxRole"] & string;
338700
+ label_es: string;
338701
+ /** @enum {string} */
338702
+ section: "income" | "outlay" | "non_result";
338703
+ hint_es: string;
338704
+ /** @description The F22 code this role feeds in each regime for the tax year; null = no code of that regime takes it. */
338705
+ codes: {
338706
+ "14A": {
338707
+ code: number;
338708
+ /** @description The twin code for documents of an earlier year paid in this one (14 D); null when the form has none. */
338709
+ earlier: number | null;
338710
+ } | null;
338711
+ "14D3": {
338712
+ code: number;
338713
+ /** @description The twin code for documents of an earlier year paid in this one (14 D); null when the form has none. */
338714
+ earlier: number | null;
338715
+ } | null;
338716
+ "14D8": {
338717
+ code: number;
338718
+ /** @description The twin code for documents of an earlier year paid in this one (14 D); null when the form has none. */
338719
+ earlier: number | null;
338720
+ } | null;
338721
+ };
338722
+ }[];
338723
+ outcomes: {
338724
+ outcome: components["schemas"]["FinanzasNonDeductibleOutcome"];
338725
+ label_es: string;
338726
+ hint_es: string;
338727
+ regimes: ("14A" | "14D3" | "14D8")[];
338728
+ }[];
338729
+ default_reasons: {
338730
+ /** @enum {string} */
338731
+ reason: "fine" | "prior_year_income_tax";
338732
+ label_es: string;
338733
+ }[];
338734
+ };
338735
+ FinanzasAccountTaxList: {
338736
+ tax_year: number;
338737
+ /** @description Accounts with no role: «sin significado tributario». */
338738
+ without_tax_meaning: number;
338739
+ accounts: {
338740
+ /** Format: uuid */
338741
+ account_id: string;
338742
+ name: string;
338743
+ path: string;
338744
+ /** @enum {string} */
338745
+ kind: "ingreso" | "costo" | "gasto" | "no_operacional";
338746
+ archived: boolean;
338747
+ seeded: boolean;
338748
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
338749
+ tax_role_label: string | null;
338750
+ without_tax_meaning: boolean;
338751
+ /** @description The F22 code this role feeds in each regime for the tax year; null = no code of that regime takes it. */
338752
+ codes: {
338753
+ "14A": {
338754
+ code: number;
338755
+ /** @description The twin code for documents of an earlier year paid in this one (14 D); null when the form has none. */
338756
+ earlier: number | null;
338757
+ } | null;
338758
+ "14D3": {
338759
+ code: number;
338760
+ /** @description The twin code for documents of an earlier year paid in this one (14 D); null when the form has none. */
338761
+ earlier: number | null;
338762
+ } | null;
338763
+ "14D8": {
338764
+ code: number;
338765
+ /** @description The twin code for documents of an earlier year paid in this one (14 D); null when the form has none. */
338766
+ earlier: number | null;
338767
+ } | null;
338768
+ };
338769
+ /** @description For an account with no role: a proposal from its name (nothing is stored until a person sets it). */
338770
+ suggestion: {
338771
+ role: components["schemas"]["FinanzasTaxRole"] & string;
338772
+ label_es: string;
338773
+ /** @enum {string} */
338774
+ section: "income" | "outlay" | "non_result";
338775
+ /** @enum {string} */
338776
+ reason: "name" | "parent" | "kind";
338777
+ } | null;
338778
+ }[];
338779
+ };
338780
+ FinanzasAccountTaxBody: {
338781
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
338782
+ };
338783
+ FinanzasNonDeductibleList: {
338784
+ year: number;
338785
+ items: {
338786
+ /** @enum {string} */
338787
+ target: "document" | "movement";
338788
+ /** Format: uuid */
338789
+ id: string;
338790
+ date: string;
338791
+ amount_clp: number;
338792
+ label: string | null;
338793
+ non_deductible: components["schemas"]["FinanzasNonDeductible"];
338794
+ /** @description A person said «deductible» over a default. */
338795
+ overrides_default: boolean;
338796
+ }[];
338797
+ defaults: {
338798
+ /** Format: uuid */
338799
+ movement_id: string;
338800
+ non_deductible: components["schemas"]["FinanzasNonDeductible"] & Record<string, never>;
338801
+ }[];
338802
+ };
338803
+ FinanzasNonDeductibleResult: {
338804
+ /** @enum {string} */
338805
+ target: "document" | "movement";
338806
+ /** Format: uuid */
338807
+ id: string;
338808
+ non_deductible: components["schemas"]["FinanzasNonDeductible"] & unknown;
338809
+ };
338810
+ FinanzasNonDeductibleBody: {
338811
+ /**
338812
+ * @description `tax_40`, `owner` (needs `owner_id`), `left_out`, or `deductible` to override a default (a fine or income-tax payment a person says is deductible).
338813
+ * @enum {string}
338814
+ */
338815
+ outcome: "tax_40" | "owner" | "left_out" | "deductible";
338816
+ /**
338817
+ * Format: uuid
338818
+ * @description Required with `owner`, refused otherwise.
338819
+ */
338820
+ owner_id?: string | null;
338821
+ note?: string | null;
338822
+ };
337196
338823
  FinanzasResumenCash: {
337197
338824
  /** @description «Caja hoy»: today’s balance of the operating accounts (savings apart) = the Flujo de caja opening. */
337198
338825
  today_clp: number;