@doswiftly/storefront-operations 11.5.0 → 12.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 +1 -1
- package/CHANGELOG.md +33 -0
- package/fragments.graphql +0 -1
- package/llms-full.txt +1 -2
- package/operations.json +2 -2
- package/package.json +1 -1
- package/schema.graphql +0 -3
package/AGENTS.md
CHANGED
|
@@ -27,7 +27,7 @@ consumer's `codegen.ts` references this package's `.graphql` files as
|
|
|
27
27
|
live in the consumer's repo.
|
|
28
28
|
|
|
29
29
|
<!-- AUTOGEN:STATS:BEGIN — auto-regenerated, do not edit by hand -->
|
|
30
|
-
- **Schema version**:
|
|
30
|
+
- **Schema version**: 12.0.0
|
|
31
31
|
- **Queries**: 49
|
|
32
32
|
- **Mutations**: 40
|
|
33
33
|
- **Fragments**: 100
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 12.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 2ff6b16: **BREAKING**: `Product.requiresRecipientInfo` field has been removed from the storefront GraphQL schema. Every paid gift card line now guarantees email delivery — to the recipient when your storefront captured one, otherwise to the buyer as fallback.
|
|
8
|
+
|
|
9
|
+
### Why removed
|
|
10
|
+
|
|
11
|
+
The field exposed a per-product merchant toggle intended to gate whether your storefront should collect gift card recipient info (email, name, message) at checkout. In practice the toggle did not change actual delivery behaviour — every storefront ended up deciding on its own whether to render a recipient form, and the platform sent emails based solely on whether per-line recipient data was present. Merchants saw an admin control that had no effect downstream, so it has been removed in favour of an explicit storefront-driven model.
|
|
12
|
+
|
|
13
|
+
### New model — storefront-driven recipient mode
|
|
14
|
+
|
|
15
|
+
Common e-commerce convention for gift card flow:
|
|
16
|
+
1. **Your storefront opts in**: render a recipient form on PDP / cart drawer for any cart line where `product.type === 'GIFT_CARD'`. Call `cartUpdateGiftCardRecipient({ cartId, lineItemId, recipientEmail, recipientName?, message? })` per line where the buyer fills it in.
|
|
17
|
+
2. **Your storefront opts out**: skip the mutation entirely. Gift cards still ship — the platform emails the code to the buyer (the same email used at checkout) as a fallback.
|
|
18
|
+
|
|
19
|
+
Every paid gift card is now guaranteed to land in someone's inbox — either the explicit recipient (when collected) or the buyer (fallback). Previously, missing recipient data caused a silent email skip, leaving customers without their codes.
|
|
20
|
+
|
|
21
|
+
### Migration
|
|
22
|
+
|
|
23
|
+
If your storefront was reading `Product.requiresRecipientInfo` to conditionally show a recipient form, replace the gate with a simple product type check:
|
|
24
|
+
|
|
25
|
+
```diff
|
|
26
|
+
- {product.requiresRecipientInfo && (
|
|
27
|
+
+ {product.type === 'GIFT_CARD' && (
|
|
28
|
+
<GiftRecipientForm cartId={cartId} lineItemId={lineItemId} />
|
|
29
|
+
)}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If you were not reading the field, no storefront changes are required — the fallback ensures gift card delivery works out of the box.
|
|
33
|
+
|
|
34
|
+
See [cart docs — Karty podarunkowe — dostawa kodu](https://docs.doswiftly.pl/storefront-developer/sdk/cart#karty-podarunkowe--dostawa-kodu) for the full delivery semantics, a cart-structuring table (one gift card for self vs N gift cards for N recipients), and a recipient form example.
|
|
35
|
+
|
|
3
36
|
## 11.5.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
package/fragments.graphql
CHANGED
package/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DoSwiftly Storefront Operations — Full Reference
|
|
2
2
|
|
|
3
|
-
> Schema version: **
|
|
3
|
+
> Schema version: **12.0.0**
|
|
4
4
|
> 49 queries · 40 mutations · 100 fragments
|
|
5
5
|
|
|
6
6
|
Auto-generated from `.graphql` source files. Do not edit by hand — this file is
|
|
@@ -2602,7 +2602,6 @@ fragment ProductBase on Product {
|
|
|
2602
2602
|
descriptionHtml
|
|
2603
2603
|
stockTotal
|
|
2604
2604
|
type
|
|
2605
|
-
requiresRecipientInfo
|
|
2606
2605
|
visibility
|
|
2607
2606
|
attributeSetId
|
|
2608
2607
|
createdAt
|
package/operations.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "
|
|
2
|
+
"schemaVersion": "12.0.0",
|
|
3
3
|
"queries": [
|
|
4
4
|
{
|
|
5
5
|
"name": "Shop",
|
|
@@ -1932,7 +1932,7 @@
|
|
|
1932
1932
|
"fragmentRefs": [
|
|
1933
1933
|
"ProductCard"
|
|
1934
1934
|
],
|
|
1935
|
-
"body": "fragment ProductBase on Product {\n ...ProductCard\n description\n descriptionHtml\n stockTotal\n type\n
|
|
1935
|
+
"body": "fragment ProductBase on Product {\n ...ProductCard\n description\n descriptionHtml\n stockTotal\n type\n visibility\n attributeSetId\n createdAt\n updatedAt\n}",
|
|
1936
1936
|
"onType": "Product"
|
|
1937
1937
|
},
|
|
1938
1938
|
{
|
package/package.json
CHANGED
package/schema.graphql
CHANGED
|
@@ -4083,9 +4083,6 @@ type Product implements Node {
|
|
|
4083
4083
|
"""Similar products recommendations"""
|
|
4084
4084
|
recommendations(first: Int = 4): ProductRecommendations
|
|
4085
4085
|
|
|
4086
|
-
"""Whether storefront checkout requires recipient data for this product"""
|
|
4087
|
-
requiresRecipientInfo: Boolean!
|
|
4088
|
-
|
|
4089
4086
|
"""Number of reviews"""
|
|
4090
4087
|
reviewCount: Int
|
|
4091
4088
|
|