@vitrina/api 17.82.0 → 17.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -17014,6 +17014,31 @@ interface paths {
17014
17014
  * "flatUfMonth": 0.5,
17015
17015
  * "freeAllowance": 10,
17016
17016
  * "meter": "tasador_valuation"
17017
+ * },
17018
+ * {
17019
+ * "key": "finanzas",
17020
+ * "access": "entitlement",
17021
+ * "flatUfMonth": 1.5,
17022
+ * "includedBanks": 1,
17023
+ * "extraBankUfMonth": 0.45,
17024
+ * "annual": {
17025
+ * "ufGrossYear": 18,
17026
+ * "discountPct": 20,
17027
+ * "ufDiscount": 3.6,
17028
+ * "ufYear": 14.4,
17029
+ * "ufMonthEquivalent": 1.2,
17030
+ * "clpYearEstimate": 566640,
17031
+ * "termStart": "2026-11-19",
17032
+ * "termEnd": "2027-11-18",
17033
+ * "purchaseInvoiceId": null,
17034
+ * "lastVoidedPurchase": {
17035
+ * "invoice_id": "33333333-3333-4333-8333-333333333333",
17036
+ * "invoice_number": "INV-11111111-AF202610",
17037
+ * "voided_on": "2026-11-14",
17038
+ * "reason": "annual_purchase_expired",
17039
+ * "credited_clp": 0
17040
+ * }
17041
+ * }
17017
17042
  * }
17018
17043
  * ],
17019
17044
  * "entitlements": [
@@ -17099,6 +17124,15 @@ interface paths {
17099
17124
  termEnd: string;
17100
17125
  /** @description The unpaid annual purchase cobro, if one is out. */
17101
17126
  purchaseInvoiceId: string | null;
17127
+ /** @description The most recent annual Finanzas purchase voided unpaid at day 30, while worth telling the owner (voided in the last 30 days, no annual Finanzas cobro paid since); null otherwise. Same shape as `GET /billing/clinic-plan`'s `last_voided_purchase`. */
17128
+ lastVoidedPurchase: {
17129
+ invoice_id: string;
17130
+ invoice_number: string;
17131
+ voided_on: string;
17132
+ /** @enum {string} */
17133
+ reason: "annual_purchase_expired";
17134
+ credited_clp: number;
17135
+ } | null;
17102
17136
  };
17103
17137
  /** @description The business types (`tenant.vertical`) this add-on is sold to. Omitted = every vertical. Read `offers` for the per-workspace answer. */
17104
17138
  verticals?: string[];
@@ -18496,7 +18530,7 @@ interface paths {
18496
18530
  *
18497
18531
  * Phase 2 (tenencia_source): `tenencia_source` COMPOSES with `tenencia` rather than narrowing it — `?tenencia=propio&tenencia_source=decided` is "propio, and a person or a document actually settled that" (`decided` ⇒ `tenencia_source <> 'default'`); `document` / `declared` / `default` match the column exactly. See `POST /vehicles/tenencia` for how a `declared` row is produced.
18498
18532
  *
18499
- * SIN COSTO (ADR 0114 §8). A car that entered without a compra (nota de compra), a consignación (contrato) or a parte de pago (nota de venta) has no acquisition, so nothing records what it cost. Every row carries `sin_costo: true` for such a unit (any status), and `view=sin_costo` lists the pile still on the floor — active, not vendido, no acquisition; the SAME predicate as the `sin_costo` count on `GET /vehicles/stats` and the `stock_without_cost` dealer alert. It is never a gate: bulk imports and migrations land cars here on purpose. `sin_costo` is a statement about the cost basis and follows the cost omission above: ABSENT without `dealership_economics:read`.
18533
+ * SIN COSTO (ADR 0114 §8). A car that entered without a compra (nota de compra), a consignación (contrato) or a parte de pago (nota de venta) has no acquisition, so nothing records what it cost. Every row carries `sin_costo: true` for such a unit (any status), and `view=sin_costo` lists the ones still on the floor — active, not vendido, no acquisition — as a filter the dealer may choose. Nothing flags these cars while they are in stock (ADR 0162): no alert, and the `sin_costo` count on `GET /vehicles/stats` is always 0. It is never a gate: bulk imports and migrations land cars here on purpose. `sin_costo` is a statement about the cost basis and follows the cost omission above: ABSENT without `dealership_economics:read`.
18500
18534
  *
18501
18535
  * MANDATO SIN FIRMAR (ADR 0114 §5). `view=mandato_sin_firmar` lists the cars whose consignación (activa or vendida) has an emitted mandato and no signed copy filed in the expediente — the SAME predicate as the `mandato_sin_firmar` count on `GET /vehicles/stats`. Never a gate, and no longer a dealer alert (retired 2026-11-10: it is a filter you open, not a to-do).
18502
18536
  */
@@ -38523,7 +38557,7 @@ interface paths {
38523
38557
  };
38524
38558
  /**
38525
38559
  * The clinic banded plan: band, count, price, review, pause state
38526
- * @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to. On an annual plan a move up is charged once as the difference for the months of the paid year left, at the annual price (`announced_remaining_months`, `announced_difference_uf`, `announced_difference_clp_estimate`), and a move down only shows as `pending_down_band` until the renewal.
38560
+ * @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to. On an annual plan a move up is charged once as the difference for the months of the paid year left, at the annual price (`announced_remaining_months`, `announced_difference_uf`, `announced_difference_clp_estimate`), and a move down only shows as `pending_down_band` until the renewal. `last_voided_purchase` names a first annual purchase voided unpaid at day 30 in the last 30 days with no plan cobro paid since (null otherwise).
38527
38561
  */
38528
38562
  get: {
38529
38563
  parameters: {
@@ -38586,7 +38620,8 @@ interface paths {
38586
38620
  * "annual_unavailable_reason": null,
38587
38621
  * "uf_value": 39350,
38588
38622
  * "uf_value_date": "2026-11-18"
38589
- * }
38623
+ * },
38624
+ * "last_voided_purchase": null
38590
38625
  * }
38591
38626
  * }
38592
38627
  */
@@ -38669,6 +38704,14 @@ interface paths {
38669
38704
  uf_period: number;
38670
38705
  clp_estimate: number | null;
38671
38706
  } | null;
38707
+ last_voided_purchase: {
38708
+ invoice_id: string;
38709
+ invoice_number: string;
38710
+ voided_on: string;
38711
+ /** @enum {string} */
38712
+ reason: "annual_purchase_expired";
38713
+ credited_clp: number;
38714
+ } | null;
38672
38715
  };
