platform-types 1.10.810 → 1.10.812
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/cjs/product.js +4 -3
- package/dist/cjs/store.js +8 -0
- package/dist/cjs/storefrontDesignRegistry.js +7 -0
- package/dist/product.d.ts +13 -8
- package/dist/product.js +4 -3
- package/dist/store.d.ts +10 -1
- package/dist/store.js +8 -0
- package/dist/storefrontDesignRegistry.js +7 -0
- package/package.json +1 -1
package/dist/cjs/product.js
CHANGED
|
@@ -7,10 +7,11 @@ exports.BASE_QUANTITY_DECIMAL_PLACES = 6;
|
|
|
7
7
|
exports.MAX_BASE_QUANTITY = 1_000_000;
|
|
8
8
|
/**
|
|
9
9
|
* The `sort` values Web `GET /products?mode=discover` serves. `newest` is
|
|
10
|
-
* descending product id; `price_asc` / `price_desc` are the caller's own price
|
|
11
|
-
*
|
|
10
|
+
* descending product id; `price_asc` / `price_desc` are the caller's own price;
|
|
11
|
+
* `name_asc` / `name_desc` are the product name under a Spanish collation (see
|
|
12
|
+
* `PublicProductDiscoverInput.sort`).
|
|
12
13
|
*/
|
|
13
|
-
exports.DISCOVERY_SORTS = ['newest', 'price_asc', 'price_desc'];
|
|
14
|
+
exports.DISCOVERY_SORTS = ['newest', 'price_asc', 'price_desc', 'name_asc', 'name_desc'];
|
|
14
15
|
/**
|
|
15
16
|
* The facets Web `GET /products?mode=discover` can count (`facets=brand,tag,category`).
|
|
16
17
|
* `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`
|
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/product.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ export declare const BASE_QUANTITY_DECIMAL_PLACES = 6;
|
|
|
4
4
|
export declare const MAX_BASE_QUANTITY = 1000000;
|
|
5
5
|
/**
|
|
6
6
|
* The `sort` values Web `GET /products?mode=discover` serves. `newest` is
|
|
7
|
-
* descending product id; `price_asc` / `price_desc` are the caller's own price
|
|
8
|
-
*
|
|
7
|
+
* descending product id; `price_asc` / `price_desc` are the caller's own price;
|
|
8
|
+
* `name_asc` / `name_desc` are the product name under a Spanish collation (see
|
|
9
|
+
* `PublicProductDiscoverInput.sort`).
|
|
9
10
|
*/
|
|
10
|
-
export declare const DISCOVERY_SORTS: readonly ["newest", "price_asc", "price_desc"];
|
|
11
|
+
export declare const DISCOVERY_SORTS: readonly ["newest", "price_asc", "price_desc", "name_asc", "name_desc"];
|
|
11
12
|
export type DiscoverySort = (typeof DISCOVERY_SORTS)[number];
|
|
12
13
|
/**
|
|
13
14
|
* The facets Web `GET /products?mode=discover` can count (`facets=brand,tag,category`).
|
|
@@ -298,8 +299,12 @@ declare global {
|
|
|
298
299
|
* currency, an open offer counting as the price, no quantity break. Rows the
|
|
299
300
|
* caller is shown no price for (a hidden slot, every row for a guest of a
|
|
300
301
|
* store that hides prices) come LAST in both directions; equal prices and
|
|
301
|
-
* that unpriced tail are newest first.
|
|
302
|
-
*
|
|
302
|
+
* that unpriced tail are newest first. `name_asc` / `name_desc` = the
|
|
303
|
+
* shown product name, Spanish collation, case- and accent-insensitive,
|
|
304
|
+
* digits compared as numbers («HP 96» before «HP 904»); names that compare
|
|
305
|
+
* equal are newest first, and a row with no name comes LAST in both
|
|
306
|
+
* directions. A price or name sort reads the whole filtered set on every
|
|
307
|
+
* page, so a set too large for one read is 400
|
|
303
308
|
* `DISCOVERY_SORT_UNSUPPORTED` after the reads, with `supportedSorts`
|
|
304
309
|
* naming what that query can be served in, and a read the time budget cut
|
|
305
310
|
* short is 503 `PRODUCT_LOOKUP_INCOMPLETE` (retryable). A price cursor is
|
|
@@ -406,12 +411,12 @@ declare global {
|
|
|
406
411
|
}
|
|
407
412
|
/** Refusals of Web `GET /products?mode=discover`. */
|
|
408
413
|
type DiscoveryErrorCode = 'INVALID_DISCOVERY_QUERY' | 'INVALID_CURSOR' | 'DISCOVERY_SORT_UNSUPPORTED'
|
|
409
|
-
/** 503: a price-sorted walk the time budget cut short; retry. */
|
|
414
|
+
/** 503: a price- or name-sorted walk the time budget cut short; retry. */
|
|
410
415
|
| 'PRODUCT_LOOKUP_INCOMPLETE';
|
|
411
416
|
/**
|
|
412
417
|
* 400 body for a `sort` the api does not serve for this request; `supportedSorts` lists what
|
|
413
|
-
* it does — every member for an unknown value, the
|
|
414
|
-
* filtered set was too large to read whole.
|
|
418
|
+
* it does — every member for an unknown value, the sorts that need no whole-set read when a
|
|
419
|
+
* price or name sort's filtered set was too large to read whole.
|
|
415
420
|
*/
|
|
416
421
|
interface DiscoverySortRefusal {
|
|
417
422
|
message: string;
|
package/dist/product.js
CHANGED
|
@@ -4,10 +4,11 @@ export const BASE_QUANTITY_DECIMAL_PLACES = 6;
|
|
|
4
4
|
export const MAX_BASE_QUANTITY = 1_000_000;
|
|
5
5
|
/**
|
|
6
6
|
* The `sort` values Web `GET /products?mode=discover` serves. `newest` is
|
|
7
|
-
* descending product id; `price_asc` / `price_desc` are the caller's own price
|
|
8
|
-
*
|
|
7
|
+
* descending product id; `price_asc` / `price_desc` are the caller's own price;
|
|
8
|
+
* `name_asc` / `name_desc` are the product name under a Spanish collation (see
|
|
9
|
+
* `PublicProductDiscoverInput.sort`).
|
|
9
10
|
*/
|
|
10
|
-
export const DISCOVERY_SORTS = ['newest', 'price_asc', 'price_desc'];
|
|
11
|
+
export const DISCOVERY_SORTS = ['newest', 'price_asc', 'price_desc', 'name_asc', 'name_desc'];
|
|
11
12
|
/**
|
|
12
13
|
* The facets Web `GET /products?mode=discover` can count (`facets=brand,tag,category`).
|
|
13
14
|
* `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`
|
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' } },
|