@vitrina/api 17.98.0 → 17.99.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 +81 -2
- package/dist/index.d.ts +81 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -23642,6 +23642,7 @@ interface paths {
|
|
|
23642
23642
|
metadata?: {
|
|
23643
23643
|
[key: string]: unknown;
|
|
23644
23644
|
};
|
|
23645
|
+
internal_only?: boolean;
|
|
23645
23646
|
};
|
|
23646
23647
|
};
|
|
23647
23648
|
};
|
|
@@ -24013,6 +24014,7 @@ interface paths {
|
|
|
24013
24014
|
metadata?: {
|
|
24014
24015
|
[key: string]: unknown;
|
|
24015
24016
|
};
|
|
24017
|
+
internal_only?: boolean;
|
|
24016
24018
|
is_active?: boolean;
|
|
24017
24019
|
};
|
|
24018
24020
|
};
|
|
@@ -44308,7 +44310,7 @@ interface paths {
|
|
|
44308
44310
|
*
|
|
44309
44311
|
* It also carries the unit it bought, the same as each row of the list: `vehicle` is `{ id, make, model, year, registration_number }` or `null`, and `vehicle_count` says how many units the document acquired (`vehicle` is the FIRST of them when there are several, and `null` exactly when the count is `0`).
|
|
44310
44312
|
*
|
|
44311
|
-
* Since vitrina-app#7723 it also carries what the «Modificar» form opens with: `acquisition` (the car’s cost under this note, with `invoice_includes_iva` and `amount_paid_clp`, or `null`) and `retentions` (the note’s live «Descuentos», each with `description` and `net_clp`).
|
|
44313
|
+
* Since vitrina-app#7723 it also carries what the «Modificar» form opens with: `acquisition` (the car’s cost under this note, with `invoice_includes_iva` and `amount_paid_clp`, or `null`) and `retentions` (the note’s live «Descuentos», each with `description` and `net_clp`). The Descuentos a «Modificar» replaced are never listed. A voided note lists the Descuentos it had when it was voided, so its total is still price − Σ retentions.
|
|
44312
44314
|
*
|
|
44313
44315
|
* A nota de compra written by closing a sale with a car in part payment (vitrina-app#7725) carries `sale_note_id`, `sale_note_trade_in_id` and `sale_note_display_id` (`V-n`); its amount is that sale’s precio de toma and `acquisition` is the car’s `retoma` cost. Every other nota has the three as `null`.
|
|
44314
44316
|
*
|
|
@@ -51028,7 +51030,84 @@ interface paths {
|
|
|
51028
51030
|
};
|
|
51029
51031
|
put?: never;
|
|
51030
51032
|
post?: never;
|
|
51031
|
-
|
|
51033
|
+
/**
|
|
51034
|
+
* Remove a typed Costo de compra
|
|
51035
|
+
* @description The dealer typed a Costo de compra by mistake and empties the field (vitrina-app#7719): the bare cost (`kind: "compra"` with no document link) is removed and the car is back to «sin costo de compra», as if none had been typed. Needs `dealership_economics:write`. 204 with no body. A cost that comes from a document is never removed here and answers the same 409 as a correction, with `error.details.code`: `purchase_cost_on_purchase_note` (+ `purchase_note_id`), `purchase_cost_on_trade_in` (+ `sale_note_id`), `purchase_cost_consigned_vehicle`. 404 for an id of another workspace or none at all. The profit report (`GET /margin`) drops the cost on the next read.
|
|
51036
|
+
*/
|
|
51037
|
+
delete: {
|
|
51038
|
+
parameters: {
|
|
51039
|
+
query?: never;
|
|
51040
|
+
header?: never;
|
|
51041
|
+
path: {
|
|
51042
|
+
id: string;
|
|
51043
|
+
};
|
|
51044
|
+
cookie?: never;
|
|
51045
|
+
};
|
|
51046
|
+
requestBody?: never;
|
|
51047
|
+
responses: {
|
|
51048
|
+
/** @description No content */
|
|
51049
|
+
204: {
|
|
51050
|
+
headers: {
|
|
51051
|
+
[name: string]: unknown;
|
|
51052
|
+
};
|
|
51053
|
+
content?: never;
|
|
51054
|
+
};
|
|
51055
|
+
/** @description Validation error */
|
|
51056
|
+
400: {
|
|
51057
|
+
headers: {
|
|
51058
|
+
[name: string]: unknown;
|
|
51059
|
+
};
|
|
51060
|
+
content: {
|
|
51061
|
+
"application/json": components["schemas"]["Error"];
|
|
51062
|
+
};
|
|
51063
|
+
};
|
|
51064
|
+
/** @description Unauthorized */
|
|
51065
|
+
401: {
|
|
51066
|
+
headers: {
|
|
51067
|
+
[name: string]: unknown;
|
|
51068
|
+
};
|
|
51069
|
+
content: {
|
|
51070
|
+
"application/json": components["schemas"]["Error"];
|
|
51071
|
+
};
|
|
51072
|
+
};
|
|
51073
|
+
/** @description Forbidden */
|
|
51074
|
+
403: {
|
|
51075
|
+
headers: {
|
|
51076
|
+
[name: string]: unknown;
|
|
51077
|
+
};
|
|
51078
|
+
content: {
|
|
51079
|
+
"application/json": components["schemas"]["Error"];
|
|
51080
|
+
};
|
|
51081
|
+
};
|
|
51082
|
+
/** @description Not found */
|
|
51083
|
+
404: {
|
|
51084
|
+
headers: {
|
|
51085
|
+
[name: string]: unknown;
|
|
51086
|
+
};
|
|
51087
|
+
content: {
|
|
51088
|
+
"application/json": components["schemas"]["Error"];
|
|
51089
|
+
};
|
|
51090
|
+
};
|
|
51091
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
51092
|
+
409: {
|
|
51093
|
+
headers: {
|
|
51094
|
+
[name: string]: unknown;
|
|
51095
|
+
};
|
|
51096
|
+
content: {
|
|
51097
|
+
"application/json": components["schemas"]["Error"];
|
|
51098
|
+
};
|
|
51099
|
+
};
|
|
51100
|
+
/** @description Rate limited */
|
|
51101
|
+
429: {
|
|
51102
|
+
headers: {
|
|
51103
|
+
[name: string]: unknown;
|
|
51104
|
+
};
|
|
51105
|
+
content: {
|
|
51106
|
+
"application/json": components["schemas"]["Error"];
|
|
51107
|
+
};
|
|
51108
|
+
};
|
|
51109
|
+
};
|
|
51110
|
+
};
|
|
51032
51111
|
options?: never;
|
|
51033
51112
|
head?: never;
|
|
51034
51113
|
patch?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -23642,6 +23642,7 @@ interface paths {
|
|
|
23642
23642
|
metadata?: {
|
|
23643
23643
|
[key: string]: unknown;
|
|
23644
23644
|
};
|
|
23645
|
+
internal_only?: boolean;
|
|
23645
23646
|
};
|
|
23646
23647
|
};
|
|
23647
23648
|
};
|
|
@@ -24013,6 +24014,7 @@ interface paths {
|
|
|
24013
24014
|
metadata?: {
|
|
24014
24015
|
[key: string]: unknown;
|
|
24015
24016
|
};
|
|
24017
|
+
internal_only?: boolean;
|
|
24016
24018
|
is_active?: boolean;
|
|
24017
24019
|
};
|
|
24018
24020
|
};
|
|
@@ -44308,7 +44310,7 @@ interface paths {
|
|
|
44308
44310
|
*
|
|
44309
44311
|
* It also carries the unit it bought, the same as each row of the list: `vehicle` is `{ id, make, model, year, registration_number }` or `null`, and `vehicle_count` says how many units the document acquired (`vehicle` is the FIRST of them when there are several, and `null` exactly when the count is `0`).
|
|
44310
44312
|
*
|
|
44311
|
-
* Since vitrina-app#7723 it also carries what the «Modificar» form opens with: `acquisition` (the car’s cost under this note, with `invoice_includes_iva` and `amount_paid_clp`, or `null`) and `retentions` (the note’s live «Descuentos», each with `description` and `net_clp`).
|
|
44313
|
+
* Since vitrina-app#7723 it also carries what the «Modificar» form opens with: `acquisition` (the car’s cost under this note, with `invoice_includes_iva` and `amount_paid_clp`, or `null`) and `retentions` (the note’s live «Descuentos», each with `description` and `net_clp`). The Descuentos a «Modificar» replaced are never listed. A voided note lists the Descuentos it had when it was voided, so its total is still price − Σ retentions.
|
|
44312
44314
|
*
|
|
44313
44315
|
* A nota de compra written by closing a sale with a car in part payment (vitrina-app#7725) carries `sale_note_id`, `sale_note_trade_in_id` and `sale_note_display_id` (`V-n`); its amount is that sale’s precio de toma and `acquisition` is the car’s `retoma` cost. Every other nota has the three as `null`.
|
|
44314
44316
|
*
|
|
@@ -51028,7 +51030,84 @@ interface paths {
|
|
|
51028
51030
|
};
|
|
51029
51031
|
put?: never;
|
|
51030
51032
|
post?: never;
|
|
51031
|
-
|
|
51033
|
+
/**
|
|
51034
|
+
* Remove a typed Costo de compra
|
|
51035
|
+
* @description The dealer typed a Costo de compra by mistake and empties the field (vitrina-app#7719): the bare cost (`kind: "compra"` with no document link) is removed and the car is back to «sin costo de compra», as if none had been typed. Needs `dealership_economics:write`. 204 with no body. A cost that comes from a document is never removed here and answers the same 409 as a correction, with `error.details.code`: `purchase_cost_on_purchase_note` (+ `purchase_note_id`), `purchase_cost_on_trade_in` (+ `sale_note_id`), `purchase_cost_consigned_vehicle`. 404 for an id of another workspace or none at all. The profit report (`GET /margin`) drops the cost on the next read.
|
|
51036
|
+
*/
|
|
51037
|
+
delete: {
|
|
51038
|
+
parameters: {
|
|
51039
|
+
query?: never;
|
|
51040
|
+
header?: never;
|
|
51041
|
+
path: {
|
|
51042
|
+
id: string;
|
|
51043
|
+
};
|
|
51044
|
+
cookie?: never;
|
|
51045
|
+
};
|
|
51046
|
+
requestBody?: never;
|
|
51047
|
+
responses: {
|
|
51048
|
+
/** @description No content */
|
|
51049
|
+
204: {
|
|
51050
|
+
headers: {
|
|
51051
|
+
[name: string]: unknown;
|
|
51052
|
+
};
|
|
51053
|
+
content?: never;
|
|
51054
|
+
};
|
|
51055
|
+
/** @description Validation error */
|
|
51056
|
+
400: {
|
|
51057
|
+
headers: {
|
|
51058
|
+
[name: string]: unknown;
|
|
51059
|
+
};
|
|
51060
|
+
content: {
|
|
51061
|
+
"application/json": components["schemas"]["Error"];
|
|
51062
|
+
};
|
|
51063
|
+
};
|
|
51064
|
+
/** @description Unauthorized */
|
|
51065
|
+
401: {
|
|
51066
|
+
headers: {
|
|
51067
|
+
[name: string]: unknown;
|
|
51068
|
+
};
|
|
51069
|
+
content: {
|
|
51070
|
+
"application/json": components["schemas"]["Error"];
|
|
51071
|
+
};
|
|
51072
|
+
};
|
|
51073
|
+
/** @description Forbidden */
|
|
51074
|
+
403: {
|
|
51075
|
+
headers: {
|
|
51076
|
+
[name: string]: unknown;
|
|
51077
|
+
};
|
|
51078
|
+
content: {
|
|
51079
|
+
"application/json": components["schemas"]["Error"];
|
|
51080
|
+
};
|
|
51081
|
+
};
|
|
51082
|
+
/** @description Not found */
|
|
51083
|
+
404: {
|
|
51084
|
+
headers: {
|
|
51085
|
+
[name: string]: unknown;
|
|
51086
|
+
};
|
|
51087
|
+
content: {
|
|
51088
|
+
"application/json": components["schemas"]["Error"];
|
|
51089
|
+
};
|
|
51090
|
+
};
|
|
51091
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
51092
|
+
409: {
|
|
51093
|
+
headers: {
|
|
51094
|
+
[name: string]: unknown;
|
|
51095
|
+
};
|
|
51096
|
+
content: {
|
|
51097
|
+
"application/json": components["schemas"]["Error"];
|
|
51098
|
+
};
|
|
51099
|
+
};
|
|
51100
|
+
/** @description Rate limited */
|
|
51101
|
+
429: {
|
|
51102
|
+
headers: {
|
|
51103
|
+
[name: string]: unknown;
|
|
51104
|
+
};
|
|
51105
|
+
content: {
|
|
51106
|
+
"application/json": components["schemas"]["Error"];
|
|
51107
|
+
};
|
|
51108
|
+
};
|
|
51109
|
+
};
|
|
51110
|
+
};
|
|
51032
51111
|
options?: never;
|
|
51033
51112
|
head?: never;
|
|
51034
51113
|
patch?: never;
|
package/package.json
CHANGED