platform-types 1.10.809 → 1.10.811

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 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;
@@ -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/cjs/store.js CHANGED
@@ -153,6 +153,13 @@ exports.STORE_MODULE_ERROR_CODES = [
153
153
  * `audienceClass: 'wholesale'` list (`store/_ecommercePatch.ts`), with
154
154
  * `data: { field: 'ecommerce.config.wholesaleRequests' }`. The platform PUT
155
155
  * answers it too.
156
+ * - `NET_PLUS_IVA_REQUIRES_RI` — an `ecommerce` save turns
157
+ * `config.showNetPlusIva` on while the store's stored
158
+ * `integrations.afip.condFiscal` is not `30` (Responsable Inscripto), unset
159
+ * included (`store/_ecommercePatch.ts`), with
160
+ * `data: { field: 'ecommerce.config.showNetPlusIva' }`; nothing is written and
161
+ * one deduped ERROR row is kept per store. `false` and `null` are never
162
+ * refused. The platform PUT answers it too.
156
163
  *
157
164
  * Maintenance mode (`{ mode: 'maintenance', level }`, `store/_patchMaintenance.ts`):
158
165
  * - `FORBIDDEN` (403) — the caller is neither an ADMIN nor a MANAGER.
@@ -187,6 +194,7 @@ exports.STORE_PATCH_ERROR_CODES = [
187
194
  'PRICE_LIST_NOT_FOUND',
188
195
  'DELIVERY_FEE_INVALID',
189
196
  'WHOLESALE_LIST_REQUIRED',
197
+ 'NET_PLUS_IVA_REQUIRES_RI',
190
198
  'DATA_FISCAL_URL_INVALID',
191
199
  'STORE_PUBLIC_HOST_MISSING',
192
200
  'FORBIDDEN',
@@ -153,6 +153,13 @@ exports.STOREFRONT_DESIGN_REGISTRY = {
153
153
  * (absent only for a product with no declarable IVA rate), so a flip needs no
154
154
  * catalogue refetch. The storefront shows the «+ IVA» line when this is on AND
155
155
  * the block is present. Default off: a store opts in.
156
+ *
157
+ * Responsable Inscripto only (`integrations.afip.condFiscal === 30`). Both
158
+ * writers refuse `true` on any other store with 409 NET_PLUS_IVA_REQUIRES_RI;
159
+ * `false` and `null` always pass. Storefront exits (web `GET /store`, the
160
+ * preview's store frame, the customer `stores` frame) send the EFFECTIVE value,
161
+ * stored flag AND RI; app reads (`GET /store`, the operator `/tenants` read)
162
+ * send the STORED one beside `integrations.afip.condFiscal`.
156
163
  */
157
164
  showNetPlusIva: liveToggle('showNetPlusIva', 'STOREFRONT_SHOW_NET_PLUS_IVA_LABEL', 'STOREFRONT_SHOW_NET_PLUS_IVA_HELP', 'Mostrar precio neto + IVA', 'Mostrar también el precio sin IVA, con la leyenda «+ IVA», junto al precio final. Nunca reemplaza al precio final.', false),
158
165
  prices: { ...LIVE_METADATA, storage: { source: 'catalogue' } },
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
- /** The shopper's one applicable slot, with its read-time `netOfIva` when the product is rated. */
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
  */
@@ -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
  /**
package/dist/store.d.ts CHANGED
@@ -232,6 +232,8 @@ declare global {
232
232
  * data: { field: 'ecommerce.config.newCustomerPriceList', value: number }; nothing written.
233
233
  * `wholesaleRequests: true` on a store with no `audienceClass: 'wholesale'` list
234
234
  * refuses 409 WHOLESALE_LIST_REQUIRED; nothing written.
235
+ * `showNetPlusIva: true` on a store whose `integrations.afip.condFiscal` is not 30
236
+ * (Responsable Inscripto) refuses 409 NET_PLUS_IVA_REQUIRES_RI; nothing written.
235
237
  */
236
238
  interface EcommercePatchInput {
237
239
  config?: Pick<NonNullable<Ecommerce['config']>, 'showDefaultPriceList' | 'newCustomerPriceList' | 'registrationMode' | 'wholesaleRequests' | 'paymentHoldMinutes'> & StorefrontLiveSettingsPatch;
@@ -2606,6 +2608,13 @@ export type StoreModuleRefusalBody = {
2606
2608
  * `audienceClass: 'wholesale'` list (`store/_ecommercePatch.ts`), with
2607
2609
  * `data: { field: 'ecommerce.config.wholesaleRequests' }`. The platform PUT
2608
2610
  * answers it too.
2611
+ * - `NET_PLUS_IVA_REQUIRES_RI` — an `ecommerce` save turns
2612
+ * `config.showNetPlusIva` on while the store's stored
2613
+ * `integrations.afip.condFiscal` is not `30` (Responsable Inscripto), unset
2614
+ * included (`store/_ecommercePatch.ts`), with
2615
+ * `data: { field: 'ecommerce.config.showNetPlusIva' }`; nothing is written and
2616
+ * one deduped ERROR row is kept per store. `false` and `null` are never
2617
+ * refused. The platform PUT answers it too.
2609
2618
  *
2610
2619
  * Maintenance mode (`{ mode: 'maintenance', level }`, `store/_patchMaintenance.ts`):
2611
2620
  * - `FORBIDDEN` (403) — the caller is neither an ADMIN nor a MANAGER.
@@ -2620,5 +2629,5 @@ export type StoreModuleRefusalBody = {
2620
2629
  * checks, the display-currency lock, the storefront fence) are not listed
2621
2630
  * either. Cross-cutting refusals: check `GATING_ERROR_CODES` as well.
2622
2631
  */
2623
- export declare const STORE_PATCH_ERROR_CODES: readonly ["STORE_CONFIG_FORBIDDEN", "STORE_ECOMMERCE_FORBIDDEN", "STORE_FISCAL_FIELD_FORBIDDEN", "STORE_JURISDICTION_FORBIDDEN", "AFIP_RELACION_FLAG_FORBIDDEN", "FX_TABLE_FORBIDDEN", "FX_AUTO_UPDATE_FORBIDDEN", "FIELD_NOT_WRITABLE_HERE", "AFIP_POINT_OF_SALE_NOT_CLEARABLE", "CURRENCY_CATALOG_ID_UNKNOWN", "ARS_RATE_MUST_BE_ONE", "CURRENCY_RATE_ABOVE_CEILING", "FX_CATALOG_ID_UNKNOWN", "FX_SOURCE_ID_UNKNOWN", "DISPLAY_CURRENCY_NOT_INVOICEABLE", "PRODUCT_CURRENCY_NOT_INVOICEABLE", "PRICE_LIST_NOT_FOUND", "DELIVERY_FEE_INVALID", "WHOLESALE_LIST_REQUIRED", "DATA_FISCAL_URL_INVALID", "STORE_PUBLIC_HOST_MISSING", "FORBIDDEN", "STORE_NOT_FOUND"];
2632
+ export declare const STORE_PATCH_ERROR_CODES: readonly ["STORE_CONFIG_FORBIDDEN", "STORE_ECOMMERCE_FORBIDDEN", "STORE_FISCAL_FIELD_FORBIDDEN", "STORE_JURISDICTION_FORBIDDEN", "AFIP_RELACION_FLAG_FORBIDDEN", "FX_TABLE_FORBIDDEN", "FX_AUTO_UPDATE_FORBIDDEN", "FIELD_NOT_WRITABLE_HERE", "AFIP_POINT_OF_SALE_NOT_CLEARABLE", "CURRENCY_CATALOG_ID_UNKNOWN", "ARS_RATE_MUST_BE_ONE", "CURRENCY_RATE_ABOVE_CEILING", "FX_CATALOG_ID_UNKNOWN", "FX_SOURCE_ID_UNKNOWN", "DISPLAY_CURRENCY_NOT_INVOICEABLE", "PRODUCT_CURRENCY_NOT_INVOICEABLE", "PRICE_LIST_NOT_FOUND", "DELIVERY_FEE_INVALID", "WHOLESALE_LIST_REQUIRED", "NET_PLUS_IVA_REQUIRES_RI", "DATA_FISCAL_URL_INVALID", "STORE_PUBLIC_HOST_MISSING", "FORBIDDEN", "STORE_NOT_FOUND"];
2624
2633
  export type StorePatchErrorCode = (typeof STORE_PATCH_ERROR_CODES)[number];
package/dist/store.js CHANGED
@@ -148,6 +148,13 @@ export const STORE_MODULE_ERROR_CODES = [
148
148
  * `audienceClass: 'wholesale'` list (`store/_ecommercePatch.ts`), with
149
149
  * `data: { field: 'ecommerce.config.wholesaleRequests' }`. The platform PUT
150
150
  * answers it too.
151
+ * - `NET_PLUS_IVA_REQUIRES_RI` — an `ecommerce` save turns
152
+ * `config.showNetPlusIva` on while the store's stored
153
+ * `integrations.afip.condFiscal` is not `30` (Responsable Inscripto), unset
154
+ * included (`store/_ecommercePatch.ts`), with
155
+ * `data: { field: 'ecommerce.config.showNetPlusIva' }`; nothing is written and
156
+ * one deduped ERROR row is kept per store. `false` and `null` are never
157
+ * refused. The platform PUT answers it too.
151
158
  *
152
159
  * Maintenance mode (`{ mode: 'maintenance', level }`, `store/_patchMaintenance.ts`):
153
160
  * - `FORBIDDEN` (403) — the caller is neither an ADMIN nor a MANAGER.
@@ -182,6 +189,7 @@ export const STORE_PATCH_ERROR_CODES = [
182
189
  'PRICE_LIST_NOT_FOUND',
183
190
  'DELIVERY_FEE_INVALID',
184
191
  'WHOLESALE_LIST_REQUIRED',
192
+ 'NET_PLUS_IVA_REQUIRES_RI',
185
193
  'DATA_FISCAL_URL_INVALID',
186
194
  'STORE_PUBLIC_HOST_MISSING',
187
195
  'FORBIDDEN',
@@ -145,6 +145,13 @@ export const STOREFRONT_DESIGN_REGISTRY = {
145
145
  * (absent only for a product with no declarable IVA rate), so a flip needs no
146
146
  * catalogue refetch. The storefront shows the «+ IVA» line when this is on AND
147
147
  * the block is present. Default off: a store opts in.
148
+ *
149
+ * Responsable Inscripto only (`integrations.afip.condFiscal === 30`). Both
150
+ * writers refuse `true` on any other store with 409 NET_PLUS_IVA_REQUIRES_RI;
151
+ * `false` and `null` always pass. Storefront exits (web `GET /store`, the
152
+ * preview's store frame, the customer `stores` frame) send the EFFECTIVE value,
153
+ * stored flag AND RI; app reads (`GET /store`, the operator `/tenants` read)
154
+ * send the STORED one beside `integrations.afip.condFiscal`.
148
155
  */
149
156
  showNetPlusIva: liveToggle('showNetPlusIva', 'STOREFRONT_SHOW_NET_PLUS_IVA_LABEL', 'STOREFRONT_SHOW_NET_PLUS_IVA_HELP', 'Mostrar precio neto + IVA', 'Mostrar también el precio sin IVA, con la leyenda «+ IVA», junto al precio final. Nunca reemplaza al precio final.', false),
150
157
  prices: { ...LIVE_METADATA, storage: { source: 'catalogue' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.809",
3
+ "version": "1.10.811",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",