platform-types 1.10.809 → 1.10.810
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/cart.d.ts +19 -0
- package/dist/cjs/socket.js +4 -0
- package/dist/pricing.d.ts +10 -0
- package/dist/product.d.ts +27 -1
- package/dist/productGroup.d.ts +1 -1
- package/dist/socket.d.ts +4 -1
- package/dist/socket.js +4 -0
- package/package.json +1 -1
package/dist/cart.d.ts
CHANGED
|
@@ -211,6 +211,25 @@ declare global {
|
|
|
211
211
|
* while `ecommerce.config.showNetPlusIva` is on.
|
|
212
212
|
*/
|
|
213
213
|
netOfIva?: number;
|
|
214
|
+
/**
|
|
215
|
+
* The «PRECIO SIN IMPUESTOS NACIONALES» amount of `price`, per unit:
|
|
216
|
+
* `netOfIva` minus the line's impuestos internos,
|
|
217
|
+
* `netOfIva − round2(netOfIva × internalTaxes.percent / 100)`, and
|
|
218
|
+
* `netOfIva` itself when the line records none. Present exactly when
|
|
219
|
+
* `netOfIva` is, except that an unreadable `internalTaxes` or a refused
|
|
220
|
+
* figure leaves it out alone.
|
|
221
|
+
*
|
|
222
|
+
* ⚠️ READ-TIME and DISPLAY ONLY, on the same customer exits as `netOfIva`
|
|
223
|
+
* and under the same rules: never stored, never on an operator copy, never
|
|
224
|
+
* charged or totalled. Not gated by `showNetPlusIva`.
|
|
225
|
+
*/
|
|
226
|
+
netOfNationalTaxes?: number;
|
|
227
|
+
/**
|
|
228
|
+
* The product's `internalTaxes`, stamped from the product row at re-price
|
|
229
|
+
* time like `ivaType`: the input to `netOfNationalTaxes`. Absent means
|
|
230
|
+
* none. Rides the line onto `OrderLine`; no invoice reads it.
|
|
231
|
+
*/
|
|
232
|
+
internalTaxes?: ProductInternalTaxes;
|
|
214
233
|
listId?: number;
|
|
215
234
|
currency?: string;
|
|
216
235
|
currencyValue?: number;
|
package/dist/cjs/socket.js
CHANGED
|
@@ -738,6 +738,9 @@ exports.isSocketAction = isSocketAction;
|
|
|
738
738
|
* `ivaType` is an INPUT to the shopper copy's `prices[].netOfIva`: the customer
|
|
739
739
|
* fan-out re-prices the frame, and without the rate a merged frame would leave a
|
|
740
740
|
* stale net beside a new gross. The customer copy still drops the Id itself.
|
|
741
|
+
* `internalTaxes` is the same kind of input, to `prices[].netOfNationalTaxes`:
|
|
742
|
+
* without it a frame would publish the legend amount of a product with no
|
|
743
|
+
* impuestos internos. The customer copy drops it too.
|
|
741
744
|
*/
|
|
742
745
|
exports.PRODUCT_STOCK_FRAME_FIELDS = [
|
|
743
746
|
'stock',
|
|
@@ -750,6 +753,7 @@ exports.PRODUCT_STOCK_FRAME_FIELDS = [
|
|
|
750
753
|
'updatedAt',
|
|
751
754
|
'lastMovementAt',
|
|
752
755
|
'ivaType',
|
|
756
|
+
'internalTaxes',
|
|
753
757
|
];
|
|
754
758
|
/* Agent diagnostic commands */
|
|
755
759
|
/**
|
package/dist/pricing.d.ts
CHANGED
|
@@ -143,9 +143,19 @@ declare global {
|
|
|
143
143
|
* A price slot as a PUBLIC read emits it (web catalogue reads, customer
|
|
144
144
|
* `products` frames). A read-time extension of {@link PriceSlot}, never
|
|
145
145
|
* stored: `Product.prices` stays `PriceSlot[]`, so no writer can persist a net.
|
|
146
|
+
*
|
|
147
|
+
* `netOfNationalTaxes` is the «PRECIO SIN IMPUESTOS NACIONALES» amount
|
|
148
|
+
* (Resolución SIC 4/2025 art. 2(c)), the same shape as `netOfIva`, figure for
|
|
149
|
+
* figure: each `netOfIva` figure minus the product's impuestos internos
|
|
150
|
+
* (`Product.internalTaxes`), `net − round2(net × percent / 100)`. A product
|
|
151
|
+
* recording no internos gets the `netOfIva` figures. Present exactly when
|
|
152
|
+
* `netOfIva` is, except that an unreadable stored `internalTaxes` or a refused
|
|
153
|
+
* figure leaves it out alone. Never replaces `amount`, and is sent whatever
|
|
154
|
+
* `showNetPlusIva` says: the legend shows on every view.
|
|
146
155
|
*/
|
|
147
156
|
type PublicPriceSlot = PriceSlot & {
|
|
148
157
|
netOfIva?: PublicPriceNet;
|
|
158
|
+
netOfNationalTaxes?: PublicPriceNet;
|
|
149
159
|
};
|
|
150
160
|
}
|
|
151
161
|
export {};
|
package/dist/product.d.ts
CHANGED
|
@@ -36,12 +36,25 @@ declare global {
|
|
|
36
36
|
/** Server-owned; starts at 1 and increments when the declaration changes. */
|
|
37
37
|
unitRevision: number;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* `Product.internalTaxes`: impuestos internos as a nominal `percent`,
|
|
41
|
+
* greater than 0 and less than 100, applied to the net of IVA. The legend
|
|
42
|
+
* amount is `netOfIva − round2(netOfIva × percent / 100)`. A rate only:
|
|
43
|
+
* a fixed amount per unit would need a currency and an FX step the
|
|
44
|
+
* per-figure net has none of. A later basis is an additive key.
|
|
45
|
+
*/
|
|
46
|
+
interface ProductInternalTaxes {
|
|
47
|
+
percent: number;
|
|
48
|
+
}
|
|
39
49
|
type ProductUnitsInput = Omit<ProductUnits, 'unitRevision'>;
|
|
40
50
|
/** The display declaration plus the purchase-unit factor; `unitRevision` stays server-only. */
|
|
41
51
|
type PublicProductUnits = Pick<ProductUnits, 'baseUnit' | 'purchaseUnit' | 'packLabel' | 'baseUnitsPerPurchaseUnit'>;
|
|
42
52
|
type PublicProduct = Omit<Partial<Product>, 'units' | 'unitRevisionGeneration' | 'prices'> & {
|
|
43
53
|
units?: PublicProductUnits | null;
|
|
44
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The shopper's one applicable slot, with its read-time `netOfIva` and
|
|
56
|
+
* `netOfNationalTaxes` when the product is rated.
|
|
57
|
+
*/
|
|
45
58
|
prices?: PublicPriceSlot[];
|
|
46
59
|
};
|
|
47
60
|
/** Anonymous Web GET /products lookup; the tenant comes from the public store context. */
|
|
@@ -956,6 +969,19 @@ declare global {
|
|
|
956
969
|
currencyValue?: number;
|
|
957
970
|
currencyValueAt?: number;
|
|
958
971
|
ivaType: number;
|
|
972
|
+
/**
|
|
973
|
+
* Impuestos internos the merchant records for this product, as a nominal
|
|
974
|
+
* rate: the input to the public `prices[].netOfNationalTaxes` and the cart
|
|
975
|
+
* line's `netOfNationalTaxes` («PRECIO SIN IMPUESTOS NACIONALES»). Absent
|
|
976
|
+
* means none. Written through `POST /products`, cleared through
|
|
977
|
+
* `removeFields: ['internalTaxes']`.
|
|
978
|
+
*
|
|
979
|
+
* ⚠️ DISPLAY INPUT ONLY. No invoice reads it: the voucher declares no
|
|
980
|
+
* impuestos internos tributo, so a product recording them still prints
|
|
981
|
+
* `$0,00` on the RG 5614 «Otros Impuestos Nacionales Indirectos» line.
|
|
982
|
+
* Never on a public product row; the shopper gets the net, never the rate.
|
|
983
|
+
*/
|
|
984
|
+
internalTaxes?: ProductInternalTaxes;
|
|
959
985
|
/** Optional category membership. New enabled membership atomically requires an existing, enabled, unfrozen category.
|
|
960
986
|
* Cosmetic edits preserve legacy references; leaving or disabling remains allowed while frozen.
|
|
961
987
|
*/
|
package/dist/productGroup.d.ts
CHANGED
|
@@ -194,7 +194,7 @@ declare global {
|
|
|
194
194
|
* (per combination only), `stock` (always 0), `tagIds` and `typedAttributes`
|
|
195
195
|
* (set per child afterwards, through `POST /products`).
|
|
196
196
|
*/
|
|
197
|
-
type ProductVariantFields = Partial<Pick<Product, 'description' | 'categoryId' | 'brandId' | 'zone' | 'cost' | 'currency' | 'ivaType' | 'prices' | 'limit' | 'isService' | 'isNew' | 'hiddenFromStorefront' | 'sellableOn' | 'minStock' | 'reorderPoint' | 'safetyStock' | 'leadTimeDays' | 'serviceLevel' | 'lotTracking' | 'weightGrams' | 'lengthMm' | 'widthMm' | 'heightMm' | 'model' | 'seoTitle' | 'seoDescription' | 'attributes'>> & {
|
|
197
|
+
type ProductVariantFields = Partial<Pick<Product, 'description' | 'categoryId' | 'brandId' | 'zone' | 'cost' | 'currency' | 'ivaType' | 'internalTaxes' | 'prices' | 'limit' | 'isService' | 'isNew' | 'hiddenFromStorefront' | 'sellableOn' | 'minStock' | 'reorderPoint' | 'safetyStock' | 'leadTimeDays' | 'serviceLevel' | 'lotTracking' | 'weightGrams' | 'lengthMm' | 'widthMm' | 'heightMm' | 'model' | 'seoTitle' | 'seoDescription' | 'attributes'>> & {
|
|
198
198
|
/** `draft` or `active`; omitted creates the child as `POST /products` does. */
|
|
199
199
|
catalogStatus?: Exclude<CatalogStatus, 'archived'>;
|
|
200
200
|
/**
|
package/dist/socket.d.ts
CHANGED
|
@@ -176,8 +176,11 @@ export interface SocketMessage<T = unknown> {
|
|
|
176
176
|
* `ivaType` is an INPUT to the shopper copy's `prices[].netOfIva`: the customer
|
|
177
177
|
* fan-out re-prices the frame, and without the rate a merged frame would leave a
|
|
178
178
|
* stale net beside a new gross. The customer copy still drops the Id itself.
|
|
179
|
+
* `internalTaxes` is the same kind of input, to `prices[].netOfNationalTaxes`:
|
|
180
|
+
* without it a frame would publish the legend amount of a product with no
|
|
181
|
+
* impuestos internos. The customer copy drops it too.
|
|
179
182
|
*/
|
|
180
|
-
export declare const PRODUCT_STOCK_FRAME_FIELDS: readonly ["stock", "prices", "cost", "currency", "hiddenFromStorefront", "disabled", "catalogStatus", "updatedAt", "lastMovementAt", "ivaType"];
|
|
183
|
+
export declare const PRODUCT_STOCK_FRAME_FIELDS: readonly ["stock", "prices", "cost", "currency", "hiddenFromStorefront", "disabled", "catalogStatus", "updatedAt", "lastMovementAt", "ivaType", "internalTaxes"];
|
|
181
184
|
/**
|
|
182
185
|
* `data` of a **partial** `products` frame — the projection every stock-moving
|
|
183
186
|
* write announces, and the only `products` shape that is not a whole `Product`.
|
package/dist/socket.js
CHANGED
|
@@ -734,6 +734,9 @@ export const isSocketAction = (value) => typeof value === 'string' && SOCKET_ACT
|
|
|
734
734
|
* `ivaType` is an INPUT to the shopper copy's `prices[].netOfIva`: the customer
|
|
735
735
|
* fan-out re-prices the frame, and without the rate a merged frame would leave a
|
|
736
736
|
* stale net beside a new gross. The customer copy still drops the Id itself.
|
|
737
|
+
* `internalTaxes` is the same kind of input, to `prices[].netOfNationalTaxes`:
|
|
738
|
+
* without it a frame would publish the legend amount of a product with no
|
|
739
|
+
* impuestos internos. The customer copy drops it too.
|
|
737
740
|
*/
|
|
738
741
|
export const PRODUCT_STOCK_FRAME_FIELDS = [
|
|
739
742
|
'stock',
|
|
@@ -746,6 +749,7 @@ export const PRODUCT_STOCK_FRAME_FIELDS = [
|
|
|
746
749
|
'updatedAt',
|
|
747
750
|
'lastMovementAt',
|
|
748
751
|
'ivaType',
|
|
752
|
+
'internalTaxes',
|
|
749
753
|
];
|
|
750
754
|
/* Agent diagnostic commands */
|
|
751
755
|
/**
|