@vitrina/api 17.119.0 → 17.121.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 +1767 -239
  2. package/dist/index.d.ts +1767 -239
  3. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -113193,7 +113193,7 @@ interface paths {
113193
113193
  patch?: never;
113194
113194
  trace?: never;
113195
113195
  };
113196
- "/finanzas/tax-tags/roles": {
113196
+ "/finanzas/tax-regime": {
113197
113197
  parameters: {
113198
113198
  query?: never;
113199
113199
  header?: never;
@@ -113201,13 +113201,14 @@ interface paths {
113201
113201
  cookie?: never;
113202
113202
  };
113203
113203
  /**
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).
113204
+ * The tax regime of each sociedad for a commercial year
113205
+ * @description Régimen tributario per sociedad: the regime in force for `year` (default this year), or `null` when none was ever set (never a default), plus the history. The regime is set by a person today (`source: person`); the SII backend has no reader for it, `sii` is reserved. Pro Pyme regimes carry an `income_check` (average annual income of the 3 prior years against 75.000 UF, from Finanzas’ accrual income, or `no_data`), and 14 D N°8 a warning when an owner is a legal person. Warnings are facts with their numbers and never block a write. 422 `FINANZAS_TAX_REGIME_INVALID` with `details.reason` (`sociedad_not_found`, `regime_not_found`). Requires the `finanzas` add-on (otherwise `402 ENTITLEMENT_NOT_ACTIVE`). Requires `finanzas_reports:read`.
113206
113206
  */
113207
113207
  get: {
113208
113208
  parameters: {
113209
113209
  query?: {
113210
- tax_year?: number;
113210
+ dte_connection_id?: string;
113211
+ year?: number;
113211
113212
  };
113212
113213
  header?: never;
113213
113214
  path?: never;
@@ -113215,7 +113216,7 @@ interface paths {
113215
113216
  };
113216
113217
  requestBody?: never;
113217
113218
  responses: {
113218
- /** @description Roles and outcomes */
113219
+ /** @description Regimes */
113219
113220
  200: {
113220
113221
  headers: {
113221
113222
  [name: string]: unknown;
@@ -113224,55 +113225,67 @@ interface paths {
113224
113225
  /**
113225
113226
  * @example {
113226
113227
  * "data": {
113227
- * "tax_year": 2026,
113228
- * "tax_years": [
113229
- * 2026
113230
- * ],
113231
- * "roles": [
113228
+ * "sociedades": [
113232
113229
  * {
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
113241
- * },
113242
- * "14D3": {
113243
- * "code": 1415,
113244
- * "earlier": null
113245
- * },
113246
- * "14D8": {
113247
- * "code": 1620,
113248
- * "earlier": null
113230
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113231
+ * "legal_name": "Clínica Sonrisa SpA",
113232
+ * "tax_id": "76123456-0",
113233
+ * "commercial_year": 2026,
113234
+ * "regime": "14D3",
113235
+ * "regime_name": "Pro Pyme General",
113236
+ * "regime_article": "14 D N°3",
113237
+ * "regime_label": "Pro Pyme General (14 D N°3)",
113238
+ * "in_force": {
113239
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7101",
113240
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113241
+ * "regime": "14D3",
113242
+ * "applies_from_year": 2025,
113243
+ * "source": "person",
113244
+ * "set_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113245
+ * "set_at": "2026-11-22T12:00:00.000Z"
113246
+ * },
113247
+ * "history": [
113248
+ * {
113249
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7101",
113250
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113251
+ * "regime": "14D3",
113252
+ * "applies_from_year": 2025,
113253
+ * "source": "person",
113254
+ * "set_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113255
+ * "set_at": "2026-11-22T12:00:00.000Z"
113249
113256
  * }
113250
- * }
113251
- * }
113252
- * ],
113253
- * "outcomes": [
113254
- * {
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": [
113266
- * {
113267
- * "reason": "fine",
113268
- * "label_es": "Multa"
113257
+ * ],
113258
+ * "income_check": {
113259
+ * "ceiling_uf": 75000,
113260
+ * "single_year_cap_uf": 85000,
113261
+ * "status": "ok",
113262
+ * "years_used": [
113263
+ * 2025
113264
+ * ],
113265
+ * "years_missing": [
113266
+ * {
113267
+ * "year": 2023,
113268
+ * "reason": "no_tax_tables"
113269
+ * },
113270
+ * {
113271
+ * "year": 2024,
113272
+ * "reason": "no_tax_tables"
113273
+ * }
113274
+ * ],
113275
+ * "income_uf_by_year": {
113276
+ * "2025": 9800
113277
+ * },
113278
+ * "average_uf": 9800,
113279
+ * "message": "Ingreso bruto promedio 9.800 UF (2025), límite 75.000 UF. Faltan 2023 y 2024 en Finanzas."
113280
+ * },
113281
+ * "warnings": []
113269
113282
  * }
113270
113283
  * ]
113271
113284
  * }
113272
113285
  * }
113273
113286
  */
113274
113287
  "application/json": {
113275
- data: components["schemas"]["FinanzasTaxRoles"];
113288
+ data: components["schemas"]["FinanzasTaxRegimeList"];
113276
113289
  };
113277
113290
  };
113278
113291
  };
@@ -113333,38 +113346,35 @@ interface paths {
113333
113346
  };
113334
113347
  };
113335
113348
  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
113349
  /**
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).
113350
+ * Set or correct the tax regime of a sociedad from a commercial year
113351
+ * @description Adds a row to the history; the regime applies from `applies_from_year` until a later row says otherwise, so a change on 1 January is a new row. Setting the same year again corrects it (the earlier row stays in the history). The write is accepted whatever the warnings say. 422 `FINANZAS_TAX_REGIME_INVALID` with `details.reason` (`sociedad_not_found`, `regime_not_found`). Requires the `finanzas` add-on (otherwise `402 ENTITLEMENT_NOT_ACTIVE`). Requires `finanzas_admin:write` (the Contador seat is read-only); audited.
113353
113352
  */
113354
- get: {
113353
+ post: {
113355
113354
  parameters: {
113356
- query?: {
113357
- tax_year?: number;
113358
- include_archived?: "true" | "false";
113355
+ query?: never;
113356
+ header?: {
113357
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
113358
+ "Idempotency-Key"?: string;
113359
113359
  };
113360
- header?: never;
113361
113360
  path?: never;
113362
113361
  cookie?: never;
113363
113362
  };
113364
- requestBody?: never;
113363
+ requestBody?: {
113364
+ content: {
113365
+ /**
113366
+ * @example {
113367
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113368
+ * "regime": "14D3",
113369
+ * "applies_from_year": 2025
113370
+ * }
113371
+ */
113372
+ "application/json": components["schemas"]["FinanzasTaxRegimeSetBody"];
113373
+ };
113374
+ };
113365
113375
  responses: {
113366
- /** @description Accounts with their tax meaning */
113367
- 200: {
113376
+ /** @description The row and the view for that year */
113377
+ 201: {
113368
113378
  headers: {
113369
113379
  [name: string]: unknown;
113370
113380
  };
@@ -113372,41 +113382,74 @@ interface paths {
113372
113382
  /**
113373
113383
  * @example {
113374
113384
  * "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
113385
+ * "row": {
113386
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7101",
113387
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113388
+ * "regime": "14D3",
113389
+ * "applies_from_year": 2025,
113390
+ * "source": "person",
113391
+ * "set_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113392
+ * "set_at": "2026-11-22T12:00:00.000Z"
113393
+ * },
113394
+ * "view": {
113395
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113396
+ * "legal_name": "Clínica Sonrisa SpA",
113397
+ * "tax_id": "76123456-0",
113398
+ * "commercial_year": 2026,
113399
+ * "regime": "14D3",
113400
+ * "regime_name": "Pro Pyme General",
113401
+ * "regime_article": "14 D N°3",
113402
+ * "regime_label": "Pro Pyme General (14 D N°3)",
113403
+ * "in_force": {
113404
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7101",
113405
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113406
+ * "regime": "14D3",
113407
+ * "applies_from_year": 2025,
113408
+ * "source": "person",
113409
+ * "set_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113410
+ * "set_at": "2026-11-22T12:00:00.000Z"
113411
+ * },
113412
+ * "history": [
113413
+ * {
113414
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7101",
113415
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113416
+ * "regime": "14D3",
113417
+ * "applies_from_year": 2025,
113418
+ * "source": "person",
113419
+ * "set_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113420
+ * "set_at": "2026-11-22T12:00:00.000Z"
113421
+ * }
113422
+ * ],
113423
+ * "income_check": {
113424
+ * "ceiling_uf": 75000,
113425
+ * "single_year_cap_uf": 85000,
113426
+ * "status": "ok",
113427
+ * "years_used": [
113428
+ * 2025
113429
+ * ],
113430
+ * "years_missing": [
113431
+ * {
113432
+ * "year": 2023,
113433
+ * "reason": "no_tax_tables"
113396
113434
  * },
113397
- * "14D8": {
113398
- * "code": 1620,
113399
- * "earlier": null
113435
+ * {
113436
+ * "year": 2024,
113437
+ * "reason": "no_tax_tables"
113400
113438
  * }
113439
+ * ],
113440
+ * "income_uf_by_year": {
113441
+ * "2025": 9800
113401
113442
  * },
113402
- * "suggestion": null
113403
- * }
113404
- * ]
113443
+ * "average_uf": 9800,
113444
+ * "message": "Ingreso bruto promedio 9.800 UF (2025), límite 75.000 UF. Faltan 2023 y 2024 en Finanzas."
113445
+ * },
113446
+ * "warnings": []
113447
+ * }
113405
113448
  * }
113406
113449
  * }
113407
113450
  */
113408
113451
  "application/json": {
113409
- data: components["schemas"]["FinanzasAccountTaxList"];
113452
+ data: components["schemas"]["FinanzasTaxRegimeSetResult"];
113410
113453
  };
113411
113454
  };
113412
113455
  };
@@ -113466,15 +113509,13 @@ interface paths {
113466
113509
  };
113467
113510
  };
113468
113511
  };
113469
- put?: never;
113470
- post?: never;
113471
113512
  delete?: never;
113472
113513
  options?: never;
113473
113514
  head?: never;
113474
113515
  patch?: never;
113475
113516
  trace?: never;
113476
113517
  };
113477
- "/finanzas/tax-tags/accounts/{accountId}": {
113518
+ "/finanzas/tax-regime/{id}": {
113478
113519
  parameters: {
113479
113520
  query?: never;
113480
113521
  header?: never;
@@ -113482,54 +113523,29 @@ interface paths {
113482
113523
  cookie?: never;
113483
113524
  };
113484
113525
  get?: never;
113526
+ put?: never;
113527
+ post?: never;
113485
113528
  /**
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.
113529
+ * Remove a mistaken tax-regime row
113530
+ * @description Only a row a person set. Prefer correcting with a new row, which keeps the history. 422 `FINANZAS_TAX_REGIME_INVALID` with `details.reason` (`sociedad_not_found`, `regime_not_found`). Requires the `finanzas` add-on (otherwise `402 ENTITLEMENT_NOT_ACTIVE`). Requires `finanzas_admin:write` (the Contador seat is read-only); audited.
113488
113531
  */
113489
- put: {
113532
+ delete: {
113490
113533
  parameters: {
113491
113534
  query?: never;
113492
113535
  header?: never;
113493
113536
  path: {
113494
- accountId: string;
113537
+ id: string;
113495
113538
  };
113496
113539
  cookie?: never;
113497
113540
  };
113498
- requestBody?: {
113499
- content: {
113500
- /**
113501
- * @example {
113502
- * "tax_role": "rent"
113503
- * }
113504
- */
113505
- "application/json": components["schemas"]["FinanzasAccountTaxBody"];
113506
- };
113507
- };
113541
+ requestBody?: never;
113508
113542
  responses: {
113509
- /** @description The account's role */
113510
- 200: {
113543
+ /** @description Removed */
113544
+ 204: {
113511
113545
  headers: {
113512
113546
  [name: string]: unknown;
113513
113547
  };
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
- };
113548
+ content?: never;
113533
113549
  };
113534
113550
  /** @description Validation error */
113535
113551
  400: {
@@ -113587,14 +113603,12 @@ interface paths {
113587
113603
  };
113588
113604
  };
113589
113605
  };
113590
- post?: never;
113591
- delete?: never;
113592
113606
  options?: never;
113593
113607
  head?: never;
113594
113608
  patch?: never;
113595
113609
  trace?: never;
113596
113610
  };
113597
- "/finanzas/tax-tags/non-deductible": {
113611
+ "/finanzas/f22-draft": {
113598
113612
  parameters: {
113599
113613
  query?: never;
113600
113614
  header?: never;
@@ -113602,13 +113616,14 @@ interface paths {
113602
113616
  cookie?: never;
113603
113617
  };
113604
113618
  /**
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).
113619
+ * The Borrador de F22 of a sociedad for a commercial year
113620
+ * @description A draft FOR THE ACCOUNTANT, by the sociedad's tax regime, on the cash basis of the Pro Pyme regimes (14 D N°3, 14 D N°8). Vitrina never files it. Every code of the regime's mapping is a line with exactly one `state` and what it was built from; an amount Vitrina cannot determine is `null`, never 0. Also: the cash base from the books and what stays outside it (accounts without tax meaning, non-deductible items, undated items), the reconciliation with the accrual Resultado, PPM by month brought to year end (with a warning while they come from SII proposals), the IDPC rate, the Pro Pyme income check, and for 14 D N°8 the attribution to owners (no owner's tax is computed). `available: false` with a `refusal` (no sociedad, more than one sociedad, no regime, regime 14 A, no mapping or no tax tables for the year). A future year answers 400. Requires the `finanzas` add-on (otherwise `402 ENTITLEMENT_NOT_ACTIVE`). Requires `finanzas_reports:read` (owner, admin, Contador seat).
113607
113621
  */
113608
113622
  get: {
113609
113623
  parameters: {
113610
- query: {
113611
- year: number;
113624
+ query?: {
113625
+ year?: number;
113626
+ dte_connection_id?: string;
113612
113627
  };
113613
113628
  header?: never;
113614
113629
  path?: never;
@@ -113616,7 +113631,7 @@ interface paths {
113616
113631
  };
113617
113632
  requestBody?: never;
113618
113633
  responses: {
113619
- /** @description Marks and defaults */
113634
+ /** @description The draft, or why there is none */
113620
113635
  200: {
113621
113636
  headers: {
113622
113637
  [name: string]: unknown;
@@ -113625,32 +113640,19 @@ interface paths {
113625
113640
  /**
113626
113641
  * @example {
113627
113642
  * "data": {
113643
+ * "available": false,
113628
113644
  * "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": []
113645
+ * "tax_year": 2026,
113646
+ * "refusal": {
113647
+ * "code": "no_regime",
113648
+ * "message": "La sociedad no tiene régimen tributario definido para 2025: defínelo en Finanzas para armar el borrador de F22."
113649
+ * },
113650
+ * "draft": null
113649
113651
  * }
113650
113652
  * }
113651
113653
  */
113652
113654
  "application/json": {
113653
- data: components["schemas"]["FinanzasNonDeductibleList"];
113655
+ data: components["schemas"]["FinanzasF22DraftResult"];
113654
113656
  };
113655
113657
  };
113656
113658
  };
@@ -113718,7 +113720,7 @@ interface paths {
113718
113720
  patch?: never;
113719
113721
  trace?: never;
113720
113722
  };
113721
- "/finanzas/tax-tags/non-deductible/documents/{id}": {
113723
+ "/finanzas/f22-draft/values": {
113722
113724
  parameters: {
113723
113725
  query?: never;
113724
113726
  header?: never;
@@ -113727,31 +113729,39 @@ interface paths {
113727
113729
  };
113728
113730
  get?: never;
113729
113731
  /**
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
+ * Enter values on the F22 draft
113733
+ * @description A person enters the codes Vitrina cannot build (last year's return, decisions, data it does not hold), per sociedad, tax year and code; an owner-side code (14 D N°8) names the owner. Each code must be in the regime's mapping for the year. Re-entering a code keeps the previous value in the history. The draft labels the line «Ingresado por una persona» with who and when; a value entered wins over one Vitrina computed. 422 `FINANZAS_F22_DRAFT_INVALID` with `details.reason` (`sociedad_not_found`, `draft_unavailable` + `refusal`, `code_not_in_mapping`, `owner_not_found`, `value_required`, `duplicate_code`, `value_not_found`). Requires the `finanzas` add-on (otherwise `402 ENTITLEMENT_NOT_ACTIVE`). Requires `finanzas_admin:write` (the Contador seat is read-only); audited.
113732
113734
  */
113733
113735
  put: {
113734
113736
  parameters: {
113735
113737
  query?: never;
113736
113738
  header?: never;
113737
- path: {
113738
- id: string;
113739
- };
113739
+ path?: never;
113740
113740
  cookie?: never;
113741
113741
  };
113742
113742
  requestBody?: {
113743
113743
  content: {
113744
113744
  /**
113745
113745
  * @example {
113746
- * "outcome": "left_out",
113747
- * "note": "Multa del banco"
113746
+ * "year": 2025,
113747
+ * "values": [
113748
+ * {
113749
+ * "code": 1426,
113750
+ * "amount_clp": 0,
113751
+ * "note": "Sin pérdida en el AT 2025"
113752
+ * },
113753
+ * {
113754
+ * "code": 1432,
113755
+ * "amount_clp": 0
113756
+ * }
113757
+ * ]
113748
113758
  * }
113749
113759
  */
113750
- "application/json": components["schemas"]["FinanzasNonDeductibleBody"];
113760
+ "application/json": components["schemas"]["FinanzasF22DraftValuesBody"];
113751
113761
  };
113752
113762
  };
113753
113763
  responses: {
113754
- /** @description The mark */
113764
+ /** @description The values entered */
113755
113765
  200: {
113756
113766
  headers: {
113757
113767
  [name: string]: unknown;
@@ -113760,22 +113770,798 @@ interface paths {
113760
113770
  /**
113761
113771
  * @example {
113762
113772
  * "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
- * }
113773
+ * "tax_year": 2026,
113774
+ * "values": [
113775
+ * {
113776
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7201",
113777
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113778
+ * "tax_year": 2026,
113779
+ * "code": 1426,
113780
+ * "owner_id": null,
113781
+ * "amount_clp": 0,
113782
+ * "text_value": null,
113783
+ * "source": "person",
113784
+ * "note": "Sin pérdida en el AT 2025",
113785
+ * "entered_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113786
+ * "entered_at": "2026-03-02T12:00:00.000Z"
113787
+ * }
113788
+ * ]
113774
113789
  * }
113775
113790
  * }
113776
113791
  */
113777
113792
  "application/json": {
113778
- data: components["schemas"]["FinanzasNonDeductibleResult"];
113793
+ data: components["schemas"]["FinanzasF22DraftValuesResult"];
113794
+ };
113795
+ };
113796
+ };
113797
+ /** @description Validation error */
113798
+ 400: {
113799
+ headers: {
113800
+ [name: string]: unknown;
113801
+ };
113802
+ content: {
113803
+ "application/json": components["schemas"]["Error"];
113804
+ };
113805
+ };
113806
+ /** @description Unauthorized */
113807
+ 401: {
113808
+ headers: {
113809
+ [name: string]: unknown;
113810
+ };
113811
+ content: {
113812
+ "application/json": components["schemas"]["Error"];
113813
+ };
113814
+ };
113815
+ /** @description Forbidden */
113816
+ 403: {
113817
+ headers: {
113818
+ [name: string]: unknown;
113819
+ };
113820
+ content: {
113821
+ "application/json": components["schemas"]["Error"];
113822
+ };
113823
+ };
113824
+ /** @description Not found */
113825
+ 404: {
113826
+ headers: {
113827
+ [name: string]: unknown;
113828
+ };
113829
+ content: {
113830
+ "application/json": components["schemas"]["Error"];
113831
+ };
113832
+ };
113833
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113834
+ 409: {
113835
+ headers: {
113836
+ [name: string]: unknown;
113837
+ };
113838
+ content: {
113839
+ "application/json": components["schemas"]["Error"];
113840
+ };
113841
+ };
113842
+ /** @description Rate limited */
113843
+ 429: {
113844
+ headers: {
113845
+ [name: string]: unknown;
113846
+ };
113847
+ content: {
113848
+ "application/json": components["schemas"]["Error"];
113849
+ };
113850
+ };
113851
+ };
113852
+ };
113853
+ post?: never;
113854
+ delete?: never;
113855
+ options?: never;
113856
+ head?: never;
113857
+ patch?: never;
113858
+ trace?: never;
113859
+ };
113860
+ "/finanzas/f22-draft/values/{code}": {
113861
+ parameters: {
113862
+ query?: never;
113863
+ header?: never;
113864
+ path?: never;
113865
+ cookie?: never;
113866
+ };
113867
+ get?: never;
113868
+ put?: never;
113869
+ post?: never;
113870
+ /**
113871
+ * Remove a value a person entered on the F22 draft
113872
+ * @description The line goes back to what Vitrina knows (or to «falta»). The history keeps the removed value. 422 `FINANZAS_F22_DRAFT_INVALID` with `details.reason` (`sociedad_not_found`, `draft_unavailable` + `refusal`, `code_not_in_mapping`, `owner_not_found`, `value_required`, `duplicate_code`, `value_not_found`). Requires the `finanzas` add-on (otherwise `402 ENTITLEMENT_NOT_ACTIVE`). Requires `finanzas_admin:write` (the Contador seat is read-only); audited.
113873
+ */
113874
+ delete: {
113875
+ parameters: {
113876
+ query: {
113877
+ year: number;
113878
+ owner_id?: string;
113879
+ dte_connection_id?: string;
113880
+ };
113881
+ header?: never;
113882
+ path: {
113883
+ code: number;
113884
+ };
113885
+ cookie?: never;
113886
+ };
113887
+ requestBody?: never;
113888
+ responses: {
113889
+ /** @description The removed value */
113890
+ 200: {
113891
+ headers: {
113892
+ [name: string]: unknown;
113893
+ };
113894
+ content: {
113895
+ /**
113896
+ * @example {
113897
+ * "data": {
113898
+ * "removed": {
113899
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7201",
113900
+ * "dte_connection_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7001",
113901
+ * "tax_year": 2026,
113902
+ * "code": 1426,
113903
+ * "owner_id": null,
113904
+ * "amount_clp": 0,
113905
+ * "text_value": null,
113906
+ * "source": "person",
113907
+ * "note": "Sin pérdida en el AT 2025",
113908
+ * "entered_by": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7102",
113909
+ * "entered_at": "2026-03-02T12:00:00.000Z"
113910
+ * }
113911
+ * }
113912
+ * }
113913
+ */
113914
+ "application/json": {
113915
+ data: {
113916
+ removed: components["schemas"]["FinanzasF22EnteredValue"];
113917
+ };
113918
+ };
113919
+ };
113920
+ };
113921
+ /** @description Validation error */
113922
+ 400: {
113923
+ headers: {
113924
+ [name: string]: unknown;
113925
+ };
113926
+ content: {
113927
+ "application/json": components["schemas"]["Error"];
113928
+ };
113929
+ };
113930
+ /** @description Unauthorized */
113931
+ 401: {
113932
+ headers: {
113933
+ [name: string]: unknown;
113934
+ };
113935
+ content: {
113936
+ "application/json": components["schemas"]["Error"];
113937
+ };
113938
+ };
113939
+ /** @description Forbidden */
113940
+ 403: {
113941
+ headers: {
113942
+ [name: string]: unknown;
113943
+ };
113944
+ content: {
113945
+ "application/json": components["schemas"]["Error"];
113946
+ };
113947
+ };
113948
+ /** @description Not found */
113949
+ 404: {
113950
+ headers: {
113951
+ [name: string]: unknown;
113952
+ };
113953
+ content: {
113954
+ "application/json": components["schemas"]["Error"];
113955
+ };
113956
+ };
113957
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
113958
+ 409: {
113959
+ headers: {
113960
+ [name: string]: unknown;
113961
+ };
113962
+ content: {
113963
+ "application/json": components["schemas"]["Error"];
113964
+ };
113965
+ };
113966
+ /** @description Rate limited */
113967
+ 429: {
113968
+ headers: {
113969
+ [name: string]: unknown;
113970
+ };
113971
+ content: {
113972
+ "application/json": components["schemas"]["Error"];
113973
+ };
113974
+ };
113975
+ };
113976
+ };
113977
+ options?: never;
113978
+ head?: never;
113979
+ patch?: never;
113980
+ trace?: never;
113981
+ };
113982
+ "/finanzas/tax-tags/roles": {
113983
+ parameters: {
113984
+ query?: never;
113985
+ header?: never;
113986
+ path?: never;
113987
+ cookie?: never;
113988
+ };
113989
+ /**
113990
+ * Tax roles of accounts, the F22 codes they feed, and art. 21 outcomes
113991
+ * @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).
113992
+ */
113993
+ get: {
113994
+ parameters: {
113995
+ query?: {
113996
+ tax_year?: number;
113997
+ };
113998
+ header?: never;
113999
+ path?: never;
114000
+ cookie?: never;
114001
+ };
114002
+ requestBody?: never;
114003
+ responses: {
114004
+ /** @description Roles and outcomes */
114005
+ 200: {
114006
+ headers: {
114007
+ [name: string]: unknown;
114008
+ };
114009
+ content: {
114010
+ /**
114011
+ * @example {
114012
+ * "data": {
114013
+ * "tax_year": 2026,
114014
+ * "tax_years": [
114015
+ * 2026
114016
+ * ],
114017
+ * "roles": [
114018
+ * {
114019
+ * "role": "rent",
114020
+ * "label_es": "Arriendos",
114021
+ * "section": "outlay",
114022
+ * "hint_es": "Arriendo del local, oficina o equipos.",
114023
+ * "codes": {
114024
+ * "14A": {
114025
+ * "code": 1140,
114026
+ * "earlier": null
114027
+ * },
114028
+ * "14D3": {
114029
+ * "code": 1415,
114030
+ * "earlier": null
114031
+ * },
114032
+ * "14D8": {
114033
+ * "code": 1620,
114034
+ * "earlier": null
114035
+ * }
114036
+ * }
114037
+ * }
114038
+ * ],
114039
+ * "outcomes": [
114040
+ * {
114041
+ * "outcome": "left_out",
114042
+ * "label_es": "Solo se excluye de la base",
114043
+ * "hint_es": "No se descuenta de la base y no paga impuesto aparte.",
114044
+ * "regimes": [
114045
+ * "14A",
114046
+ * "14D3",
114047
+ * "14D8"
114048
+ * ]
114049
+ * }
114050
+ * ],
114051
+ * "default_reasons": [
114052
+ * {
114053
+ * "reason": "fine",
114054
+ * "label_es": "Multa"
114055
+ * }
114056
+ * ]
114057
+ * }
114058
+ * }
114059
+ */
114060
+ "application/json": {
114061
+ data: components["schemas"]["FinanzasTaxRoles"];
114062
+ };
114063
+ };
114064
+ };
114065
+ /** @description Validation error */
114066
+ 400: {
114067
+ headers: {
114068
+ [name: string]: unknown;
114069
+ };
114070
+ content: {
114071
+ "application/json": components["schemas"]["Error"];
114072
+ };
114073
+ };
114074
+ /** @description Unauthorized */
114075
+ 401: {
114076
+ headers: {
114077
+ [name: string]: unknown;
114078
+ };
114079
+ content: {
114080
+ "application/json": components["schemas"]["Error"];
114081
+ };
114082
+ };
114083
+ /** @description Forbidden */
114084
+ 403: {
114085
+ headers: {
114086
+ [name: string]: unknown;
114087
+ };
114088
+ content: {
114089
+ "application/json": components["schemas"]["Error"];
114090
+ };
114091
+ };
114092
+ /** @description Not found */
114093
+ 404: {
114094
+ headers: {
114095
+ [name: string]: unknown;
114096
+ };
114097
+ content: {
114098
+ "application/json": components["schemas"]["Error"];
114099
+ };
114100
+ };
114101
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
114102
+ 409: {
114103
+ headers: {
114104
+ [name: string]: unknown;
114105
+ };
114106
+ content: {
114107
+ "application/json": components["schemas"]["Error"];
114108
+ };
114109
+ };
114110
+ /** @description Rate limited */
114111
+ 429: {
114112
+ headers: {
114113
+ [name: string]: unknown;
114114
+ };
114115
+ content: {
114116
+ "application/json": components["schemas"]["Error"];
114117
+ };
114118
+ };
114119
+ };
114120
+ };
114121
+ put?: never;
114122
+ post?: never;
114123
+ delete?: never;
114124
+ options?: never;
114125
+ head?: never;
114126
+ patch?: never;
114127
+ trace?: never;
114128
+ };
114129
+ "/finanzas/tax-tags/accounts": {
114130
+ parameters: {
114131
+ query?: never;
114132
+ header?: never;
114133
+ path?: never;
114134
+ cookie?: never;
114135
+ };
114136
+ /**
114137
+ * Every account with its tax meaning
114138
+ * @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).
114139
+ */
114140
+ get: {
114141
+ parameters: {
114142
+ query?: {
114143
+ tax_year?: number;
114144
+ include_archived?: "true" | "false";
114145
+ };
114146
+ header?: never;
114147
+ path?: never;
114148
+ cookie?: never;
114149
+ };
114150
+ requestBody?: never;
114151
+ responses: {
114152
+ /** @description Accounts with their tax meaning */
114153
+ 200: {
114154
+ headers: {
114155
+ [name: string]: unknown;
114156
+ };
114157
+ content: {
114158
+ /**
114159
+ * @example {
114160
+ * "data": {
114161
+ * "tax_year": 2026,
114162
+ * "without_tax_meaning": 1,
114163
+ * "accounts": [
114164
+ * {
114165
+ * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8201",
114166
+ * "name": "Arriendo",
114167
+ * "path": "Gastos de administración y venta › Gastos generales › Arriendo",
114168
+ * "kind": "gasto",
114169
+ * "archived": false,
114170
+ * "seeded": true,
114171
+ * "tax_role": "rent",
114172
+ * "tax_role_label": "Arriendos",
114173
+ * "without_tax_meaning": false,
114174
+ * "codes": {
114175
+ * "14A": {
114176
+ * "code": 1140,
114177
+ * "earlier": null
114178
+ * },
114179
+ * "14D3": {
114180
+ * "code": 1415,
114181
+ * "earlier": null
114182
+ * },
114183
+ * "14D8": {
114184
+ * "code": 1620,
114185
+ * "earlier": null
114186
+ * }
114187
+ * },
114188
+ * "suggestion": null
114189
+ * }
114190
+ * ]
114191
+ * }
114192
+ * }
114193
+ */
114194
+ "application/json": {
114195
+ data: components["schemas"]["FinanzasAccountTaxList"];
114196
+ };
114197
+ };
114198
+ };
114199
+ /** @description Validation error */
114200
+ 400: {
114201
+ headers: {
114202
+ [name: string]: unknown;
114203
+ };
114204
+ content: {
114205
+ "application/json": components["schemas"]["Error"];
114206
+ };
114207
+ };
114208
+ /** @description Unauthorized */
114209
+ 401: {
114210
+ headers: {
114211
+ [name: string]: unknown;
114212
+ };
114213
+ content: {
114214
+ "application/json": components["schemas"]["Error"];
114215
+ };
114216
+ };
114217
+ /** @description Forbidden */
114218
+ 403: {
114219
+ headers: {
114220
+ [name: string]: unknown;
114221
+ };
114222
+ content: {
114223
+ "application/json": components["schemas"]["Error"];
114224
+ };
114225
+ };
114226
+ /** @description Not found */
114227
+ 404: {
114228
+ headers: {
114229
+ [name: string]: unknown;
114230
+ };
114231
+ content: {
114232
+ "application/json": components["schemas"]["Error"];
114233
+ };
114234
+ };
114235
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
114236
+ 409: {
114237
+ headers: {
114238
+ [name: string]: unknown;
114239
+ };
114240
+ content: {
114241
+ "application/json": components["schemas"]["Error"];
114242
+ };
114243
+ };
114244
+ /** @description Rate limited */
114245
+ 429: {
114246
+ headers: {
114247
+ [name: string]: unknown;
114248
+ };
114249
+ content: {
114250
+ "application/json": components["schemas"]["Error"];
114251
+ };
114252
+ };
114253
+ };
114254
+ };
114255
+ put?: never;
114256
+ post?: never;
114257
+ delete?: never;
114258
+ options?: never;
114259
+ head?: never;
114260
+ patch?: never;
114261
+ trace?: never;
114262
+ };
114263
+ "/finanzas/tax-tags/accounts/{accountId}": {
114264
+ parameters: {
114265
+ query?: never;
114266
+ header?: never;
114267
+ path?: never;
114268
+ cookie?: never;
114269
+ };
114270
+ get?: never;
114271
+ /**
114272
+ * Set or clear an account's tax role
114273
+ * @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.
114274
+ */
114275
+ put: {
114276
+ parameters: {
114277
+ query?: never;
114278
+ header?: never;
114279
+ path: {
114280
+ accountId: string;
114281
+ };
114282
+ cookie?: never;
114283
+ };
114284
+ requestBody?: {
114285
+ content: {
114286
+ /**
114287
+ * @example {
114288
+ * "tax_role": "rent"
114289
+ * }
114290
+ */
114291
+ "application/json": components["schemas"]["FinanzasAccountTaxBody"];
114292
+ };
114293
+ };
114294
+ responses: {
114295
+ /** @description The account's role */
114296
+ 200: {
114297
+ headers: {
114298
+ [name: string]: unknown;
114299
+ };
114300
+ content: {
114301
+ /**
114302
+ * @example {
114303
+ * "data": {
114304
+ * "account_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8201",
114305
+ * "tax_role": "rent",
114306
+ * "tax_role_label": "Arriendos"
114307
+ * }
114308
+ * }
114309
+ */
114310
+ "application/json": {
114311
+ data: {
114312
+ /** Format: uuid */
114313
+ account_id: string;
114314
+ tax_role: components["schemas"]["FinanzasTaxRole"] & unknown;
114315
+ tax_role_label: string | null;
114316
+ };
114317
+ };
114318
+ };
114319
+ };
114320
+ /** @description Validation error */
114321
+ 400: {
114322
+ headers: {
114323
+ [name: string]: unknown;
114324
+ };
114325
+ content: {
114326
+ "application/json": components["schemas"]["Error"];
114327
+ };
114328
+ };
114329
+ /** @description Unauthorized */
114330
+ 401: {
114331
+ headers: {
114332
+ [name: string]: unknown;
114333
+ };
114334
+ content: {
114335
+ "application/json": components["schemas"]["Error"];
114336
+ };
114337
+ };
114338
+ /** @description Forbidden */
114339
+ 403: {
114340
+ headers: {
114341
+ [name: string]: unknown;
114342
+ };
114343
+ content: {
114344
+ "application/json": components["schemas"]["Error"];
114345
+ };
114346
+ };
114347
+ /** @description Not found */
114348
+ 404: {
114349
+ headers: {
114350
+ [name: string]: unknown;
114351
+ };
114352
+ content: {
114353
+ "application/json": components["schemas"]["Error"];
114354
+ };
114355
+ };
114356
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
114357
+ 409: {
114358
+ headers: {
114359
+ [name: string]: unknown;
114360
+ };
114361
+ content: {
114362
+ "application/json": components["schemas"]["Error"];
114363
+ };
114364
+ };
114365
+ /** @description Rate limited */
114366
+ 429: {
114367
+ headers: {
114368
+ [name: string]: unknown;
114369
+ };
114370
+ content: {
114371
+ "application/json": components["schemas"]["Error"];
114372
+ };
114373
+ };
114374
+ };
114375
+ };
114376
+ post?: never;
114377
+ delete?: never;
114378
+ options?: never;
114379
+ head?: never;
114380
+ patch?: never;
114381
+ trace?: never;
114382
+ };
114383
+ "/finanzas/tax-tags/non-deductible": {
114384
+ parameters: {
114385
+ query?: never;
114386
+ header?: never;
114387
+ path?: never;
114388
+ cookie?: never;
114389
+ };
114390
+ /**
114391
+ * Non-deductible marks of a year
114392
+ * @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).
114393
+ */
114394
+ get: {
114395
+ parameters: {
114396
+ query: {
114397
+ year: number;
114398
+ };
114399
+ header?: never;
114400
+ path?: never;
114401
+ cookie?: never;
114402
+ };
114403
+ requestBody?: never;
114404
+ responses: {
114405
+ /** @description Marks and defaults */
114406
+ 200: {
114407
+ headers: {
114408
+ [name: string]: unknown;
114409
+ };
114410
+ content: {
114411
+ /**
114412
+ * @example {
114413
+ * "data": {
114414
+ * "year": 2025,
114415
+ * "items": [
114416
+ * {
114417
+ * "target": "document",
114418
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8202",
114419
+ * "date": "2025-06-12",
114420
+ * "amount_clp": 119000,
114421
+ * "label": "Restaurante X",
114422
+ * "non_deductible": {
114423
+ * "outcome": "tax_40",
114424
+ * "outcome_label": "Paga impuesto único de 40 % la empresa",
114425
+ * "owner": null,
114426
+ * "note": null,
114427
+ * "source": "person",
114428
+ * "reason": null,
114429
+ * "reason_label": null
114430
+ * },
114431
+ * "overrides_default": false
114432
+ * }
114433
+ * ],
114434
+ * "defaults": []
114435
+ * }
114436
+ * }
114437
+ */
114438
+ "application/json": {
114439
+ data: components["schemas"]["FinanzasNonDeductibleList"];
114440
+ };
114441
+ };
114442
+ };
114443
+ /** @description Validation error */
114444
+ 400: {
114445
+ headers: {
114446
+ [name: string]: unknown;
114447
+ };
114448
+ content: {
114449
+ "application/json": components["schemas"]["Error"];
114450
+ };
114451
+ };
114452
+ /** @description Unauthorized */
114453
+ 401: {
114454
+ headers: {
114455
+ [name: string]: unknown;
114456
+ };
114457
+ content: {
114458
+ "application/json": components["schemas"]["Error"];
114459
+ };
114460
+ };
114461
+ /** @description Forbidden */
114462
+ 403: {
114463
+ headers: {
114464
+ [name: string]: unknown;
114465
+ };
114466
+ content: {
114467
+ "application/json": components["schemas"]["Error"];
114468
+ };
114469
+ };
114470
+ /** @description Not found */
114471
+ 404: {
114472
+ headers: {
114473
+ [name: string]: unknown;
114474
+ };
114475
+ content: {
114476
+ "application/json": components["schemas"]["Error"];
114477
+ };
114478
+ };
114479
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
114480
+ 409: {
114481
+ headers: {
114482
+ [name: string]: unknown;
114483
+ };
114484
+ content: {
114485
+ "application/json": components["schemas"]["Error"];
114486
+ };
114487
+ };
114488
+ /** @description Rate limited */
114489
+ 429: {
114490
+ headers: {
114491
+ [name: string]: unknown;
114492
+ };
114493
+ content: {
114494
+ "application/json": components["schemas"]["Error"];
114495
+ };
114496
+ };
114497
+ };
114498
+ };
114499
+ put?: never;
114500
+ post?: never;
114501
+ delete?: never;
114502
+ options?: never;
114503
+ head?: never;
114504
+ patch?: never;
114505
+ trace?: never;
114506
+ };
114507
+ "/finanzas/tax-tags/non-deductible/documents/{id}": {
114508
+ parameters: {
114509
+ query?: never;
114510
+ header?: never;
114511
+ path?: never;
114512
+ cookie?: never;
114513
+ };
114514
+ get?: never;
114515
+ /**
114516
+ * Mark a document as not deductible
114517
+ * @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.
114518
+ */
114519
+ put: {
114520
+ parameters: {
114521
+ query?: never;
114522
+ header?: never;
114523
+ path: {
114524
+ id: string;
114525
+ };
114526
+ cookie?: never;
114527
+ };
114528
+ requestBody?: {
114529
+ content: {
114530
+ /**
114531
+ * @example {
114532
+ * "outcome": "left_out",
114533
+ * "note": "Multa del banco"
114534
+ * }
114535
+ */
114536
+ "application/json": components["schemas"]["FinanzasNonDeductibleBody"];
114537
+ };
114538
+ };
114539
+ responses: {
114540
+ /** @description The mark */
114541
+ 200: {
114542
+ headers: {
114543
+ [name: string]: unknown;
114544
+ };
114545
+ content: {
114546
+ /**
114547
+ * @example {
114548
+ * "data": {
114549
+ * "target": "document",
114550
+ * "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8202",
114551
+ * "non_deductible": {
114552
+ * "outcome": "tax_40",
114553
+ * "outcome_label": "Paga impuesto único de 40 % la empresa",
114554
+ * "owner": null,
114555
+ * "note": null,
114556
+ * "source": "person",
114557
+ * "reason": null,
114558
+ * "reason_label": null
114559
+ * }
114560
+ * }
114561
+ * }
114562
+ */
114563
+ "application/json": {
114564
+ data: components["schemas"]["FinanzasNonDeductibleResult"];
113779
114565
  };
113780
114566
  };
113781
114567
  };
@@ -115255,12 +116041,23 @@ interface paths {
115255
116041
  }[];
115256
116042
  files: {
115257
116043
  /** @enum {string} */
115258
- key: "estado" | "resultado" | "base_caja" | "iva_ppm" | "honorarios" | "libro_compras" | "libro_ventas" | "pagos_impuestos";
116044
+ key: "estado" | "resultado" | "base_caja" | "iva_ppm" | "honorarios" | "libro_compras" | "libro_ventas" | "pagos_impuestos" | "borrador_f22";
115259
116045
  label: string;
115260
116046
  filename: string;
115261
116047
  rows: number;
115262
116048
  size_bytes: number;
115263
116049
  }[];
116050
+ /** @description The Borrador de F22 (#8088). Its full read is `GET /finanzas/f22-draft?year=`. */
116051
+ f22_draft: {
116052
+ /** @description True when the zip carries `08-borrador-f22-<year>.xlsx` (#8088): only for a sociedad in a Pro Pyme regime that year. */
116053
+ available: boolean;
116054
+ complete: boolean | null;
116055
+ /** @description Why there is no draft: `no_sociedad`, `multi_sociedad`, `no_regime`, `regime_14a`, `no_mapping`, `no_tax_tables`. Spanish message ready to show. */
116056
+ refusal: {
116057
+ code: string;
116058
+ message: string;
116059
+ } | null;
116060
+ };
115264
116061
  };
115265
116062
  };
115266
116063
  };
@@ -182433,7 +183230,8 @@ interface paths {
182433
183230
  * "checked_at": "2026-09-25T10:40:00.000Z",
182434
183231
  * "stale": false,
182435
183232
  * "sample": false,
182436
- * "ad_set_goals": null
183233
+ * "ad_set_goals": null,
183234
+ * "engaged_visit": null
182437
183235
  * }
182438
183236
  * }
182439
183237
  */
@@ -224520,14 +225318,14 @@ interface paths {
224520
225318
  * "review": {
224521
225319
  * "language": "es",
224522
225320
  * "category": "MARKETING",
224523
- * "category_note": "Marketing. Los mensajes de una secuencia se envían como marketing, así que la plantilla se pide en esa categoría y solo le llega a quien no se haya dado de baja de tus mensajes. Meta puede cambiar la categoría al revisarla; si la aprueba en otra, Vitrina no la envía.",
225321
+ * "category_note": "Marketing. Los mensajes de una secuencia se envían como marketing, así que la plantilla se pide en esa categoría y solo le llega a quien no se haya dado de baja de los mensajes. Meta puede cambiar la categoría al revisarla; si la aprueba en otra, Vitrina no la envía.",
224524
225322
  * "price_per_send": {
224525
225323
  * "market": "CL",
224526
225324
  * "currency": "USD",
224527
225325
  * "category": "marketing",
224528
225326
  * "amount": 0.0889,
224529
225327
  * "as_of": "2026-11-01",
224530
- * "label": "Cada envío de esta plantilla cuesta cerca de US$0,0889, la tarifa de Meta para una plantilla de marketing a un número de Chile. Meta lo cobra a tu cuenta de WhatsApp."
225328
+ * "label": "Cada envío de esta plantilla cuesta cerca de US$0,0889, la tarifa de Meta para una plantilla de marketing a un número de Chile. Meta lo cobra a la cuenta de WhatsApp."
224531
225329
  * },
224532
225330
  * "header": {
224533
225331
  * "format": "VIDEO",
@@ -224536,8 +225334,8 @@ interface paths {
224536
225334
  * "mime_type": "video/mp4",
224537
225335
  * "byte_size": 4200000
224538
225336
  * },
224539
- * "body_text": "Hola {{nombre}}, mira cómo es tu primera visita.",
224540
- * "body_preview": "Hola María, mira cómo es tu primera visita.",
225337
+ * "body_text": "Hola {{nombre}}, así es la primera visita.",
225338
+ * "body_preview": "Hola María, así es la primera visita.",
224541
225339
  * "variables": [
224542
225340
  * {
224543
225341
  * "name": "nombre",
@@ -224669,14 +225467,14 @@ interface paths {
224669
225467
  * "review": {
224670
225468
  * "language": "es",
224671
225469
  * "category": "MARKETING",
224672
- * "category_note": "Marketing. Los mensajes de una secuencia se envían como marketing, así que la plantilla se pide en esa categoría y solo le llega a quien no se haya dado de baja de tus mensajes. Meta puede cambiar la categoría al revisarla; si la aprueba en otra, Vitrina no la envía.",
225470
+ * "category_note": "Marketing. Los mensajes de una secuencia se envían como marketing, así que la plantilla se pide en esa categoría y solo le llega a quien no se haya dado de baja de los mensajes. Meta puede cambiar la categoría al revisarla; si la aprueba en otra, Vitrina no la envía.",
224673
225471
  * "price_per_send": {
224674
225472
  * "market": "CL",
224675
225473
  * "currency": "USD",
224676
225474
  * "category": "marketing",
224677
225475
  * "amount": 0.0889,
224678
225476
  * "as_of": "2026-11-01",
224679
- * "label": "Cada envío de esta plantilla cuesta cerca de US$0,0889, la tarifa de Meta para una plantilla de marketing a un número de Chile. Meta lo cobra a tu cuenta de WhatsApp."
225477
+ * "label": "Cada envío de esta plantilla cuesta cerca de US$0,0889, la tarifa de Meta para una plantilla de marketing a un número de Chile. Meta lo cobra a la cuenta de WhatsApp."
224680
225478
  * },
224681
225479
  * "header": {
224682
225480
  * "format": "VIDEO",
@@ -224685,8 +225483,8 @@ interface paths {
224685
225483
  * "mime_type": "video/mp4",
224686
225484
  * "byte_size": 4200000
224687
225485
  * },
224688
- * "body_text": "Hola {{nombre}}, mira cómo es tu primera visita.",
224689
- * "body_preview": "Hola María, mira cómo es tu primera visita.",
225486
+ * "body_text": "Hola {{nombre}}, así es la primera visita.",
225487
+ * "body_preview": "Hola María, así es la primera visita.",
224690
225488
  * "variables": [
224691
225489
  * {
224692
225490
  * "name": "nombre",
@@ -224829,14 +225627,14 @@ interface paths {
224829
225627
  * "review": {
224830
225628
  * "language": "es",
224831
225629
  * "category": "MARKETING",
224832
- * "category_note": "Marketing. Los mensajes de una secuencia se envían como marketing, así que la plantilla se pide en esa categoría y solo le llega a quien no se haya dado de baja de tus mensajes. Meta puede cambiar la categoría al revisarla; si la aprueba en otra, Vitrina no la envía.",
225630
+ * "category_note": "Marketing. Los mensajes de una secuencia se envían como marketing, así que la plantilla se pide en esa categoría y solo le llega a quien no se haya dado de baja de los mensajes. Meta puede cambiar la categoría al revisarla; si la aprueba en otra, Vitrina no la envía.",
224833
225631
  * "price_per_send": {
224834
225632
  * "market": "CL",
224835
225633
  * "currency": "USD",
224836
225634
  * "category": "marketing",
224837
225635
  * "amount": 0.0889,
224838
225636
  * "as_of": "2026-11-01",
224839
- * "label": "Cada envío de esta plantilla cuesta cerca de US$0,0889, la tarifa de Meta para una plantilla de marketing a un número de Chile. Meta lo cobra a tu cuenta de WhatsApp."
225637
+ * "label": "Cada envío de esta plantilla cuesta cerca de US$0,0889, la tarifa de Meta para una plantilla de marketing a un número de Chile. Meta lo cobra a la cuenta de WhatsApp."
224840
225638
  * },
224841
225639
  * "header": {
224842
225640
  * "format": "VIDEO",
@@ -224845,8 +225643,8 @@ interface paths {
224845
225643
  * "mime_type": "video/mp4",
224846
225644
  * "byte_size": 4200000
224847
225645
  * },
224848
- * "body_text": "Hola {{nombre}}, mira cómo es tu primera visita.",
224849
- * "body_preview": "Hola María, mira cómo es tu primera visita.",
225646
+ * "body_text": "Hola {{nombre}}, así es la primera visita.",
225647
+ * "body_preview": "Hola María, así es la primera visita.",
224850
225648
  * "variables": [
224851
225649
  * {
224852
225650
  * "name": "nombre",
@@ -246859,39 +247657,336 @@ interface paths {
246859
247657
  delete?: never;
246860
247658
  options?: never;
246861
247659
  head?: never;
246862
- patch?: never;
246863
- trace?: never;
246864
- };
246865
- "/ads/tracking/status": {
246866
- parameters: {
246867
- query?: never;
246868
- header?: never;
246869
- path?: never;
246870
- cookie?: never;
246871
- };
247660
+ patch?: never;
247661
+ trace?: never;
247662
+ };
247663
+ "/ads/tracking/status": {
247664
+ parameters: {
247665
+ query?: never;
247666
+ header?: never;
247667
+ path?: never;
247668
+ cookie?: never;
247669
+ };
247670
+ /**
247671
+ * Is the tag installed? Last event seen, events in 24 h, domain
247672
+ * @description Tag detection for the workspace's tracking key. `source: tracker` (the normal case) reads the measurement provider's per-key last-event time (`last_seen_at`), the tracker events of the last 24 hours (`events_24h`) and the hostname of the latest verified install check (`domain`). `installed` is `true` only when the tag sent an event in the last 30 days — never without a timestamp — and it STAYS `true` for 30 days after the last event, so it does not mean «live»: `reporting` does (events in the last 24 hours).
247673
+ *
247674
+ * When the per-key read is unavailable the answer falls back to the health read's daily UTM scan: `source: health`, `installed` = the refreshed scan counted events, `reporting: false` (unknown), `last_seen_at` / `events_24h` / `domain` = `null`. `events_24h` is `null` (never `0`) whenever the count could not be read.
247675
+ *
247676
+ * Same entitlement gate as `GET /ads/tracking/key`, except that `sample=1` (or a sandbox workspace) answers a fixed sample status (`installed: true`, `reporting: true`, seen minutes ago, `source: tracker`) without the entitlement and without reading the real tag — like every other Ads read. Admin-scoped (`ads:read`).
247677
+ *
247678
+ * `booking_widget` is the clinic booking widget’s own install check (#3709): seen when a page loads the widget with the clinic’s `pk_` key; `null` when the workspace has no clinic widget to install.
247679
+ */
247680
+ get: {
247681
+ parameters: {
247682
+ query?: {
247683
+ /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
247684
+ sample?: "1" | "true";
247685
+ };
247686
+ header?: never;
247687
+ path?: never;
247688
+ cookie?: never;
247689
+ };
247690
+ requestBody?: never;
247691
+ responses: {
247692
+ /** @description The tag detection status */
247693
+ 200: {
247694
+ headers: {
247695
+ [name: string]: unknown;
247696
+ };
247697
+ content: {
247698
+ /**
247699
+ * @example {
247700
+ * "data": {
247701
+ * "installed": true,
247702
+ * "reporting": true,
247703
+ * "last_seen_at": "2026-09-23T14:02:11.000Z",
247704
+ * "events_24h": 184,
247705
+ * "domain": "www.clinica-ejemplo.cl",
247706
+ * "source": "tracker"
247707
+ * }
247708
+ * }
247709
+ */
247710
+ "application/json": {
247711
+ data: components["schemas"]["AdsTrackingStatus"];
247712
+ };
247713
+ };
247714
+ };
247715
+ /** @description Validation error */
247716
+ 400: {
247717
+ headers: {
247718
+ [name: string]: unknown;
247719
+ };
247720
+ content: {
247721
+ "application/json": components["schemas"]["Error"];
247722
+ };
247723
+ };
247724
+ /** @description Unauthorized */
247725
+ 401: {
247726
+ headers: {
247727
+ [name: string]: unknown;
247728
+ };
247729
+ content: {
247730
+ "application/json": components["schemas"]["Error"];
247731
+ };
247732
+ };
247733
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
247734
+ 402: {
247735
+ headers: {
247736
+ [name: string]: unknown;
247737
+ };
247738
+ content: {
247739
+ /**
247740
+ * @example {
247741
+ * "error": {
247742
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
247743
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
247744
+ * "details": {
247745
+ * "required": [
247746
+ * "vitrina_ads"
247747
+ * ],
247748
+ * "active": [],
247749
+ * "feature": "vitrina_ads",
247750
+ * "entitlement_state": "off"
247751
+ * }
247752
+ * }
247753
+ * }
247754
+ */
247755
+ "application/json": components["schemas"]["Error"];
247756
+ };
247757
+ };
247758
+ /** @description Forbidden */
247759
+ 403: {
247760
+ headers: {
247761
+ [name: string]: unknown;
247762
+ };
247763
+ content: {
247764
+ "application/json": components["schemas"]["Error"];
247765
+ };
247766
+ };
247767
+ /** @description Not found */
247768
+ 404: {
247769
+ headers: {
247770
+ [name: string]: unknown;
247771
+ };
247772
+ content: {
247773
+ "application/json": components["schemas"]["Error"];
247774
+ };
247775
+ };
247776
+ /** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
247777
+ 409: {
247778
+ headers: {
247779
+ [name: string]: unknown;
247780
+ };
247781
+ content: {
247782
+ /**
247783
+ * @example {
247784
+ * "error": {
247785
+ * "code": "ADS_KEY_NEEDS_REMINT",
247786
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
247787
+ * "details": {
247788
+ * "key_kind": "core"
247789
+ * }
247790
+ * }
247791
+ * }
247792
+ */
247793
+ "application/json": components["schemas"]["Error"];
247794
+ };
247795
+ };
247796
+ /** @description Rate limited */
247797
+ 429: {
247798
+ headers: {
247799
+ [name: string]: unknown;
247800
+ };
247801
+ content: {
247802
+ "application/json": components["schemas"]["Error"];
247803
+ };
247804
+ };
247805
+ };
247806
+ };
247807
+ put?: never;
247808
+ post?: never;
247809
+ delete?: never;
247810
+ options?: never;
247811
+ head?: never;
247812
+ patch?: never;
247813
+ trace?: never;
247814
+ };
247815
+ "/ads/tracking/engaged-visit": {
247816
+ parameters: {
247817
+ query?: never;
247818
+ header?: never;
247819
+ path?: never;
247820
+ cookie?: never;
247821
+ };
247822
+ /**
247823
+ * The «Se quedó 15 segundos» signal: state read back
247824
+ * @description Clinics (healthcare workspaces) with Vitrina Ads usable. The signal sends Meta an event when a person has had the page open and visible for `seconds` (15). It measures time on the PAGE, not video play time. Off by default. The state is read back from the measurement engine on every call: `enabled`, `seconds` (read-only), `export_ready` and, when it is not ready, the `export_blocker` with `blocker_text`. It is a signal sent to Meta, not an optimisation target (see `meta_note`). A workspace that is a guest on its agency’s profile reads the state (`can_write: false`). After the setting changes the install snippet must be copied again (`install`, `recopy_note`). Admin-scoped (`ads:read`).
247825
+ */
247826
+ get: {
247827
+ parameters: {
247828
+ query?: never;
247829
+ header?: never;
247830
+ path?: never;
247831
+ cookie?: never;
247832
+ };
247833
+ requestBody?: never;
247834
+ responses: {
247835
+ /** @description The signal’s state */
247836
+ 200: {
247837
+ headers: {
247838
+ [name: string]: unknown;
247839
+ };
247840
+ content: {
247841
+ /**
247842
+ * @example {
247843
+ * "data": {
247844
+ * "state": "off",
247845
+ * "enabled": false,
247846
+ * "seconds": 15,
247847
+ * "export_ready": false,
247848
+ * "export_blocker": null,
247849
+ * "blocker_text": null,
247850
+ * "can_write": true,
247851
+ * "managed_by_agency": false,
247852
+ * "title": "Se quedó 15 segundos",
247853
+ * "summary": "Apagada. No se envía nada a Meta sobre cuánto tiempo se queda la gente en la página.",
247854
+ * "measures": "Mide el tiempo que la página estuvo abierta y a la vista, no cuánto del video se reprodujo.",
247855
+ * "meta_note": "Es una señal que se envía a Meta, no un objetivo de optimización: todavía no está comprobado que un conjunto de anuncios pueda optimizar con ella.",
247856
+ * "recopy_note": "Después de encender o apagar esta señal, hay que copiar de nuevo el código de instalación en la página. Si no, la página sigue como estaba.",
247857
+ * "agency_note": null,
247858
+ * "install": {
247859
+ * "path": "/ads/tracking/key",
247860
+ * "field": "snippet"
247861
+ * }
247862
+ * }
247863
+ * }
247864
+ */
247865
+ "application/json": {
247866
+ data: components["schemas"]["AdsEngagedVisit"] & Record<string, never>;
247867
+ };
247868
+ };
247869
+ };
247870
+ /** @description Validation error */
247871
+ 400: {
247872
+ headers: {
247873
+ [name: string]: unknown;
247874
+ };
247875
+ content: {
247876
+ "application/json": components["schemas"]["Error"];
247877
+ };
247878
+ };
247879
+ /** @description Unauthorized */
247880
+ 401: {
247881
+ headers: {
247882
+ [name: string]: unknown;
247883
+ };
247884
+ content: {
247885
+ "application/json": components["schemas"]["Error"];
247886
+ };
247887
+ };
247888
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
247889
+ 402: {
247890
+ headers: {
247891
+ [name: string]: unknown;
247892
+ };
247893
+ content: {
247894
+ /**
247895
+ * @example {
247896
+ * "error": {
247897
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
247898
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
247899
+ * "details": {
247900
+ * "required": [
247901
+ * "vitrina_ads"
247902
+ * ],
247903
+ * "active": [],
247904
+ * "feature": "vitrina_ads",
247905
+ * "entitlement_state": "off"
247906
+ * }
247907
+ * }
247908
+ * }
247909
+ */
247910
+ "application/json": components["schemas"]["Error"];
247911
+ };
247912
+ };
247913
+ /** @description Forbidden */
247914
+ 403: {
247915
+ headers: {
247916
+ [name: string]: unknown;
247917
+ };
247918
+ content: {
247919
+ "application/json": components["schemas"]["Error"];
247920
+ };
247921
+ };
247922
+ /** @description Not found */
247923
+ 404: {
247924
+ headers: {
247925
+ [name: string]: unknown;
247926
+ };
247927
+ content: {
247928
+ "application/json": components["schemas"]["Error"];
247929
+ };
247930
+ };
247931
+ /** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
247932
+ 409: {
247933
+ headers: {
247934
+ [name: string]: unknown;
247935
+ };
247936
+ content: {
247937
+ /**
247938
+ * @example {
247939
+ * "error": {
247940
+ * "code": "ADS_KEY_NEEDS_REMINT",
247941
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
247942
+ * "details": {
247943
+ * "key_kind": "core"
247944
+ * }
247945
+ * }
247946
+ * }
247947
+ */
247948
+ "application/json": components["schemas"]["Error"];
247949
+ };
247950
+ };
247951
+ /** @description Rate limited */
247952
+ 429: {
247953
+ headers: {
247954
+ [name: string]: unknown;
247955
+ };
247956
+ content: {
247957
+ "application/json": components["schemas"]["Error"];
247958
+ };
247959
+ };
247960
+ };
247961
+ };
247962
+ put?: never;
247963
+ post?: never;
247964
+ delete?: never;
247965
+ options?: never;
247966
+ head?: never;
246872
247967
  /**
246873
- * Is the tag installed? Last event seen, events in 24 h, domain
246874
- * @description Tag detection for the workspace's tracking key. `source: tracker` (the normal case) reads the measurement provider's per-key last-event time (`last_seen_at`), the tracker events of the last 24 hours (`events_24h`) and the hostname of the latest verified install check (`domain`). `installed` is `true` only when the tag sent an event in the last 30 days — never without a timestamp — and it STAYS `true` for 30 days after the last event, so it does not mean «live»: `reporting` does (events in the last 24 hours).
246875
- *
246876
- * When the per-key read is unavailable the answer falls back to the health read's daily UTM scan: `source: health`, `installed` = the refreshed scan counted events, `reporting: false` (unknown), `last_seen_at` / `events_24h` / `domain` = `null`. `events_24h` is `null` (never `0`) whenever the count could not be read.
246877
- *
246878
- * Same entitlement gate as `GET /ads/tracking/key`, except that `sample=1` (or a sandbox workspace) answers a fixed sample status (`installed: true`, `reporting: true`, seen minutes ago, `source: tracker`) without the entitlement and without reading the real tag — like every other Ads read. Admin-scoped (`ads:read`).
246879
- *
246880
- * `booking_widget` is the clinic booking widget’s own install check (#3709): seen when a page loads the widget with the clinic’s `pk_` key; `null` when the workspace has no clinic widget to install.
247968
+ * Turn the «Se quedó 15 segundos» signal on or off
247969
+ * @description Sets `enabled` at the measurement engine and answers the state the engine now reports (never an echo of the request). Audited. Turning it on while `export_ready` is false is accepted: the answer says why nothing is sent. 403 `ATTRIBUTION_LINKED_READ_ONLY` for a workspace that is a guest on its agency’s profile (the agency manages it); 403 `vertical_not_enabled` outside clinics; 409 `ADS_KEY_NEEDS_REMINT` while the credential catches up with the add-on (one automatic re-mint is tried first). The install snippet must be copied again after the change. Admin-scoped (`ads:write`).
246881
247970
  */
246882
- get: {
247971
+ patch: {
246883
247972
  parameters: {
246884
- query?: {
246885
- /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
246886
- sample?: "1" | "true";
246887
- };
247973
+ query?: never;
246888
247974
  header?: never;
246889
247975
  path?: never;
246890
247976
  cookie?: never;
246891
247977
  };
246892
- requestBody?: never;
247978
+ requestBody: {
247979
+ content: {
247980
+ /**
247981
+ * @example {
247982
+ * "enabled": true
247983
+ * }
247984
+ */
247985
+ "application/json": components["schemas"]["AdsEngagedVisitPatch"];
247986
+ };
247987
+ };
246893
247988
  responses: {
246894
- /** @description The tag detection status */
247989
+ /** @description The signal’s state after the change */
246895
247990
  200: {
246896
247991
  headers: {
246897
247992
  [name: string]: unknown;
@@ -246900,17 +247995,29 @@ interface paths {
246900
247995
  /**
246901
247996
  * @example {
246902
247997
  * "data": {
246903
- * "installed": true,
246904
- * "reporting": true,
246905
- * "last_seen_at": "2026-09-23T14:02:11.000Z",
246906
- * "events_24h": 184,
246907
- * "domain": "www.clinica-ejemplo.cl",
246908
- * "source": "tracker"
247998
+ * "state": "not_sending",
247999
+ * "enabled": true,
248000
+ * "seconds": 15,
248001
+ * "export_ready": false,
248002
+ * "export_blocker": "no_clean_dataset_destination",
248003
+ * "blocker_text": "todavía no hay un conjunto de datos protegido de Meta conectado",
248004
+ * "can_write": true,
248005
+ * "managed_by_agency": false,
248006
+ * "title": "Se quedó 15 segundos",
248007
+ * "summary": "Encendida, pero por ahora no se envía nada a Meta: todavía no hay un conjunto de datos protegido de Meta conectado.",
248008
+ * "measures": "Mide el tiempo que la página estuvo abierta y a la vista, no cuánto del video se reprodujo.",
248009
+ * "meta_note": "Es una señal que se envía a Meta, no un objetivo de optimización: todavía no está comprobado que un conjunto de anuncios pueda optimizar con ella.",
248010
+ * "recopy_note": "Después de encender o apagar esta señal, hay que copiar de nuevo el código de instalación en la página. Si no, la página sigue como estaba.",
248011
+ * "agency_note": null,
248012
+ * "install": {
248013
+ * "path": "/ads/tracking/key",
248014
+ * "field": "snippet"
248015
+ * }
246909
248016
  * }
246910
248017
  * }
246911
248018
  */
246912
248019
  "application/json": {
246913
- data: components["schemas"]["AdsTrackingStatus"];
248020
+ data: components["schemas"]["AdsEngagedVisit"] & Record<string, never>;
246914
248021
  };
246915
248022
  };
246916
248023
  };
@@ -247006,12 +248113,6 @@ interface paths {
247006
248113
  };
247007
248114
  };
247008
248115
  };
247009
- put?: never;
247010
- post?: never;
247011
- delete?: never;
247012
- options?: never;
247013
- head?: never;
247014
- patch?: never;
247015
248116
  trace?: never;
247016
248117
  };
247017
248118
  "/ads/tracking/gtm": {
@@ -338694,6 +339795,389 @@ interface components {
338694
339795
  /** Format: uuid */
338695
339796
  owner_id: string;
338696
339797
  };
339798
+ /**
339799
+ * @description The regime in force for `commercial_year`; null when none was ever set (never a default).
339800
+ * @enum {string|null}
339801
+ */
339802
+ FinanzasTaxRegimeCode: "14D3" | "14D8" | "14A" | null;
339803
+ FinanzasTaxRegimeRow: {
339804
+ /** Format: uuid */
339805
+ id: string;
339806
+ /** Format: uuid */
339807
+ dte_connection_id: string;
339808
+ regime: components["schemas"]["FinanzasTaxRegimeCode"] & string;
339809
+ applies_from_year: number;
339810
+ /**
339811
+ * @description `person` today. `sii` is reserved for an automatic read (none exists yet); a person-set row always outranks an `sii` row of the same year.
339812
+ * @enum {string}
339813
+ */
339814
+ source: "person" | "sii";
339815
+ /** Format: uuid */
339816
+ set_by: string | null;
339817
+ set_at: string;
339818
+ } | null;
339819
+ /** @description Only for the two Pro Pyme regimes. */
339820
+ FinanzasTaxRegimeIncomeCheck: {
339821
+ ceiling_uf: number;
339822
+ single_year_cap_uf: number;
339823
+ /** @enum {string} */
339824
+ status: "ok" | "above" | "no_data";
339825
+ years_used: number[];
339826
+ years_missing: {
339827
+ year: number;
339828
+ /** @enum {string} */
339829
+ reason: "no_tax_tables" | "no_income_in_finanzas" | "not_split_by_sociedad";
339830
+ }[];
339831
+ income_uf_by_year: {
339832
+ [key: string]: number;
339833
+ };
339834
+ average_uf: number | null;
339835
+ message: string;
339836
+ } | null;
339837
+ FinanzasTaxRegimeWarning: {
339838
+ /** @enum {string} */
339839
+ code: "owners_not_final_taxpayers" | "owners_unknown" | "income_average_above_ceiling" | "income_year_above_cap";
339840
+ message: string;
339841
+ facts: {
339842
+ [key: string]: unknown;
339843
+ };
339844
+ };
339845
+ FinanzasTaxRegimeView: {
339846
+ /** Format: uuid */
339847
+ dte_connection_id: string;
339848
+ legal_name: string | null;
339849
+ tax_id: string | null;
339850
+ commercial_year: number;
339851
+ regime: components["schemas"]["FinanzasTaxRegimeCode"];
339852
+ regime_name: string | null;
339853
+ regime_article: string | null;
339854
+ regime_label: string | null;
339855
+ in_force: components["schemas"]["FinanzasTaxRegimeRow"];
339856
+ history: (components["schemas"]["FinanzasTaxRegimeRow"] & Record<string, never>)[];
339857
+ income_check: components["schemas"]["FinanzasTaxRegimeIncomeCheck"];
339858
+ warnings: components["schemas"]["FinanzasTaxRegimeWarning"][];
339859
+ };
339860
+ FinanzasTaxRegimeList: {
339861
+ sociedades: components["schemas"]["FinanzasTaxRegimeView"][];
339862
+ };
339863
+ FinanzasTaxRegimeSetResult: {
339864
+ row: components["schemas"]["FinanzasTaxRegimeRow"] & Record<string, never>;
339865
+ view: components["schemas"]["FinanzasTaxRegimeView"];
339866
+ };
339867
+ FinanzasTaxRegimeSetBody: {
339868
+ /**
339869
+ * Format: uuid
339870
+ * @description The sociedad: the id of its DTE connection (`clinic_dte_connection.id`), as on the owners register.
339871
+ */
339872
+ dte_connection_id: string;
339873
+ regime: components["schemas"]["FinanzasTaxRegimeCode"] & string;
339874
+ /** @description Commercial year the regime applies from (a change of regime takes effect on 1 January). Applies until a later row says otherwise. Setting the same year again corrects it; the earlier row stays in the history. */
339875
+ applies_from_year: number;
339876
+ };
339877
+ /**
339878
+ * @description Exactly one per line. `books` computed from the books (with `built_from`); `formula` derived with the SII formula (with `inputs`); `formula_incomplete` a formula whose inputs are missing (`missing`, amount null); `entered` a person typed it (`entered`); `needs_input` a datum only a person has; `needs_prior_year` from last year's F22, not readable yet; `sii_only` held by the SII (may carry a `reference_amount_clp` that is NOT the amount); `not_held` Vitrina does not record it (or it belongs to an owner's own return); `not_evaluable` derived with no formula in the mapping.
339879
+ * @enum {string}
339880
+ */
339881
+ FinanzasF22LineState: "books" | "formula" | "formula_incomplete" | "entered" | "needs_input" | "needs_prior_year" | "sii_only" | "not_held" | "not_evaluable";
339882
+ FinanzasF22BuiltFrom: {
339883
+ /** @description Spanish, ready to show. */
339884
+ description: string;
339885
+ roles: {
339886
+ role: string;
339887
+ label: string;
339888
+ }[];
339889
+ accounts: {
339890
+ id: string | null;
339891
+ name: string;
339892
+ amount_clp: number;
339893
+ }[];
339894
+ documents: number;
339895
+ payments: number;
339896
+ lines: number;
339897
+ /** @description `YYYY-MM`, oldest first. */
339898
+ months: string[];
339899
+ } | null;
339900
+ FinanzasF22DraftLine: {
339901
+ /** @enum {string} */
339902
+ scope: "company" | "owner";
339903
+ owner_id: string | null;
339904
+ code: number;
339905
+ recuadro: number | null;
339906
+ form_line: number | null;
339907
+ label: string;
339908
+ sign: string;
339909
+ /** @enum {string} */
339910
+ role: "input" | "subtotal" | "total" | "info";
339911
+ /** @description Whole CLP; null = «no determinado» (never a silent 0). */
339912
+ amount_clp: number | null;
339913
+ text_value: string | null;
339914
+ state: components["schemas"]["FinanzasF22LineState"];
339915
+ state_label: string;
339916
+ /** @description Spanish: what it was built from, what to enter, or why there is nothing. */
339917
+ explanation: string;
339918
+ /** @description False: the mapping lists the code as unverified; show «sin confirmar». */
339919
+ verified: boolean;
339920
+ sources: string[];
339921
+ formula: string | null;
339922
+ inputs: {
339923
+ code: number;
339924
+ amount_clp: number | null;
339925
+ }[] | null;
339926
+ missing: {
339927
+ codes: number[];
339928
+ variables: string[];
339929
+ } | null;
339930
+ built_from: components["schemas"]["FinanzasF22BuiltFrom"];
339931
+ entered: {
339932
+ by: string | null;
339933
+ by_name: string | null;
339934
+ at: string;
339935
+ /** @enum {string} */
339936
+ source: "person" | "sii_filed_f22";
339937
+ note: string | null;
339938
+ } | null;
339939
+ replaces_amount_clp: number | null;
339940
+ reference_amount_clp: number | null;
339941
+ notes: string[];
339942
+ mapping_status: string;
339943
+ counts_for_completeness: boolean;
339944
+ };
339945
+ FinanzasF22Draft: {
339946
+ title: string;
339947
+ audience: string;
339948
+ disclaimer: string;
339949
+ year: number;
339950
+ tax_year: number;
339951
+ in_progress: boolean;
339952
+ sociedad: {
339953
+ dte_connection_id: string;
339954
+ legal_name: string | null;
339955
+ tax_id: string | null;
339956
+ };
339957
+ regime: {
339958
+ /** @enum {string} */
339959
+ code: "14D3" | "14D8";
339960
+ name: string;
339961
+ article: string;
339962
+ label: string;
339963
+ applies_from_year: number | null;
339964
+ set_by: string | null;
339965
+ set_at: string | null;
339966
+ };
339967
+ mapping: {
339968
+ tax_year: number;
339969
+ commercial_year: number;
339970
+ regime_name: string;
339971
+ /** @enum {string} */
339972
+ basis: "cash" | "accrual";
339973
+ recuadros: {
339974
+ number: number;
339975
+ title: string;
339976
+ }[];
339977
+ };
339978
+ status: {
339979
+ /** @description True only when the year has nothing missing (`incomplete` empty) AND no line that counts is in a «needs» state. */
339980
+ complete: boolean;
339981
+ label: string;
339982
+ incomplete: {
339983
+ code: string;
339984
+ month: string | null;
339985
+ message: string;
339986
+ }[];
339987
+ blocking_lines: number;
339988
+ state_counts: {
339989
+ [key: string]: number;
339990
+ };
339991
+ };
339992
+ lines: components["schemas"]["FinanzasF22DraftLine"][];
339993
+ /** @description 14 D N°8 only: the attribution to the owners; null in 14 D N°3. */
339994
+ owners: {
339995
+ as_of: string;
339996
+ /** @enum {string} */
339997
+ rule: "statute_profit_share" | "paid_in_capital" | "subscribed_capital" | "none";
339998
+ rule_label: string;
339999
+ determined: boolean;
340000
+ reason: string | null;
340001
+ statement: string;
340002
+ owners: {
340003
+ owner_id: string;
340004
+ name: string;
340005
+ tax_id: string;
340006
+ person_kind: string;
340007
+ tax_residence_country: string;
340008
+ resident: boolean;
340009
+ share_pct: number | null;
340010
+ attributed_base_clp: number | null;
340011
+ ppm_clp: number | null;
340012
+ lines: components["schemas"]["FinanzasF22DraftLine"][];
340013
+ }[];
340014
+ } | null;
340015
+ base: {
340016
+ cash_base_from_books_clp: number;
340017
+ untagged: {
340018
+ /** @enum {string} */
340019
+ side: "collection" | "payment";
340020
+ account: {
340021
+ id: string | null;
340022
+ name: string;
340023
+ };
340024
+ amount_clp: number;
340025
+ lines: number;
340026
+ }[];
340027
+ untagged_total: {
340028
+ collections_clp: number;
340029
+ payments_clp: number;
340030
+ };
340031
+ excluded: {
340032
+ reason: string;
340033
+ label: string;
340034
+ /** @enum {string|null} */
340035
+ outcome: "tax_40" | "owner" | "left_out" | null;
340036
+ amount_clp: number;
340037
+ lines: number;
340038
+ }[];
340039
+ undated: {
340040
+ collections: {
340041
+ lines: number;
340042
+ base_clp: number;
340043
+ };
340044
+ payments: {
340045
+ lines: number;
340046
+ base_clp: number;
340047
+ };
340048
+ items: {
340049
+ /** @enum {string} */
340050
+ side: "collection" | "payment";
340051
+ document: string;
340052
+ counterparty: string | null;
340053
+ base_clp: number;
340054
+ reason: string;
340055
+ paid_no_later_than: string | null;
340056
+ }[];
340057
+ };
340058
+ non_result: {
340059
+ role: string;
340060
+ label: string;
340061
+ collected_clp: number;
340062
+ paid_clp: number;
340063
+ lines: number;
340064
+ code: number | null;
340065
+ }[];
340066
+ };
340067
+ reconciliation: {
340068
+ accrual_result_clp: number;
340069
+ cash_result_clp: number;
340070
+ cash_base_from_books_clp: number;
340071
+ unexplained_clp: number;
340072
+ reconciles: boolean;
340073
+ lines: {
340074
+ key: string;
340075
+ label: string;
340076
+ amount_clp: number;
340077
+ effect: 1 | -1 | 0;
340078
+ detail: string | null;
340079
+ }[];
340080
+ outside_both: {
340081
+ role: string;
340082
+ label: string;
340083
+ collected_clp: number;
340084
+ paid_clp: number;
340085
+ lines: number;
340086
+ code: number | null;
340087
+ }[];
340088
+ note: string;
340089
+ };
340090
+ credits: {
340091
+ idpc: {
340092
+ applies: boolean;
340093
+ rate: number | null;
340094
+ rate_label: string | null;
340095
+ source: string | null;
340096
+ message: string;
340097
+ };
340098
+ ppm: {
340099
+ months: {
340100
+ period: string;
340101
+ /** @enum {string} */
340102
+ status: "filed" | "proposal" | "missing";
340103
+ ppm_clp: number | null;
340104
+ payment_date: string | null;
340105
+ adjusted_by_month: string | null;
340106
+ adjusted_clp: number | null;
340107
+ note: string | null;
340108
+ }[];
340109
+ total_nominal_clp: number;
340110
+ total_adjusted_clp: number | null;
340111
+ all_filed: boolean;
340112
+ from_proposals: boolean;
340113
+ /** @description Show prominently while any month comes from an SII proposal. */
340114
+ warning: string | null;
340115
+ };
340116
+ retentions: {
340117
+ boletas_retention_clp: number;
340118
+ declared_clp: number | null;
340119
+ months_with_difference: number;
340120
+ message: string;
340121
+ };
340122
+ /** @description The regime read's `income_check` (FinanzasTaxRegimeIncomeCheck). */
340123
+ income_check: {
340124
+ [key: string]: unknown;
340125
+ } | null;
340126
+ };
340127
+ warnings: {
340128
+ code: string;
340129
+ message: string;
340130
+ }[];
340131
+ } | null;
340132
+ FinanzasF22DraftResult: {
340133
+ available: boolean;
340134
+ year: number;
340135
+ tax_year: number;
340136
+ /** @description Why there is no draft (Spanish message ready to show); null when `available`. */
340137
+ refusal: {
340138
+ /** @enum {string} */
340139
+ code: "no_sociedad" | "multi_sociedad" | "no_regime" | "regime_14a" | "no_mapping" | "no_tax_tables";
340140
+ message: string;
340141
+ } | null;
340142
+ draft: components["schemas"]["FinanzasF22Draft"];
340143
+ };
340144
+ FinanzasF22EnteredValue: {
340145
+ id: string;
340146
+ dte_connection_id: string;
340147
+ tax_year: number;
340148
+ code: number;
340149
+ owner_id: string | null;
340150
+ amount_clp: number | null;
340151
+ text_value: string | null;
340152
+ /** @enum {string} */
340153
+ source: "person" | "sii_filed_f22";
340154
+ note: string | null;
340155
+ entered_by: string | null;
340156
+ entered_at: string;
340157
+ };
340158
+ FinanzasF22DraftValuesResult: {
340159
+ tax_year: number;
340160
+ values: components["schemas"]["FinanzasF22EnteredValue"][];
340161
+ };
340162
+ FinanzasF22DraftValuesBody: {
340163
+ /** @description The commercial year of the draft. */
340164
+ year: number;
340165
+ /** Format: uuid */
340166
+ dte_connection_id?: string;
340167
+ values: {
340168
+ code: number;
340169
+ /**
340170
+ * Format: uuid
340171
+ * @description For a code of the owners' side (14 D N°8): the owner.
340172
+ */
340173
+ owner_id?: string | null;
340174
+ /** @description Whole CLP, signed. 0 is a real answer («no aplica»). Exactly one of amount_clp / text_value. */
340175
+ amount_clp?: number | null;
340176
+ /** @description For identification codes (giro, domicilio, banco). */
340177
+ text_value?: string | null;
340178
+ note?: string | null;
340179
+ }[];
340180
+ };
338697
340181
  FinanzasTaxRoles: {
338698
340182
  tax_year: number;
338699
340183
  tax_years: number[];
@@ -341349,6 +342833,46 @@ interface components {
341349
342833
  ttl_ms: number;
341350
342834
  privacy?: components["schemas"]["AdsPrivacyCheck"];
341351
342835
  };
342836
+ /** @description Clinics: the «Se quedó 15 segundos» step, a signal sent to Meta (never an optimisation target). Off by default; when on but not reaching Meta it says why. `null` outside clinics. */
342837
+ AdsEngagedVisit: {
342838
+ /**
342839
+ * @description `off` = nothing is sent. `sending` = on, and the setup lets it reach Meta. `not_sending` = on, but `export_blocker` keeps it from Meta. `unavailable` = the state could not be read (only inside the send status).
342840
+ * @enum {string}
342841
+ */
342842
+ state: "off" | "sending" | "not_sending" | "unavailable";
342843
+ /** @description The signal is on. Off by default. */
342844
+ enabled: boolean;
342845
+ /** @description Visible seconds before the event fires. Read-only: 15 unless the platform changes it. */
342846
+ seconds: number;
342847
+ /** @description Read back from the measurement engine: an engaged visit would reach the clinic’s protected Meta dataset. Computed whether or not the signal is on; it does not evaluate consent or the engine’s kill switches. */
342848
+ export_ready: boolean;
342849
+ /**
342850
+ * @description Why `export_ready` is false; `null` when ready or not named.
342851
+ * @enum {string|null}
342852
+ */
342853
+ export_blocker: "not_platform_safe" | "platform_safe_target_not_clean" | "meta_export_disabled" | "no_clean_dataset_destination" | null;
342854
+ /** @description `export_blocker` in plain Spanish; only when `not_sending`. */
342855
+ blocker_text: string | null;
342856
+ /** @description False for a workspace that is a guest on its agency’s profile. */
342857
+ can_write: boolean;
342858
+ managed_by_agency: boolean;
342859
+ /** @description «Se quedó 15 segundos». */
342860
+ title: string;
342861
+ /** @description The state in one Spanish sentence. */
342862
+ summary: string;
342863
+ /** @description Time on the PAGE, not video play time (Spanish). */
342864
+ measures: string;
342865
+ /** @description A signal sent to Meta, never an optimisation target: it is not verified that an ad set can optimise on it (Spanish). */
342866
+ meta_note: string;
342867
+ /** @description The install snippet must be copied again after the setting changes (Spanish). */
342868
+ recopy_note: string;
342869
+ agency_note: string | null;
342870
+ /** @description Where the snippet is: `GET {path}` (the existing tracking key read), field `field`. */
342871
+ install: {
342872
+ path: string;
342873
+ field: string;
342874
+ };
342875
+ } | null;
341352
342876
  AdsSendStatus: {
341353
342877
  /**
341354
342878
  * @description `blocked` = only Meta or the owner outside Vitrina can fix it (`blocked_reason`). `off` = set up once and every stage stopped. `measure_only` = the owner chose «Solo medir, no enviar a Meta» (reversible with `send_setup`).
@@ -341609,6 +343133,7 @@ interface components {
341609
343133
  /** @description Distinct active ad sets that optimise on an event Vitrina sends (the wiring verdicts). */
341610
343134
  on_sent_events: number;
341611
343135
  } | null;
343136
+ engaged_visit: components["schemas"]["AdsEngagedVisit"];
341612
343137
  };
341613
343138
  AdsSendPreviewEvent: {
341614
343139
  /** @enum {string} */
@@ -346524,6 +348049,9 @@ interface components {
346524
348049
  }[];
346525
348050
  } | null;
346526
348051
  };
348052
+ AdsEngagedVisitPatch: {
348053
+ enabled: boolean;
348054
+ };
346527
348055
  /**
346528
348056
  * @example {
346529
348057
  * "type": "tag",