platform-types 1.10.811 → 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.
@@ -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
- * (see `PublicProductDiscoverInput.sort`). Name sorts are not served.
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/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
- * (see `PublicProductDiscoverInput.sort`). Name sorts are not served.
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. A price sort reads the whole filtered
302
- * set on every page, so a set too large for one read is 400
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 non-price sorts when a price sort's
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
- * (see `PublicProductDiscoverInput.sort`). Name sorts are not served.
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.811",
3
+ "version": "1.10.812",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",