38673
38716
  };
38674
38717
  };
@@ -300681,7 +300724,7 @@ interface paths {
300681
300724
  *
300682
300725
  * `propio_sin_clasificar` (Phase 2, tenencia_source, 20270903000000) is a SUB-COUNT of `propio`, NOT a fifth bucket — the four above still sum to `total`. It is the cars nobody has ever classified (`tenencia_source=default`), provably coextensive with "sin clasificar" (a consignación can never be `default`). Measured on production 2026-08-31: 903 of 967 vehicles carried `propio` with nobody having said so — that is what this number answers, rather than leaving `propio` an unresolved warning. Opens with `GET /vehicles?active=false&tenencia=propio&tenencia_source=default`.
300683
300726
  *
300684
- * `sin_costo` (ADR 0114 §8, «Sin costo») counts the active, non-vendido cars with NO acquisition — no nota de compra, contrato de consignación or parte de pago — so their cost is unknown. Opens with `GET /vehicles?view=sin_costo`, the same predicate. A statement about the cost basis: ABSENT (not 0) for a caller without `dealership_economics:read`.
300727
+ * `sin_costo` is always 0 since ADR 0162 (app#7720): a car in stock without Costo de compra is not flagged until it is sold. The list `GET /vehicles?view=sin_costo` still works as a filter; only its count is gone. Kept for the clients that read it, and still ABSENT for a caller without `dealership_economics:read`.
300685
300728
  *
300686
300729
  * `mandato_sin_firmar` (ADR 0114 §5) counts the cars whose consignación (activa, or vendida) has an emitted mandato and no signed copy filed in the expediente. Opens with `GET /vehicles?view=mandato_sin_firmar`, the same predicate.
300687
300730
  *
@@ -300723,7 +300766,7 @@ interface paths {
300723
300766
  * "with_error": 0,
300724
300767
  * "unpublished": 7,
300725
300768
  * "stale": 0,
300726
- * "sin_costo": 7,
300769
+ * "sin_costo": 0,
300727
300770
  * "mandato_sin_firmar": 1,
300728
300771
  * "needs_review": 1,
300729
300772
  * "sin_sucursal": 2,
package/dist/index.d.ts CHANGED
@@ -17014,6 +17014,31 @@ interface paths {
17014
17014
  * "flatUfMonth": 0.5,
17015
17015
  * "freeAllowance": 10,
17016
17016
  * "meter": "tasador_valuation"
17017
+ * },
17018
+ * {
17019
+ * "key": "finanzas",
17020
+ * "access": "entitlement",
17021
+ * "flatUfMonth": 1.5,
17022
+ * "includedBanks": 1,
17023
+ * "extraBankUfMonth": 0.45,
17024
+ * "annual": {
17025
+ * "ufGrossYear": 18,
17026
+ * "discountPct": 20,
17027
+ * "ufDiscount": 3.6,
17028
+ * "ufYear": 14.4,
17029
+ * "ufMonthEquivalent": 1.2,
17030
+ * "clpYearEstimate": 566640,
17031
+ * "termStart": "2026-11-19",
17032
+ * "termEnd": "2027-11-18",
17033
+ * "purchaseInvoiceId": null,
17034
+ * "lastVoidedPurchase": {
17035
+ * "invoice_id": "33333333-3333-4333-8333-333333333333",
17036
+ * "invoice_number": "INV-11111111-AF202610",
17037
+ * "voided_on": "2026-11-14",
17038
+ * "reason": "annual_purchase_expired",
17039
+ * "credited_clp": 0
17040
+ * }
17041
+ * }
17017
17042
  * }
17018
17043
  * ],
17019
17044
  * "entitlements": [
@@ -17099,6 +17124,15 @@ interface paths {
17099
17124
  termEnd: string;
17100
17125
  /** @description The unpaid annual purchase cobro, if one is out. */
17101
17126
  purchaseInvoiceId: string | null;
17127
+ /** @description The most recent annual Finanzas purchase voided unpaid at day 30, while worth telling the owner (voided in the last 30 days, no annual Finanzas cobro paid since); null otherwise. Same shape as `GET /billing/clinic-plan`'s `last_voided_purchase`. */
17128
+ lastVoidedPurchase: {
17129
+ invoice_id: string;
17130
+ invoice_number: string;
17131
+ voided_on: string;
17132
+ /** @enum {string} */
17133
+ reason: "annual_purchase_expired";
17134
+ credited_clp: number;
17135
+ } | null;
17102
17136
  };
17103
17137
  /** @description The business types (`tenant.vertical`) this add-on is sold to. Omitted = every vertical. Read `offers` for the per-workspace answer. */
17104
17138
  verticals?: string[];
@@ -18496,7 +18530,7 @@ interface paths {
18496
18530
  *
18497
18531
  * Phase 2 (tenencia_source): `tenencia_source` COMPOSES with `tenencia` rather than narrowing it — `?tenencia=propio&tenencia_source=decided` is "propio, and a person or a document actually settled that" (`decided` ⇒ `tenencia_source <> 'default'`); `document` / `declared` / `default` match the column exactly. See `POST /vehicles/tenencia` for how a `declared` row is produced.
18498
18532
  *
18499
- * SIN COSTO (ADR 0114 §8). A car that entered without a compra (nota de compra), a consignación (contrato) or a parte de pago (nota de venta) has no acquisition, so nothing records what it cost. Every row carries `sin_costo: true` for such a unit (any status), and `view=sin_costo` lists the pile still on the floor — active, not vendido, no acquisition; the SAME predicate as the `sin_costo` count on `GET /vehicles/stats` and the `stock_without_cost` dealer alert. It is never a gate: bulk imports and migrations land cars here on purpose. `sin_costo` is a statement about the cost basis and follows the cost omission above: ABSENT without `dealership_economics:read`.
18533
+ * SIN COSTO (ADR 0114 §8). A car that entered without a compra (nota de compra), a consignación (contrato) or a parte de pago (nota de venta) has no acquisition, so nothing records what it cost. Every row carries `sin_costo: true` for such a unit (any status), and `view=sin_costo` lists the ones still on the floor — active, not vendido, no acquisition — as a filter the dealer may choose. Nothing flags these cars while they are in stock (ADR 0162): no alert, and the `sin_costo` count on `GET /vehicles/stats` is always 0. It is never a gate: bulk imports and migrations land cars here on purpose. `sin_costo` is a statement about the cost basis and follows the cost omission above: ABSENT without `dealership_economics:read`.
18500
18534
  *
18501
18535
  * MANDATO SIN FIRMAR (ADR 0114 §5). `view=mandato_sin_firmar` lists the cars whose consignación (activa or vendida) has an emitted mandato and no signed copy filed in the expediente — the SAME predicate as the `mandato_sin_firmar` count on `GET /vehicles/stats`. Never a gate, and no longer a dealer alert (retired 2026-11-10: it is a filter you open, not a to-do).
18502
18536
  */
@@ -38523,7 +38557,7 @@ interface paths {
38523
38557
  };
38524
38558
  /**
38525
38559
  * The clinic banded plan: band, count, price, review, pause state
38526
- * @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to. On an annual plan a move up is charged once as the difference for the months of the paid year left, at the annual price (`announced_remaining_months`, `announced_difference_uf`, `announced_difference_clp_estimate`), and a move down only shows as `pending_down_band` until the renewal.
38560
+ * @description Band (S/M/L/XL or quoted), the 3-month average of professionals who attended patients that produced it, the UF/month price with the design-partner lock honoured, the next band review, any announced move, the payment mandate, the pause state and where the non-payment ladder has got to. On an annual plan a move up is charged once as the difference for the months of the paid year left, at the annual price (`announced_remaining_months`, `announced_difference_uf`, `announced_difference_clp_estimate`), and a move down only shows as `pending_down_band` until the renewal. `last_voided_purchase` names a first annual purchase voided unpaid at day 30 in the last 30 days with no plan cobro paid since (null otherwise).
38527
38561
  */
38528
38562
  get: {
38529
38563
  parameters: {
@@ -38586,7 +38620,8 @@ interface paths {
38586
38620
  * "annual_unavailable_reason": null,
38587
38621
  * "uf_value": 39350,
38588
38622
  * "uf_value_date": "2026-11-18"
38589
- * }
38623
+ * },
38624
+ * "last_voided_purchase": null
38590
38625
  * }
38591
38626
  * }
38592
38627
  */
@@ -38669,6 +38704,14 @@ interface paths {
38669
38704
  uf_period: number;
38670
38705
  clp_estimate: number | null;
38671
38706
  } | null;
38707
+ last_voided_purchase: {
38708
+ invoice_id: string;
38709
+ invoice_number: string;
38710
+ voided_on: string;
38711
+ /** @enum {string} */
38712
+ reason: "annual_purchase_expired";
38713
+ credited_clp: number;
38714
+ } | null;
38672
38715
  };
38673
38716
  };
38674
38717
  };
