@vitrina/api 17.32.1 → 17.36.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 +15 -11
- package/dist/index.d.ts +15 -11
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -148132,7 +148132,9 @@ interface paths {
|
|
|
148132
148132
|
* Sell the car and settle with the owner
|
|
148133
148133
|
* @description One atomic action doing two things: moves the contract to `vendido`, and produces the **Liquidación** — sale price minus commission equals the amount owed to the owner, minus every retained cost line the owner bears (derived from the car's cost ledger, never sent; a 409 if they exceed the payout), plus the payment record. Requires `amount_venta_clp`; `paid_at` records when the owner was actually paid.
|
|
148134
148134
|
*
|
|
148135
|
-
* **
|
|
148135
|
+
* **Only the medio de pago is required**: `payout_method` (transferencia, vale_vista or cheque). `payout_bank`, `payout_account` (the cuenta de destino — only its last four digits are stored and returned as `payout_account_last4`), `payout_operation_number` and `payout_paid_by` («pagado por», an active member of the workspace; defaults to whoever registers it) are optional. What was recorded prints on the liquidación with the payment and registration dates.
|
|
148136
|
+
*
|
|
148137
|
+
* **The commission can be set for this sale**: `comision_amount_clp` (net of IVA) replaces what the contract’s terms would compute — a minimum commission, a figure renegotiated at closing. The liquidación then records a fixed commission of that amount; the contract keeps its terms. To charge the owner an additional cost, record it on the car’s cost ledger with a `dueno` share before settling.
|
|
148136
148138
|
*
|
|
148137
148139
|
* Legal only from `activo`; anything else is a 409. Answers 201 with the contract and the Liquidación.
|
|
148138
148140
|
*
|
|
@@ -148167,22 +148169,24 @@ interface paths {
|
|
|
148167
148169
|
amount_venta_clp: number;
|
|
148168
148170
|
/** Format: date-time */
|
|
148169
148171
|
paid_at?: string;
|
|
148172
|
+
/** @description Comisión acordada para ESTA venta, neta de IVA, en pesos. Opcional: si se omite, se calcula con los términos del contrato. Cuando se envía, la liquidación la registra como comisión fija (el contrato no cambia) y el «+ IVA» sigue siendo el del contrato. No puede superar `amount_venta_clp`. */
|
|
148173
|
+
comision_amount_clp?: number;
|
|
148170
148174
|
/**
|
|
148171
|
-
* @description Medio de pago al consignante: `transferencia`, `vale_vista` o `cheque`.
|
|
148175
|
+
* @description Medio de pago al consignante: `transferencia`, `vale_vista` o `cheque`. Es el único dato del pago que se exige.
|
|
148172
148176
|
* @enum {string}
|
|
148173
148177
|
*/
|
|
148174
148178
|
payout_method: "transferencia" | "vale_vista" | "cheque";
|
|
148175
|
-
/** @description Banco por el que se pagó. */
|
|
148176
|
-
payout_bank
|
|
148177
|
-
/** @description Cuenta de destino. Solo se guardan sus últimos 4 dígitos (`payout_account_last4`), que es lo que muestran la app y la liquidación. */
|
|
148178
|
-
payout_account
|
|
148179
|
-
/** @description Número de operación del pago. */
|
|
148180
|
-
payout_operation_number
|
|
148179
|
+
/** @description Banco por el que se pagó. Opcional. */
|
|
148180
|
+
payout_bank?: string;
|
|
148181
|
+
/** @description Cuenta de destino. Opcional. Solo se guardan sus últimos 4 dígitos (`payout_account_last4`), que es lo que muestran la app y la liquidación; si se envía, necesita al menos 4 dígitos. */
|
|
148182
|
+
payout_account?: string;
|
|
148183
|
+
/** @description Número de operación del pago. Opcional. */
|
|
148184
|
+
payout_operation_number?: string;
|
|
148181
148185
|
/**
|
|
148182
148186
|
* Format: uuid
|
|
148183
|
-
* @description «Pagado por»: id de usuario de un miembro activo del equipo.
|
|
148187
|
+
* @description «Pagado por»: id de usuario de un miembro activo del equipo. Opcional: si se omite, queda quien registra la liquidación.
|
|
148184
148188
|
*/
|
|
148185
|
-
payout_paid_by
|
|
148189
|
+
payout_paid_by?: string;
|
|
148186
148190
|
};
|
|
148187
148191
|
};
|
|
148188
148192
|
};
|
|
@@ -148322,7 +148326,7 @@ interface paths {
|
|
|
148322
148326
|
* Fetch the settlement record
|
|
148323
148327
|
* @description The persisted Liquidación for a contract. It only exists once the contract has been sold — this is a read of a record, not a projection computed on demand, so the figures are what was agreed at settlement even if the terms changed afterwards.
|
|
148324
148328
|
*
|
|
148325
|
-
* It carries how the owner was paid (`payout_*`, with `payout_paid_by_name` resolved for display). On a liquidación registered before the payout fields
|
|
148329
|
+
* It carries how the owner was paid (`payout_*`, with `payout_paid_by_name` resolved for display). On a liquidación registered before the payout fields existed they are all `null`; since then `payout_method` is always set and each of the others is `null` when it was not recorded.
|
|
148326
148330
|
*
|
|
148327
148331
|
* `deducciones_clp` is the Σ of the dueño share of every retained cost line the settlement discharged, and `deductions` lists them one by one (`cost_entry_id`, `label`, `entry_date`, `dueno_clp`). Selling a consigned car deducts them all: `monto_owner_clp` is `amount_venta_clp` minus the comisión minus `deducciones_clp`.
|
|
148328
148332
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -148132,7 +148132,9 @@ interface paths {
|
|
|
148132
148132
|
* Sell the car and settle with the owner
|
|
148133
148133
|
* @description One atomic action doing two things: moves the contract to `vendido`, and produces the **Liquidación** — sale price minus commission equals the amount owed to the owner, minus every retained cost line the owner bears (derived from the car's cost ledger, never sent; a 409 if they exceed the payout), plus the payment record. Requires `amount_venta_clp`; `paid_at` records when the owner was actually paid.
|
|
148134
148134
|
*
|
|
148135
|
-
* **
|
|
148135
|
+
* **Only the medio de pago is required**: `payout_method` (transferencia, vale_vista or cheque). `payout_bank`, `payout_account` (the cuenta de destino — only its last four digits are stored and returned as `payout_account_last4`), `payout_operation_number` and `payout_paid_by` («pagado por», an active member of the workspace; defaults to whoever registers it) are optional. What was recorded prints on the liquidación with the payment and registration dates.
|
|
148136
|
+
*
|
|
148137
|
+
* **The commission can be set for this sale**: `comision_amount_clp` (net of IVA) replaces what the contract’s terms would compute — a minimum commission, a figure renegotiated at closing. The liquidación then records a fixed commission of that amount; the contract keeps its terms. To charge the owner an additional cost, record it on the car’s cost ledger with a `dueno` share before settling.
|
|
148136
148138
|
*
|
|
148137
148139
|
* Legal only from `activo`; anything else is a 409. Answers 201 with the contract and the Liquidación.
|
|
148138
148140
|
*
|
|
@@ -148167,22 +148169,24 @@ interface paths {
|
|
|
148167
148169
|
amount_venta_clp: number;
|
|
148168
148170
|
/** Format: date-time */
|
|
148169
148171
|
paid_at?: string;
|
|
148172
|
+
/** @description Comisión acordada para ESTA venta, neta de IVA, en pesos. Opcional: si se omite, se calcula con los términos del contrato. Cuando se envía, la liquidación la registra como comisión fija (el contrato no cambia) y el «+ IVA» sigue siendo el del contrato. No puede superar `amount_venta_clp`. */
|
|
148173
|
+
comision_amount_clp?: number;
|
|
148170
148174
|
/**
|
|
148171
|
-
* @description Medio de pago al consignante: `transferencia`, `vale_vista` o `cheque`.
|
|
148175
|
+
* @description Medio de pago al consignante: `transferencia`, `vale_vista` o `cheque`. Es el único dato del pago que se exige.
|
|
148172
148176
|
* @enum {string}
|
|
148173
148177
|
*/
|
|
148174
148178
|
payout_method: "transferencia" | "vale_vista" | "cheque";
|
|
148175
|
-
/** @description Banco por el que se pagó. */
|
|
148176
|
-
payout_bank
|
|
148177
|
-
/** @description Cuenta de destino. Solo se guardan sus últimos 4 dígitos (`payout_account_last4`), que es lo que muestran la app y la liquidación. */
|
|
148178
|
-
payout_account
|
|
148179
|
-
/** @description Número de operación del pago. */
|
|
148180
|
-
payout_operation_number
|
|
148179
|
+
/** @description Banco por el que se pagó. Opcional. */
|
|
148180
|
+
payout_bank?: string;
|
|
148181
|
+
/** @description Cuenta de destino. Opcional. Solo se guardan sus últimos 4 dígitos (`payout_account_last4`), que es lo que muestran la app y la liquidación; si se envía, necesita al menos 4 dígitos. */
|
|
148182
|
+
payout_account?: string;
|
|
148183
|
+
/** @description Número de operación del pago. Opcional. */
|
|
148184
|
+
payout_operation_number?: string;
|
|
148181
148185
|
/**
|
|
148182
148186
|
* Format: uuid
|
|
148183
|
-
* @description «Pagado por»: id de usuario de un miembro activo del equipo.
|
|
148187
|
+
* @description «Pagado por»: id de usuario de un miembro activo del equipo. Opcional: si se omite, queda quien registra la liquidación.
|
|
148184
148188
|
*/
|
|
148185
|
-
payout_paid_by
|
|
148189
|
+
payout_paid_by?: string;
|
|
148186
148190
|
};
|
|
148187
148191
|
};
|
|
148188
148192
|
};
|
|
@@ -148322,7 +148326,7 @@ interface paths {
|
|
|
148322
148326
|
* Fetch the settlement record
|
|
148323
148327
|
* @description The persisted Liquidación for a contract. It only exists once the contract has been sold — this is a read of a record, not a projection computed on demand, so the figures are what was agreed at settlement even if the terms changed afterwards.
|
|
148324
148328
|
*
|
|
148325
|
-
* It carries how the owner was paid (`payout_*`, with `payout_paid_by_name` resolved for display). On a liquidación registered before the payout fields
|
|
148329
|
+
* It carries how the owner was paid (`payout_*`, with `payout_paid_by_name` resolved for display). On a liquidación registered before the payout fields existed they are all `null`; since then `payout_method` is always set and each of the others is `null` when it was not recorded.
|
|
148326
148330
|
*
|
|
148327
148331
|
* `deducciones_clp` is the Σ of the dueño share of every retained cost line the settlement discharged, and `deductions` lists them one by one (`cost_entry_id`, `label`, `entry_date`, `dueno_clp`). Selling a consigned car deducts them all: `monto_owner_clp` is `amount_venta_clp` minus the comisión minus `deducciones_clp`.
|
|
148328
148332
|
*/
|
package/package.json
CHANGED