@doswiftly/storefront-operations 8.0.0 → 10.0.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/AGENTS.md +3 -3
- package/CHANGELOG.md +180 -0
- package/README.md +17 -37
- package/fragments.graphql +63 -156
- package/llms-full.txt +206 -479
- package/mutations.graphql +71 -121
- package/operations.json +120 -319
- package/package.json +1 -1
- package/queries.graphql +21 -7
- package/schema.graphql +401 -601
package/package.json
CHANGED
package/queries.graphql
CHANGED
|
@@ -232,13 +232,27 @@ query CustomerOrder($orderId: ID!) {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
# ============================================
|
|
235
|
-
#
|
|
236
|
-
# ============================================
|
|
237
|
-
|
|
238
|
-
#
|
|
239
|
-
query
|
|
240
|
-
|
|
241
|
-
|
|
235
|
+
# Discount Code Validation
|
|
236
|
+
# ============================================
|
|
237
|
+
|
|
238
|
+
# Read-only validation of a discount code against an existing cart — does NOT modify cart state. Returns `{ isValid, discount, error }` (`DiscountValidationResult`) for previewing the effect of a code (inline UI feedback as the user types, before they commit to applying via `cartDiscountCodesUpdate`). Validates: discount existence + active status + customer eligibility + minimum order amount + minimum quantity met. Errors: `NOT_FOUND`, `INACTIVE`, `NOT_STARTED`, `EXPIRED`, `USAGE_LIMIT_REACHED`, `CUSTOMER_USAGE_LIMIT_REACHED`, `CUSTOMER_NOT_ELIGIBLE`, `MINIMUM_ORDER_NOT_MET`, `MINIMUM_QUANTITY_NOT_MET`.
|
|
239
|
+
query CartValidateDiscountCode($cartId: ID!, $discountCode: String!) {
|
|
240
|
+
cartValidateDiscountCode(cartId: $cartId, discountCode: $discountCode) {
|
|
241
|
+
isValid
|
|
242
|
+
discount {
|
|
243
|
+
code
|
|
244
|
+
title
|
|
245
|
+
type
|
|
246
|
+
value
|
|
247
|
+
discountAmount {
|
|
248
|
+
amount
|
|
249
|
+
currencyCode
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
error {
|
|
253
|
+
code
|
|
254
|
+
message
|
|
255
|
+
}
|
|
242
256
|
}
|
|
243
257
|
}
|
|
244
258
|
|