@@ -300681,7 +300724,7 @@ interface paths {
300681
300724
  *
300682
300725
  * `propio_sin_clasificar` (Phase 2, tenencia_source, 20270903000000) is a SUB-COUNT of `propio`, NOT a fifth bucket — the four above still sum to `total`. It is the cars nobody has ever classified (`tenencia_source=default`), provably coextensive with "sin clasificar" (a consignación can never be `default`). Measured on production 2026-08-31: 903 of 967 vehicles carried `propio` with nobody having said so — that is what this number answers, rather than leaving `propio` an unresolved warning. Opens with `GET /vehicles?active=false&tenencia=propio&tenencia_source=default`.
300683
300726
  *
300684
- * `sin_costo` (ADR 0114 §8, «Sin costo») counts the active, non-vendido cars with NO acquisition — no nota de compra, contrato de consignación or parte de pago — so their cost is unknown. Opens with `GET /vehicles?view=sin_costo`, the same predicate. A statement about the cost basis: ABSENT (not 0) for a caller without `dealership_economics:read`.
300727
+ * `sin_costo` is always 0 since ADR 0162 (app#7720): a car in stock without Costo de compra is not flagged until it is sold. The list `GET /vehicles?view=sin_costo` still works as a filter; only its count is gone. Kept for the clients that read it, and still ABSENT for a caller without `dealership_economics:read`.
300685
300728
  *
300686
300729
  * `mandato_sin_firmar` (ADR 0114 §5) counts the cars whose consignación (activa, or vendida) has an emitted mandato and no signed copy filed in the expediente. Opens with `GET /vehicles?view=mandato_sin_firmar`, the same predicate.
300687
300730
  *
@@ -300723,7 +300766,7 @@ interface paths {
300723
300766
  * "with_error": 0,
300724
300767
  * "unpublished": 7,
300725
300768
  * "stale": 0,
300726
- * "sin_costo": 7,
300769
+ * "sin_costo": 0,
300727
300770
  * "mandato_sin_firmar": 1,
300728
300771
  * "needs_review": 1,
300729
300772
  * "sin_sucursal": 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.82.0",
3
+ "version": "17.83.1",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",