@doswiftly/storefront-operations 16.0.0 → 17.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/llms-full.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  # DoSwiftly Storefront Operations — Full Reference
2
2
 
3
- > Schema version: **16.0.0**
4
- > 52 queries · 40 mutations · 102 fragments
3
+ > Schema version: **17.0.0**
4
+ > 52 queries · 41 mutations · 104 fragments
5
5
 
6
6
  Auto-generated from `.graphql` source files. Do not edit by hand — this file is
7
7
  regenerated on every release to match the published schema.
@@ -1975,7 +1975,7 @@ mutation CartSelectShippingMethod($input: CartSelectShippingMethodInput!) {
1975
1975
 
1976
1976
  **Section**: Cart Completion Mutations
1977
1977
 
1978
- **Description**: Selects a payment method by `paymentMethodId` (UUID from `availablePaymentMethods` query). Validates existence + active status; no pre-authorization performed here. Errors: `PAYMENT_METHOD_REQUIRED`, `INVALID_PAYMENT`, `CART_NOT_FOUND`.
1978
+ **Description**: Selects a payment method on the cart by category (`methodType` BLIK, CARD, BANK_TRANSFER, ...). Optional `preferredProviderId` overrides the merchant priority when the buyer explicitly picks a gateway from `PaymentMethod.providersAvailable`. The backend resolves the gateway routing from `MerchantPaymentConfig` at `cartComplete`; the selection persisted here is the category. Errors: `PAYMENT_METHOD_REQUIRED`, `CART_NOT_FOUND`, `CART_UNAUTHENTICATED`.
1979
1979
 
1980
1980
  **Variables**:
1981
1981
  - `$input`: `CartSelectPaymentMethodInput!`
@@ -2115,12 +2115,12 @@ mutation CartComplete($input: CartCompleteInput!) {
2115
2115
 
2116
2116
  **Section**: Cart Completion Mutations
2117
2117
 
2118
- **Description**: Initiates a payment session for an order created by `cartComplete` — call this when `order.canCreatePayment` is `true` (orders with an offline payment method like cash-on-delivery skip this step). `orderId` is required; `returnUrl` / `cancelUrl` are optional and, when supplied, must point to a verified domain of the shop (open-redirect protected). Branch on the returned `payment.flow`: `ONLINE_REDIRECT` → redirect to `payment.redirectUrl`, `ONLINE_EMBEDDED` → render a widget with `payment.clientSecret`, `INSTANT_DIRECT` → already settled, read `payment.status`. Public, but ownership-checked — an authenticated customer cannot pay for another customer's order. **Idempotent** — calling it again for the same order returns the existing still-valid session instead of creating a duplicate (safe to retry). Rate limit: 5 requests/minute. `userErrors[].code`: `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `INVALID_ID_FORMAT`, `PAYMENT_FAILED`.
2118
+ **Description**: Initiates a payment session for an order created by `cartComplete` — call this when `order.canCreatePayment` is `true` (orders with an offline payment method like cash-on-delivery skip this step). `orderId` is required; `returnUrl` / `cancelUrl` are optional and, when supplied, must point to a verified domain of the shop (open-redirect protected). Branch on the returned `payment.flow`: `ONLINE_REDIRECT` → redirect to `payment.redirectUrl`, `ONLINE_EMBEDDED` → render a widget with `payment.clientSecret`, `INSTANT_DIRECT` → already settled, read `payment.status`. Public, but ownership-checked — an authenticated customer cannot pay for another customer's order. **Idempotent** — calling it again for the same order returns the existing still-valid session instead of creating a duplicate (safe to retry). Rate limit: 5 requests/minute. `userErrors[].code`: `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `INVALID_ID_FORMAT`, `PAYMENT_FAILED`, `INSTRUMENT_PRESELECTION_FAILED`. `warnings[]` array zawiera `INSTRUMENT_CLEARED_FOR_RETRY` post-auto-clear instrument-specific failure (storefront retry hint: next attempt uses gateway default landing).
2119
2119
 
2120
2120
  **Variables**:
2121
2121
  - `$input`: `PaymentCreateInput!`
2122
2122
 
2123
- **Fragments used**: `PaymentSession`, `UserError`
2123
+ **Fragments used**: `PaymentSession`, `PaymentWarning`, `UserError`
2124
2124
 
2125
2125
  **GraphQL**:
2126
2126
  ```graphql
@@ -2132,6 +2132,37 @@ mutation PaymentCreate($input: PaymentCreateInput!) {
2132
2132
  userErrors {
2133
2133
  ...UserError
2134
2134
  }
2135
+ warnings {
2136
+ ...PaymentWarning
2137
+ }
2138
+ }
2139
+ }
2140
+ ```
2141
+
2142
+ ### Mutation: `CartClearPaymentSelection`
2143
+
2144
+ **Section**: Cart Completion Mutations
2145
+
2146
+ **Description**: Clears all payment selection state on the cart in a single atomic operation. Use for accordion "back to method picker" flows w storefront UI. Idempotent — calling twice yields the same end state. Cart MUSI być `ACTIVE` (CONVERTED carts reject z `ALREADY_COMPLETED`). Rate limit: 30 requests/minute per IP+shop.
2147
+
2148
+ **Variables**:
2149
+ - `$input`: `CartClearPaymentSelectionInput!`
2150
+
2151
+ **Fragments used**: `Cart`, `CartWarning`, `UserError`
2152
+
2153
+ **GraphQL**:
2154
+ ```graphql
2155
+ mutation CartClearPaymentSelection($input: CartClearPaymentSelectionInput!) {
2156
+ cartClearPaymentSelection(input: $input) {
2157
+ cart {
2158
+ ...Cart
2159
+ }
2160
+ userErrors {
2161
+ ...UserError
2162
+ }
2163
+ warnings {
2164
+ ...CartWarning
2165
+ }
2135
2166
  }
2136
2167
  }
2137
2168
  ```
@@ -3052,6 +3083,11 @@ fragment CartLine on CartLine {
3052
3083
  productHandle
3053
3084
  productType
3054
3085
  requiresShipping
3086
+ giftCardRecipient {
3087
+ recipientEmail
3088
+ recipientName
3089
+ message
3090
+ }
3055
3091
  }
3056
3092
  ```
3057
3093
 
@@ -3166,6 +3202,7 @@ fragment Cart on Cart {
3166
3202
  selectedPaymentMethod {
3167
3203
  ...CartSelectedPaymentMethod
3168
3204
  }
3205
+ selectedPaymentInstrumentCode
3169
3206
  appliedGiftCards {
3170
3207
  ...CartAppliedGiftCard
3171
3208
  }
@@ -3465,11 +3502,32 @@ fragment ShopConfigFields on Shop {
3465
3502
  }
3466
3503
  ```
3467
3504
 
3505
+ ### Fragment: `PaymentMethodInstrument` on `PaymentMethodInstrument`
3506
+
3507
+ **Section**: Payment Methods
3508
+
3509
+ **Description**: A single concrete instrument exposed by a gateway provider (BLIK code, branded bank, wallet, card brand). Pass `instrumentCode` as `preferredInstrumentCode` in `cartSelectPaymentMethod` for direct deep-link to that instrument screen on the gateway. `displayHint` is a semantic UX hint (`PIN_ENTRY`, `WALLET_TAP`, `BANK_LIST`, `CARD_FORM`) — storefront branches rendering accordingly. `enabled: false` means the gateway reported the instrument as temporarily disabled — gray out, don't hide.
3510
+
3511
+ **GraphQL**:
3512
+ ```graphql
3513
+ fragment PaymentMethodInstrument on PaymentMethodInstrument {
3514
+ providerCode
3515
+ instrumentCode
3516
+ type
3517
+ displayName
3518
+ displayHint
3519
+ brandImageUrl
3520
+ enabled
3521
+ }
3522
+ ```
3523
+
3468
3524
  ### Fragment: `PaymentMethod` on `PaymentMethod`
3469
3525
 
3470
3526
  **Section**: Payment Methods
3471
3527
 
3472
- **Description**: Single payment method enabled for the shop — type (CARD / BANK_TRANSFER / BLIK / PAYPAL / APPLE_PAY / GOOGLE_PAY / CASH_ON_DELIVERY / OTHER), provider, icon, supported currencies, default flag, sort position. Spread on the checkout payment step.
3528
+ **Description**: Single payment method enabled for the shop — method-centric. `type` is the category (CARD, BLIK, BANK_TRANSFER, CASH_ON_DELIVERY, OTHER) drive iconography here. `provider`, `providersAvailable`, `preferredProvider` are `ProviderCode` enum (UPPERCASE: `PAYU`, `PRZELEWY24`, ...). `available` is `false` when the resolving gateway is temporarily unavailable or reported the method as disabled — gray-out the tile, don't hide it; `unavailableReason` carries the diagnostic. `instruments` lists concrete gateway-side instruments (BLIK code, branded banks, wallets) when the gateway exposes granular data — pass `instrumentCode` as `preferredInstrumentCode` in `cartSelectPaymentMethod` for direct deep-link to that instrument screen on the gateway. Spread on the checkout payment step.
3529
+
3530
+ **Uses fragments**: `PaymentMethodInstrument`
3473
3531
 
3474
3532
  **GraphQL**:
3475
3533
  ```graphql
@@ -3483,6 +3541,13 @@ fragment PaymentMethod on PaymentMethod {
3483
3541
  isDefault
3484
3542
  supportedCurrencies
3485
3543
  position
3544
+ providersAvailable
3545
+ preferredProvider
3546
+ available
3547
+ unavailableReason
3548
+ instruments {
3549
+ ...PaymentMethodInstrument
3550
+ }
3486
3551
  }
3487
3552
  ```
3488
3553
 
@@ -3526,6 +3591,21 @@ fragment PaymentSession on PaymentSession {
3526
3591
  }
3527
3592
  ```
3528
3593
 
3594
+ ### Fragment: `PaymentWarning` on `PaymentWarning`
3595
+
3596
+ **Section**: Payment Methods
3597
+
3598
+ **Description**: Non-blocking signal emitted alongside `userErrors[]` in `paymentCreate` payload — backend state change context (e.g. an auto-clear of preselected instrument after gateway rejection). Pre-translated by backend per shop locale. `code === 'INSTRUMENT_CLEARED_FOR_RETRY'` signals storefront that the next `paymentCreate` will land on the gateway default landing page (server-side cleared `Order.paymentInstrumentCode` after `INSTRUMENT_PRESELECTION_FAILED`). `retryHint` is optional context for UI dispatch — currently unused for `INSTRUMENT_CLEARED_FOR_RETRY`, reserved for future warning codes.
3599
+
3600
+ **GraphQL**:
3601
+ ```graphql
3602
+ fragment PaymentWarning on PaymentWarning {
3603
+ message
3604
+ code
3605
+ retryHint
3606
+ }
3607
+ ```
3608
+
3529
3609
  ### Fragment: `ShipmentEvent` on `ShipmentEvent`
3530
3610
 
3531
3611
  **Section**: Shipments / Tracking
package/mutations.graphql CHANGED
@@ -329,7 +329,11 @@ mutation CartSelectShippingMethod($input: CartSelectShippingMethodInput!) {
329
329
  }
330
330
  }
331
331
 
332
- # Selects a payment method by `paymentMethodId` (UUID from `availablePaymentMethods` query). Validates existence + active status; no pre-authorization performed here. Errors: `PAYMENT_METHOD_REQUIRED`, `INVALID_PAYMENT`, `CART_NOT_FOUND`.
332
+ # Selects a payment method on the cart by category (`methodType` BLIK, CARD, BANK_TRANSFER, ...).
333
+ # Optional `preferredProviderId` overrides the merchant priority when the buyer explicitly picks
334
+ # a gateway from `PaymentMethod.providersAvailable`. The backend resolves the gateway routing
335
+ # from `MerchantPaymentConfig` at `cartComplete`; the selection persisted here is the category.
336
+ # Errors: `PAYMENT_METHOD_REQUIRED`, `CART_NOT_FOUND`, `CART_UNAUTHENTICATED`.
333
337
  mutation CartSelectPaymentMethod($input: CartSelectPaymentMethodInput!) {
334
338
  cartSelectPaymentMethod(input: $input) {
335
339
  cart {
@@ -404,7 +408,7 @@ mutation CartComplete($input: CartCompleteInput!) {
404
408
  }
405
409
  }
406
410
 
407
- # Initiates a payment session for an order created by `cartComplete` — call this when `order.canCreatePayment` is `true` (orders with an offline payment method like cash-on-delivery skip this step). `orderId` is required; `returnUrl` / `cancelUrl` are optional and, when supplied, must point to a verified domain of the shop (open-redirect protected). Branch on the returned `payment.flow`: `ONLINE_REDIRECT` → redirect to `payment.redirectUrl`, `ONLINE_EMBEDDED` → render a widget with `payment.clientSecret`, `INSTANT_DIRECT` → already settled, read `payment.status`. Public, but ownership-checked — an authenticated customer cannot pay for another customer's order. **Idempotent** — calling it again for the same order returns the existing still-valid session instead of creating a duplicate (safe to retry). Rate limit: 5 requests/minute. `userErrors[].code`: `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `INVALID_ID_FORMAT`, `PAYMENT_FAILED`.
411
+ # Initiates a payment session for an order created by `cartComplete` — call this when `order.canCreatePayment` is `true` (orders with an offline payment method like cash-on-delivery skip this step). `orderId` is required; `returnUrl` / `cancelUrl` are optional and, when supplied, must point to a verified domain of the shop (open-redirect protected). Branch on the returned `payment.flow`: `ONLINE_REDIRECT` → redirect to `payment.redirectUrl`, `ONLINE_EMBEDDED` → render a widget with `payment.clientSecret`, `INSTANT_DIRECT` → already settled, read `payment.status`. Public, but ownership-checked — an authenticated customer cannot pay for another customer's order. **Idempotent** — calling it again for the same order returns the existing still-valid session instead of creating a duplicate (safe to retry). Rate limit: 5 requests/minute. `userErrors[].code`: `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `INVALID_ID_FORMAT`, `PAYMENT_FAILED`, `INSTRUMENT_PRESELECTION_FAILED`. `warnings[]` array zawiera `INSTRUMENT_CLEARED_FOR_RETRY` post-auto-clear instrument-specific failure (storefront retry hint: next attempt uses gateway default landing).
408
412
  mutation PaymentCreate($input: PaymentCreateInput!) {
409
413
  paymentCreate(input: $input) {
410
414
  payment {
@@ -413,6 +417,24 @@ mutation PaymentCreate($input: PaymentCreateInput!) {
413
417
  userErrors {
414
418
  ...UserError
415
419
  }
420
+ warnings {
421
+ ...PaymentWarning
422
+ }
423
+ }
424
+ }
425
+
426
+ # Clears all payment selection state on the cart in a single atomic operation. Use for accordion "back to method picker" flows w storefront UI. Idempotent — calling twice yields the same end state. Cart MUSI być `ACTIVE` (CONVERTED carts reject z `ALREADY_COMPLETED`). Rate limit: 30 requests/minute per IP+shop.
427
+ mutation CartClearPaymentSelection($input: CartClearPaymentSelectionInput!) {
428
+ cartClearPaymentSelection(input: $input) {
429
+ cart {
430
+ ...Cart
431
+ }
432
+ userErrors {
433
+ ...UserError
434
+ }
435
+ warnings {
436
+ ...CartWarning
437
+ }
416
438
  }
417
439
  }
418
440
 
package/operations.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "16.0.0",
2
+ "schemaVersion": "17.0.0",
3
3
  "queries": [
4
4
  {
5
5
  "name": "Shop",
@@ -1518,7 +1518,7 @@
1518
1518
  "name": "CartSelectPaymentMethod",
1519
1519
  "kind": "mutation",
1520
1520
  "section": "Cart Completion Mutations",
1521
- "description": "Selects a payment method by `paymentMethodId` (UUID from `availablePaymentMethods` query). Validates existence + active status; no pre-authorization performed here. Errors: `PAYMENT_METHOD_REQUIRED`, `INVALID_PAYMENT`, `CART_NOT_FOUND`.",
1521
+ "description": "Selects a payment method on the cart by category (`methodType` BLIK, CARD, BANK_TRANSFER, ...). Optional `preferredProviderId` overrides the merchant priority when the buyer explicitly picks a gateway from `PaymentMethod.providersAvailable`. The backend resolves the gateway routing from `MerchantPaymentConfig` at `cartComplete`; the selection persisted here is the category. Errors: `PAYMENT_METHOD_REQUIRED`, `CART_NOT_FOUND`, `CART_UNAUTHENTICATED`.",
1522
1522
  "variables": [
1523
1523
  {
1524
1524
  "name": "input",
@@ -1613,7 +1613,7 @@
1613
1613
  "name": "PaymentCreate",
1614
1614
  "kind": "mutation",
1615
1615
  "section": "Cart Completion Mutations",
1616
- "description": "Initiates a payment session for an order created by `cartComplete` — call this when `order.canCreatePayment` is `true` (orders with an offline payment method like cash-on-delivery skip this step). `orderId` is required; `returnUrl` / `cancelUrl` are optional and, when supplied, must point to a verified domain of the shop (open-redirect protected). Branch on the returned `payment.flow`: `ONLINE_REDIRECT` → redirect to `payment.redirectUrl`, `ONLINE_EMBEDDED` → render a widget with `payment.clientSecret`, `INSTANT_DIRECT` → already settled, read `payment.status`. Public, but ownership-checked — an authenticated customer cannot pay for another customer's order. **Idempotent** — calling it again for the same order returns the existing still-valid session instead of creating a duplicate (safe to retry). Rate limit: 5 requests/minute. `userErrors[].code`: `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `INVALID_ID_FORMAT`, `PAYMENT_FAILED`.",
1616
+ "description": "Initiates a payment session for an order created by `cartComplete` — call this when `order.canCreatePayment` is `true` (orders with an offline payment method like cash-on-delivery skip this step). `orderId` is required; `returnUrl` / `cancelUrl` are optional and, when supplied, must point to a verified domain of the shop (open-redirect protected). Branch on the returned `payment.flow`: `ONLINE_REDIRECT` → redirect to `payment.redirectUrl`, `ONLINE_EMBEDDED` → render a widget with `payment.clientSecret`, `INSTANT_DIRECT` → already settled, read `payment.status`. Public, but ownership-checked — an authenticated customer cannot pay for another customer's order. **Idempotent** — calling it again for the same order returns the existing still-valid session instead of creating a duplicate (safe to retry). Rate limit: 5 requests/minute. `userErrors[].code`: `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `INVALID_ID_FORMAT`, `PAYMENT_FAILED`, `INSTRUMENT_PRESELECTION_FAILED`. `warnings[]` array zawiera `INSTRUMENT_CLEARED_FOR_RETRY` post-auto-clear instrument-specific failure (storefront retry hint: next attempt uses gateway default landing).",
1617
1617
  "variables": [
1618
1618
  {
1619
1619
  "name": "input",
@@ -1623,9 +1623,29 @@
1623
1623
  ],
1624
1624
  "fragmentRefs": [
1625
1625
  "PaymentSession",
1626
+ "PaymentWarning",
1626
1627
  "UserError"
1627
1628
  ],
1628
- "body": "mutation PaymentCreate($input: PaymentCreateInput!) {\n paymentCreate(input: $input) {\n payment {\n ...PaymentSession\n }\n userErrors {\n ...UserError\n }\n }\n}"
1629
+ "body": "mutation PaymentCreate($input: PaymentCreateInput!) {\n paymentCreate(input: $input) {\n payment {\n ...PaymentSession\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...PaymentWarning\n }\n }\n}"
1630
+ },
1631
+ {
1632
+ "name": "CartClearPaymentSelection",
1633
+ "kind": "mutation",
1634
+ "section": "Cart Completion Mutations",
1635
+ "description": "Clears all payment selection state on the cart in a single atomic operation. Use for accordion \"back to method picker\" flows w storefront UI. Idempotent — calling twice yields the same end state. Cart MUSI być `ACTIVE` (CONVERTED carts reject z `ALREADY_COMPLETED`). Rate limit: 30 requests/minute per IP+shop.",
1636
+ "variables": [
1637
+ {
1638
+ "name": "input",
1639
+ "type": "CartClearPaymentSelectionInput!",
1640
+ "defaultValue": null
1641
+ }
1642
+ ],
1643
+ "fragmentRefs": [
1644
+ "Cart",
1645
+ "CartWarning",
1646
+ "UserError"
1647
+ ],
1648
+ "body": "mutation CartClearPaymentSelection($input: CartClearPaymentSelectionInput!) {\n cartClearPaymentSelection(input: $input) {\n cart {\n ...Cart\n }\n userErrors {\n ...UserError\n }\n warnings {\n ...CartWarning\n }\n }\n}"
1629
1649
  },
1630
1650
  {
1631
1651
  "name": "ReturnCreate",
@@ -2124,7 +2144,7 @@
2124
2144
  "CartLineCost",
2125
2145
  "ProductVariant"
2126
2146
  ],
2127
- "body": "fragment CartLine on CartLine {\n id\n quantity\n variant {\n ...ProductVariant\n }\n cost {\n ...CartLineCost\n }\n attributes {\n key\n value\n }\n attributeSelections {\n ...AttributeSelection\n }\n productId\n productTitle\n productHandle\n productType\n requiresShipping\n}",
2147
+ "body": "fragment CartLine on CartLine {\n id\n quantity\n variant {\n ...ProductVariant\n }\n cost {\n ...CartLineCost\n }\n attributes {\n key\n value\n }\n attributeSelections {\n ...AttributeSelection\n }\n productId\n productTitle\n productHandle\n productType\n requiresShipping\n giftCardRecipient {\n recipientEmail\n recipientName\n message\n }\n}",
2128
2148
  "onType": "CartLine"
2129
2149
  },
2130
2150
  {
@@ -2177,7 +2197,7 @@
2177
2197
  "MailingAddress",
2178
2198
  "PageInfo"
2179
2199
  ],
2180
- "body": "fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost {\n ...CartCost\n }\n lines(first: 100) {\n edges {\n cursor\n node {\n ... on CartLine {\n ...CartLine\n }\n }\n }\n nodes {\n ... on CartLine {\n ...CartLine\n }\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n buyerIdentity {\n ...CartBuyerIdentity\n }\n discountCodes {\n ...CartDiscountCode\n }\n discountAllocations {\n ...CartDiscountAllocation\n }\n note\n attributes {\n key\n value\n }\n email\n phone\n shippingAddress {\n ...MailingAddress\n }\n billingAddress {\n ...MailingAddress\n }\n selectedShippingMethod {\n ...CartShippingMethod\n }\n selectedPaymentMethod {\n ...CartSelectedPaymentMethod\n }\n appliedGiftCards {\n ...CartAppliedGiftCard\n }\n requiresShipping\n createdAt\n updatedAt\n status\n completedOrder {\n id\n orderNumber\n accessToken\n status\n paymentStatus\n fulfillmentStatus\n }\n}",
2200
+ "body": "fragment Cart on Cart {\n id\n checkoutUrl\n totalQuantity\n cost {\n ...CartCost\n }\n lines(first: 100) {\n edges {\n cursor\n node {\n ... on CartLine {\n ...CartLine\n }\n }\n }\n nodes {\n ... on CartLine {\n ...CartLine\n }\n }\n pageInfo {\n ...PageInfo\n }\n totalCount\n }\n buyerIdentity {\n ...CartBuyerIdentity\n }\n discountCodes {\n ...CartDiscountCode\n }\n discountAllocations {\n ...CartDiscountAllocation\n }\n note\n attributes {\n key\n value\n }\n email\n phone\n shippingAddress {\n ...MailingAddress\n }\n billingAddress {\n ...MailingAddress\n }\n selectedShippingMethod {\n ...CartShippingMethod\n }\n selectedPaymentMethod {\n ...CartSelectedPaymentMethod\n }\n selectedPaymentInstrumentCode\n appliedGiftCards {\n ...CartAppliedGiftCard\n }\n requiresShipping\n createdAt\n updatedAt\n status\n completedOrder {\n id\n orderNumber\n accessToken\n status\n paymentStatus\n fulfillmentStatus\n }\n}",
2181
2201
  "onType": "Cart"
2182
2202
  },
2183
2203
  {
@@ -2330,13 +2350,25 @@
2330
2350
  "onType": "Shop"
2331
2351
  },
2332
2352
  {
2333
- "name": "PaymentMethod",
2353
+ "name": "PaymentMethodInstrument",
2334
2354
  "kind": "fragment",
2335
2355
  "section": "Payment Methods",
2336
- "description": "Single payment method enabled for the shop type (CARD / BANK_TRANSFER / BLIK / PAYPAL / APPLE_PAY / GOOGLE_PAY / CASH_ON_DELIVERY / OTHER), provider, icon, supported currencies, default flag, sort position. Spread on the checkout payment step.",
2356
+ "description": "A single concrete instrument exposed by a gateway provider (BLIK code, branded bank, wallet, card brand). Pass `instrumentCode` as `preferredInstrumentCode` in `cartSelectPaymentMethod` for direct deep-link to that instrument screen on the gateway. `displayHint` is a semantic UX hint (`PIN_ENTRY`, `WALLET_TAP`, `BANK_LIST`, `CARD_FORM`) — storefront branches rendering accordingly. `enabled: false` means the gateway reported the instrument as temporarily disabled — gray out, don't hide.",
2337
2357
  "variables": [],
2338
2358
  "fragmentRefs": [],
2339
- "body": "fragment PaymentMethod on PaymentMethod {\n id\n name\n provider\n type\n icon\n description\n isDefault\n supportedCurrencies\n position\n}",
2359
+ "body": "fragment PaymentMethodInstrument on PaymentMethodInstrument {\n providerCode\n instrumentCode\n type\n displayName\n displayHint\n brandImageUrl\n enabled\n}",
2360
+ "onType": "PaymentMethodInstrument"
2361
+ },
2362
+ {
2363
+ "name": "PaymentMethod",
2364
+ "kind": "fragment",
2365
+ "section": "Payment Methods",
2366
+ "description": "Single payment method enabled for the shop — method-centric. `type` is the category (CARD, BLIK, BANK_TRANSFER, CASH_ON_DELIVERY, OTHER) — drive iconography here. `provider`, `providersAvailable`, `preferredProvider` are `ProviderCode` enum (UPPERCASE: `PAYU`, `PRZELEWY24`, ...). `available` is `false` when the resolving gateway is temporarily unavailable or reported the method as disabled — gray-out the tile, don't hide it; `unavailableReason` carries the diagnostic. `instruments` lists concrete gateway-side instruments (BLIK code, branded banks, wallets) when the gateway exposes granular data — pass `instrumentCode` as `preferredInstrumentCode` in `cartSelectPaymentMethod` for direct deep-link to that instrument screen on the gateway. Spread on the checkout payment step.",
2367
+ "variables": [],
2368
+ "fragmentRefs": [
2369
+ "PaymentMethodInstrument"
2370
+ ],
2371
+ "body": "fragment PaymentMethod on PaymentMethod {\n id\n name\n provider\n type\n icon\n description\n isDefault\n supportedCurrencies\n position\n providersAvailable\n preferredProvider\n available\n unavailableReason\n instruments {\n ...PaymentMethodInstrument\n }\n}",
2340
2372
  "onType": "PaymentMethod"
2341
2373
  },
2342
2374
  {
@@ -2361,6 +2393,16 @@
2361
2393
  "body": "fragment PaymentSession on PaymentSession {\n id\n orderId\n flow\n provider\n redirectUrl\n clientSecret\n status\n expiresAt\n}",
2362
2394
  "onType": "PaymentSession"
2363
2395
  },
2396
+ {
2397
+ "name": "PaymentWarning",
2398
+ "kind": "fragment",
2399
+ "section": "Payment Methods",
2400
+ "description": "Non-blocking signal emitted alongside `userErrors[]` in `paymentCreate` payload — backend state change context (e.g. an auto-clear of preselected instrument after gateway rejection). Pre-translated by backend per shop locale. `code === 'INSTRUMENT_CLEARED_FOR_RETRY'` signals storefront that the next `paymentCreate` will land on the gateway default landing page (server-side cleared `Order.paymentInstrumentCode` after `INSTRUMENT_PRESELECTION_FAILED`). `retryHint` is optional context for UI dispatch — currently unused for `INSTRUMENT_CLEARED_FOR_RETRY`, reserved for future warning codes.",
2401
+ "variables": [],
2402
+ "fragmentRefs": [],
2403
+ "body": "fragment PaymentWarning on PaymentWarning {\n message\n code\n retryHint\n}",
2404
+ "onType": "PaymentWarning"
2405
+ },
2364
2406
  {
2365
2407
  "name": "ShipmentEvent",
2366
2408
  "kind": "fragment",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doswiftly/storefront-operations",
3
- "version": "16.0.0",
3
+ "version": "17.0.0",
4
4
  "description": "GraphQL operations for DoSwiftly Storefront - SSOT from backend",
5
5
  "homepage": "https://doswiftly.pl",
6
6
  "publishConfig": {