platform-types 1.10.813 → 1.10.815

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.
@@ -14,8 +14,10 @@ exports.MAX_BASE_QUANTITY = 1_000_000;
14
14
  exports.DISCOVERY_SORTS = ['newest', 'price_asc', 'price_desc', 'name_asc', 'name_desc'];
15
15
  /**
16
16
  * The facets Web `GET /products?mode=discover` can count (`facets=brand,tag,category`).
17
- * `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`
18
- * (the filter matches no descendants, so a rolled-up parent would select nothing).
17
+ * `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`.
18
+ * The `categoryId` filter selects a category's enabled descendants too, so a filter on a
19
+ * parent yields counts for several descendant ids; a product has one primary category,
20
+ * so a client sums exact counts over a subtree without counting a product twice.
19
21
  */
20
22
  exports.DISCOVERY_FACETS = ['brand', 'tag', 'category'];
21
23
  /** Most products the store's best-seller ranking holds, and web `mode=best-sellers` returns. */
@@ -156,12 +156,21 @@ exports.STOREFRONT_DESIGN_REGISTRY = {
156
156
  *
157
157
  * Responsable Inscripto only (`integrations.afip.condFiscal === 30`). Both
158
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`.
159
+ * `false` and `null` always pass. App reads (`GET /store`, the operator
160
+ * `/tenants` read) send the STORED value beside `integrations.afip.condFiscal`.
161
+ *
162
+ * Wholesale customers only. Storefront exits send the EFFECTIVE value per
163
+ * viewer: stored flag AND RI AND an approved customer whose effective price
164
+ * list is `audienceClass: 'wholesale'`. A guest, a pending registrant and a
165
+ * retail customer read `false`.
166
+ * - Web `GET /store` judges its resolved caller. A customer's answer is
167
+ * `private, no-store`, and every answer varies on `Authorization`.
168
+ * - The preview's store frame judges the grant fixture's simulated caller.
169
+ * A grant without a fixture is judged as a guest.
170
+ * - The customer `stores` frame reaches every shopper at once, so it always
171
+ * sends `false`. The storefront re-reads web `GET /store` on that frame.
163
172
  */
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),
173
+ showNetPlusIva: liveToggle('showNetPlusIva', 'STOREFRONT_SHOW_NET_PLUS_IVA_LABEL', 'STOREFRONT_SHOW_NET_PLUS_IVA_HELP', 'Mostrar precio neto + IVA', 'Tus clientes mayoristas ven también el precio sin IVA, con la leyenda «+ IVA», junto al precio final. Nunca reemplaza al precio final.', false),
165
174
  prices: { ...LIVE_METADATA, storage: { source: 'catalogue' } },
166
175
  stock: { ...LIVE_METADATA, storage: { source: 'catalogue' } },
167
176
  checkout: { ...LIVE_METADATA, storage: { source: 'store' } },
package/dist/product.d.ts CHANGED
@@ -12,8 +12,10 @@ export declare const DISCOVERY_SORTS: readonly ["newest", "price_asc", "price_de
12
12
  export type DiscoverySort = (typeof DISCOVERY_SORTS)[number];
13
13
  /**
14
14
  * The facets Web `GET /products?mode=discover` can count (`facets=brand,tag,category`).
15
- * `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`
16
- * (the filter matches no descendants, so a rolled-up parent would select nothing).
15
+ * `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`.
16
+ * The `categoryId` filter selects a category's enabled descendants too, so a filter on a
17
+ * parent yields counts for several descendant ids; a product has one primary category,
18
+ * so a client sums exact counts over a subtree without counting a product twice.
17
19
  */
18
20
  export declare const DISCOVERY_FACETS: readonly ["brand", "tag", "category"];
19
21
  export type DiscoveryFacet = (typeof DISCOVERY_FACETS)[number];
@@ -272,7 +274,17 @@ declare global {
272
274
  mode: 'discover';
273
275
  /** Free text, ≤100 chars; every token must appear in the product's search term. */
274
276
  search?: string;
275
- /** Exact primary category; descendants are not included. */
277
+ /**
278
+ * A primary category AND every enabled descendant: a product whose primary
279
+ * category is this one or any category below it. A disabled descendant
280
+ * excludes its whole branch. An id the store's enabled tree does not hold —
281
+ * unknown, or itself disabled — matches its own products only. A cursor is
282
+ * bound to the subtree it was minted over: once descendants count, or after
283
+ * the enabled subtree changes, a parent's cursor is 400 `INVALID_CURSOR`
284
+ * (a category with no enabled descendant keeps its cursors). A subtree too
285
+ * large for a price or name sort's whole-set read is refused like any such
286
+ * set (`DISCOVERY_SORT_UNSUPPORTED`).
287
+ */
276
288
  categoryId?: string;
277
289
  brandId?: string;
278
290
  /**
package/dist/product.js CHANGED
@@ -11,8 +11,10 @@ export const MAX_BASE_QUANTITY = 1_000_000;
11
11
  export const DISCOVERY_SORTS = ['newest', 'price_asc', 'price_desc', 'name_asc', 'name_desc'];
12
12
  /**
13
13
  * The facets Web `GET /products?mode=discover` can count (`facets=brand,tag,category`).
14
- * `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`
15
- * (the filter matches no descendants, so a rolled-up parent would select nothing).
14
+ * `brand` tallies `brandId`, `tag` each of `tagIds`, `category` the EXACT `categoryId`.
15
+ * The `categoryId` filter selects a category's enabled descendants too, so a filter on a
16
+ * parent yields counts for several descendant ids; a product has one primary category,
17
+ * so a client sums exact counts over a subtree without counting a product twice.
16
18
  */
17
19
  export const DISCOVERY_FACETS = ['brand', 'tag', 'category'];
18
20
  /** Most products the store's best-seller ranking holds, and web `mode=best-sellers` returns. */
@@ -148,12 +148,21 @@ export const STOREFRONT_DESIGN_REGISTRY = {
148
148
  *
149
149
  * Responsable Inscripto only (`integrations.afip.condFiscal === 30`). Both
150
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`.
151
+ * `false` and `null` always pass. App reads (`GET /store`, the operator
152
+ * `/tenants` read) send the STORED value beside `integrations.afip.condFiscal`.
153
+ *
154
+ * Wholesale customers only. Storefront exits send the EFFECTIVE value per
155
+ * viewer: stored flag AND RI AND an approved customer whose effective price
156
+ * list is `audienceClass: 'wholesale'`. A guest, a pending registrant and a
157
+ * retail customer read `false`.
158
+ * - Web `GET /store` judges its resolved caller. A customer's answer is
159
+ * `private, no-store`, and every answer varies on `Authorization`.
160
+ * - The preview's store frame judges the grant fixture's simulated caller.
161
+ * A grant without a fixture is judged as a guest.
162
+ * - The customer `stores` frame reaches every shopper at once, so it always
163
+ * sends `false`. The storefront re-reads web `GET /store` on that frame.
155
164
  */
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),
165
+ showNetPlusIva: liveToggle('showNetPlusIva', 'STOREFRONT_SHOW_NET_PLUS_IVA_LABEL', 'STOREFRONT_SHOW_NET_PLUS_IVA_HELP', 'Mostrar precio neto + IVA', 'Tus clientes mayoristas ven también el precio sin IVA, con la leyenda «+ IVA», junto al precio final. Nunca reemplaza al precio final.', false),
157
166
  prices: { ...LIVE_METADATA, storage: { source: 'catalogue' } },
158
167
  stock: { ...LIVE_METADATA, storage: { source: 'catalogue' } },
159
168
  checkout: { ...LIVE_METADATA, storage: { source: 'store' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.813",
3
+ "version": "1.10.815",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",