@vitrina/api 17.83.0 → 17.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +347 -3
- package/dist/index.d.ts +347 -3
- package/package.json +1 -1
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[];
|
|
@@ -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
|
};
|
|
@@ -50156,7 +50199,121 @@ interface paths {
|
|
|
50156
50199
|
path?: never;
|
|
50157
50200
|
cookie?: never;
|
|
50158
50201
|
};
|
|
50159
|
-
|
|
50202
|
+
/**
|
|
50203
|
+
* The acquisition record for a vehicle
|
|
50204
|
+
* @description How one car arrived and what it cost (its Costo de compra). Needs `dealership_economics:read`. `vehicle_id` is required (no whole-lot cost dump). An empty array, not a 404, when no acquisition has been recorded yet; a car removed from Stock answers the same empty array. The cost editor prefills its amount from `amount_paid_clp` and its «Compra con factura (incluye IVA)» tick from `invoice_includes_iva` (vitrina-app#7719); a correction is `POST /vehicle-acquisitions`.
|
|
50205
|
+
*/
|
|
50206
|
+
get: {
|
|
50207
|
+
parameters: {
|
|
50208
|
+
query: {
|
|
50209
|
+
vehicle_id: string;
|
|
50210
|
+
};
|
|
50211
|
+
header?: never;
|
|
50212
|
+
path?: never;
|
|
50213
|
+
cookie?: never;
|
|
50214
|
+
};
|
|
50215
|
+
requestBody?: never;
|
|
50216
|
+
responses: {
|
|
50217
|
+
/** @description The acquisition of the car: a list of at most one row. */
|
|
50218
|
+
200: {
|
|
50219
|
+
headers: {
|
|
50220
|
+
[name: string]: unknown;
|
|
50221
|
+
};
|
|
50222
|
+
content: {
|
|
50223
|
+
/**
|
|
50224
|
+
* @example {
|
|
50225
|
+
* "data": [
|
|
50226
|
+
* {
|
|
50227
|
+
* "id": "b5f0d6c2-1e8a-4c3b-9f7d-2a6e4b8c0d11",
|
|
50228
|
+
* "tenant_id": "a3c9e1f0-7b2d-4e5a-8c6f-1d0b9e2a4f73",
|
|
50229
|
+
* "vehicle_id": "7c1e2a40-5b7d-4f0e-9a51-3d2f8e6b1c90",
|
|
50230
|
+
* "kind": "compra",
|
|
50231
|
+
* "counterparty_contact_id": null,
|
|
50232
|
+
* "acquired_on": "2026-08-03",
|
|
50233
|
+
* "purchase_note_id": null,
|
|
50234
|
+
* "consignment_contract_id": null,
|
|
50235
|
+
* "sale_note_id": null,
|
|
50236
|
+
* "net_clp": 8500000,
|
|
50237
|
+
* "tax_clp": null,
|
|
50238
|
+
* "tax_treatment": "exento",
|
|
50239
|
+
* "borne_by": "automotora",
|
|
50240
|
+
* "generates_fiscal_credit": false,
|
|
50241
|
+
* "created_at": "2026-11-19T15:02:00.000Z",
|
|
50242
|
+
* "updated_at": "2026-11-19T15:02:00.000Z",
|
|
50243
|
+
* "derived_tenencia": "propio",
|
|
50244
|
+
* "invoice_includes_iva": false,
|
|
50245
|
+
* "amount_paid_clp": 8500000
|
|
50246
|
+
* }
|
|
50247
|
+
* ],
|
|
50248
|
+
* "meta": {
|
|
50249
|
+
* "total": 1
|
|
50250
|
+
* }
|
|
50251
|
+
* }
|
|
50252
|
+
*/
|
|
50253
|
+
"application/json": {
|
|
50254
|
+
data: components["schemas"]["VehicleAcquisition"][];
|
|
50255
|
+
meta?: {
|
|
50256
|
+
[key: string]: unknown;
|
|
50257
|
+
};
|
|
50258
|
+
};
|
|
50259
|
+
};
|
|
50260
|
+
};
|
|
50261
|
+
/** @description Validation error */
|
|
50262
|
+
400: {
|
|
50263
|
+
headers: {
|
|
50264
|
+
[name: string]: unknown;
|
|
50265
|
+
};
|
|
50266
|
+
content: {
|
|
50267
|
+
"application/json": components["schemas"]["Error"];
|
|
50268
|
+
};
|
|
50269
|
+
};
|
|
50270
|
+
/** @description Unauthorized */
|
|
50271
|
+
401: {
|
|
50272
|
+
headers: {
|
|
50273
|
+
[name: string]: unknown;
|
|
50274
|
+
};
|
|
50275
|
+
content: {
|
|
50276
|
+
"application/json": components["schemas"]["Error"];
|
|
50277
|
+
};
|
|
50278
|
+
};
|
|
50279
|
+
/** @description Forbidden */
|
|
50280
|
+
403: {
|
|
50281
|
+
headers: {
|
|
50282
|
+
[name: string]: unknown;
|
|
50283
|
+
};
|
|
50284
|
+
content: {
|
|
50285
|
+
"application/json": components["schemas"]["Error"];
|
|
50286
|
+
};
|
|
50287
|
+
};
|
|
50288
|
+
/** @description Not found */
|
|
50289
|
+
404: {
|
|
50290
|
+
headers: {
|
|
50291
|
+
[name: string]: unknown;
|
|
50292
|
+
};
|
|
50293
|
+
content: {
|
|
50294
|
+
"application/json": components["schemas"]["Error"];
|
|
50295
|
+
};
|
|
50296
|
+
};
|
|
50297
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
50298
|
+
409: {
|
|
50299
|
+
headers: {
|
|
50300
|
+
[name: string]: unknown;
|
|
50301
|
+
};
|
|
50302
|
+
content: {
|
|
50303
|
+
"application/json": components["schemas"]["Error"];
|
|
50304
|
+
};
|
|
50305
|
+
};
|
|
50306
|
+
/** @description Rate limited */
|
|
50307
|
+
429: {
|
|
50308
|
+
headers: {
|
|
50309
|
+
[name: string]: unknown;
|
|
50310
|
+
};
|
|
50311
|
+
content: {
|
|
50312
|
+
"application/json": components["schemas"]["Error"];
|
|
50313
|
+
};
|
|
50314
|
+
};
|
|
50315
|
+
};
|
|
50316
|
+
};
|
|
50160
50317
|
put?: never;
|
|
50161
50318
|
/**
|
|
50162
50319
|
* Record how a unit arrived, or its bare Costo de compra
|
|
@@ -50354,6 +50511,131 @@ interface paths {
|
|
|
50354
50511
|
patch?: never;
|
|
50355
50512
|
trace?: never;
|
|
50356
50513
|
};
|
|
50514
|
+
"/vehicle-acquisitions/{id}": {
|
|
50515
|
+
parameters: {
|
|
50516
|
+
query?: never;
|
|
50517
|
+
header?: never;
|
|
50518
|
+
path?: never;
|
|
50519
|
+
cookie?: never;
|
|
50520
|
+
};
|
|
50521
|
+
/**
|
|
50522
|
+
* Fetch one acquisition record
|
|
50523
|
+
* @description One acquisition by its id, in the same shape as the list read. Needs `dealership_economics:read`. 404 for an id of another workspace or none at all.
|
|
50524
|
+
*/
|
|
50525
|
+
get: {
|
|
50526
|
+
parameters: {
|
|
50527
|
+
query?: never;
|
|
50528
|
+
header?: never;
|
|
50529
|
+
path: {
|
|
50530
|
+
id: string;
|
|
50531
|
+
};
|
|
50532
|
+
cookie?: never;
|
|
50533
|
+
};
|
|
50534
|
+
requestBody?: never;
|
|
50535
|
+
responses: {
|
|
50536
|
+
/** @description The acquisition record */
|
|
50537
|
+
200: {
|
|
50538
|
+
headers: {
|
|
50539
|
+
[name: string]: unknown;
|
|
50540
|
+
};
|
|
50541
|
+
content: {
|
|
50542
|
+
/**
|
|
50543
|
+
* @example {
|
|
50544
|
+
* "data": {
|
|
50545
|
+
* "id": "b5f0d6c2-1e8a-4c3b-9f7d-2a6e4b8c0d11",
|
|
50546
|
+
* "tenant_id": "a3c9e1f0-7b2d-4e5a-8c6f-1d0b9e2a4f73",
|
|
50547
|
+
* "vehicle_id": "7c1e2a40-5b7d-4f0e-9a51-3d2f8e6b1c90",
|
|
50548
|
+
* "kind": "compra",
|
|
50549
|
+
* "counterparty_contact_id": null,
|
|
50550
|
+
* "acquired_on": "2026-08-03",
|
|
50551
|
+
* "purchase_note_id": null,
|
|
50552
|
+
* "consignment_contract_id": null,
|
|
50553
|
+
* "sale_note_id": null,
|
|
50554
|
+
* "net_clp": 8500000,
|
|
50555
|
+
* "tax_clp": null,
|
|
50556
|
+
* "tax_treatment": "exento",
|
|
50557
|
+
* "borne_by": "automotora",
|
|
50558
|
+
* "generates_fiscal_credit": false,
|
|
50559
|
+
* "created_at": "2026-11-19T15:02:00.000Z",
|
|
50560
|
+
* "updated_at": "2026-11-19T15:02:00.000Z",
|
|
50561
|
+
* "derived_tenencia": "propio",
|
|
50562
|
+
* "invoice_includes_iva": false,
|
|
50563
|
+
* "amount_paid_clp": 8500000
|
|
50564
|
+
* }
|
|
50565
|
+
* }
|
|
50566
|
+
*/
|
|
50567
|
+
"application/json": {
|
|
50568
|
+
data: components["schemas"]["VehicleAcquisition"];
|
|
50569
|
+
meta?: {
|
|
50570
|
+
[key: string]: unknown;
|
|
50571
|
+
};
|
|
50572
|
+
};
|
|
50573
|
+
};
|
|
50574
|
+
};
|
|
50575
|
+
/** @description Validation error */
|
|
50576
|
+
400: {
|
|
50577
|
+
headers: {
|
|
50578
|
+
[name: string]: unknown;
|
|
50579
|
+
};
|
|
50580
|
+
content: {
|
|
50581
|
+
"application/json": components["schemas"]["Error"];
|
|
50582
|
+
};
|
|
50583
|
+
};
|
|
50584
|
+
/** @description Unauthorized */
|
|
50585
|
+
401: {
|
|
50586
|
+
headers: {
|
|
50587
|
+
[name: string]: unknown;
|
|
50588
|
+
};
|
|
50589
|
+
content: {
|
|
50590
|
+
"application/json": components["schemas"]["Error"];
|
|
50591
|
+
};
|
|
50592
|
+
};
|
|
50593
|
+
/** @description Forbidden */
|
|
50594
|
+
403: {
|
|
50595
|
+
headers: {
|
|
50596
|
+
[name: string]: unknown;
|
|
50597
|
+
};
|
|
50598
|
+
content: {
|
|
50599
|
+
"application/json": components["schemas"]["Error"];
|
|
50600
|
+
};
|
|
50601
|
+
};
|
|
50602
|
+
/** @description Not found */
|
|
50603
|
+
404: {
|
|
50604
|
+
headers: {
|
|
50605
|
+
[name: string]: unknown;
|
|
50606
|
+
};
|
|
50607
|
+
content: {
|
|
50608
|
+
"application/json": components["schemas"]["Error"];
|
|
50609
|
+
};
|
|
50610
|
+
};
|
|
50611
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
50612
|
+
409: {
|
|
50613
|
+
headers: {
|
|
50614
|
+
[name: string]: unknown;
|
|
50615
|
+
};
|
|
50616
|
+
content: {
|
|
50617
|
+
"application/json": components["schemas"]["Error"];
|
|
50618
|
+
};
|
|
50619
|
+
};
|
|
50620
|
+
/** @description Rate limited */
|
|
50621
|
+
429: {
|
|
50622
|
+
headers: {
|
|
50623
|
+
[name: string]: unknown;
|
|
50624
|
+
};
|
|
50625
|
+
content: {
|
|
50626
|
+
"application/json": components["schemas"]["Error"];
|
|
50627
|
+
};
|
|
50628
|
+
};
|
|
50629
|
+
};
|
|
50630
|
+
};
|
|
50631
|
+
put?: never;
|
|
50632
|
+
post?: never;
|
|
50633
|
+
delete?: never;
|
|
50634
|
+
options?: never;
|
|
50635
|
+
head?: never;
|
|
50636
|
+
patch?: never;
|
|
50637
|
+
trace?: never;
|
|
50638
|
+
};
|
|
50357
50639
|
"/vehicles/kanban": {
|
|
50358
50640
|
parameters: {
|
|
50359
50641
|
query?: never;
|
|
@@ -323787,6 +324069,68 @@ interface components {
|
|
|
323787
324069
|
};
|
|
323788
324070
|
/** @example 2026-01 */
|
|
323789
324071
|
OverheadPeriod: string;
|
|
324072
|
+
VehicleAcquisition: {
|
|
324073
|
+
/** Format: uuid */
|
|
324074
|
+
id: string;
|
|
324075
|
+
/** Format: uuid */
|
|
324076
|
+
tenant_id: string;
|
|
324077
|
+
/**
|
|
324078
|
+
* Format: uuid
|
|
324079
|
+
* @description El auto.
|
|
324080
|
+
*/
|
|
324081
|
+
vehicle_id: string;
|
|
324082
|
+
/**
|
|
324083
|
+
* @description Cómo llegó el auto: compra (de la automotora), consignacion o retoma (parte de pago).
|
|
324084
|
+
* @enum {string}
|
|
324085
|
+
*/
|
|
324086
|
+
kind: "compra" | "consignacion" | "retoma";
|
|
324087
|
+
/**
|
|
324088
|
+
* Format: uuid
|
|
324089
|
+
* @description De quién llegó el auto (contacto). null = no registrado.
|
|
324090
|
+
*/
|
|
324091
|
+
counterparty_contact_id: string | null;
|
|
324092
|
+
/** @description Fecha de adquisición, YYYY-MM-DD. */
|
|
324093
|
+
acquired_on: string;
|
|
324094
|
+
/**
|
|
324095
|
+
* Format: uuid
|
|
324096
|
+
* @description La nota de compra de una compra. null en un costo de compra escrito a mano.
|
|
324097
|
+
*/
|
|
324098
|
+
purchase_note_id: string | null;
|
|
324099
|
+
/**
|
|
324100
|
+
* Format: uuid
|
|
324101
|
+
* @description El contrato de una consignación.
|
|
324102
|
+
*/
|
|
324103
|
+
consignment_contract_id: string | null;
|
|
324104
|
+
/**
|
|
324105
|
+
* Format: uuid
|
|
324106
|
+
* @description La nota de venta que recibió el auto en parte de pago (retoma).
|
|
324107
|
+
*/
|
|
324108
|
+
sale_note_id: string | null;
|
|
324109
|
+
/** @description Costo de compra en pesos, sin IVA cuando la compra fue con factura. */
|
|
324110
|
+
net_clp: number;
|
|
324111
|
+
/** @description IVA de la compra en pesos. null = no registrado; 0 = sin IVA. */
|
|
324112
|
+
tax_clp: number | null;
|
|
324113
|
+
/**
|
|
324114
|
+
* @description Tratamiento de IVA de la compra.
|
|
324115
|
+
* @enum {string}
|
|
324116
|
+
*/
|
|
324117
|
+
tax_treatment: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
324118
|
+
/**
|
|
324119
|
+
* @description Quién asume el costo (automotora o cliente).
|
|
324120
|
+
* @enum {string}
|
|
324121
|
+
*/
|
|
324122
|
+
borne_by: "automotora" | "cliente";
|
|
324123
|
+
/** @description La compra genera crédito fiscal (IVA recuperable). */
|
|
324124
|
+
generates_fiscal_credit: boolean;
|
|
324125
|
+
created_at: string;
|
|
324126
|
+
updated_at: string;
|
|
324127
|
+
/** @description La tenencia del auto (propio o consignacion) tal como quedó tras este registro. */
|
|
324128
|
+
derived_tenencia: string | null;
|
|
324129
|
+
/** @description «Compra con factura (incluye IVA)» tal como quedó registrada. Sirve para mostrar el tick al reabrir el costo. */
|
|
324130
|
+
invoice_includes_iva: boolean;
|
|
324131
|
+
/** @description El monto que escribió la automotora: net_clp más el IVA cuando la compra fue con factura, si no net_clp. Sirve para mostrar el monto al reabrir el costo. */
|
|
324132
|
+
amount_paid_clp: number;
|
|
324133
|
+
};
|
|
323790
324134
|
/** @description A Mercado Pago checkout payment: its payment id, a link to it and its status. Null for every other movement. */
|
|
323791
324135
|
GatewayPaymentRef: {
|
|
323792
324136
|
/** @enum {string} */
|
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[];
|
|
@@ -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
|
};
|
|
@@ -50156,7 +50199,121 @@ interface paths {
|
|
|
50156
50199
|
path?: never;
|
|
50157
50200
|
cookie?: never;
|
|
50158
50201
|
};
|
|
50159
|
-
|
|
50202
|
+
/**
|
|
50203
|
+
* The acquisition record for a vehicle
|
|
50204
|
+
* @description How one car arrived and what it cost (its Costo de compra). Needs `dealership_economics:read`. `vehicle_id` is required (no whole-lot cost dump). An empty array, not a 404, when no acquisition has been recorded yet; a car removed from Stock answers the same empty array. The cost editor prefills its amount from `amount_paid_clp` and its «Compra con factura (incluye IVA)» tick from `invoice_includes_iva` (vitrina-app#7719); a correction is `POST /vehicle-acquisitions`.
|
|
50205
|
+
*/
|
|
50206
|
+
get: {
|
|
50207
|
+
parameters: {
|
|
50208
|
+
query: {
|
|
50209
|
+
vehicle_id: string;
|
|
50210
|
+
};
|
|
50211
|
+
header?: never;
|
|
50212
|
+
path?: never;
|
|
50213
|
+
cookie?: never;
|
|
50214
|
+
};
|
|
50215
|
+
requestBody?: never;
|
|
50216
|
+
responses: {
|
|
50217
|
+
/** @description The acquisition of the car: a list of at most one row. */
|
|
50218
|
+
200: {
|
|
50219
|
+
headers: {
|
|
50220
|
+
[name: string]: unknown;
|
|
50221
|
+
};
|
|
50222
|
+
content: {
|
|
50223
|
+
/**
|
|
50224
|
+
* @example {
|
|
50225
|
+
* "data": [
|
|
50226
|
+
* {
|
|
50227
|
+
* "id": "b5f0d6c2-1e8a-4c3b-9f7d-2a6e4b8c0d11",
|
|
50228
|
+
* "tenant_id": "a3c9e1f0-7b2d-4e5a-8c6f-1d0b9e2a4f73",
|
|
50229
|
+
* "vehicle_id": "7c1e2a40-5b7d-4f0e-9a51-3d2f8e6b1c90",
|
|
50230
|
+
* "kind": "compra",
|
|
50231
|
+
* "counterparty_contact_id": null,
|
|
50232
|
+
* "acquired_on": "2026-08-03",
|
|
50233
|
+
* "purchase_note_id": null,
|
|
50234
|
+
* "consignment_contract_id": null,
|
|
50235
|
+
* "sale_note_id": null,
|
|
50236
|
+
* "net_clp": 8500000,
|
|
50237
|
+
* "tax_clp": null,
|
|
50238
|
+
* "tax_treatment": "exento",
|
|
50239
|
+
* "borne_by": "automotora",
|
|
50240
|
+
* "generates_fiscal_credit": false,
|
|
50241
|
+
* "created_at": "2026-11-19T15:02:00.000Z",
|
|
50242
|
+
* "updated_at": "2026-11-19T15:02:00.000Z",
|
|
50243
|
+
* "derived_tenencia": "propio",
|
|
50244
|
+
* "invoice_includes_iva": false,
|
|
50245
|
+
* "amount_paid_clp": 8500000
|
|
50246
|
+
* }
|
|
50247
|
+
* ],
|
|
50248
|
+
* "meta": {
|
|
50249
|
+
* "total": 1
|
|
50250
|
+
* }
|
|
50251
|
+
* }
|
|
50252
|
+
*/
|
|
50253
|
+
"application/json": {
|
|
50254
|
+
data: components["schemas"]["VehicleAcquisition"][];
|
|
50255
|
+
meta?: {
|
|
50256
|
+
[key: string]: unknown;
|
|
50257
|
+
};
|
|
50258
|
+
};
|
|
50259
|
+
};
|
|
50260
|
+
};
|
|
50261
|
+
/** @description Validation error */
|
|
50262
|
+
400: {
|
|
50263
|
+
headers: {
|
|
50264
|
+
[name: string]: unknown;
|
|
50265
|
+
};
|
|
50266
|
+
content: {
|
|
50267
|
+
"application/json": components["schemas"]["Error"];
|
|
50268
|
+
};
|
|
50269
|
+
};
|
|
50270
|
+
/** @description Unauthorized */
|
|
50271
|
+
401: {
|
|
50272
|
+
headers: {
|
|
50273
|
+
[name: string]: unknown;
|
|
50274
|
+
};
|
|
50275
|
+
content: {
|
|
50276
|
+
"application/json": components["schemas"]["Error"];
|
|
50277
|
+
};
|
|
50278
|
+
};
|
|
50279
|
+
/** @description Forbidden */
|
|
50280
|
+
403: {
|
|
50281
|
+
headers: {
|
|
50282
|
+
[name: string]: unknown;
|
|
50283
|
+
};
|
|
50284
|
+
content: {
|
|
50285
|
+
"application/json": components["schemas"]["Error"];
|
|
50286
|
+
};
|
|
50287
|
+
};
|
|
50288
|
+
/** @description Not found */
|
|
50289
|
+
404: {
|
|
50290
|
+
headers: {
|
|
50291
|
+
[name: string]: unknown;
|
|
50292
|
+
};
|
|
50293
|
+
content: {
|
|
50294
|
+
"application/json": components["schemas"]["Error"];
|
|
50295
|
+
};
|
|
50296
|
+
};
|
|
50297
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
50298
|
+
409: {
|
|
50299
|
+
headers: {
|
|
50300
|
+
[name: string]: unknown;
|
|
50301
|
+
};
|
|
50302
|
+
content: {
|
|
50303
|
+
"application/json": components["schemas"]["Error"];
|
|
50304
|
+
};
|
|
50305
|
+
};
|
|
50306
|
+
/** @description Rate limited */
|
|
50307
|
+
429: {
|
|
50308
|
+
headers: {
|
|
50309
|
+
[name: string]: unknown;
|
|
50310
|
+
};
|
|
50311
|
+
content: {
|
|
50312
|
+
"application/json": components["schemas"]["Error"];
|
|
50313
|
+
};
|
|
50314
|
+
};
|
|
50315
|
+
};
|
|
50316
|
+
};
|
|
50160
50317
|
put?: never;
|
|
50161
50318
|
/**
|
|
50162
50319
|
* Record how a unit arrived, or its bare Costo de compra
|
|
@@ -50354,6 +50511,131 @@ interface paths {
|
|
|
50354
50511
|
patch?: never;
|
|
50355
50512
|
trace?: never;
|
|
50356
50513
|
};
|
|
50514
|
+
"/vehicle-acquisitions/{id}": {
|
|
50515
|
+
parameters: {
|
|
50516
|
+
query?: never;
|
|
50517
|
+
header?: never;
|
|
50518
|
+
path?: never;
|
|
50519
|
+
cookie?: never;
|
|
50520
|
+
};
|
|
50521
|
+
/**
|
|
50522
|
+
* Fetch one acquisition record
|
|
50523
|
+
* @description One acquisition by its id, in the same shape as the list read. Needs `dealership_economics:read`. 404 for an id of another workspace or none at all.
|
|
50524
|
+
*/
|
|
50525
|
+
get: {
|
|
50526
|
+
parameters: {
|
|
50527
|
+
query?: never;
|
|
50528
|
+
header?: never;
|
|
50529
|
+
path: {
|
|
50530
|
+
id: string;
|
|
50531
|
+
};
|
|
50532
|
+
cookie?: never;
|
|
50533
|
+
};
|
|
50534
|
+
requestBody?: never;
|
|
50535
|
+
responses: {
|
|
50536
|
+
/** @description The acquisition record */
|
|
50537
|
+
200: {
|
|
50538
|
+
headers: {
|
|
50539
|
+
[name: string]: unknown;
|
|
50540
|
+
};
|
|
50541
|
+
content: {
|
|
50542
|
+
/**
|
|
50543
|
+
* @example {
|
|
50544
|
+
* "data": {
|
|
50545
|
+
* "id": "b5f0d6c2-1e8a-4c3b-9f7d-2a6e4b8c0d11",
|
|
50546
|
+
* "tenant_id": "a3c9e1f0-7b2d-4e5a-8c6f-1d0b9e2a4f73",
|
|
50547
|
+
* "vehicle_id": "7c1e2a40-5b7d-4f0e-9a51-3d2f8e6b1c90",
|
|
50548
|
+
* "kind": "compra",
|
|
50549
|
+
* "counterparty_contact_id": null,
|
|
50550
|
+
* "acquired_on": "2026-08-03",
|
|
50551
|
+
* "purchase_note_id": null,
|
|
50552
|
+
* "consignment_contract_id": null,
|
|
50553
|
+
* "sale_note_id": null,
|
|
50554
|
+
* "net_clp": 8500000,
|
|
50555
|
+
* "tax_clp": null,
|
|
50556
|
+
* "tax_treatment": "exento",
|
|
50557
|
+
* "borne_by": "automotora",
|
|
50558
|
+
* "generates_fiscal_credit": false,
|
|
50559
|
+
* "created_at": "2026-11-19T15:02:00.000Z",
|
|
50560
|
+
* "updated_at": "2026-11-19T15:02:00.000Z",
|
|
50561
|
+
* "derived_tenencia": "propio",
|
|
50562
|
+
* "invoice_includes_iva": false,
|
|
50563
|
+
* "amount_paid_clp": 8500000
|
|
50564
|
+
* }
|
|
50565
|
+
* }
|
|
50566
|
+
*/
|
|
50567
|
+
"application/json": {
|
|
50568
|
+
data: components["schemas"]["VehicleAcquisition"];
|
|
50569
|
+
meta?: {
|
|
50570
|
+
[key: string]: unknown;
|
|
50571
|
+
};
|
|
50572
|
+
};
|
|
50573
|
+
};
|
|
50574
|
+
};
|
|
50575
|
+
/** @description Validation error */
|
|
50576
|
+
400: {
|
|
50577
|
+
headers: {
|
|
50578
|
+
[name: string]: unknown;
|
|
50579
|
+
};
|
|
50580
|
+
content: {
|
|
50581
|
+
"application/json": components["schemas"]["Error"];
|
|
50582
|
+
};
|
|
50583
|
+
};
|
|
50584
|
+
/** @description Unauthorized */
|
|
50585
|
+
401: {
|
|
50586
|
+
headers: {
|
|
50587
|
+
[name: string]: unknown;
|
|
50588
|
+
};
|
|
50589
|
+
content: {
|
|
50590
|
+
"application/json": components["schemas"]["Error"];
|
|
50591
|
+
};
|
|
50592
|
+
};
|
|
50593
|
+
/** @description Forbidden */
|
|
50594
|
+
403: {
|
|
50595
|
+
headers: {
|
|
50596
|
+
[name: string]: unknown;
|
|
50597
|
+
};
|
|
50598
|
+
content: {
|
|
50599
|
+
"application/json": components["schemas"]["Error"];
|
|
50600
|
+
};
|
|
50601
|
+
};
|
|
50602
|
+
/** @description Not found */
|
|
50603
|
+
404: {
|
|
50604
|
+
headers: {
|
|
50605
|
+
[name: string]: unknown;
|
|
50606
|
+
};
|
|
50607
|
+
content: {
|
|
50608
|
+
"application/json": components["schemas"]["Error"];
|
|
50609
|
+
};
|
|
50610
|
+
};
|
|
50611
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
50612
|
+
409: {
|
|
50613
|
+
headers: {
|
|
50614
|
+
[name: string]: unknown;
|
|
50615
|
+
};
|
|
50616
|
+
content: {
|
|
50617
|
+
"application/json": components["schemas"]["Error"];
|
|
50618
|
+
};
|
|
50619
|
+
};
|
|
50620
|
+
/** @description Rate limited */
|
|
50621
|
+
429: {
|
|
50622
|
+
headers: {
|
|
50623
|
+
[name: string]: unknown;
|
|
50624
|
+
};
|
|
50625
|
+
content: {
|
|
50626
|
+
"application/json": components["schemas"]["Error"];
|
|
50627
|
+
};
|
|
50628
|
+
};
|
|
50629
|
+
};
|
|
50630
|
+
};
|
|
50631
|
+
put?: never;
|
|
50632
|
+
post?: never;
|
|
50633
|
+
delete?: never;
|
|
50634
|
+
options?: never;
|
|
50635
|
+
head?: never;
|
|
50636
|
+
patch?: never;
|
|
50637
|
+
trace?: never;
|
|
50638
|
+
};
|
|
50357
50639
|
"/vehicles/kanban": {
|
|
50358
50640
|
parameters: {
|
|
50359
50641
|
query?: never;
|
|
@@ -323787,6 +324069,68 @@ interface components {
|
|
|
323787
324069
|
};
|
|
323788
324070
|
/** @example 2026-01 */
|
|
323789
324071
|
OverheadPeriod: string;
|
|
324072
|
+
VehicleAcquisition: {
|
|
324073
|
+
/** Format: uuid */
|
|
324074
|
+
id: string;
|
|
324075
|
+
/** Format: uuid */
|
|
324076
|
+
tenant_id: string;
|
|
324077
|
+
/**
|
|
324078
|
+
* Format: uuid
|
|
324079
|
+
* @description El auto.
|
|
324080
|
+
*/
|
|
324081
|
+
vehicle_id: string;
|
|
324082
|
+
/**
|
|
324083
|
+
* @description Cómo llegó el auto: compra (de la automotora), consignacion o retoma (parte de pago).
|
|
324084
|
+
* @enum {string}
|
|
324085
|
+
*/
|
|
324086
|
+
kind: "compra" | "consignacion" | "retoma";
|
|
324087
|
+
/**
|
|
324088
|
+
* Format: uuid
|
|
324089
|
+
* @description De quién llegó el auto (contacto). null = no registrado.
|
|
324090
|
+
*/
|
|
324091
|
+
counterparty_contact_id: string | null;
|
|
324092
|
+
/** @description Fecha de adquisición, YYYY-MM-DD. */
|
|
324093
|
+
acquired_on: string;
|
|
324094
|
+
/**
|
|
324095
|
+
* Format: uuid
|
|
324096
|
+
* @description La nota de compra de una compra. null en un costo de compra escrito a mano.
|
|
324097
|
+
*/
|
|
324098
|
+
purchase_note_id: string | null;
|
|
324099
|
+
/**
|
|
324100
|
+
* Format: uuid
|
|
324101
|
+
* @description El contrato de una consignación.
|
|
324102
|
+
*/
|
|
324103
|
+
consignment_contract_id: string | null;
|
|
324104
|
+
/**
|
|
324105
|
+
* Format: uuid
|
|
324106
|
+
* @description La nota de venta que recibió el auto en parte de pago (retoma).
|
|
324107
|
+
*/
|
|
324108
|
+
sale_note_id: string | null;
|
|
324109
|
+
/** @description Costo de compra en pesos, sin IVA cuando la compra fue con factura. */
|
|
324110
|
+
net_clp: number;
|
|
324111
|
+
/** @description IVA de la compra en pesos. null = no registrado; 0 = sin IVA. */
|
|
324112
|
+
tax_clp: number | null;
|
|
324113
|
+
/**
|
|
324114
|
+
* @description Tratamiento de IVA de la compra.
|
|
324115
|
+
* @enum {string}
|
|
324116
|
+
*/
|
|
324117
|
+
tax_treatment: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
324118
|
+
/**
|
|
324119
|
+
* @description Quién asume el costo (automotora o cliente).
|
|
324120
|
+
* @enum {string}
|
|
324121
|
+
*/
|
|
324122
|
+
borne_by: "automotora" | "cliente";
|
|
324123
|
+
/** @description La compra genera crédito fiscal (IVA recuperable). */
|
|
324124
|
+
generates_fiscal_credit: boolean;
|
|
324125
|
+
created_at: string;
|
|
324126
|
+
updated_at: string;
|
|
324127
|
+
/** @description La tenencia del auto (propio o consignacion) tal como quedó tras este registro. */
|
|
324128
|
+
derived_tenencia: string | null;
|
|
324129
|
+
/** @description «Compra con factura (incluye IVA)» tal como quedó registrada. Sirve para mostrar el tick al reabrir el costo. */
|
|
324130
|
+
invoice_includes_iva: boolean;
|
|
324131
|
+
/** @description El monto que escribió la automotora: net_clp más el IVA cuando la compra fue con factura, si no net_clp. Sirve para mostrar el monto al reabrir el costo. */
|
|
324132
|
+
amount_paid_clp: number;
|
|
324133
|
+
};
|
|
323790
324134
|
/** @description A Mercado Pago checkout payment: its payment id, a link to it and its status. Null for every other movement. */
|
|
323791
324135
|
GatewayPaymentRef: {
|
|
323792
324136
|
/** @enum {string} */
|
package/package.json
CHANGED