@doswiftly/storefront-operations 10.0.0 → 11.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 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**: 10.0.0
30
+ - **Schema version**: 11.0.0
31
31
  - **Queries**: 48
32
32
  - **Mutations**: 39
33
33
  - **Fragments**: 99
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - c1faee7: **Breaking:** `cartComplete` no longer returns `cart` in its payload.
8
+
9
+ After completion the cart is converted and locked — returning it meant an extra server round-trip for a dead resource. The mutation payload (and `cartClient.complete()`) now returns only `{ order, warnings }`. The `order` is the meaningful result of completion and carries `canCreatePayment` + `paymentMethodType` for the post-completion payment flow.
10
+
11
+ **Migration:**
12
+ - `cartClient.complete()` now returns `{ order, warnings }` — remove any use of `result.cart`. After completion, clear your local cart state and work with `result.order`.
13
+ - If you query `cartComplete` directly, drop the `cart { ... }` selection — the field no longer exists on `CartCompletePayload`.
14
+
3
15
  ## 10.0.0
4
16
 
5
17
  ### Major Changes
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # DoSwiftly Storefront Operations — Full Reference
2
2
 
3
- > Schema version: **10.0.0**
3
+ > Schema version: **11.0.0**
4
4
  > 48 queries · 39 mutations · 99 fragments
5
5
 
6
6
  Auto-generated from `.graphql` source files. Do not edit by hand — this file is
@@ -1992,15 +1992,12 @@ mutation CartUpdateGiftCardRecipient($input: CartUpdateGiftCardRecipientInput!)
1992
1992
  **Variables**:
1993
1993
  - `$input`: `CartCompleteInput!`
1994
1994
 
1995
- **Fragments used**: `Cart`, `CartWarning`, `Order`, `UserError`
1995
+ **Fragments used**: `CartWarning`, `Order`, `UserError`
1996
1996
 
1997
1997
  **GraphQL**:
1998
1998
  ```graphql
1999
1999
  mutation CartComplete($input: CartCompleteInput!) {
2000
2000
  cartComplete(input: $input) {
2001
- cart {
2002
- ...Cart
2003
- }
2004
2001
  order {
2005
2002
  ...Order
2006
2003
  }
package/mutations.graphql CHANGED
@@ -392,9 +392,6 @@ mutation CartUpdateGiftCardRecipient($input: CartUpdateGiftCardRecipientInput!)
392
392
  # Finalizes the cart — creates the `Order`, deducts gift cards, sends order-created confirmation — all atomically. **Idempotent on `idempotencyKey`** (auto-generated from cartId + minute timestamp if caller omits it). Returns `order` field after completion. Note: `paymentUrl` is intentionally NOT in payload — for hosted gateways (online providers) the storefront calls a separate `paymentCreate` mutation after this returns (check `order.canCreatePayment` first). Errors: `EMAIL_REQUIRED`, `SHIPPING_ADDRESS_REQUIRED`, `SHIPPING_METHOD_REQUIRED`, `PAYMENT_METHOD_REQUIRED`, `INSUFFICIENT_STOCK`, `ALREADY_COMPLETED`.
393
393
  mutation CartComplete($input: CartCompleteInput!) {
394
394
  cartComplete(input: $input) {
395
- cart {
396
- ...Cart
397
- }
398
395
  order {
399
396
  ...Order
400
397
  }
package/operations.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "10.0.0",
2
+ "schemaVersion": "11.0.0",
3
3
  "queries": [
4
4
  {
5
5
  "name": "Shop",
@@ -1534,12 +1534,11 @@
1534
1534
  }
1535
1535
  ],
1536
1536
  "fragmentRefs": [
1537
- "Cart",
1538
1537
  "CartWarning",
1539
1538
  "Order",
1540
1539
  "UserError"
1541
1540
  ],
1542
- "body": "mutation CartComplete($input: CartCompleteInput!) {\n cartComplete(input: $input) {\n cart {\n ...Cart\n }\n order {\n ...Order\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1541
+ "body": "mutation CartComplete($input: CartCompleteInput!) {\n cartComplete(input: $input) {\n order {\n ...Order\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1543
1542
  },
1544
1543
  {
1545
1544
  "name": "ReturnCreate",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doswiftly/storefront-operations",
3
- "version": "10.0.0",
3
+ "version": "11.0.0",
4
4
  "description": "GraphQL operations for DoSwiftly Storefront - SSOT from backend",
5
5
  "homepage": "https://doswiftly.pl",
6
6
  "publishConfig": {
package/schema.graphql CHANGED
@@ -917,12 +917,9 @@ input CartCompleteInput {
917
917
  }
918
918
 
919
919
  """
920
- Result of completing cart — transition cart → order (per D4 NO paymentUrl)
920
+ Result of completing cart — transition cart → order (per D4 NO paymentUrl). Cart NIE w payload — po complete koszyk jest CONVERTED/locked.
921
921
  """
922
922
  type CartCompletePayload {
923
- """Cart finalised (status CONVERTED — read-only po complete)"""
924
- cart: Cart
925
-
926
923
  """
927
924
  Order created z cart. Zapewnia canCreatePayment + paymentMethodType (Phase 4 ResolveFields) dla decyzji storefront przycisku "Zapłać".
928
925
  """