Skip to content

Commit c64124a

Browse files
committed
Move ProductSortType desc
1 parent 81b1119 commit c64124a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/ui-extensions/src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ import type {MultipleResourceResult} from '../../types/multiple-resource-result'
22
import type {PaginatedResult} from '../../types/paginated-result';
33
import type {Product, ProductVariant} from '../../types/product';
44

5-
/**
6-
* Specifies the order in which products should be sorted. When a `queryString` is provided, `sortType` won't have any effect, as the results will be returned in order by relevance to the `queryString`. Available options:
7-
*
8-
* - **`RECENTLY_ADDED`** - Sorts products by creation date in descending order, displaying the most recently added products first. Commonly used to highlight new inventory additions or showcase latest product arrivals.
9-
* - **`RECENTLY_ADDED_ASCENDING`** - Sorts products by creation date in ascending order, displaying the oldest products first. Typically applied when prioritizing established products or implementing chronological browsing from earliest to newest
10-
* - **`ALPHABETICAL_A_TO_Z`** - Sorts products alphabetically by title from A to Z. Commonly used for product catalogs where alphabetical organization improves browsing efficiency and helps users locate products by name quickly.
11-
* - **`ALPHABETICAL_Z_TO_A`** - Sorts products alphabetically by title from Z to A in reverse order. Typically applied when reverse alphabetical sorting is needed for specialized browsing patterns or user preferences.
12-
*/
135
export type ProductSortType =
146
| 'RECENTLY_ADDED'
157
| 'RECENTLY_ADDED_ASCENDING'
@@ -45,9 +37,12 @@ export interface ProductSearchParams extends PaginationParams {
4537
*/
4638
queryString?: string;
4739
/**
48-
* Specifies the order in which product results are returned when no `queryString` is provided. Options include recently added (newest/oldest first) and alphabetical (A-Z/Z-A). The `sortType` has no effect when `queryString` is specified—relevance sorting always takes precedence for search queries. When omitted, the default sort order is typically creation date descending (newest products first).
40+
* Specifies the order in which products should be sorted. When a `queryString` is provided, `sortType` won't have any effect, as the results will be returned in order by relevance to the `queryString`. Available options:
4941
*
50-
* Commonly used for organizing product listings, creating sorted catalogs, or implementing browsing interfaces where users explore products without searching.
42+
* - **`RECENTLY_ADDED`** - Sorts products by creation date in descending order, displaying the most recently added products first. Commonly used to highlight new inventory additions or showcase latest product arrivals.
43+
* - **`RECENTLY_ADDED_ASCENDING`** - Sorts products by creation date in ascending order, displaying the oldest products first. Typically applied when prioritizing established products or implementing chronological browsing from earliest to newest
44+
* - **`ALPHABETICAL_A_TO_Z`** - Sorts products alphabetically by title from A to Z. Commonly used for product catalogs where alphabetical organization improves browsing efficiency and helps users locate products by name quickly.
45+
* - **`ALPHABETICAL_Z_TO_A`** - Sorts products alphabetically by title from Z to A in reverse order. Typically applied when reverse alphabetical sorting is needed for specialized browsing patterns or user preferences.
5146
*/
5247
sortType?: ProductSortType;
5348
}

0 commit comments

Comments
 (0)