@asstio-dev/storefront 0.53.0 → 0.55.0
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/README.md +175 -0
- package/dist/account/cookies.d.ts +12 -0
- package/dist/account/cookies.js +6 -0
- package/dist/account/index.d.ts +1 -1
- package/dist/account/index.js +1 -1
- package/dist/account/next.d.ts +34 -4
- package/dist/account/next.js +154 -28
- package/dist/attribution/browser.d.ts +35 -0
- package/dist/attribution/browser.js +63 -0
- package/dist/attribution/codec.d.ts +76 -0
- package/dist/attribution/codec.js +466 -0
- package/dist/attribution/index.d.ts +8 -0
- package/dist/attribution/index.js +8 -0
- package/dist/attribution/next.d.ts +76 -0
- package/dist/attribution/next.js +239 -0
- package/dist/cart-codes.d.ts +3 -0
- package/dist/cart-codes.js +25 -0
- package/dist/checkout/server.d.ts +6 -0
- package/dist/checkout/server.js +2 -2
- package/dist/consent/index.d.ts +1 -1
- package/dist/consent/index.js +1 -1
- package/dist/consent/notice.d.ts +7 -0
- package/dist/consent/notice.js +36 -0
- package/dist/consent/server.d.ts +9 -1
- package/dist/consent/server.js +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/price-display.d.ts +87 -0
- package/dist/price-display.js +102 -0
- package/dist/schema.d.ts +183 -7
- package/dist/seo/product.js +18 -4
- package/dist/seo/types.d.ts +6 -0
- package/dist/site.d.ts +8 -0
- package/dist/site.js +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +13 -4
- package/src/schema.d.ts +183 -7
package/src/schema.d.ts
CHANGED
|
@@ -237,6 +237,26 @@ export interface paths {
|
|
|
237
237
|
patch?: never;
|
|
238
238
|
trace?: never;
|
|
239
239
|
};
|
|
240
|
+
"/v1/checkout/attribution": {
|
|
241
|
+
parameters: {
|
|
242
|
+
query?: never;
|
|
243
|
+
header?: never;
|
|
244
|
+
path?: never;
|
|
245
|
+
cookie?: never;
|
|
246
|
+
};
|
|
247
|
+
get?: never;
|
|
248
|
+
put?: never;
|
|
249
|
+
post?: never;
|
|
250
|
+
/**
|
|
251
|
+
* Drop the cart's order-source touches
|
|
252
|
+
* @description Called when the shopper withdraws measurement consent: every checkout of the cart that has no order yet keeps no touches, and so does any checkout the cart starts later. No body. It never starts a checkout and never contacts a payment provider. A missing or unknown cart answers 204 too (nothing to do, and nothing to tell). No X-Market, X-Country or X-Locale is needed; the route works on a paused site. Publishable or server key only. On 503 retry: the clear is idempotent.
|
|
253
|
+
*/
|
|
254
|
+
delete: operations["ClearCheckoutAttribution"];
|
|
255
|
+
options?: never;
|
|
256
|
+
head?: never;
|
|
257
|
+
patch?: never;
|
|
258
|
+
trace?: never;
|
|
259
|
+
};
|
|
240
260
|
"/v1/checkout/{attemptId}": {
|
|
241
261
|
parameters: {
|
|
242
262
|
query?: never;
|
|
@@ -1100,6 +1120,7 @@ export interface components {
|
|
|
1100
1120
|
};
|
|
1101
1121
|
CartLineDto: {
|
|
1102
1122
|
availability: components["schemas"]["LineAvailability"];
|
|
1123
|
+
claim?: null | components["schemas"]["PriceClaimDto"];
|
|
1103
1124
|
delivery: null | components["schemas"]["DeliveryRangeDto"];
|
|
1104
1125
|
id: string;
|
|
1105
1126
|
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
@@ -1109,6 +1130,7 @@ export interface components {
|
|
|
1109
1130
|
promotions: components["schemas"]["LinePromotionDto"][];
|
|
1110
1131
|
/** Format: int32 */
|
|
1111
1132
|
quantity: number | string;
|
|
1133
|
+
reference?: null | components["schemas"]["PricePairDto"];
|
|
1112
1134
|
/** @description At least one. One segment: every unit costs unitPrice. Several: the units differ; unitPrice is the largest segment's (ties: the higher price) and linePrice the exact line amount. */
|
|
1113
1135
|
segments: components["schemas"]["CartLineSegmentDto"][];
|
|
1114
1136
|
sku: string;
|
|
@@ -1150,6 +1172,7 @@ export interface components {
|
|
|
1150
1172
|
/** Format: int32 */
|
|
1151
1173
|
promotionId: number | string;
|
|
1152
1174
|
scope: components["schemas"]["PromotionScopeDto"];
|
|
1175
|
+
stage: components["schemas"]["PromotionStageDto"];
|
|
1153
1176
|
};
|
|
1154
1177
|
CartTokenDto: {
|
|
1155
1178
|
token: string;
|
|
@@ -1189,6 +1212,7 @@ export interface components {
|
|
|
1189
1212
|
};
|
|
1190
1213
|
CheckoutCartLineDto: {
|
|
1191
1214
|
availability: null | components["schemas"]["LineAvailability"];
|
|
1215
|
+
claim?: null | components["schemas"]["PriceClaimDto"];
|
|
1192
1216
|
delivery: null | components["schemas"]["DeliveryRangeDto"];
|
|
1193
1217
|
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
1194
1218
|
lineKey: null | string;
|
|
@@ -1203,6 +1227,7 @@ export interface components {
|
|
|
1203
1227
|
promotions: components["schemas"]["LinePromotionDto"][];
|
|
1204
1228
|
/** Format: int32 */
|
|
1205
1229
|
quantity: number | string;
|
|
1230
|
+
reference?: null | components["schemas"]["PricePairDto"];
|
|
1206
1231
|
segmentId: null | string;
|
|
1207
1232
|
sku: string;
|
|
1208
1233
|
unitPriceBeforePromotionsInc: null | string;
|
|
@@ -1642,12 +1667,14 @@ export interface components {
|
|
|
1642
1667
|
role: string;
|
|
1643
1668
|
};
|
|
1644
1669
|
OfferDto: {
|
|
1670
|
+
claim?: null | components["schemas"]["PriceClaimDto"];
|
|
1645
1671
|
compareAt: null | components["schemas"]["PricePairDto"];
|
|
1646
1672
|
displayBasis: components["schemas"]["DisplayBasisDto"];
|
|
1647
1673
|
listPrice: null | components["schemas"]["PricePairDto"];
|
|
1648
1674
|
offerStatus: components["schemas"]["OfferStatusDto"];
|
|
1649
1675
|
price: null | components["schemas"]["PricePairDto"];
|
|
1650
1676
|
purchaseStatus: components["schemas"]["PurchaseStatusDto"];
|
|
1677
|
+
reference?: null | components["schemas"]["PricePairDto"];
|
|
1651
1678
|
regular: null | components["schemas"]["PricePairDto"];
|
|
1652
1679
|
sale: null | components["schemas"]["SalePriceDto"];
|
|
1653
1680
|
stock: components["schemas"]["StockDto"];
|
|
@@ -1685,6 +1712,7 @@ export interface components {
|
|
|
1685
1712
|
tracking: components["schemas"]["TrackingDto"][];
|
|
1686
1713
|
};
|
|
1687
1714
|
OrderLineDto: {
|
|
1715
|
+
claim?: null | components["schemas"]["PriceClaimDto"];
|
|
1688
1716
|
id: string;
|
|
1689
1717
|
lineKey: null | string;
|
|
1690
1718
|
lineTotalBeforePromotionsInc: null | string;
|
|
@@ -1698,6 +1726,7 @@ export interface components {
|
|
|
1698
1726
|
promotions: components["schemas"]["LinePromotionDto"][];
|
|
1699
1727
|
/** Format: int32 */
|
|
1700
1728
|
quantity: number | string;
|
|
1729
|
+
reference?: null | components["schemas"]["PricePairDto"];
|
|
1701
1730
|
segmentId: null | string;
|
|
1702
1731
|
sku: string;
|
|
1703
1732
|
type: string;
|
|
@@ -1774,6 +1803,18 @@ export interface components {
|
|
|
1774
1803
|
source: string;
|
|
1775
1804
|
tax: components["schemas"]["DisplayBasisDto"];
|
|
1776
1805
|
};
|
|
1806
|
+
PriceClaimDto: {
|
|
1807
|
+
amountOff: components["schemas"]["PricePairDto"];
|
|
1808
|
+
/** Format: date-time */
|
|
1809
|
+
claimEndsAt: null | string;
|
|
1810
|
+
/** Format: date-time */
|
|
1811
|
+
endsAt: null | string;
|
|
1812
|
+
labelKey: string;
|
|
1813
|
+
/** Format: int32 */
|
|
1814
|
+
percent: number;
|
|
1815
|
+
/** Format: date-time */
|
|
1816
|
+
since: string;
|
|
1817
|
+
};
|
|
1777
1818
|
PriceFromDto: {
|
|
1778
1819
|
price: components["schemas"]["PricePairDto"];
|
|
1779
1820
|
variantId: string;
|
|
@@ -1864,7 +1905,7 @@ export interface components {
|
|
|
1864
1905
|
variants: components["schemas"]["VariantDto"][] | null;
|
|
1865
1906
|
};
|
|
1866
1907
|
/** @enum {unknown} */
|
|
1867
|
-
PromotionCodeReasonDto: "expired" | "notForAccount" | "notInMarket" | "notStarted" | "unavailable";
|
|
1908
|
+
PromotionCodeReasonDto: "expired" | "notForAccount" | "notInMarket" | "notStarted" | "superseded" | "unavailable";
|
|
1868
1909
|
/** @enum {unknown} */
|
|
1869
1910
|
PromotionCodeStatusDto: "applied" | "notApplicable";
|
|
1870
1911
|
PromotionRefDto: {
|
|
@@ -1875,6 +1916,8 @@ export interface components {
|
|
|
1875
1916
|
/** @enum {unknown} */
|
|
1876
1917
|
PromotionScopeDto: "merchandise" | "shipping";
|
|
1877
1918
|
/** @enum {unknown} */
|
|
1919
|
+
PromotionStageDto: "cart" | "item";
|
|
1920
|
+
/** @enum {unknown} */
|
|
1878
1921
|
PurchaseStatusDto: "available" | "unavailable";
|
|
1879
1922
|
/** @enum {unknown} */
|
|
1880
1923
|
QuoteStatusDto: "complete" | "partial" | "unavailable";
|
|
@@ -1978,6 +2021,9 @@ export interface components {
|
|
|
1978
2021
|
manufacturer: null | components["schemas"]["PartyDto"];
|
|
1979
2022
|
};
|
|
1980
2023
|
SalePriceDto: {
|
|
2024
|
+
/** Format: date-time */
|
|
2025
|
+
extendedFrom?: null | string;
|
|
2026
|
+
label?: null | string;
|
|
1981
2027
|
price: components["schemas"]["PricePairDto"];
|
|
1982
2028
|
/** Format: date-time */
|
|
1983
2029
|
validFrom: null | string;
|
|
@@ -2147,6 +2193,21 @@ export interface components {
|
|
|
2147
2193
|
consumer: boolean;
|
|
2148
2194
|
paths: components["schemas"]["AccountPathsDto"];
|
|
2149
2195
|
};
|
|
2196
|
+
SiteAttributionDto: {
|
|
2197
|
+
checkoutPaths: string[];
|
|
2198
|
+
dropPaths: string[];
|
|
2199
|
+
enabled: boolean;
|
|
2200
|
+
ignoreReferrerHosts: string[];
|
|
2201
|
+
/** Format: int32 */
|
|
2202
|
+
lookbackDays: number | string;
|
|
2203
|
+
/** Format: int32 */
|
|
2204
|
+
minNoticeVersion: number | null | string;
|
|
2205
|
+
touches: components["schemas"]["SiteAttributionTouchesDto"];
|
|
2206
|
+
};
|
|
2207
|
+
SiteAttributionTouchesDto: {
|
|
2208
|
+
content: boolean;
|
|
2209
|
+
term: boolean;
|
|
2210
|
+
};
|
|
2150
2211
|
SiteCapabilitiesDto: {
|
|
2151
2212
|
checkout: boolean;
|
|
2152
2213
|
priceQueries: boolean;
|
|
@@ -2154,6 +2215,7 @@ export interface components {
|
|
|
2154
2215
|
};
|
|
2155
2216
|
SiteDto: {
|
|
2156
2217
|
accounts: null | components["schemas"]["SiteAccountsDto"];
|
|
2218
|
+
attribution?: null | components["schemas"]["SiteAttributionDto"];
|
|
2157
2219
|
bindings: components["schemas"]["BindingDto"][];
|
|
2158
2220
|
capabilities: components["schemas"]["SiteCapabilitiesDto"];
|
|
2159
2221
|
code: string;
|
|
@@ -2164,6 +2226,8 @@ export interface components {
|
|
|
2164
2226
|
markets: components["schemas"]["MarketDto"][];
|
|
2165
2227
|
media: components["schemas"]["MediaDto"];
|
|
2166
2228
|
name: string;
|
|
2229
|
+
/** Format: date-time */
|
|
2230
|
+
nextPriceBoundary?: null | string;
|
|
2167
2231
|
offerPolicy: components["schemas"]["OfferPolicyDto"];
|
|
2168
2232
|
preview: boolean;
|
|
2169
2233
|
sellability: components["schemas"]["SellabilityDto"];
|
|
@@ -2227,6 +2291,33 @@ export interface components {
|
|
|
2227
2291
|
label: string;
|
|
2228
2292
|
};
|
|
2229
2293
|
StartCheckoutRequest: {
|
|
2294
|
+
/** @description Optional. Where the order came from, as the device captured it under measurement consent. Absent, null or not an object: what the checkout holds is not changed. A capture never produces a problem answer: a member of the wrong kind reads as absent, and unknown members are ignored. */
|
|
2295
|
+
attribution?: null | {
|
|
2296
|
+
/** @description null (or not an array): the device does not grant measurement. []: it grants measurement and holds no touch. Otherwise the device's touches, oldest first, at most 5; when more are sent, the first and the newest four are kept. */
|
|
2297
|
+
touches?: {
|
|
2298
|
+
/**
|
|
2299
|
+
* Format: date-time
|
|
2300
|
+
* @description When the landing happened, UTC (yyyy-MM-ddTHH:mm:ssZ).
|
|
2301
|
+
*/
|
|
2302
|
+
at?: null | string;
|
|
2303
|
+
/** @description utm_campaign, normalised. */
|
|
2304
|
+
campaign?: null | string;
|
|
2305
|
+
/** @description Which kind of click id the landing carried — gclid, gbraid, wbraid, msclkid, fbclid or ttclid — never its value; null when none. */
|
|
2306
|
+
clickIdKind?: null | string;
|
|
2307
|
+
/** @description utm_content, normalised; kept only when the site keeps it. */
|
|
2308
|
+
content?: null | string;
|
|
2309
|
+
/** @description The landing page's site-relative path, without its query. */
|
|
2310
|
+
landingPath?: null | string;
|
|
2311
|
+
/** @description utm_medium, normalised. */
|
|
2312
|
+
medium?: null | string;
|
|
2313
|
+
/** @description The referring site's host, never its path or query. */
|
|
2314
|
+
referrerHost?: null | string;
|
|
2315
|
+
/** @description utm_source, normalised. */
|
|
2316
|
+
source?: null | string;
|
|
2317
|
+
/** @description utm_term, normalised; kept only when the site keeps it. */
|
|
2318
|
+
term?: null | string;
|
|
2319
|
+
}[] | null;
|
|
2320
|
+
};
|
|
2230
2321
|
option: null | string;
|
|
2231
2322
|
returnOrigin: null | string;
|
|
2232
2323
|
};
|
|
@@ -3961,6 +4052,8 @@ export interface operations {
|
|
|
3961
4052
|
"X-Locale"?: string;
|
|
3962
4053
|
/** @description The cart's bearer token. The checkout works on this cart. */
|
|
3963
4054
|
"X-Cart-Token": string;
|
|
4055
|
+
/** @description Optional. The guest shopper token (sft_…), sent with an attribution capture only when there is no shopper session and the device grants measurement: the server checks the grant on the token's consent record before it keeps any touch (with a session, the account's record is read instead and the token is not). It is never stored with the checkout, and the route never mints a token; without it, or with an unknown one, the touches are not kept and the checkout answers as it would without them. */
|
|
4056
|
+
"X-Shopper-Token"?: string;
|
|
3964
4057
|
/** @description Optional. The shopper session (sfs_…) of a signed-in shopper, server-to-server with the site's server key only: it opens the principal's saved carts and orders, and is never needed for a guest cart or order. On a site without accounts it is not read. Not in the CORS allow-list. */
|
|
3965
4058
|
"X-Shopper-Session"?: string;
|
|
3966
4059
|
};
|
|
@@ -4065,6 +4158,89 @@ export interface operations {
|
|
|
4065
4158
|
};
|
|
4066
4159
|
};
|
|
4067
4160
|
};
|
|
4161
|
+
ClearCheckoutAttribution: {
|
|
4162
|
+
parameters: {
|
|
4163
|
+
query?: never;
|
|
4164
|
+
header: {
|
|
4165
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
4166
|
+
"X-Site-Key": string;
|
|
4167
|
+
/** @description Market code (e.g. "eur"). Optional when the site has one market; else the default binding's market. */
|
|
4168
|
+
"X-Market"?: string;
|
|
4169
|
+
/** @description ISO 3166-1 alpha-2 country (e.g. "DE"). Optional when the market has one country; catalog reads fall back to the market's default country, cart and checkout require it. */
|
|
4170
|
+
"X-Country"?: string;
|
|
4171
|
+
/** @description Locale tag as the site spells it (e.g. "sv"). Optional: the country's default locale. Accept-Language selects nothing. */
|
|
4172
|
+
"X-Locale"?: string;
|
|
4173
|
+
/** @description Optional. The cart whose checkouts drop their order-source touches. A missing or unknown token answers 204. */
|
|
4174
|
+
"X-Cart-Token"?: string;
|
|
4175
|
+
};
|
|
4176
|
+
path?: never;
|
|
4177
|
+
cookie?: never;
|
|
4178
|
+
};
|
|
4179
|
+
requestBody?: never;
|
|
4180
|
+
responses: {
|
|
4181
|
+
/** @description No Content */
|
|
4182
|
+
204: {
|
|
4183
|
+
headers: {
|
|
4184
|
+
[name: string]: unknown;
|
|
4185
|
+
};
|
|
4186
|
+
content?: never;
|
|
4187
|
+
};
|
|
4188
|
+
/** @description problem+json. Not answered by this route: it has no 400 of its own, and X-Market, X-Country and X-Locale play no part in it. */
|
|
4189
|
+
400: {
|
|
4190
|
+
headers: {
|
|
4191
|
+
[name: string]: unknown;
|
|
4192
|
+
};
|
|
4193
|
+
content: {
|
|
4194
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
4195
|
+
};
|
|
4196
|
+
};
|
|
4197
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID; SESSION_INVALID when an X-Shopper-Session is sent on a site with accounts and does not validate. */
|
|
4198
|
+
401: {
|
|
4199
|
+
headers: {
|
|
4200
|
+
[name: string]: unknown;
|
|
4201
|
+
};
|
|
4202
|
+
content: {
|
|
4203
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
4204
|
+
};
|
|
4205
|
+
};
|
|
4206
|
+
/** @description problem+json. PERMISSION_DENIED (a key other than the site's publishable or server key: no secret or preview key), SECRET_KEY_FROM_BROWSER (the server key from a browser); with an X-Shopper-Session: SERVER_KEY_REQUIRED or SESSION_FROM_BROWSER. */
|
|
4207
|
+
403: {
|
|
4208
|
+
headers: {
|
|
4209
|
+
[name: string]: unknown;
|
|
4210
|
+
};
|
|
4211
|
+
content: {
|
|
4212
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
4213
|
+
};
|
|
4214
|
+
};
|
|
4215
|
+
/** @description problem+json. NOT_FOUND for an unrouted path only: a missing or unknown cart answers 204, and the route works on a paused site. */
|
|
4216
|
+
404: {
|
|
4217
|
+
headers: {
|
|
4218
|
+
[name: string]: unknown;
|
|
4219
|
+
};
|
|
4220
|
+
content: {
|
|
4221
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
4222
|
+
};
|
|
4223
|
+
};
|
|
4224
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
4225
|
+
429: {
|
|
4226
|
+
headers: {
|
|
4227
|
+
[name: string]: unknown;
|
|
4228
|
+
};
|
|
4229
|
+
content: {
|
|
4230
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4233
|
+
/** @description problem+json. CHECKOUT_UNAVAILABLE (the cart's lock timed out or the clear failed; nothing is promised cleared — retry); SITE_KEYS_SYNCING (the server key before the site's first key sync; Retry-After) or SITE_REGISTRY_WARMING. */
|
|
4234
|
+
503: {
|
|
4235
|
+
headers: {
|
|
4236
|
+
[name: string]: unknown;
|
|
4237
|
+
};
|
|
4238
|
+
content: {
|
|
4239
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
4240
|
+
};
|
|
4241
|
+
};
|
|
4242
|
+
};
|
|
4243
|
+
};
|
|
4068
4244
|
GetCheckout: {
|
|
4069
4245
|
parameters: {
|
|
4070
4246
|
query?: never;
|
|
@@ -4426,9 +4602,9 @@ export interface operations {
|
|
|
4426
4602
|
page?: number;
|
|
4427
4603
|
/** @description Items per page, 1–100. Out of range is a 400 with code INVALID_PAGE. */
|
|
4428
4604
|
pageSize?: number;
|
|
4429
|
-
/** @description Sort key. An unknown one is not refused: it falls back to relevance with a SORT_UNKNOWN warning, because it usually comes from a stale bookmark. */
|
|
4430
|
-
sort?: "name_asc" | "newest" | "popular" | "price_asc" | "price_desc" | "recommended" | "relevance";
|
|
4431
|
-
/** @description Facet selection, sent as filter[key]=value. Several values for one facet are comma-separated; price is "min-max" and a boolean facet is "true". An unknown key is dropped with a FILTER_IGNORED warning. */
|
|
4605
|
+
/** @description Sort key. An unknown one is not refused: it falls back to relevance with a SORT_UNKNOWN warning, because it usually comes from a stale bookmark. discount (biggest discount first, then price ascending) is accepted on every site and offered in sort.available only on a site with item sales. */
|
|
4606
|
+
sort?: "discount" | "name_asc" | "newest" | "popular" | "price_asc" | "price_desc" | "recommended" | "relevance";
|
|
4607
|
+
/** @description Facet selection, sent as filter[key]=value. Several values for one facet are comma-separated; price is "min-max" and a boolean facet is "true". An unknown key is dropped with a FILTER_IGNORED warning. The key sale is reserved: filter[sale]=true lists only the products on sale in the request's market and country (never echoed in appliedFilters; any other value is dropped with FILTER_IGNORED). On a site with item sales the price sorts order by the sale-aware from-price first; a company context has no sale key, so the filter matches nothing there. */
|
|
4432
4608
|
filter?: {
|
|
4433
4609
|
[key: string]: string;
|
|
4434
4610
|
};
|
|
@@ -6140,9 +6316,9 @@ export interface operations {
|
|
|
6140
6316
|
page?: number;
|
|
6141
6317
|
/** @description Items per page, 1–100. Out of range is a 400 with code INVALID_PAGE. */
|
|
6142
6318
|
pageSize?: number;
|
|
6143
|
-
/** @description Sort key. An unknown one is not refused: it falls back to relevance with a SORT_UNKNOWN warning, because it usually comes from a stale bookmark. */
|
|
6144
|
-
sort?: "name_asc" | "newest" | "popular" | "price_asc" | "price_desc" | "recommended" | "relevance";
|
|
6145
|
-
/** @description Facet selection, sent as filter[key]=value. Several values for one facet are comma-separated; price is "min-max" and a boolean facet is "true". An unknown key is dropped with a FILTER_IGNORED warning. */
|
|
6319
|
+
/** @description Sort key. An unknown one is not refused: it falls back to relevance with a SORT_UNKNOWN warning, because it usually comes from a stale bookmark. discount (biggest discount first, then price ascending) is accepted on every site and offered in sort.available only on a site with item sales. */
|
|
6320
|
+
sort?: "discount" | "name_asc" | "newest" | "popular" | "price_asc" | "price_desc" | "recommended" | "relevance";
|
|
6321
|
+
/** @description Facet selection, sent as filter[key]=value. Several values for one facet are comma-separated; price is "min-max" and a boolean facet is "true". An unknown key is dropped with a FILTER_IGNORED warning. The key sale is reserved: filter[sale]=true lists only the products on sale in the request's market and country (never echoed in appliedFilters; any other value is dropped with FILTER_IGNORED). On a site with item sales the price sorts order by the sale-aware from-price first; a company context has no sale key, so the filter matches nothing there. */
|
|
6146
6322
|
filter?: {
|
|
6147
6323
|
[key: string]: string;
|
|
6148
6324
|
};
|