@doswiftly/storefront-operations 14.0.0 → 15.1.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/schema.graphql CHANGED
@@ -32,12 +32,14 @@ directive @inContext(
32
32
  preferredLocationId: ID
33
33
  ) on MUTATION | QUERY | SUBSCRIPTION
34
34
 
35
- """Generic attribute"""
35
+ """
36
+ A generic key/value attribute — used for line item properties and other free-form metadata.
37
+ """
36
38
  type Attribute {
37
- """Attribute key"""
39
+ """Attribute key."""
38
40
  key: String!
39
41
 
40
- """Attribute value"""
42
+ """Attribute value. Null when the key is set without an associated value."""
41
43
  value: String
42
44
  }
43
45
 
@@ -230,64 +232,88 @@ type AttributeRangeBounds {
230
232
  min: Float
231
233
  }
232
234
 
233
- """Typed snapshot of customer-filled attribute selection (Faza 1 R5)"""
235
+ """
236
+ A configurator selection that the buyer filled in on a line item — typed snapshot taken at add-to-cart and frozen on the resulting order. Distinct from `CartLine.attributes` (free-form key/value line item properties): selections are validated against the product attribute definition, carry pricing surcharges and can link to a hidden component variant.
237
+ """
234
238
  type AttributeSelection {
235
- """AttributeDefinition ID (snapshot at addItem)"""
239
+ """ID of the attribute definition this selection refers to."""
236
240
  attributeDefinitionId: ID!
237
241
 
238
- """AttributeDefinition name (snapshot)"""
242
+ """Display name of the attribute at the moment it was added to the cart."""
239
243
  attributeName: String!
240
244
 
241
- """Billing mode; null = informational only"""
245
+ """
246
+ How the surcharge is charged: BUNDLED (folded into the line unit price) or SEPARATE_LINE (its own line on the order). Null when the selection is informational and has no surcharge.
247
+ """
242
248
  billingMode: AttributeBillingMode
243
249
 
244
- """Filling mode (snapshot)"""
250
+ """
251
+ Who supplies the value: MERCHANT (set on the product), CUSTOMER (filled at add-to-cart) or BOTH.
252
+ """
245
253
  fillingMode: AttributeFillingMode!
246
254
 
247
- """Linked ProductVariant ID for component stock (Faza 1.5)"""
255
+ """
256
+ Linked variant whose stock is decremented when this option is chosen — used by the hidden-product configurator pattern (e.g. finish, accessory). Null when no component stock is tied to the selection.
257
+ """
248
258
  linkedVariantId: ID
249
259
 
250
- """Selected option ID (SELECT/RADIO/CHECKBOX)"""
260
+ """
261
+ Selected option ID for single-choice types (SELECT, RADIO, single-CHECKBOX).
262
+ """
251
263
  optionId: ID
252
264
 
253
- """Selected option IDs (MULTI_SELECT — Faza 2)"""
265
+ """
266
+ Selected option IDs for multi-choice types (MULTI_SELECT, CHECKBOX list).
267
+ """
254
268
  optionIds: [ID!]
255
269
 
256
- """Selected option label (snapshot)"""
270
+ """Display label of the selected option at the moment of selection."""
257
271
  optionLabel: String
258
272
 
259
273
  """
260
- Surcharge amount snapshot (FIXED = grosze; PERCENT = thousandths of percent)
274
+ Surcharge attached to this selection in minor units of the shop currency when `surchargeType` is FIXED; thousandths of a percent (per mille of a percent) when PERCENT. Already reflected in the line cost.
261
275
  """
262
276
  surchargeAmount: Int!
263
277
 
264
- """Surcharge type (snapshot)"""
278
+ """
279
+ How the surcharge is calculated — FIXED (absolute amount) or PERCENT. Null when the selection has no surcharge.
280
+ """
265
281
  surchargeType: AttributeOptionSurchargeType
266
282
 
267
- """Tax class ID (snapshot); null = inherit from variant"""
283
+ """
284
+ Tax class applied to this selection. Null means the line inherits its tax class from the variant.
285
+ """
268
286
  taxClassId: ID
269
287
 
270
- """Free-text value (TEXT/TEXTAREA/NUMBER/DATE)"""
288
+ """Free-text value for TEXT, TEXTAREA, NUMBER or DATE attribute types."""
271
289
  textValue: String
272
290
 
273
- """AttributeDefinition type (snapshot)"""
291
+ """
292
+ Attribute data type (TEXT, SELECT, RADIO, CHECKBOX, NUMBER, DATE, COLOR, etc.). Drives which value field is populated.
293
+ """
274
294
  type: AttributeType!
275
295
  }
276
296
 
277
297
  """
278
- Customer-filled attribute selection (Faza 1 R5 — server-side validated)
298
+ A configurator selection on a cart line — server-side validated against the product attribute definition. The value goes into one of `optionId`, `optionIds` or `textValue` depending on the attribute type.
279
299
  """
280
300
  input AttributeSelectionInput {
281
- """AttributeDefinition ID"""
301
+ """ID of the attribute definition this selection refers to."""
282
302
  attributeDefinitionId: ID!
283
303
 
284
- """Selected option ID for SELECT/RADIO/CHECKBOX"""
304
+ """
305
+ Selected option ID for single-choice attribute types (SELECT, RADIO, single-CHECKBOX).
306
+ """
285
307
  optionId: ID
286
308
 
287
- """Selected option IDs for MULTI_SELECT (Faza 2)"""
309
+ """
310
+ Selected option IDs for multi-choice attribute types (MULTI_SELECT, CHECKBOX list).
311
+ """
288
312
  optionIds: [ID!]
289
313
 
290
- """Free-text value for TEXT/TEXTAREA/NUMBER/DATE"""
314
+ """
315
+ Free-text value for TEXT, TEXTAREA, NUMBER or DATE attribute types (max 2000 chars).
316
+ """
291
317
  textValue: String
292
318
  }
293
319
 
@@ -370,54 +396,89 @@ input AvailableFiltersInput {
370
396
  searchQuery: String
371
397
  }
372
398
 
373
- """Available payment methods for checkout"""
399
+ """
400
+ Result of `availablePaymentMethods` — the methods to render in the payment picker plus the merchant default.
401
+ """
374
402
  type AvailablePaymentMethods {
375
- """Default payment method"""
403
+ """
404
+ Method marked as the merchant default — pre-select in the picker. Null when no default is configured.
405
+ """
376
406
  defaultMethod: PaymentMethod
377
407
 
378
- """List of available payment methods"""
408
+ """Payment methods active for the shop, sorted by `position`."""
379
409
  methods: [PaymentMethod!]!
380
410
  }
381
411
 
382
- """Available shipping method"""
412
+ """
413
+ A shipping method offered to the buyer for the current cart and destination — what to render in the shipping picker.
414
+ """
383
415
  type AvailableShippingMethod {
384
- """Carrier information"""
416
+ """
417
+ Carrier behind the method. Null when the merchant configured a custom non-carrier method.
418
+ """
385
419
  carrier: ShippingCarrier
386
420
 
387
- """Method description"""
421
+ """
422
+ Destination type — HOME (courier to the street address), PICKUP_POINT (staffed counter) or LOCKER (parcel locker). Drives whether the storefront must render a pickup-point picker for the method instead of inferring it from the method name.
423
+ """
424
+ deliveryType: DeliveryType!
425
+
426
+ """
427
+ Optional method description shown under the name (e.g. "Saturday delivery available").
428
+ """
388
429
  description: String
389
430
 
390
- """Estimated delivery time"""
431
+ """
432
+ Estimated delivery window. Null when the merchant has not configured an estimate for this method.
433
+ """
391
434
  estimatedDelivery: DeliveryEstimate
392
435
 
393
- """Free shipping progress if threshold exists"""
436
+ """
437
+ Progress towards the free-shipping threshold for this method, when one is configured. Null otherwise.
438
+ """
394
439
  freeShippingProgress: FreeShippingProgress
395
440
 
396
- """Shipping method ID (used as handle for selection)"""
441
+ """
442
+ Stable ID of the shipping method. Pass to `cartSelectShippingMethod` to select it.
443
+ """
397
444
  id: ID!
398
445
 
399
- """Whether shipping is free"""
446
+ """
447
+ True when the price is zero — the method is free for this cart (e.g. free-shipping threshold met).
448
+ """
400
449
  isFree: Boolean!
401
450
 
402
- """Method name"""
451
+ """Display name of the method (e.g. "DPD Standard")."""
403
452
  name: String!
404
453
 
405
- """Shipping price"""
454
+ """
455
+ Cost of the method for the current cart (in the buyer preferred currency).
456
+ """
406
457
  price: Money!
407
458
 
408
- """Sort order for display"""
459
+ """
460
+ Merchant-configured display position — lower values come first in the picker.
461
+ """
409
462
  sortOrder: Int!
410
463
  }
411
464
 
412
- """Available shipping methods result"""
465
+ """
466
+ Result of `availableShippingMethods` / `cart.availableShippingMethods` — the methods to render plus optional free-shipping progress and any user errors.
467
+ """
413
468
  type AvailableShippingMethodsPayload {
414
- """Best free shipping progress across all methods"""
469
+ """
470
+ Best free-shipping progress across all returned methods. Use to render a single banner above the picker.
471
+ """
415
472
  freeShippingProgress: FreeShippingProgress
416
473
 
417
- """Available shipping methods"""
474
+ """
475
+ Methods available for the current cart and destination, sorted by `sortOrder`.
476
+ """
418
477
  methods: [AvailableShippingMethod!]!
419
478
 
420
- """User errors"""
479
+ """
480
+ Validation / availability errors — e.g. `DIGITAL_ONLY_NO_SHIPPING` when the cart contains only non-physical items. Branch on `code`.
481
+ """
421
482
  userErrors: [UserError!]!
422
483
  }
423
484
 
@@ -805,61 +866,79 @@ type CarrierShippingRate {
805
866
  serviceName: String!
806
867
  }
807
868
 
808
- """Shopping cart"""
869
+ """
870
+ A shopping cart — the buyer-facing aggregate that holds items, totals, buyer identity, addresses, selected shipping and payment methods, gift cards and discount codes through to checkout completion.
871
+ """
809
872
  type Cart implements Node {
810
- """Gift cards applied do tego koszyka (debited at cartComplete)"""
873
+ """
874
+ Gift cards attached to the cart. Each card is debited by its `appliedAmount` when the cart completes.
875
+ """
811
876
  appliedGiftCards: [CartAppliedGiftCard!]!
812
877
 
813
- """Cart attributes"""
878
+ """
879
+ Cart-level custom attributes (free-form key/value). Use for cart-wide metadata such as B2B PO number or marketing source. Replace (not merge) the list with `cartUpdateAttributes`.
880
+ """
814
881
  attributes: [CartAttribute!]!
815
882
 
816
883
  """Available payment methods dla tego cart (shop-configured providers)"""
817
884
  availablePaymentMethods: [PaymentMethod!]!
818
885
 
819
886
  """
820
- Cart-aware shipping methods discovery. Returns empty methods + DIGITAL_ONLY_NO_SHIPPING user error when the cart contains only non-physical items (digital, gift card, service, subscription). Physical / mixed carts get the same method computation as the standalone `availableShippingMethods` query but with subtotal and weight pulled from the cart aggregate.
887
+ Shipping methods available for this cart at the given destination. Reads the cart subtotal and weight directly — for pre-cart preview (e.g. a product detail page calculator) use the top-level `availableShippingMethods(address, cart)` query instead. Returns an empty `methods` list plus a `DIGITAL_ONLY_NO_SHIPPING` user error when the cart has no shippable items; the storefront can use this to skip the shipping step entirely.
821
888
  """
822
889
  availableShippingMethods(address: ShippingAddressInput!): AvailableShippingMethodsPayload!
823
890
 
824
891
  """
825
- Billing address ustawiony przez cartSetBillingAddress (jeśli różny od shipping)
892
+ Billing address attached to the cart via `cartSetBillingAddress`. Null when the buyer reuses the shipping address as billing (the order will then mirror the shipping address).
826
893
  """
827
894
  billingAddress: MailingAddress
828
895
 
829
- """Buyer identity information"""
896
+ """
897
+ Buyer identity attached to the cart (email, phone, country and language hints). Null on a fresh cart before any identity is captured.
898
+ """
830
899
  buyerIdentity: CartBuyerIdentity
831
900
 
832
- """Checkout URL"""
901
+ """
902
+ Hosted checkout URL the storefront may redirect to as a fallback. The recommended flow is to drive checkout through SDK mutations (`cartSetShippingAddress`, `cartSelectShippingMethod`, `cartSelectPaymentMethod`, `cartComplete`).
903
+ """
833
904
  checkoutUrl: URL
834
905
 
835
- """Cost breakdown"""
906
+ """
907
+ Cost breakdown for the cart (subtotal, tax, shipping, discount, grand total).
908
+ """
836
909
  cost: CartCost!
837
910
 
838
- """Creation timestamp"""
911
+ """When the cart was created (ISO 8601)."""
839
912
  createdAt: DateTime!
840
913
 
841
- """Discount allocations"""
914
+ """
915
+ Per-code discount amounts that make up `cost.totalDiscount`. Render line-item discount breakdown from this list.
916
+ """
842
917
  discountAllocations: [CartDiscountAllocation!]!
843
918
 
844
- """Applied discount codes"""
919
+ """Discount codes attached to the cart with their applicability flag."""
845
920
  discountCodes: [CartDiscountCode!]!
846
921
 
847
922
  """
848
- Customer email (D2 persisted via cartUpdateBuyerIdentity). Convenience accessor; pełen kontekst w buyerIdentity.email.
923
+ Convenience accessor — buyer email as last set via `cartUpdateBuyerIdentity`. The same value is available on `buyerIdentity.email`.
849
924
  """
850
925
  email: String
851
926
 
852
- """Unique cart identifier"""
927
+ """
928
+ Stable cart identifier — persist in a cookie / local store between sessions.
929
+ """
853
930
  id: ID!
854
931
 
855
- """Cart line items (Relay Connection)"""
932
+ """Lines in the cart (paginated, Relay Connection)."""
856
933
  lines(after: String, before: String, first: Float, last: Float): CartLineConnection!
857
934
 
858
- """Cart note"""
935
+ """
936
+ Buyer-supplied note (e.g. delivery instructions). Free-form, surfaced to the merchant on the order.
937
+ """
859
938
  note: String
860
939
 
861
940
  """
862
- Customer phone (D2). Convenience accessor; pełen kontekst w buyerIdentity.phone.
941
+ Convenience accessor — buyer phone as last set via `cartUpdateBuyerIdentity`. The same value is available on `buyerIdentity.phone`.
863
942
  """
864
943
  phone: String
865
944
 
@@ -867,43 +946,51 @@ type Cart implements Node {
867
946
  recommendations(first: Int = 4): CartRecommendations
868
947
 
869
948
  """
870
- True if any line in the cart requires physical shipping. False when every line is non-physical (digital, gift card, service, subscription). Use as the single signal to render or skip the shipping picker in checkout.
949
+ True when at least one line in the cart requires physical shipping. False when every line is non-physical (digital, gift card, service, subscription). Use as the single signal to render or skip the shipping step in checkout.
871
950
  """
872
951
  requiresShipping: Boolean!
873
952
 
874
- """Selected payment method (PayU/Stripe/COD/etc.)"""
953
+ """
954
+ The payment method currently selected on the cart. Null until the buyer picks a method via `cartSelectPaymentMethod`.
955
+ """
875
956
  selectedPaymentMethod: PaymentMethod
876
957
 
877
958
  """
878
- Selected shipping method (D8 term unification wcześniej selectedShippingRate)
959
+ The shipping method currently selected on the cart (label + cost). Null until the buyer picks a method.
879
960
  """
880
961
  selectedShippingMethod: CartShippingMethod
881
962
 
882
- """Shipping address ustawiony przez cartSetShippingAddress"""
963
+ """
964
+ Shipping address attached to the cart via `cartSetShippingAddress`. Null until set.
965
+ """
883
966
  shippingAddress: MailingAddress
884
967
 
885
- """Total quantity of all items"""
968
+ """
969
+ Sum of `quantity` across all lines — the badge number for the cart icon.
970
+ """
886
971
  totalQuantity: Int!
887
972
 
888
- """Last update timestamp"""
973
+ """When the cart was last modified (ISO 8601)."""
889
974
  updatedAt: DateTime!
890
975
  }
891
976
 
892
- """Result of adding lines to cart"""
977
+ """Result of `cartAddLines`."""
893
978
  type CartAddLinesPayload {
894
- """Updated cart"""
979
+ """The updated cart on success; null when `userErrors` is non-empty."""
895
980
  cart: Cart
896
981
 
897
982
  """
898
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
983
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `CART_NOT_FOUND`, `NOT_ENOUGH_IN_STOCK`).
899
984
  """
900
985
  userErrors: [UserError!]!
901
986
 
902
- """Non-fatal warnings"""
987
+ """Non-fatal advisories — the mutation itself succeeded."""
903
988
  warnings: [CartWarning!]!
904
989
  }
905
990
 
906
- """Mailing address input dla cart fulfillment mutations"""
991
+ """
992
+ Mailing address used as the shipping or billing address on a cart. Carries an optional pickup point (for parcel locker / collection-point delivery) and optional B2B fields (`taxId`, `regon`).
993
+ """
907
994
  input CartAddressInput {
908
995
  """City"""
909
996
  city: String!
@@ -923,9 +1010,19 @@ input CartAddressInput {
923
1010
  """Phone number"""
924
1011
  phone: String
925
1012
 
1013
+ """
1014
+ Selected pickup point — required when the chosen shipping method has a deliveryType other than HOME (parcel locker / collection point).
1015
+ """
1016
+ pickupPoint: PickupPointInput
1017
+
926
1018
  """Postal / ZIP code"""
927
1019
  postalCode: String!
928
1020
 
1021
+ """
1022
+ Buyer business registry number for B2B invoicing (Polish REGON). Persisted on the resulting order at checkout completion.
1023
+ """
1024
+ regon: String
1025
+
929
1026
  """State / province"""
930
1027
  state: String
931
1028
 
@@ -934,153 +1031,209 @@ input CartAddressInput {
934
1031
 
935
1032
  """Second line of street address"""
936
1033
  streetLine2: String
1034
+
1035
+ """
1036
+ Buyer tax ID for B2B invoicing (Polish NIP). Persisted on the resulting order at checkout completion.
1037
+ """
1038
+ taxId: String
937
1039
  }
938
1040
 
939
- """Gift card applied to a cart"""
1041
+ """
1042
+ A gift card that the buyer has attached to the cart. The card is debited when the cart completes.
1043
+ """
940
1044
  type CartAppliedGiftCard {
941
- """Amount applied to this cart"""
1045
+ """Amount of this gift card that will be applied to the cart total."""
942
1046
  appliedAmount: Money!
943
1047
 
944
- """Last 4 characters of the gift card code"""
1048
+ """
1049
+ Stable identifier of this applied gift card on the cart. Pass it to `cartRemoveGiftCard` so the storefront never has to hold the full gift card code.
1050
+ """
1051
+ id: ID!
1052
+
1053
+ """
1054
+ Last 4 characters of the gift card code — useful when several cards are applied.
1055
+ """
945
1056
  lastCharacters: String!
946
1057
 
947
- """Masked gift card code for display (np. "****-****-****-ABCD")"""
1058
+ """Masked code safe for display (e.g. "****-****-****-ABCD")."""
948
1059
  maskedCode: String!
949
1060
 
950
- """Remaining balance on the gift card after this cart"""
1061
+ """Remaining balance on the gift card after this cart is completed."""
951
1062
  remainingBalance: Money!
952
1063
  }
953
1064
 
954
- """Input dla cartApplyGiftCard mutation"""
1065
+ """Input for `cartApplyGiftCard`."""
955
1066
  input CartApplyGiftCardInput {
956
- """Cart ID"""
1067
+ """ID of the cart to update."""
957
1068
  cartId: ID!
958
1069
 
959
- """Gift card code (np. ABCD-1234-EFGH-5678)"""
1070
+ """
1071
+ Full gift card code entered by the buyer (e.g. "ABCD-1234-EFGH-5678"). Max 64 chars.
1072
+ """
960
1073
  giftCardCode: String!
961
1074
  }
962
1075
 
963
- """Result of applying gift card to cart"""
1076
+ """Result of `cartApplyGiftCard`."""
964
1077
  type CartApplyGiftCardPayload {
965
- """Updated cart z appliedGiftCards"""
1078
+ """The updated cart with the gift card included in `appliedGiftCards`."""
966
1079
  cart: Cart
967
1080
 
968
1081
  """
969
- User errors (CartErrorCode-namespaced np. GIFT_CARD_NOT_FOUND, GIFT_CARD_DEPLETED, GIFT_CARD_UNUSABLE)
1082
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `GIFT_CARD_NOT_FOUND`, `GIFT_CARD_DEPLETED`, `GIFT_CARD_UNUSABLE`).
970
1083
  """
971
1084
  userErrors: [UserError!]!
972
1085
 
973
- """Non-fatal warnings"""
1086
+ """Non-fatal advisories — the mutation itself succeeded."""
974
1087
  warnings: [CartWarning!]!
975
1088
  }
976
1089
 
977
- """Cart line attribute"""
1090
+ """
1091
+ Custom attribute on a cart line — free-form key/value used for line item properties such as engraving text or gift wrap flags.
1092
+ """
978
1093
  type CartAttribute {
979
- """Attribute key"""
1094
+ """Attribute key (e.g. "giftWrap", "engraving")."""
980
1095
  key: String!
981
1096
 
982
- """Attribute value"""
1097
+ """Attribute value. Null when the key is set without an associated value."""
983
1098
  value: String
984
1099
  }
985
1100
 
986
- """Input for cart attribute"""
1101
+ """
1102
+ A custom cart attribute key/value pair. Used by `cartUpdateAttributes`; the full list is replaced on each call.
1103
+ """
987
1104
  input CartAttributeInput {
988
- """Attribute key"""
1105
+ """Attribute key (max 255 chars)."""
989
1106
  key: String!
990
1107
 
991
- """Attribute value"""
1108
+ """Attribute value (max 500 chars). Omit to set the key without a value."""
992
1109
  value: String
993
1110
  }
994
1111
 
995
- """Buyer identity information"""
1112
+ """
1113
+ Buyer identity attached to the cart — email, phone, locale hints used during checkout and on the resulting order.
1114
+ """
996
1115
  type CartBuyerIdentity {
997
- """ISO 3166-1 alpha-2 country code"""
1116
+ """
1117
+ Buyer country (ISO 3166-1 alpha-2). Hint for pricing, tax and shipping eligibility before an address is provided.
1118
+ """
998
1119
  countryCode: CountryCode
999
1120
 
1000
- """Customer ID"""
1121
+ """
1122
+ Customer record ID when the cart is owned by a signed-in customer. Null for guest carts.
1123
+ """
1001
1124
  customerId: ID
1002
1125
 
1003
- """Customer email"""
1126
+ """Buyer email — receives the order confirmation when the cart completes."""
1004
1127
  email: String
1005
1128
 
1006
- """ISO 639-1 preferred language code"""
1129
+ """
1130
+ Buyer preferred language (ISO 639-1). Used for the order confirmation email and any localised content.
1131
+ """
1007
1132
  languageCode: LanguageCode
1008
1133
 
1009
- """Customer phone"""
1134
+ """Buyer phone number, free-form (validated only for length)."""
1010
1135
  phone: String
1011
1136
  }
1012
1137
 
1013
- """Input for buyer identity"""
1138
+ """
1139
+ Buyer identity to attach to a cart. All fields are optional — only the supplied fields are updated.
1140
+ """
1014
1141
  input CartBuyerIdentityInput {
1015
- """ISO 3166-1 alpha-2 country code"""
1142
+ """
1143
+ Buyer country (ISO 3166-1 alpha-2). Hint for currency, tax and shipping eligibility before an address is set.
1144
+ """
1016
1145
  countryCode: CountryCode
1017
1146
 
1018
- """Customer ID"""
1147
+ """
1148
+ ID of a signed-in customer that owns this cart. Pass to bind a guest cart to a customer record.
1149
+ """
1019
1150
  customerId: ID
1020
1151
 
1021
- """Customer email"""
1152
+ """Buyer email address. Persisted to the order at checkout completion."""
1022
1153
  email: String
1023
1154
 
1024
- """ISO 639-1 preferred language code"""
1155
+ """
1156
+ Buyer preferred language (ISO 639-1). Used for the order confirmation email and localised content.
1157
+ """
1025
1158
  languageCode: LanguageCode
1026
1159
 
1027
- """Customer phone"""
1160
+ """Buyer phone number. Free-form; max 30 chars."""
1028
1161
  phone: String
1029
1162
  }
1030
1163
 
1031
- """Input dla cartComplete mutation finalizuje cart do Order"""
1164
+ """Input for `cartComplete`finalises the cart into an `Order`."""
1032
1165
  input CartCompleteInput {
1033
- """Cart ID do skompletowania"""
1166
+ """ID of the cart to complete."""
1034
1167
  cartId: ID!
1035
1168
 
1036
1169
  """
1037
- Optional idempotency key — zapobiega duplicate Orders przy retry / network issue (jeśli null, generowany z cartId + minute timestamp)
1170
+ Optional idempotency key — guards against duplicate orders on retry / network issue. When omitted, the server derives one from the cart ID and the current minute, which is sufficient for the typical "user double-clicks the pay button" case.
1038
1171
  """
1039
1172
  idempotencyKey: String
1040
1173
  }
1041
1174
 
1042
1175
  """
1043
- Result of completing cart — transition cart order (per D4 NO paymentUrl). Cart NIE w payload po complete koszyk jest CONVERTED/locked.
1176
+ Result of `cartComplete`. The cart is converted into an `Order` and locked no further mutations are accepted on it. Payment is initiated separately via `paymentCreate` (after checking `order.canCreatePayment`).
1044
1177
  """
1045
1178
  type CartCompletePayload {
1046
1179
  """
1047
- Order created z cart. Zapewnia canCreatePayment + paymentMethodType (Phase 4 ResolveFields) dla decyzji storefront przycisku "Zapłać".
1180
+ The order created from the cart. Carries `canCreatePayment` and `paymentMethodType` signals so the storefront can decide whether to render a "Pay now" button or send the buyer straight to the confirmation page (for offline methods).
1048
1181
  """
1049
1182
  order: Order
1050
1183
 
1051
1184
  """
1052
- User errors (CartErrorCode-namespaced np. INSUFFICIENT_STOCK, SHIPPING_ADDRESS_REQUIRED, PAYMENT_METHOD_REQUIRED, EMAIL_REQUIRED)
1185
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `NOT_ENOUGH_IN_STOCK`, `SHIPPING_ADDRESS_REQUIRED`, `SHIPPING_METHOD_REQUIRED`, `PAYMENT_METHOD_REQUIRED`, `EMAIL_REQUIRED`, `ALREADY_COMPLETED`).
1053
1186
  """
1054
1187
  userErrors: [UserError!]!
1055
1188
 
1056
- """Non-fatal warnings"""
1189
+ """Non-fatal advisories — the mutation itself succeeded."""
1057
1190
  warnings: [CartWarning!]!
1058
1191
  }
1059
1192
 
1060
- """Cart cost breakdown"""
1193
+ """
1194
+ Cart cost breakdown. All amounts are in the buyer preferred currency (auto-converted when the shop runs multi-currency). `total` is what the buyer will pay at checkout — no need to recompute.
1195
+ """
1061
1196
  type CartCost {
1062
- """Checkout charge amount."""
1197
+ """
1198
+ Additional fixed checkout fee configured by the shop (e.g. small-order surcharge). Null when no such fee applies.
1199
+ """
1063
1200
  checkoutCharge: Money
1064
1201
 
1065
1202
  """Opt-in: checkoutCharge with conversion transparency."""
1066
1203
  checkoutChargeWithConversion: PriceMoney
1067
1204
 
1068
- """Subtotal before taxes and shipping. Default field."""
1205
+ """Subtotal of items in the cart before taxes, shipping and discounts."""
1069
1206
  subtotal: Money!
1070
1207
 
1071
1208
  """Opt-in: subtotal with full conversion transparency."""
1072
1209
  subtotalWithConversion: PriceMoney
1073
1210
 
1074
- """Total amount including taxes."""
1211
+ """
1212
+ Grand total the buyer will pay — includes taxes, discounts and any selected shipping. Use this directly on the checkout summary instead of summing `subtotal` + extras.
1213
+ """
1075
1214
  total: Money!
1076
1215
 
1077
- """Total duty amount."""
1216
+ """
1217
+ Aggregated discount across the cart — the sum of every entry in `discountAllocations`. Returns an amount of 0 when no discount applies.
1218
+ """
1219
+ totalDiscount: Money!
1220
+
1221
+ """
1222
+ Total customs duty on the cart. Null when no duty applies (most domestic orders).
1223
+ """
1078
1224
  totalDuty: Money
1079
1225
 
1080
1226
  """Opt-in: totalDuty with conversion transparency."""
1081
1227
  totalDutyWithConversion: PriceMoney
1082
1228
 
1083
- """Total tax amount."""
1229
+ """
1230
+ Cost of the currently selected shipping method. Null until a shipping method is selected — a selected free-shipping method returns an amount of 0, so null unambiguously means "no method chosen yet".
1231
+ """
1232
+ totalShipping: Money
1233
+
1234
+ """
1235
+ Total tax across all lines. Null when tax has not yet been calculated for this cart (e.g. before an address is set in tax-inclusive shops).
1236
+ """
1084
1237
  totalTax: Money
1085
1238
 
1086
1239
  """Opt-in: totalTax with conversion transparency."""
@@ -1090,150 +1243,194 @@ type CartCost {
1090
1243
  totalWithConversion: PriceMoney
1091
1244
  }
1092
1245
 
1093
- """Input for creating a cart"""
1246
+ """
1247
+ Input for `cartCreate`. All fields are optional — pass only what you have at cart creation time.
1248
+ """
1094
1249
  input CartCreateInput {
1095
- """Cart attributes"""
1250
+ """
1251
+ Cart-level custom attributes to set on the new cart (up to 50 entries).
1252
+ """
1096
1253
  attributes: [CartAttributeInput!]
1097
1254
 
1098
- """Buyer identity"""
1255
+ """
1256
+ Buyer identity to attach to the new cart (email, phone, customer ID, country, language).
1257
+ """
1099
1258
  buyerIdentity: CartBuyerIdentityInput
1100
1259
 
1101
- """Discount codes to apply"""
1260
+ """
1261
+ Discount codes to apply at creation (up to 10). Equivalent to calling `cartDiscountCodesUpdate` immediately after creating the cart.
1262
+ """
1102
1263
  discountCodes: [String!]
1103
1264
 
1104
- """Customer email (Phase 3 D2 — merge funkcjonalności checkoutCreate)"""
1265
+ """
1266
+ Buyer email — shortcut for `buyerIdentity.email`. If both are provided, this field wins.
1267
+ """
1105
1268
  email: String
1106
1269
 
1107
- """Initial cart lines"""
1270
+ """Initial lines to add to the cart (up to 100)."""
1108
1271
  lines: [CartLineInput!]
1109
1272
 
1110
- """Cart note"""
1273
+ """Buyer-supplied note (max 1000 chars), e.g. delivery instructions."""
1111
1274
  note: String
1112
1275
 
1113
- """Shipping address (Phase 3 — fulfillment context w jednym round-trip)"""
1276
+ """
1277
+ Shipping address to attach to the new cart — lets the storefront skip a follow-up `cartSetShippingAddress` call.
1278
+ """
1114
1279
  shippingAddress: CartAddressInput
1115
1280
  }
1116
1281
 
1117
- """Result of cart creation"""
1282
+ """Result of `cartCreate`."""
1118
1283
  type CartCreatePayload {
1119
- """Created cart"""
1284
+ """The created cart on success; null when `userErrors` is non-empty."""
1120
1285
  cart: Cart
1121
1286
 
1122
1287
  """
1123
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1288
+ Business / validation errors. Each entry carries a stable `code` (e.g. `CART_NOT_FOUND`, `NOT_ENOUGH_IN_STOCK`, `INVALID_MERCHANDISE_LINE`) — branch on `code`, never on `message`.
1124
1289
  """
1125
1290
  userErrors: [UserError!]!
1126
1291
 
1127
- """Non-fatal warnings"""
1292
+ """
1293
+ Non-fatal advisories (informational only; the mutation itself succeeded).
1294
+ """
1128
1295
  warnings: [CartWarning!]!
1129
1296
  }
1130
1297
 
1131
- """Discount allocation showing how discount is applied"""
1298
+ """
1299
+ Per-code discount amount applied to the cart. Sum these for the aggregate total — or read `CartCost.totalDiscount`.
1300
+ """
1132
1301
  type CartDiscountAllocation {
1133
- """Discount amount"""
1302
+ """Amount discounted by this code on the cart."""
1134
1303
  amount: Money!
1135
1304
 
1136
- """Discount code"""
1305
+ """The discount code that produced this allocation."""
1137
1306
  discountCode: String!
1138
1307
  }
1139
1308
 
1140
- """Discount code applied to cart"""
1309
+ """A discount code that the buyer has attached to the cart."""
1141
1310
  type CartDiscountCode {
1142
- """Discount code string"""
1311
+ """The code string as entered by the buyer (case is preserved as stored)."""
1143
1312
  code: String!
1144
1313
 
1145
- """Whether the code is applicable"""
1314
+ """
1315
+ Whether this code currently produces a discount on the cart. False when the code is recognised but its conditions are not met (e.g. minimum-order, customer-eligibility, or product-set restrictions) — keep the chip visible and surface the reason.
1316
+ """
1146
1317
  isApplicable: Boolean!
1147
1318
  }
1148
1319
 
1149
- """Result of applying discount codes"""
1320
+ """Result of `cartDiscountCodesUpdate`."""
1150
1321
  type CartDiscountCodesUpdatePayload {
1151
- """Updated cart"""
1322
+ """The updated cart on success."""
1152
1323
  cart: Cart
1153
1324
 
1154
1325
  """
1155
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1326
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `INVALID_DISCOUNT_CODE`).
1156
1327
  """
1157
1328
  userErrors: [UserError!]!
1158
1329
 
1159
- """Non-fatal warnings"""
1330
+ """Non-fatal advisories — the mutation itself succeeded."""
1160
1331
  warnings: [CartWarning!]!
1161
1332
  }
1162
1333
 
1163
- """Single line item in the cart"""
1334
+ """
1335
+ A single line item in the cart — one variant, a quantity and the data attached to it (cost, attributes, configurator selections).
1336
+ """
1164
1337
  type CartLine {
1165
- """Typed customer-filled attribute selections (surcharge + tax snapshot)"""
1338
+ """
1339
+ Typed configurator selections filled in by the buyer (snapshot from add-to-cart). Validated server-side against the product attribute definition; carries any pricing surcharge.
1340
+ """
1166
1341
  attributeSelections: [AttributeSelection!]!
1167
1342
 
1168
- """Line Item Properties — raw key/value pairs"""
1343
+ """
1344
+ Free-form custom attributes (line item properties) attached to this line — engraving text, gift wrap, B2B PO line reference, etc.
1345
+ """
1169
1346
  attributes: [Attribute!]!
1170
1347
 
1171
- """Cost information for this line"""
1348
+ """
1349
+ Per-line cost breakdown (unit price, subtotal, total, optional compare-at).
1350
+ """
1172
1351
  cost: CartLineCost!
1173
1352
 
1174
- """Unique line identifier"""
1353
+ """
1354
+ Stable line identifier. Use it to address the line in `cartUpdateLines` / `cartRemoveLines`.
1355
+ """
1175
1356
  id: ID!
1176
1357
 
1177
- """Parent product handle (slug)"""
1358
+ """
1359
+ URL handle (slug) of the parent product — link target for the cart drawer (denormalised).
1360
+ """
1178
1361
  productHandle: String
1179
1362
 
1180
- """Parent product ID"""
1363
+ """
1364
+ ID of the parent product. Denormalised so a cart drawer renders without an extra round-trip.
1365
+ """
1181
1366
  productId: ID
1182
1367
 
1183
- """Parent product title"""
1368
+ """Display title of the parent product (denormalised)."""
1184
1369
  productTitle: String
1185
1370
 
1186
- """Parent product type"""
1371
+ """
1372
+ Type of the parent product (PHYSICAL, DIGITAL, SERVICE, SUBSCRIPTION, GIFT_CARD). Drives whether the line requires shipping and which post-purchase flow applies.
1373
+ """
1187
1374
  productType: ProductTypeEnum
1188
1375
 
1189
- """Quantity of this item"""
1376
+ """
1377
+ Quantity of the variant in this line (≥ 1; set to 0 with `cartUpdateLines` to remove).
1378
+ """
1190
1379
  quantity: Int!
1191
1380
 
1192
1381
  """
1193
- True if this line item requires physical shipping (productType=PHYSICAL). False for digital, gift card, service, and subscription items. Use to skip the shipping step in checkout when every line is non-physical.
1382
+ True when this line requires physical shipping (`productType` = PHYSICAL). False for digital, gift card, service and subscription items. Use together with `Cart.requiresShipping` to decide whether to render the shipping step.
1194
1383
  """
1195
1384
  requiresShipping: Boolean!
1196
1385
 
1197
- """Product variant being purchased"""
1386
+ """
1387
+ The variant being purchased — fresh data (current price, image, stock).
1388
+ """
1198
1389
  variant: ProductVariant!
1199
1390
  }
1200
1391
 
1201
- """Paginated cart lines"""
1392
+ """Paginated list of cart lines (Relay Connection)."""
1202
1393
  type CartLineConnection {
1203
- """Cart line edges with cursors"""
1394
+ """Edges with the line and its cursor — use for cursor-based pagination."""
1204
1395
  edges: [CartLineEdge!]!
1205
1396
 
1206
- """Cart line nodes (shortcut for edges.map(e => e.node))"""
1397
+ """Cart line nodes — convenience shortcut for `edges.map(e => e.node)`."""
1207
1398
  nodes: [CartLine!]!
1208
1399
 
1209
- """Pagination info"""
1400
+ """Cursor pagination info (`hasNextPage`, `endCursor`, etc.)."""
1210
1401
  pageInfo: PageInfo!
1211
1402
 
1212
- """Total count of cart lines"""
1403
+ """Total number of lines in the cart across all pages."""
1213
1404
  totalCount: Int!
1214
1405
  }
1215
1406
 
1216
- """Cost information for a single cart line"""
1407
+ """Cost breakdown for a single cart line."""
1217
1408
  type CartLineCost {
1218
- """Compare-at price per unit if discounted."""
1409
+ """
1410
+ Strike-through compare-at unit price when the line is on sale. Null when the line is not discounted; show the strike-through only when this is present and greater than `pricePerUnit`.
1411
+ """
1219
1412
  compareAtPricePerUnit: Money
1220
1413
 
1221
1414
  """Opt-in: compareAtPricePerUnit with conversion transparency."""
1222
1415
  compareAtPricePerUnitWithConversion: PriceMoney
1223
1416
 
1224
- """Price per unit. Default field — shop base currency."""
1417
+ """
1418
+ Unit price of the line item in the shop base currency. Use this for per-unit display.
1419
+ """
1225
1420
  pricePerUnit: Money!
1226
1421
 
1227
1422
  """Opt-in: pricePerUnit with conversion transparency."""
1228
1423
  pricePerUnitWithConversion: PriceMoney
1229
1424
 
1230
- """Subtotal before discounts."""
1425
+ """Line subtotal before line-level discounts (`pricePerUnit` × quantity)."""
1231
1426
  subtotal: Money!
1232
1427
 
1233
1428
  """Opt-in: subtotal with conversion transparency."""
1234
1429
  subtotalWithConversion: PriceMoney
1235
1430
 
1236
- """Total after discounts."""
1431
+ """
1432
+ Line total after any line-level discounts and surcharges. This is what the buyer pays for the line.
1433
+ """
1237
1434
  total: Money!
1238
1435
 
1239
1436
  """Opt-in: total with conversion transparency."""
@@ -1249,35 +1446,45 @@ type CartLineEdge {
1249
1446
  node: CartLine!
1250
1447
  }
1251
1448
 
1252
- """Input for adding a line to cart"""
1449
+ """
1450
+ A line to add to the cart — variant, quantity and optional custom attributes / configurator selections.
1451
+ """
1253
1452
  input CartLineInput {
1254
- """Customer-filled AttributeDefinition selections (Faza 1 R5)"""
1453
+ """
1454
+ Typed configurator selections to apply to this line — validated against the product attribute definition; pricing surcharges are taken from a snapshot at add-to-cart.
1455
+ """
1255
1456
  attributeSelections: [AttributeSelectionInput!]
1256
1457
 
1257
- """Line attributes (Line Item Properties)"""
1458
+ """
1459
+ Free-form custom attributes (line item properties) — e.g. engraving text, gift wrap, B2B PO line reference. Up to 50 entries.
1460
+ """
1258
1461
  attributes: [AttributeInput!]
1259
1462
 
1260
- """Quantity to add"""
1463
+ """Quantity to add (1 to 9999). Defaults to 1 when omitted."""
1261
1464
  quantity: Int! = 1
1262
1465
 
1263
- """Product variant ID"""
1466
+ """ID of the product variant being purchased."""
1264
1467
  variantId: ID!
1265
1468
  }
1266
1469
 
1267
- """Input for updating a cart line"""
1470
+ """
1471
+ An update to apply to an existing cart line — new quantity (set to 0 to remove) and optional attribute updates.
1472
+ """
1268
1473
  input CartLineUpdateInput {
1269
1474
  """
1270
- Updated customer-filled attribute selections (null preserves; [] clears)
1475
+ Replacement list of configurator selections. Omit (or pass null) to keep the existing selections; pass an empty array to clear them.
1271
1476
  """
1272
1477
  attributeSelections: [AttributeSelectionInput!]
1273
1478
 
1274
- """Updated Line Item Properties (null preserves)"""
1479
+ """
1480
+ Replacement list of custom attributes on the line. Omit (or pass null) to keep the existing list; pass an empty array to clear it.
1481
+ """
1275
1482
  attributes: [AttributeInput!]
1276
1483
 
1277
- """Cart line ID to update"""
1484
+ """ID of the cart line to update (`CartLine.id`)."""
1278
1485
  id: ID!
1279
1486
 
1280
- """New quantity"""
1487
+ """New quantity. Use 0 to remove the line from the cart."""
1281
1488
  quantity: Int!
1282
1489
  }
1283
1490
 
@@ -1290,130 +1497,142 @@ type CartRecommendations {
1290
1497
  youMayAlsoLike: [ProductRecommendation!]!
1291
1498
  }
1292
1499
 
1293
- """Input dla cartRemoveGiftCard mutation"""
1500
+ """Input for `cartRemoveGiftCard`."""
1294
1501
  input CartRemoveGiftCardInput {
1295
- """Cart ID"""
1502
+ """ID of the cart to update."""
1296
1503
  cartId: ID!
1297
1504
 
1298
- """Gift card code (matching wartości aplikowanej karty)"""
1299
- giftCardCode: String!
1505
+ """
1506
+ ID of the applied gift card to remove — `CartAppliedGiftCard.id` from the cart.
1507
+ """
1508
+ giftCardId: ID!
1300
1509
  }
1301
1510
 
1302
- """Result of removing gift card from cart"""
1511
+ """Result of `cartRemoveGiftCard`."""
1303
1512
  type CartRemoveGiftCardPayload {
1304
- """Updated cart (gift card usunięty z appliedGiftCards)"""
1513
+ """The updated cart with the gift card removed from `appliedGiftCards`."""
1305
1514
  cart: Cart
1306
1515
 
1307
- """User errors (CartErrorCode-namespaced)"""
1516
+ """
1517
+ Business / validation errors carrying a stable `CartErrorCode` in `code`.
1518
+ """
1308
1519
  userErrors: [UserError!]!
1309
1520
 
1310
- """Non-fatal warnings"""
1521
+ """Non-fatal advisories — the mutation itself succeeded."""
1311
1522
  warnings: [CartWarning!]!
1312
1523
  }
1313
1524
 
1314
- """Result of removing cart lines"""
1525
+ """Result of `cartRemoveLines`."""
1315
1526
  type CartRemoveLinesPayload {
1316
- """Updated cart"""
1527
+ """The updated cart on success; null when `userErrors` is non-empty."""
1317
1528
  cart: Cart
1318
1529
 
1319
1530
  """
1320
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1531
+ Business / validation errors carrying a stable `CartErrorCode` in `code`.
1321
1532
  """
1322
1533
  userErrors: [UserError!]!
1323
1534
 
1324
- """Non-fatal warnings"""
1535
+ """Non-fatal advisories — the mutation itself succeeded."""
1325
1536
  warnings: [CartWarning!]!
1326
1537
  }
1327
1538
 
1328
- """Input dla cartSelectPaymentMethod mutation"""
1539
+ """Input for `cartSelectPaymentMethod`."""
1329
1540
  input CartSelectPaymentMethodInput {
1330
- """Cart ID"""
1541
+ """ID of the cart to update."""
1331
1542
  cartId: ID!
1332
1543
 
1333
- """Payment method (integration provider) ID"""
1544
+ """
1545
+ ID of the chosen payment method (matches a `PaymentMethod.id` from `availablePaymentMethods`).
1546
+ """
1334
1547
  paymentMethodId: ID!
1335
1548
  }
1336
1549
 
1337
- """Result of selecting payment method on cart"""
1550
+ """Result of `cartSelectPaymentMethod`."""
1338
1551
  type CartSelectPaymentMethodPayload {
1339
- """Updated cart (selectedPaymentMethod populated)"""
1552
+ """The updated cart with `selectedPaymentMethod` populated."""
1340
1553
  cart: Cart
1341
1554
 
1342
1555
  """
1343
- User errors (CartErrorCode-namespaced np. PAYMENT_METHOD_REQUIRED, INVALID_PAYMENT)
1556
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `PAYMENT_METHOD_REQUIRED`, `INVALID_PAYMENT_METHOD`, `PAYMENT_METHOD_NOT_SUPPORTED`).
1344
1557
  """
1345
1558
  userErrors: [UserError!]!
1346
1559
 
1347
- """Non-fatal warnings"""
1560
+ """Non-fatal advisories — the mutation itself succeeded."""
1348
1561
  warnings: [CartWarning!]!
1349
1562
  }
1350
1563
 
1351
- """Input dla cartSelectShippingMethod mutation (D8 term unification)"""
1564
+ """Input for `cartSelectShippingMethod`."""
1352
1565
  input CartSelectShippingMethodInput {
1353
- """Cart ID"""
1566
+ """ID of the cart to update."""
1354
1567
  cartId: ID!
1355
1568
 
1356
1569
  """
1357
- Shipping method ID (handle z available shipping methods query). Typed ID! per D8 rename argument rateId → shippingMethodId.
1570
+ ID of the chosen shipping method (matches an `AvailableShippingMethod.id` from `cart.availableShippingMethods`).
1358
1571
  """
1359
1572
  shippingMethodId: ID!
1360
1573
  }
1361
1574
 
1362
- """Result of selecting shipping method on cart (D8 term unification)"""
1575
+ """Result of `cartSelectShippingMethod`."""
1363
1576
  type CartSelectShippingMethodPayload {
1364
- """Updated cart (selectedShippingMethod populated)"""
1577
+ """
1578
+ The updated cart with `selectedShippingMethod` populated and `cost.totalShipping` updated.
1579
+ """
1365
1580
  cart: Cart
1366
1581
 
1367
1582
  """
1368
- User errors (CartErrorCode-namespaced np. SHIPPING_METHOD_REQUIRED, ZIP_CODE_NOT_SUPPORTED)
1583
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `SHIPPING_METHOD_REQUIRED`, `FORBIDDEN_SHIPPING_METHOD`, `ZIP_CODE_NOT_SUPPORTED`).
1369
1584
  """
1370
1585
  userErrors: [UserError!]!
1371
1586
 
1372
- """Non-fatal warnings"""
1587
+ """Non-fatal advisories — the mutation itself succeeded."""
1373
1588
  warnings: [CartWarning!]!
1374
1589
  }
1375
1590
 
1376
- """Input dla cartSetBillingAddress mutation"""
1591
+ """Input for `cartSetBillingAddress`."""
1377
1592
  input CartSetBillingAddressInput {
1378
- """Billing address (zostawia shipping bez zmian)"""
1593
+ """New billing address. The shipping address is left unchanged."""
1379
1594
  address: CartAddressInput!
1380
1595
 
1381
- """Cart ID"""
1596
+ """ID of the cart to update."""
1382
1597
  cartId: ID!
1383
1598
  }
1384
1599
 
1385
- """Result of setting cart billing address"""
1600
+ """Result of `cartSetBillingAddress`."""
1386
1601
  type CartSetBillingAddressPayload {
1387
- """Updated cart"""
1602
+ """The updated cart with the new billing address."""
1388
1603
  cart: Cart
1389
1604
 
1390
- """User errors (CartErrorCode-namespaced)"""
1605
+ """
1606
+ Business / validation errors carrying a stable `CartErrorCode` in `code`.
1607
+ """
1391
1608
  userErrors: [UserError!]!
1392
1609
 
1393
- """Non-fatal warnings"""
1610
+ """Non-fatal advisories — the mutation itself succeeded."""
1394
1611
  warnings: [CartWarning!]!
1395
1612
  }
1396
1613
 
1397
- """Input dla cartSetShippingAddress mutation"""
1614
+ """Input for `cartSetShippingAddress`."""
1398
1615
  input CartSetShippingAddressInput {
1399
- """Shipping address"""
1616
+ """
1617
+ New shipping address. Replaces any previous shipping address on the cart.
1618
+ """
1400
1619
  address: CartAddressInput!
1401
1620
 
1402
- """Cart ID"""
1621
+ """ID of the cart to update."""
1403
1622
  cartId: ID!
1404
1623
  }
1405
1624
 
1406
- """Result of setting cart shipping address"""
1625
+ """Result of `cartSetShippingAddress`."""
1407
1626
  type CartSetShippingAddressPayload {
1408
- """Updated cart"""
1627
+ """The updated cart with the new shipping address."""
1409
1628
  cart: Cart
1410
1629
 
1411
1630
  """
1412
- User errors (CartErrorCode-namespaced np. INVALID_ADDRESS, EMAIL_REQUIRED)
1631
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `INVALID_ADDRESS`, `EMAIL_REQUIRED`, `PICKUP_POINT_REQUIRED`).
1413
1632
  """
1414
1633
  userErrors: [UserError!]!
1415
1634
 
1416
- """Non-fatal warnings"""
1635
+ """Non-fatal advisories — the mutation itself succeeded."""
1417
1636
  warnings: [CartWarning!]!
1418
1637
  }
1419
1638
 
@@ -1429,119 +1648,135 @@ input CartShippingInput {
1429
1648
  totalWeight: Int
1430
1649
  }
1431
1650
 
1432
- """Shipping method selected on a cart (D8 term unification)"""
1651
+ """
1652
+ The shipping method currently selected on a cart, with its display label and cost.
1653
+ """
1433
1654
  type CartShippingMethod {
1434
- """Shipping method (rate) handle"""
1655
+ """
1656
+ Handle of the selected shipping method — matches the `id` of an `AvailableShippingMethod`.
1657
+ """
1435
1658
  handle: ID!
1436
1659
 
1437
- """Shipping cost"""
1660
+ """Cost of the selected shipping method."""
1438
1661
  price: Money!
1439
1662
 
1440
- """Display title (e.g. "DPD Standard 2 dni")"""
1663
+ """Display title for the checkout summary (e.g. "DPD Standard, 2 days")."""
1441
1664
  title: String!
1442
1665
  }
1443
1666
 
1444
- """Result of updating cart attributes"""
1667
+ """Result of `cartUpdateAttributes`."""
1445
1668
  type CartUpdateAttributesPayload {
1446
- """Updated cart"""
1669
+ """The updated cart on success."""
1447
1670
  cart: Cart
1448
1671
 
1449
1672
  """
1450
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1673
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `CART_ATTRIBUTES_UPDATE_FAILED`).
1451
1674
  """
1452
1675
  userErrors: [UserError!]!
1453
1676
 
1454
- """Non-fatal warnings"""
1677
+ """Non-fatal advisories — the mutation itself succeeded."""
1455
1678
  warnings: [CartWarning!]!
1456
1679
  }
1457
1680
 
1458
- """Result of updating buyer identity"""
1681
+ """Result of `cartUpdateBuyerIdentity`."""
1459
1682
  type CartUpdateBuyerIdentityPayload {
1460
- """Updated cart"""
1683
+ """The updated cart on success."""
1461
1684
  cart: Cart
1462
1685
 
1463
1686
  """
1464
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1687
+ Business / validation errors carrying a stable `CartErrorCode` in `code`.
1465
1688
  """
1466
1689
  userErrors: [UserError!]!
1467
1690
 
1468
- """Non-fatal warnings"""
1691
+ """Non-fatal advisories — the mutation itself succeeded."""
1469
1692
  warnings: [CartWarning!]!
1470
1693
  }
1471
1694
 
1472
1695
  """
1473
- Input dla cartUpdateGiftCardRecipient mutation (gift card line item recipient info)
1696
+ Input for `cartUpdateGiftCardRecipient` sets the recipient details for a gift card line item.
1474
1697
  """
1475
1698
  input CartUpdateGiftCardRecipientInput {
1476
- """Cart ID"""
1699
+ """ID of the cart to update."""
1477
1700
  cartId: ID!
1478
1701
 
1479
- """Cart line item ID (musi reprezentować gift card SKU)"""
1702
+ """ID of the cart line; the line must be a gift card SKU."""
1480
1703
  lineItemId: ID!
1481
1704
 
1482
- """Personalised message dla recipienta (max 500 znaków)"""
1705
+ """Personalised message included with the gift card (max 500 chars)."""
1483
1706
  message: String
1484
1707
 
1485
- """Recipient email (gift card delivery target)"""
1708
+ """Recipient email — where the gift card code will be delivered."""
1486
1709
  recipientEmail: String
1487
1710
 
1488
- """Recipient display name"""
1711
+ """Recipient display name."""
1489
1712
  recipientName: String
1490
1713
  }
1491
1714
 
1492
- """Result of updating gift card recipient info on cart line item"""
1715
+ """Result of `cartUpdateGiftCardRecipient`."""
1493
1716
  type CartUpdateGiftCardRecipientPayload {
1494
- """Updated cart"""
1717
+ """
1718
+ The updated cart with the new gift card recipient info on the target line.
1719
+ """
1495
1720
  cart: Cart
1496
1721
 
1497
- """User errors (CartErrorCode-namespaced)"""
1722
+ """
1723
+ Business / validation errors carrying a stable `CartErrorCode` in `code`.
1724
+ """
1498
1725
  userErrors: [UserError!]!
1499
1726
 
1500
- """Non-fatal warnings"""
1727
+ """Non-fatal advisories — the mutation itself succeeded."""
1501
1728
  warnings: [CartWarning!]!
1502
1729
  }
1503
1730
 
1504
- """Result of updating cart lines"""
1731
+ """Result of `cartUpdateLines`."""
1505
1732
  type CartUpdateLinesPayload {
1506
- """Updated cart"""
1733
+ """The updated cart on success; null when `userErrors` is non-empty."""
1507
1734
  cart: Cart
1508
1735
 
1509
1736
  """
1510
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1737
+ Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `CART_NOT_FOUND`, `NOT_ENOUGH_IN_STOCK`).
1511
1738
  """
1512
1739
  userErrors: [UserError!]!
1513
1740
 
1514
- """Non-fatal warnings"""
1741
+ """Non-fatal advisories — the mutation itself succeeded."""
1515
1742
  warnings: [CartWarning!]!
1516
1743
  }
1517
1744
 
1518
- """Result of updating cart note"""
1745
+ """Result of `cartUpdateNote`."""
1519
1746
  type CartUpdateNotePayload {
1520
- """Updated cart"""
1747
+ """The updated cart on success."""
1521
1748
  cart: Cart
1522
1749
 
1523
1750
  """
1524
- User errors (code is namespaced e.g. CART_NOT_FOUND, CART_LINE_NOT_FOUND)
1751
+ Business / validation errors carrying a stable `CartErrorCode` in `code`.
1525
1752
  """
1526
1753
  userErrors: [UserError!]!
1527
1754
 
1528
- """Non-fatal warnings"""
1755
+ """Non-fatal advisories — the mutation itself succeeded."""
1529
1756
  warnings: [CartWarning!]!
1530
1757
  }
1531
1758
 
1532
1759
  """Cart warning (non-fatal advisory)"""
1533
1760
  type CartWarning {
1534
- """Typed warning code"""
1761
+ """
1762
+ Stable machine-readable warning code. Branch on this for UI behaviour — never on `message` (translated, locale-dependent).
1763
+ """
1535
1764
  code: CartWarningCode!
1536
1765
 
1537
- """Warning message"""
1766
+ """
1767
+ Human-readable warning message — informational, the mutation itself succeeded.
1768
+ """
1538
1769
  message: String!
1539
1770
 
1540
- """Target identifier (cart line ID lub field path)"""
1771
+ """
1772
+ What the warning is about — a cart line ID when the warning refers to a specific item, or a field path otherwise.
1773
+ """
1541
1774
  target: String!
1542
1775
  }
1543
1776
 
1544
- """Non-fatal cart warnings"""
1777
+ """
1778
+ Stable, machine-readable codes for non-fatal cart warnings. The mutation succeeded; the storefront can surface a toast or stay silent based on the code.
1779
+ """
1545
1780
  enum CartWarningCode {
1546
1781
  MERCHANDISE_NOT_AVAILABLE
1547
1782
  MERCHANDISE_NOT_ENOUGH_STOCK
@@ -1748,7 +1983,7 @@ type Country implements Node {
1748
1983
  unitSystem: UnitSystem!
1749
1984
  }
1750
1985
 
1751
- """ISO 3166-1 alpha-2 country code"""
1986
+ """ISO 3166-1 alpha-2 country code (2-letter uppercase, e.g. PL, DE, US)."""
1752
1987
  enum CountryCode {
1753
1988
  AT
1754
1989
  AU
@@ -1816,7 +2051,7 @@ type Currency {
1816
2051
  symbolPosition: CurrencySymbolPosition!
1817
2052
  }
1818
2053
 
1819
- """ISO 4217 currency code"""
2054
+ """ISO 4217 currency code (3-letter uppercase, e.g. PLN, EUR, USD)."""
1820
2055
  enum CurrencyCode {
1821
2056
  AED
1822
2057
  AFN
@@ -2030,90 +2265,122 @@ enum CurrencySymbolPosition {
2030
2265
  BEFORE
2031
2266
  }
2032
2267
 
2033
- """Customer - registered user"""
2268
+ """
2269
+ A registered customer of the shop — identity, profile, B2B fields, saved addresses and order history. Returned by `customer` (currently authenticated) and `customerSignup`.
2270
+ """
2034
2271
  type Customer implements Node {
2035
- """Saved addresses (Relay Connection)"""
2272
+ """
2273
+ Saved address book of the customer (Relay Connection). Use to render an address picker on checkout.
2274
+ """
2036
2275
  addresses(after: String, before: String, first: Int, last: Int): MailingAddressConnection!
2037
2276
 
2038
2277
  """Customer custom field values (post-Opcja A unified custom fields)."""
2039
2278
  attributes(namespace: String): [EntityAttributeField!]!
2040
2279
 
2041
- """Company name (populated for COMPANY type)"""
2280
+ """
2281
+ Company name. Populated when `customerType` is COMPANY; null for INDIVIDUAL profiles.
2282
+ """
2042
2283
  companyName: String
2043
2284
 
2044
- """Account creation date"""
2285
+ """When the customer account was created (ISO 8601)."""
2045
2286
  createdAt: DateTime!
2046
2287
 
2047
- """Business type discriminator (INDIVIDUAL/COMPANY)"""
2288
+ """
2289
+ Profile type — INDIVIDUAL (B2C) or COMPANY (B2B). When COMPANY, the company fields below are populated.
2290
+ """
2048
2291
  customerType: CustomerType!
2049
2292
 
2050
- """Default address"""
2293
+ """
2294
+ Default address pre-selected in checkout pickers. Null when the customer has no saved addresses.
2295
+ """
2051
2296
  defaultAddress: MailingAddress
2052
2297
 
2053
- """Display name"""
2298
+ """
2299
+ Display name — typically `firstName lastName`, with sensible fallback to email when neither is set. Render directly in the UI.
2300
+ """
2054
2301
  displayName: String!
2055
2302
 
2056
- """Email address"""
2303
+ """Customer email address (login identity)."""
2057
2304
  email: String!
2058
2305
 
2059
- """Email marketing consent state"""
2306
+ """
2307
+ Marketing consent state (NOT_SUBSCRIBED, PENDING, SUBSCRIBED, UNSUBSCRIBED, REDACTED, INVALID). Drive newsletter UI and opt-in / opt-out controls from this value.
2308
+ """
2060
2309
  emailMarketing: EmailMarketingState!
2061
2310
 
2062
- """First name"""
2311
+ """Customer first name."""
2063
2312
  firstName: String
2064
2313
 
2065
- """Unique identifier"""
2314
+ """Stable identifier of the customer."""
2066
2315
  id: ID!
2067
2316
 
2068
- """Whether email is verified"""
2317
+ """True when the customer has confirmed ownership of their email address."""
2069
2318
  isEmailVerified: Boolean!
2070
2319
 
2071
- """Last name"""
2320
+ """Customer last name."""
2072
2321
  lastName: String
2073
2322
 
2074
- """Total orders count (UnsignedInt64 — BigInt-safe)"""
2323
+ """
2324
+ Total number of orders the customer has placed. Stringified for BigInt safety.
2325
+ """
2075
2326
  orderCount: UnsignedInt64!
2076
2327
 
2077
- """Customer orders"""
2328
+ """
2329
+ Orders placed by this customer (Relay Connection). Use for the order history page.
2330
+ """
2078
2331
  orders(after: String, first: Int = 10): OrderConnection!
2079
2332
 
2080
- """Phone number"""
2333
+ """Customer phone number (free-form)."""
2081
2334
  phone: String
2082
2335
 
2083
- """Polish business registry number — REGON"""
2336
+ """
2337
+ Customer-wide Polish business registry number (REGON, 9 or 14 digits with checksum).
2338
+ """
2084
2339
  regon: String
2085
2340
 
2086
- """Customer tags for segmentation (e.g. vip, wholesale, b2b)"""
2341
+ """
2342
+ Merchant-assigned segmentation tags (e.g. "vip", "wholesale", "b2b"). Use to customise UI / pricing rules on the storefront.
2343
+ """
2087
2344
  tags: [String!]!
2088
2345
 
2089
- """Polish tax ID — NIP"""
2346
+ """
2347
+ Customer-wide Polish tax ID (NIP, 10 digits with checksum). Default for new addresses; can be overridden per address via `MailingAddress.taxId`.
2348
+ """
2090
2349
  taxId: String
2091
2350
 
2092
- """Total amount spent"""
2351
+ """Lifetime amount the customer has spent (sum of paid orders)."""
2093
2352
  totalSpent: Money!
2094
2353
 
2095
- """Last update date"""
2354
+ """When the customer profile was last modified (ISO 8601)."""
2096
2355
  updatedAt: DateTime!
2097
2356
 
2098
- """EU VAT number"""
2357
+ """
2358
+ Customer-wide EU VAT number (e.g. `PL1234567890`). Default for new addresses; can be overridden per address via `MailingAddress.vatNumber`.
2359
+ """
2099
2360
  vatNumber: String
2100
2361
  }
2101
2362
 
2102
- """Customer access token"""
2363
+ """
2364
+ Access token returned by `customerLogin`, `customerSignup` and `customerRefreshToken`. Send it on subsequent requests in the `Authorization: Bearer <token>` header, or store it in an HTTP-only cookie via the SDK BFF helpers. Never write it to `localStorage`.
2365
+ """
2103
2366
  type CustomerAccessToken {
2104
- """Access token string"""
2367
+ """The access token string (JWT). Treat as sensitive — do not log."""
2105
2368
  accessToken: String!
2106
2369
 
2107
- """Token expiration (ISO 8601)"""
2370
+ """
2371
+ When the token stops being valid (ISO 8601). Call `customerRefreshToken` before this to obtain a fresh one.
2372
+ """
2108
2373
  expiresAt: DateTime!
2109
2374
  }
2110
2375
 
2111
- """Input for customer login"""
2376
+ """
2377
+ Input for `customerLogin` — exchanges email + password for an access token.
2378
+ """
2112
2379
  input CustomerAccessTokenCreateInput {
2113
- """Email address"""
2380
+ """Customer email address."""
2114
2381
  email: String!
2115
2382
 
2116
- """Password"""
2383
+ """Customer password."""
2117
2384
  password: String!
2118
2385
  }
2119
2386
 
@@ -2144,31 +2411,35 @@ type CustomerAddAddressPayload {
2144
2411
  userErrors: [UserError!]!
2145
2412
  }
2146
2413
 
2147
- """Input for customer registration"""
2414
+ """Input for `customerSignup` — registers a new customer."""
2148
2415
  input CustomerCreateInput {
2149
2416
  """
2150
- Opt-in to email marketing checkbox. true → state SUBSCRIBED (single opt-in) unless `marketingOptInLevel: CONFIRMED_OPT_IN` is also set (then PENDING + double opt-in confirmation email). false/null → no consent change.
2417
+ Marketing opt-in checkbox. true → consent state SUBSCRIBED (single opt-in) unless `marketingOptInLevel: CONFIRMED_OPT_IN` is also sent (then PENDING and the server sends a double-opt-in confirmation email). false / null → no consent change.
2151
2418
  """
2152
2419
  acceptsMarketing: Boolean
2153
2420
 
2154
- """Email address"""
2421
+ """
2422
+ Email address — must be unique within the shop. Used as the login identity.
2423
+ """
2155
2424
  email: String!
2156
2425
 
2157
- """First name"""
2426
+ """First name."""
2158
2427
  firstName: String
2159
2428
 
2160
- """Last name"""
2429
+ """Last name."""
2161
2430
  lastName: String
2162
2431
 
2163
2432
  """
2164
- Opt-in level. Default SINGLE_OPT_IN (signup = email proven implicitly). Set CONFIRMED_OPT_IN to force double opt-in via confirmation email.
2433
+ Opt-in level. Defaults to SINGLE_OPT_IN (signup itself is treated as email proof). Pass CONFIRMED_OPT_IN to enforce double opt-in the server then emails a confirmation link and leaves consent in PENDING until the buyer clicks it.
2165
2434
  """
2166
2435
  marketingOptInLevel: MarketingOptInLevel
2167
2436
 
2168
- """Password"""
2437
+ """
2438
+ Password (8 to 128 chars). The shop password policy may impose additional strength rules.
2439
+ """
2169
2440
  password: String!
2170
2441
 
2171
- """Phone number"""
2442
+ """Phone number (free-form)."""
2172
2443
  phone: String
2173
2444
  }
2174
2445
 
@@ -2193,38 +2464,44 @@ type CustomerGroup {
2193
2464
  taxExempt: Boolean!
2194
2465
  }
2195
2466
 
2196
- """Result of customer login"""
2467
+ """Result of `customerLogin`."""
2197
2468
  type CustomerLoginPayload {
2198
- """Access token"""
2469
+ """Access token on success; null when `userErrors` is non-empty."""
2199
2470
  customerAccessToken: CustomerAccessToken
2200
2471
 
2201
2472
  """
2202
- User errors (code is namespaced e.g. CUSTOMER_NOT_FOUND, CUSTOMER_TOKEN_INVALID, CUSTOMER_PASSWORD_TOO_WEAK)
2473
+ Errors carrying a stable `CustomerErrorCode` in `code` (e.g. `INVALID_CREDENTIALS`, `CUSTOMER_DISABLED`, `UNIDENTIFIED_CUSTOMER`).
2203
2474
  """
2204
2475
  userErrors: [UserError!]!
2205
2476
  }
2206
2477
 
2207
- """Result of token deletion (logout)"""
2478
+ """
2479
+ Result of `customerLogout` — invalidates the current access token on the server.
2480
+ """
2208
2481
  type CustomerLogoutPayload {
2209
- """Deleted access token"""
2482
+ """
2483
+ The token string that was invalidated. Useful for client-side cache clearing.
2484
+ """
2210
2485
  deletedAccessToken: String
2211
2486
 
2212
- """Deleted token ID"""
2487
+ """ID of the invalidated token record."""
2213
2488
  deletedCustomerAccessTokenId: String
2214
2489
 
2215
2490
  """
2216
- User errors (code is namespaced e.g. CUSTOMER_NOT_FOUND, CUSTOMER_TOKEN_INVALID, CUSTOMER_PASSWORD_TOO_WEAK)
2491
+ Errors carrying a stable `CustomerErrorCode` in `code` (e.g. `TOKEN_INVALID`, `TOKEN_EXPIRED`).
2217
2492
  """
2218
2493
  userErrors: [UserError!]!
2219
2494
  }
2220
2495
 
2221
- """Result of token renewal"""
2496
+ """
2497
+ Result of `customerRefreshToken` — exchanges a valid current token for a fresh one with a later expiry.
2498
+ """
2222
2499
  type CustomerRefreshTokenPayload {
2223
- """New access token"""
2500
+ """Fresh access token on success; null when `userErrors` is non-empty."""
2224
2501
  customerAccessToken: CustomerAccessToken
2225
2502
 
2226
2503
  """
2227
- User errors (code is namespaced e.g. CUSTOMER_NOT_FOUND, CUSTOMER_TOKEN_INVALID, CUSTOMER_PASSWORD_TOO_WEAK)
2504
+ Errors carrying a stable `CustomerErrorCode` in `code` (e.g. `TOKEN_INVALID`, `TOKEN_EXPIRED`, `TOKEN_RENEWAL_FAILED`).
2228
2505
  """
2229
2506
  userErrors: [UserError!]!
2230
2507
  }
@@ -2273,16 +2550,18 @@ type CustomerSetDefaultAddressPayload {
2273
2550
  userErrors: [UserError!]!
2274
2551
  }
2275
2552
 
2276
- """Result of customer creation"""
2553
+ """Result of `customerSignup`."""
2277
2554
  type CustomerSignupPayload {
2278
- """Created customer"""
2555
+ """The created customer on success; null when `userErrors` is non-empty."""
2279
2556
  customer: Customer
2280
2557
 
2281
- """Access token for new customer"""
2558
+ """
2559
+ Access token for the new customer — saves a follow-up login round-trip.
2560
+ """
2282
2561
  customerAccessToken: CustomerAccessToken
2283
2562
 
2284
2563
  """
2285
- User errors (code is namespaced e.g. CUSTOMER_NOT_FOUND, CUSTOMER_TOKEN_INVALID, CUSTOMER_PASSWORD_TOO_WEAK)
2564
+ Validation / business errors carrying a stable `CustomerErrorCode` in `code` (e.g. `TAKEN`, `INVALID`, `PASSWORD_TOO_WEAK`, `BAD_DOMAIN`).
2286
2565
  """
2287
2566
  userErrors: [UserError!]!
2288
2567
  }
@@ -2298,7 +2577,9 @@ input CustomerSubscribeToMarketingInput {
2298
2577
  marketingOptInLevel: MarketingOptInLevel
2299
2578
  }
2300
2579
 
2301
- """Customer business type — INDIVIDUAL (B2C) or COMPANY (B2B)."""
2580
+ """
2581
+ Customer profile type — INDIVIDUAL (B2C buyer) or COMPANY (B2B buyer). Drives which company fields are required and which appear on tax documents.
2582
+ """
2302
2583
  enum CustomerType {
2303
2584
  COMPANY
2304
2585
  INDIVIDUAL
@@ -2374,19 +2655,41 @@ Decimal money amount, JSON-serialized as String. Format: "{int}.{dec}" e.g. "10.
2374
2655
  """
2375
2656
  scalar Decimal
2376
2657
 
2377
- """Estimated delivery timeframe"""
2658
+ """Estimated delivery window for a shipping method, in business days."""
2378
2659
  type DeliveryEstimate {
2379
- """Human-readable delivery estimate"""
2660
+ """
2661
+ Pre-formatted human-readable estimate (e.g. "1-2 business days"). Localised; render as-is.
2662
+ """
2380
2663
  description: String
2381
2664
 
2382
- """Maximum delivery days"""
2665
+ """Maximum expected delivery time in business days."""
2383
2666
  maxDays: Int
2384
2667
 
2385
- """Minimum delivery days"""
2668
+ """Minimum expected delivery time in business days."""
2386
2669
  minDays: Int
2387
2670
  }
2388
2671
 
2389
- """Type of discount being applied"""
2672
+ """
2673
+ Delivery destination type of a shipping method — signals whether the storefront must collect a pickup point.
2674
+ """
2675
+ enum DeliveryType {
2676
+ """Courier delivery to the street address — no pickup point required."""
2677
+ HOME
2678
+
2679
+ """
2680
+ Automated parcel locker — the buyer collects from a 24/7 self-service machine.
2681
+ """
2682
+ LOCKER
2683
+
2684
+ """
2685
+ Staffed pickup point / parcel shop — the buyer collects the parcel at a counter.
2686
+ """
2687
+ PICKUP_POINT
2688
+ }
2689
+
2690
+ """
2691
+ Category of discount: `PERCENTAGE` (percent off), `FIXED_AMOUNT` (amount off), `FREE_SHIPPING` (zeroes shipping) or `BUY_X_GET_Y` (item-quantity-based).
2692
+ """
2390
2693
  enum DiscountApplicationType {
2391
2694
  BUY_X_GET_Y
2392
2695
  FIXED_AMOUNT
@@ -2394,7 +2697,9 @@ enum DiscountApplicationType {
2394
2697
  PERCENTAGE
2395
2698
  }
2396
2699
 
2397
- """Error codes for discount validation"""
2700
+ """
2701
+ Stable reasons why a discount code is not applicable to the current cart / customer.
2702
+ """
2398
2703
  enum DiscountErrorCode {
2399
2704
  CUSTOMER_GROUP_NOT_ELIGIBLE
2400
2705
  CUSTOMER_NOT_ELIGIBLE
@@ -2410,42 +2715,58 @@ enum DiscountErrorCode {
2410
2715
  USAGE_LIMIT_REACHED
2411
2716
  }
2412
2717
 
2413
- """Information about a valid discount"""
2718
+ """
2719
+ Details of a discount that the buyer entered and that is currently valid for the cart.
2720
+ """
2414
2721
  type DiscountInfo {
2415
- """Discount code"""
2722
+ """The discount code as entered."""
2416
2723
  code: String!
2417
2724
 
2418
- """Calculated discount amount"""
2725
+ """
2726
+ Calculated savings the discount produces against the current cart. Null when the savings cannot be computed without a cart context.
2727
+ """
2419
2728
  discountAmount: Money
2420
2729
 
2421
- """Discount title"""
2730
+ """Merchant-facing title of the discount (e.g. "Summer sale 10%")."""
2422
2731
  title: String!
2423
2732
 
2424
- """Type of discount"""
2733
+ """
2734
+ Category of the discount: `PERCENTAGE`, `FIXED_AMOUNT`, `FREE_SHIPPING` or `BUY_X_GET_Y`. Drives how `value` is interpreted.
2735
+ """
2425
2736
  type: DiscountApplicationType!
2426
2737
 
2427
- """Discount value (percentage or amount)"""
2738
+ """
2739
+ Discount value — percent points for `PERCENTAGE`, amount (in major currency units) for `FIXED_AMOUNT`. Ignored for `FREE_SHIPPING` / `BUY_X_GET_Y`.
2740
+ """
2428
2741
  value: Float!
2429
2742
  }
2430
2743
 
2431
- """Discount validation error"""
2744
+ """
2745
+ Reason why a discount code is not valid for the current cart / customer.
2746
+ """
2432
2747
  type DiscountValidationError {
2433
- """Error code"""
2748
+ """
2749
+ Stable reason code (e.g. `EXPIRED`, `USAGE_LIMIT_REACHED`, `MINIMUM_ORDER_NOT_MET`). Branch on this for UI behaviour.
2750
+ """
2434
2751
  code: DiscountErrorCode!
2435
2752
 
2436
- """Error message"""
2753
+ """Human-readable explanation of the validation failure."""
2437
2754
  message: String!
2438
2755
  }
2439
2756
 
2440
- """Result of validating a discount code"""
2757
+ """
2758
+ Result of validating a discount code against a cart — preview only, no cart side effects.
2759
+ """
2441
2760
  type DiscountValidationResult {
2442
- """Discount info (if valid)"""
2761
+ """Discount details when `isValid` is true. Null otherwise."""
2443
2762
  discount: DiscountInfo
2444
2763
 
2445
- """Error details (if invalid)"""
2764
+ """Validation failure details when `isValid` is false. Null otherwise."""
2446
2765
  error: DiscountValidationError
2447
2766
 
2448
- """Whether the discount code is valid"""
2767
+ """
2768
+ True when the code is currently applicable to the cart. When false, see `error` for the reason.
2769
+ """
2449
2770
  isValid: Boolean!
2450
2771
  }
2451
2772
 
@@ -2461,7 +2782,9 @@ type Domain {
2461
2782
  url: URL!
2462
2783
  }
2463
2784
 
2464
- """Customer email marketing consent state (Prisma-derived)."""
2785
+ """
2786
+ Email marketing consent state of a customer. NOT_SUBSCRIBED = never opted in. PENDING = single opt-in awaiting double opt-in confirmation. SUBSCRIBED = active opt-in. UNSUBSCRIBED = explicitly opted out. REDACTED = data erased on request. INVALID = email rejected (bounce / spam complaint).
2787
+ """
2465
2788
  enum EmailMarketingState {
2466
2789
  INVALID
2467
2790
  NOT_SUBSCRIBED
@@ -2576,24 +2899,32 @@ type FilterValue {
2576
2899
  swatch: AttributeSwatch
2577
2900
  }
2578
2901
 
2579
- """Free shipping progress indicator"""
2902
+ """
2903
+ Progress towards the free shipping threshold configured by the merchant — drives "Add X more to get free shipping" banners.
2904
+ """
2580
2905
  type FreeShippingProgress {
2581
- """Current cart subtotal"""
2906
+ """Current qualifying subtotal of the cart."""
2582
2907
  currentAmount: Money
2583
2908
 
2584
- """Human-readable progress message"""
2909
+ """
2910
+ Pre-formatted, localised banner message (e.g. "Add 15.00 PLN more for free shipping"). Render as-is when present.
2911
+ """
2585
2912
  message: String
2586
2913
 
2587
- """Progress percentage (0-100)"""
2914
+ """
2915
+ Progress towards the threshold expressed as a percentage between 0 and 100. Use as the value of a progress bar.
2916
+ """
2588
2917
  progressPercent: Float
2589
2918
 
2590
- """Whether free shipping is achieved"""
2919
+ """True when the cart already qualifies for free shipping."""
2591
2920
  qualifies: Boolean!
2592
2921
 
2593
- """Amount remaining for free shipping"""
2922
+ """
2923
+ How much more the buyer needs to add to qualify. Zero when `qualifies` is true.
2924
+ """
2594
2925
  remaining: Money
2595
2926
 
2596
- """Threshold for free shipping"""
2927
+ """Subtotal threshold that unlocks free shipping."""
2597
2928
  threshold: Money
2598
2929
  }
2599
2930
 
@@ -2705,26 +3036,34 @@ type GiftCardValidation {
2705
3036
  isValid: Boolean!
2706
3037
  }
2707
3038
 
2708
- """Image with URL and metadata"""
3039
+ """
3040
+ An image with its URL and presentation metadata. The URL accepts an `Image.url(transform: ...)` argument for responsive resizing / format selection.
3041
+ """
2709
3042
  type Image {
2710
- """Alt text for accessibility"""
3043
+ """
3044
+ Alt text for accessibility / SEO. Null when the merchant has not provided one.
3045
+ """
2711
3046
  altText: String
2712
3047
 
2713
- """Image height in pixels"""
3048
+ """Native height of the source image in pixels."""
2714
3049
  height: Int
2715
3050
 
2716
- """Image ID"""
3051
+ """
3052
+ Stable image identifier. Null for ad-hoc images that are not stored as media library entries.
3053
+ """
2717
3054
  id: ID
2718
3055
 
2719
3056
  """
2720
- ThumbHash placeholder for progressive loading (base64-encoded, ~40 chars). Decode with thumbHashToDataURL() on the client.
3057
+ ThumbHash placeholder for progressive loading (base64-encoded, ~40 chars). Decode with `thumbHashToDataURL()` on the client to render an instant blurry preview while the full image loads.
2721
3058
  """
2722
3059
  thumbhash: String
2723
3060
 
2724
- """Image URL. Pass transform argument for resized/cropped CDN URLs."""
3061
+ """
3062
+ Public image URL. Pass an optional `transform` argument (max width / height, crop region, scale, preferred format) to obtain a resized / reformatted CDN variant — useful for responsive images and modern formats like WebP / AVIF.
3063
+ """
2725
3064
  url(transform: ImageTransformInput): String!
2726
3065
 
2727
- """Image width in pixels"""
3066
+ """Native width of the source image in pixels."""
2728
3067
  width: Int
2729
3068
  }
2730
3069
 
@@ -2804,7 +3143,7 @@ type Language {
2804
3143
  nativeName: String!
2805
3144
  }
2806
3145
 
2807
- """ISO 639-1 language code"""
3146
+ """ISO 639-1 language code (2-letter uppercase, e.g. PL, EN, DE)."""
2808
3147
  enum LanguageCode {
2809
3148
  CS
2810
3149
  DA
@@ -3223,86 +3562,99 @@ enum LoyaltyTransactionType {
3223
3562
  REFUND_REVERSAL
3224
3563
  }
3225
3564
 
3226
- """Customer mailing address"""
3565
+ """
3566
+ A mailing address — shipping or billing — used on a cart, on the resulting order, or saved in a customer address book. Carries optional B2B fields (`taxId`, `vatNumber`) and an optional `pickupPoint` for parcel locker / collection-point delivery.
3567
+ """
3227
3568
  type MailingAddress implements Node {
3228
- """City"""
3569
+ """City / town."""
3229
3570
  city: String
3230
3571
 
3231
- """Company name"""
3572
+ """Company name (relevant for B2B addresses)."""
3232
3573
  company: String
3233
3574
 
3234
- """Country"""
3575
+ """
3576
+ Country name in the request locale (e.g. "Poland", "Polska"). For machine logic use `countryCode`.
3577
+ """
3235
3578
  country: String
3236
3579
 
3237
- """ISO 3166-1 alpha-2 country code"""
3580
+ """ISO 3166-1 alpha-2 country code (e.g. PL, DE, US)."""
3238
3581
  countryCode: CountryCode
3239
3582
 
3240
- """First name"""
3583
+ """Buyer first name."""
3241
3584
  firstName: String
3242
3585
 
3243
3586
  """
3244
- Country-aware ordered address lines. Format zależy od country: PL = [name, streetLine1, "postalCode city"]; US = [name, streetLine1, "city, state postalCode"]; default = [name, streetLine1, streetLine2, city, postalCode, country]. Use bezpośrednio jako lines w UI bez ręcznego konstruowania.
3587
+ Country-aware ordered address lines, ready to render line by line in UI without manual formatting. The exact line layout depends on country (e.g. PL puts postal code before city, US after state).
3245
3588
  """
3246
3589
  formatted: [String!]!
3247
3590
 
3248
3591
  """
3249
- Single-line area summary, e.g. "Warszawa, MZ, Poland"
3592
+ Single-line summary of the area, e.g. "Warszawa, MZ, Poland". Useful for compact display in lists.
3250
3593
  """
3251
3594
  formattedArea: String
3252
3595
 
3253
- """Unique identifier"""
3596
+ """Stable identifier of the address."""
3254
3597
  id: ID!
3255
3598
 
3256
- """Whether this is default address (DoSwiftly extension)"""
3599
+ """True when this is the default address for the owning customer."""
3257
3600
  isDefault: Boolean!
3258
3601
 
3259
- """Last name"""
3602
+ """Buyer last name."""
3260
3603
  lastName: String
3261
3604
 
3262
- """Computed full name (firstName + " " + lastName)"""
3605
+ """Convenience full name (`firstName` + " " + `lastName`)."""
3263
3606
  name: String
3264
3607
 
3265
- """Phone number"""
3608
+ """Phone number associated with the address (free-form)."""
3266
3609
  phone: String
3267
3610
 
3268
- """Postal / ZIP code"""
3611
+ """
3612
+ Selected pickup point when the shipping method delivers to a parcel locker / collection point instead of the street address. Null for home delivery.
3613
+ """
3614
+ pickupPoint: PickupPoint
3615
+
3616
+ """Postal / ZIP code."""
3269
3617
  postalCode: String
3270
3618
 
3271
- """State / province"""
3619
+ """State / province / region name."""
3272
3620
  state: String
3273
3621
 
3274
- """State / province code (ISO 3166-2 subdivision)"""
3622
+ """State / province code (ISO 3166-2 subdivision, e.g. PL-MZ)."""
3275
3623
  stateCode: String
3276
3624
 
3277
- """First line of street address"""
3625
+ """First line of the street address (street and house / building number)."""
3278
3626
  streetLine1: String
3279
3627
 
3280
- """Second line of street address"""
3628
+ """
3629
+ Second line of the street address (apartment, suite, floor — optional).
3630
+ """
3281
3631
  streetLine2: String
3282
3632
 
3283
3633
  """
3284
- Per-address tax ID (Polish NIP, 10 digits z checksum). B2B use case: różne dane firmowe per adres — np. faktura na firmę matkę z NIP A, dostawa na oddział z NIP B. Distinct from `Customer.taxId` (customer-level globally).
3634
+ Per-address buyer tax ID for B2B invoicing — Polish NIP, 10 digits with checksum. Lets B2B buyers invoice different addresses to different legal entities. Independent of `Customer.taxId` (which is the customer-wide default).
3285
3635
  """
3286
3636
  taxId: String
3287
3637
 
3288
3638
  """
3289
- Per-address EU VAT number (e.g. PL1234567890). B2B cross-border: różny VAT per adres dostawy. Distinct from `Customer.vatNumber` (customer-level globally).
3639
+ Per-address EU VAT number (e.g. `PL1234567890`) for cross-border B2B. Independent of `Customer.vatNumber` (which is the customer-wide default).
3290
3640
  """
3291
3641
  vatNumber: String
3292
3642
  }
3293
3643
 
3294
- """Paginated mailing addresses (Relay Connection)"""
3644
+ """Paginated list of mailing addresses (Relay Connection)."""
3295
3645
  type MailingAddressConnection {
3296
- """Address edges with cursors"""
3646
+ """
3647
+ Edges with the address and its cursor — use for cursor-based pagination.
3648
+ """
3297
3649
  edges: [MailingAddressEdge!]!
3298
3650
 
3299
- """Address nodes (shortcut for edges.map(e => e.node))"""
3651
+ """Address nodes — convenience shortcut for `edges.map(e => e.node)`."""
3300
3652
  nodes: [MailingAddress!]!
3301
3653
 
3302
- """Pagination info"""
3654
+ """Cursor pagination info (`hasNextPage`, `endCursor`, etc.)."""
3303
3655
  pageInfo: PageInfo!
3304
3656
 
3305
- """Total count of addresses"""
3657
+ """Total number of saved addresses for the customer across all pages."""
3306
3658
  totalCount: Int!
3307
3659
  }
3308
3660
 
@@ -3427,66 +3779,96 @@ enum MenuItemType {
3427
3779
  SEARCH
3428
3780
  }
3429
3781
 
3430
- """Monetary value with currency"""
3782
+ """A monetary amount with its ISO 4217 currency code."""
3431
3783
  type Money {
3432
- """Decimal money amount"""
3784
+ """
3785
+ Amount as a decimal string in major currency units (e.g. "12.99"). String, not float — preserves precision across locales.
3786
+ """
3433
3787
  amount: Decimal!
3434
3788
 
3435
- """ISO 4217 currency code"""
3789
+ """ISO 4217 currency code (e.g. PLN, EUR, USD)."""
3436
3790
  currencyCode: CurrencyCode!
3437
3791
  }
3438
3792
 
3439
3793
  type Mutation {
3440
- """Add lines to cart"""
3794
+ """
3795
+ Add one or more lines to the cart. Adding the same variant a second time merges into the existing line (sums the quantity). Returns the full updated cart plus any non-fatal warnings (e.g. stock dropped below requested quantity).
3796
+ """
3441
3797
  cartAddLines(id: ID!, lines: [CartLineInput!]!): CartAddLinesPayload!
3442
3798
 
3443
- """Apply gift card to cart"""
3799
+ """
3800
+ Apply a gift card to the cart by full code. The card is debited at `cartComplete`. Rate-limited to 5 requests per minute per IP+shop (gift card codes form a finite enumerable space).
3801
+ """
3444
3802
  cartApplyGiftCard(input: CartApplyGiftCardInput!): CartApplyGiftCardPayload!
3445
3803
 
3446
3804
  """
3447
- Complete cart create Order (D6delegates do CartCompletionOrchestrator.processCart)
3805
+ Finalise the cart into an `Order`. The cart is locked and no longer accepts mutations. Payment is initiated separately via `paymentCreate` check `order.canCreatePayment` to decide whether to render a "Pay now" button or send the buyer directly to the confirmation page (for offline methods such as cash on delivery). Rate-limited to 5 requests per minute per IP+shop; pass an `idempotencyKey` to guard against duplicate orders on retry.
3448
3806
  """
3449
3807
  cartComplete(input: CartCompleteInput!): CartCompletePayload!
3450
3808
 
3451
- """Create new cart"""
3809
+ """
3810
+ Create a new cart. All fields on `input` are optional — call with no input to create an empty cart, or pass initial lines, buyer identity, attributes, discount codes, email and a shipping address to skip the corresponding follow-up calls.
3811
+ """
3452
3812
  cartCreate(input: CartCreateInput): CartCreatePayload!
3453
3813
 
3454
- """Apply discount codes"""
3814
+ """
3815
+ Replace (not merge) the list of discount codes on the cart. Pass an empty array to clear all codes. Rate-limited to 10 requests per minute per IP+shop.
3816
+ """
3455
3817
  cartDiscountCodesUpdate(discountCodes: [String!]!, id: ID!): CartDiscountCodesUpdatePayload!
3456
3818
 
3457
- """Remove gift card from cart"""
3819
+ """
3820
+ Remove a previously applied gift card from the cart by its `CartAppliedGiftCard.id`. The storefront never has to handle the full gift card code on the client.
3821
+ """
3458
3822
  cartRemoveGiftCard(input: CartRemoveGiftCardInput!): CartRemoveGiftCardPayload!
3459
3823
 
3460
- """Remove lines from cart"""
3824
+ """
3825
+ Remove one or more lines from the cart by `CartLine.id`. Equivalent to `cartUpdateLines` with `quantity: 0` but lets the storefront express the intent explicitly.
3826
+ """
3461
3827
  cartRemoveLines(id: ID!, lineIds: [ID!]!): CartRemoveLinesPayload!
3462
3828
 
3463
- """Select payment method on cart"""
3829
+ """
3830
+ Select a payment method on the cart. Validates against the active shop payment methods and currency. The selection is finalised at `cartComplete`; payment itself is initiated via a separate `paymentCreate` mutation after the order is created.
3831
+ """
3464
3832
  cartSelectPaymentMethod(input: CartSelectPaymentMethodInput!): CartSelectPaymentMethodPayload!
3465
3833
 
3466
3834
  """
3467
- Select shipping method on cart (D8 term unification wcześniej cartSelectShippingRate)
3835
+ Select a shipping method on the cart. Validates the method against the cart contents and the shipping address (must be eligible for the destination, and a pickup point must be set when the method delivers to a locker / collection point). Updates `cost.totalShipping` and the grand total.
3468
3836
  """
3469
3837
  cartSelectShippingMethod(input: CartSelectShippingMethodInput!): CartSelectShippingMethodPayload!
3470
3838
 
3471
- """Set billing address on cart"""
3839
+ """
3840
+ Set the billing address on a cart. The shipping address is left unchanged — pass billing only when it differs from shipping (otherwise the order mirrors the shipping address as the billing address).
3841
+ """
3472
3842
  cartSetBillingAddress(input: CartSetBillingAddressInput!): CartSetBillingAddressPayload!
3473
3843
 
3474
- """Set shipping address on cart"""
3844
+ """
3845
+ Set the shipping address on a cart. Pass `address.pickupPoint` when the buyer is delivering to a parcel locker / collection point — required for non-HOME shipping methods. Replaces any previous shipping address; the billing address is left untouched.
3846
+ """
3475
3847
  cartSetShippingAddress(input: CartSetShippingAddressInput!): CartSetShippingAddressPayload!
3476
3848
 
3477
- """Update cart attributes"""
3849
+ """
3850
+ Replace (not merge) the cart-level custom attributes — free-form key/value pairs surfaced to the merchant on the order. Use for cart-wide metadata such as a B2B PO number or marketing source. Max 250 pairs / 255-char keys; over the limit returns `CART_ATTRIBUTES_LIMIT_EXCEEDED`.
3851
+ """
3478
3852
  cartUpdateAttributes(attributes: [CartAttributeInput!]!, id: ID!): CartUpdateAttributesPayload!
3479
3853
 
3480
- """Update buyer identity"""
3854
+ """
3855
+ Update buyer identity on the cart — email, phone, customer ID, country and language hints. Only supplied fields are touched; omit a field to leave it unchanged.
3856
+ """
3481
3857
  cartUpdateBuyerIdentity(buyerIdentity: CartBuyerIdentityInput!, id: ID!): CartUpdateBuyerIdentityPayload!
3482
3858
 
3483
- """Set recipient info on gift card line item (personalised delivery)"""
3859
+ """
3860
+ Set recipient details (email, display name, personalised message) on a gift card line item — the gift card will be delivered to this recipient on order completion.
3861
+ """
3484
3862
  cartUpdateGiftCardRecipient(input: CartUpdateGiftCardRecipientInput!): CartUpdateGiftCardRecipientPayload!
3485
3863
 
3486
- """Update cart lines"""
3864
+ """
3865
+ Update existing cart lines — quantity, custom attributes and / or configurator selections. Set `quantity` to 0 to remove a line. Address lines by `CartLine.id`.
3866
+ """
3487
3867
  cartUpdateLines(id: ID!, lines: [CartLineUpdateInput!]!): CartUpdateLinesPayload!
3488
3868
 
3489
- """Update cart note"""
3869
+ """
3870
+ Set or replace the buyer note on the cart (free-form, up to 1000 chars). Surfaced to the merchant on the resulting order.
3871
+ """
3490
3872
  cartUpdateNote(id: ID!, note: String!): CartUpdateNotePayload!
3491
3873
 
3492
3874
  """
@@ -3502,13 +3884,19 @@ type Mutation {
3502
3884
  """Add customer address"""
3503
3885
  customerAddAddress(address: MailingAddressInput!): CustomerAddAddressPayload!
3504
3886
 
3505
- """Login customer"""
3887
+ """
3888
+ Sign a customer in with email and password. Returns an access token to use on subsequent requests (as a Bearer header or via the SDK auth cookie).
3889
+ """
3506
3890
  customerLogin(input: CustomerAccessTokenCreateInput!): CustomerLoginPayload!
3507
3891
 
3508
- """Logout customer (clears auth cookie)"""
3892
+ """
3893
+ Sign the current customer out. Invalidates the access token on the server; the SDK BFF auth helpers additionally clear the HTTP-only cookie.
3894
+ """
3509
3895
  customerLogout: CustomerLogoutPayload!
3510
3896
 
3511
- """Refresh access token"""
3897
+ """
3898
+ Exchange a still-valid access token for a fresh one with a later expiry. Call before `expiresAt` to keep the session alive without prompting the buyer to log in again.
3899
+ """
3512
3900
  customerRefreshToken: CustomerRefreshTokenPayload!
3513
3901
 
3514
3902
  """Remove customer address"""
@@ -3528,7 +3916,9 @@ type Mutation {
3528
3916
  """Set default address"""
3529
3917
  customerSetDefaultAddress(addressId: ID!): CustomerSetDefaultAddressPayload!
3530
3918
 
3531
- """Register new customer"""
3919
+ """
3920
+ Register a new customer with email and password. Returns the created customer plus an access token so the storefront can sign the buyer in immediately, no follow-up login call needed.
3921
+ """
3532
3922
  customerSignup(input: CustomerCreateInput!): CustomerSignupPayload!
3533
3923
 
3534
3924
  """Subscribe an email to the newsletter (guest-friendly, double opt-in)."""
@@ -3550,7 +3940,7 @@ type Mutation {
3550
3940
  loyaltyRedeemReward(input: RedeemRewardInput!): RedeemRewardPayload!
3551
3941
 
3552
3942
  """
3553
- Initiate a payment session for an order call after cartComplete when order.canCreatePayment is true
3943
+ Initiate a payment session for an order created by `cartComplete`. Call after checking `order.canCreatePayment`. Idempotent on the order — a second call returns the existing still-valid session. Branch on the returned `payment.flow` to launch the payment (redirect / embedded / instant). Rate-limited to 5 requests per minute per IP+shop.
3554
3944
  """
3555
3945
  paymentCreate(input: PaymentCreateInput!): PaymentCreatePayload!
3556
3946
 
@@ -3608,64 +3998,88 @@ enum NodeType {
3608
3998
  PRODUCT_VARIANT
3609
3999
  }
3610
4000
 
3611
- """Customer order summary"""
4001
+ """
4002
+ A buyer order — the result of completing a cart. Carries totals, status, addresses, line items and the signals needed to drive payment (`canCreatePayment`, `paymentMethodType`) and a guest confirmation page (`accessToken`).
4003
+ """
3612
4004
  type Order implements Node {
3613
4005
  """
3614
- Opaque access token (UUID v4) umożliwiający dostęp do podsumowania zamówienia bez sesji (guest order access via orderByToken query). Trwały per order share dla forwarded receipts. Storefront powinien przechowywać HTTP-only cookie / sessionStorage (NIGDY localStorage). Defense-in-depth: orderByToken akceptuje opcjonalny email guard żeby ograniczyć blast radius kompromisu.
4006
+ Opaque access token (UUID v4) that grants read access to the order summary without an authenticated session — pass it to the `orderByToken` query to build a guest confirmation page. Persistent for the lifetime of the order so it can be re-used in forwarded receipts. Store on the storefront in an HTTP-only cookie or `sessionStorage`; never in `localStorage`. As defense-in-depth, `orderByToken` also accepts an optional email guard to limit the blast radius if the token leaks.
3615
4007
  """
3616
4008
  accessToken: String!
3617
4009
 
3618
4010
  """Order custom field values (post-Opcja A unified custom fields)."""
3619
4011
  attributes(namespace: String): [EntityAttributeField!]!
3620
4012
 
3621
- """Czy storefront może zainicjować płatność dla tego order"""
4013
+ """
4014
+ True when the storefront should initiate an online payment for this order — render a "Pay now" button. False when the order is cancelled, already paid, or uses an offline payment method (cash on delivery, manual bank transfer) where no online flow applies. Retry-friendly: returns true for UNPAID / PENDING / FAILED payment statuses when the method supports online init.
4015
+ """
3622
4016
  canCreatePayment: Boolean!
3623
4017
 
3624
- """When order was cancelled"""
4018
+ """When the order was cancelled. Null when not cancelled."""
3625
4019
  cancelledAt: DateTime
3626
4020
 
3627
- """When order was confirmed"""
4021
+ """
4022
+ When the order was confirmed (e.g. payment authorised / approved). Null until confirmation.
4023
+ """
3628
4024
  confirmedAt: DateTime
3629
4025
 
3630
- """When order expired"""
4026
+ """
4027
+ When the order expired (e.g. pending payment timed out). Null when not expired.
4028
+ """
3631
4029
  expiredAt: DateTime
3632
4030
 
3633
- """Fulfillment status"""
4031
+ """
4032
+ Fulfillment progress (UNFULFILLED, PARTIALLY_FULFILLED, FULFILLED, IN_TRANSIT, DELIVERED, PARTIALLY_RETURNED, RETURNED, LOST).
4033
+ """
3634
4034
  fulfillmentStatus: OrderFulfillmentStatus!
3635
4035
 
3636
- """Unique identifier"""
4036
+ """Stable identifier of the order."""
3637
4037
  id: ID!
3638
4038
 
3639
- """Line items count"""
4039
+ """
4040
+ Number of line items on the order (sum of distinct lines, not quantities).
4041
+ """
3640
4042
  itemCount: Int!
3641
4043
 
3642
4044
  """
3643
- Pozycje zamówienia (top-level connection) eliminuje N+1 vs Order.shipments.items
4045
+ Line items on the order (paginated, Relay Connection). Use to render the order summary on the confirmation or order detail page.
3644
4046
  """
3645
4047
  lineItems(after: String, first: Int = 10): OrderLineItemConnection!
3646
4048
 
3647
- """Order number (human-readable)"""
4049
+ """
4050
+ Human-readable order number shown to the buyer and the merchant (e.g. "1042"). Distinct from `id`.
4051
+ """
3648
4052
  orderNumber: String!
3649
4053
 
3650
- """Kategoria payment method zmapowana z provider code"""
4054
+ """
4055
+ Category of the payment method on the order (CARD, BLIK, BANK_TRANSFER, CASH_ON_DELIVERY, OTHER). Use to drive iconography and copy on the confirmation page (e.g. show the card icon for CARD, the BLIK logo for BLIK).
4056
+ """
3651
4057
  paymentMethodType: PaymentMethodType!
3652
4058
 
3653
- """Payment status"""
4059
+ """
4060
+ Payment progress (UNPAID, PENDING, AUTHORIZED, PAID, PARTIALLY_PAID, PARTIALLY_REFUNDED, REFUNDED, FAILED, CHARGEBACK, VOIDED, REFUND_PENDING).
4061
+ """
3654
4062
  paymentStatus: OrderPaymentStatus!
3655
4063
 
3656
- """Order date (ISO 8601)"""
4064
+ """
4065
+ When the order was placed (ISO 8601). Use as the canonical "order date" in receipts.
4066
+ """
3657
4067
  processedAt: DateTime!
3658
4068
 
3659
4069
  """Order shipments"""
3660
4070
  shipments: [Shipment!]!
3661
4071
 
3662
- """Shipping address"""
4072
+ """
4073
+ Shipping address snapshot at the moment the order was placed. Null for digital-only orders.
4074
+ """
3663
4075
  shippingAddress: MailingAddress
3664
4076
 
3665
- """Order lifecycle status"""
4077
+ """
4078
+ High-level lifecycle status of the order (DRAFT, PENDING, CONFIRMED, PROCESSING, ON_HOLD, COMPLETED, CANCELLED, EXPIRED).
4079
+ """
3666
4080
  status: StorefrontOrderStatus!
3667
4081
 
3668
- """Cost totals breakdown (subtotal/total/totalTax/totalShipping)"""
4082
+ """Cost breakdown on the order (subtotal, total, tax, shipping)."""
3669
4083
  totals: OrderTotals!
3670
4084
  }
3671
4085
 
@@ -3693,7 +4107,9 @@ type OrderEdge {
3693
4107
  node: Order!
3694
4108
  }
3695
4109
 
3696
- """Fulfillment status of an order"""
4110
+ """
4111
+ Fulfillment progress of an order. UNFULFILLED → PARTIALLY_FULFILLED → FULFILLED (items shipped) → IN_TRANSIT → DELIVERED. PARTIALLY_RETURNED / RETURNED reflect post-delivery returns; LOST marks a parcel that never reached the buyer.
4112
+ """
3697
4113
  enum OrderFulfillmentStatus {
3698
4114
  DELIVERED
3699
4115
  FULFILLED
@@ -3768,7 +4184,9 @@ type OrderLineItemEdge {
3768
4184
  node: OrderLineItem!
3769
4185
  }
3770
4186
 
3771
- """Payment status of an order"""
4187
+ """
4188
+ Payment status of an order. UNPAID = no payment recorded yet; PENDING = initiated, awaiting confirmation; AUTHORIZED = held but not captured; PAID = fully paid; PARTIALLY_PAID / PARTIALLY_REFUNDED = intermediate states; REFUNDED = fully refunded; FAILED, CHARGEBACK, VOIDED, REFUND_PENDING = terminal / in-flight unpaid states.
4189
+ """
3772
4190
  enum OrderPaymentStatus {
3773
4191
  AUTHORIZED
3774
4192
  CHARGEBACK
@@ -3783,18 +4201,26 @@ enum OrderPaymentStatus {
3783
4201
  VOIDED
3784
4202
  }
3785
4203
 
3786
- """Order cost totals breakdown"""
4204
+ """
4205
+ Cost totals on an order — symmetric with `CartCost` so the confirmation page renders the same breakdown the buyer saw at checkout.
4206
+ """
3787
4207
  type OrderTotals {
3788
- """Order subtotal (before tax and shipping)"""
4208
+ """Order subtotal — items only, before tax, shipping and discounts."""
3789
4209
  subtotal: Money!
3790
4210
 
3791
- """Order total (after tax and shipping)"""
4211
+ """
4212
+ Grand total the buyer was charged — includes taxes, shipping and discounts.
4213
+ """
3792
4214
  total: Money!
3793
4215
 
3794
- """Total shipping cost"""
4216
+ """
4217
+ Total shipping cost on the order. Null for digital-only orders that did not go through shipping.
4218
+ """
3795
4219
  totalShipping: Money
3796
4220
 
3797
- """Total tax amount"""
4221
+ """
4222
+ Total tax across the order. Null when the order has no taxable component.
4223
+ """
3798
4224
  totalTax: Money
3799
4225
  }
3800
4226
 
@@ -3813,18 +4239,26 @@ input PackageDimensionsInput {
3813
4239
  width: Int
3814
4240
  }
3815
4241
 
3816
- """Pagination information"""
4242
+ """Cursor pagination info for a Relay Connection."""
3817
4243
  type PageInfo {
3818
- """Cursor of last item"""
4244
+ """
4245
+ Cursor of the last item on the current page — opaque, base64-encoded. Echo as the `after` argument to fetch the next page.
4246
+ """
3819
4247
  endCursor: String
3820
4248
 
3821
- """Whether there are more items after"""
4249
+ """
4250
+ True when more pages follow this one. Use to decide whether to enable a "load more" / next page action.
4251
+ """
3822
4252
  hasNextPage: Boolean!
3823
4253
 
3824
- """Whether there are more items before"""
4254
+ """
4255
+ True when pages exist before this one (relevant for bidirectional pagination).
4256
+ """
3825
4257
  hasPreviousPage: Boolean!
3826
4258
 
3827
- """Cursor of first item"""
4259
+ """
4260
+ Cursor of the first item on the current page — opaque, base64-encoded. Echo as the `before` argument to paginate backwards.
4261
+ """
3828
4262
  startCursor: String
3829
4263
  }
3830
4264
 
@@ -3835,33 +4269,39 @@ enum PageSortKeys {
3835
4269
  UPDATED_AT
3836
4270
  }
3837
4271
 
3838
- """Input dla paymentCreate mutation"""
4272
+ """
4273
+ Input for `paymentCreate` — initiates a payment for an order created by `cartComplete`. Idempotent on the order: a second call returns the existing still-valid session.
4274
+ """
3839
4275
  input PaymentCreateInput {
3840
4276
  """
3841
- URL powrotu klienta po anulowaniu płatności musi być na zweryfikowanej domenie sklepu
4277
+ URL the gateway returns the buyer to after they cancel the payment. Must point to a verified domain of the shop.
3842
4278
  """
3843
4279
  cancelUrl: URL
3844
4280
 
3845
- """ID zamówienia (z cartComplete) do opłacenia"""
4281
+ """ID of the order to pay for — `cartComplete.order.id`."""
3846
4282
  orderId: ID!
3847
4283
 
3848
4284
  """
3849
- URL powrotu klienta po płatności musi być na zweryfikowanej domenie sklepu
4285
+ URL the gateway returns the buyer to after a successful payment. Must point to a verified domain of the shop; rejected with `RETURN_URL_INVALID` otherwise.
3850
4286
  """
3851
4287
  returnUrl: URL
3852
4288
  }
3853
4289
 
3854
- """Wynik paymentCreate mutation"""
4290
+ """Result of `paymentCreate`."""
3855
4291
  type PaymentCreatePayload {
3856
- """Utworzona sesja płatności (null gdy userErrors)"""
4292
+ """
4293
+ The created (or reused) payment session on success; null when `userErrors` is non-empty.
4294
+ """
3857
4295
  payment: PaymentSession
3858
4296
 
3859
- """Błędy walidacji / biznesowe"""
4297
+ """
4298
+ Business / validation errors carrying a stable `PaymentErrorCode` in `code` (e.g. `ORDER_NOT_FOUND`, `ORDER_ALREADY_PAID`, `ORDER_NOT_PAYABLE`, `PAYMENT_PROVIDER_NOT_CONFIGURED`, `RETURN_URL_INVALID`, `PAYMENT_FAILED`).
4299
+ """
3860
4300
  userErrors: [UserError!]!
3861
4301
  }
3862
4302
 
3863
4303
  """
3864
- Sposób uruchomienia płatności po stronie klientastorefront rozgałęzia krok po tej wartości
4304
+ How the storefront should launch the payment after `paymentCreate`. ONLINE_REDIRECT = redirect the browser to `redirectUrl`. ONLINE_EMBEDDED = render an in-page widget using `clientSecret`. INSTANT_DIRECT = the payment is already settled, check `status`. OFFLINE_MANUAL never appears here when the order uses an offline method `canCreatePayment` is false and `paymentCreate` is not called.
3865
4305
  """
3866
4306
  enum PaymentInitiationFlow {
3867
4307
  INSTANT_DIRECT
@@ -3870,37 +4310,59 @@ enum PaymentInitiationFlow {
3870
4310
  ONLINE_REDIRECT
3871
4311
  }
3872
4312
 
3873
- """Payment method available for checkout"""
4313
+ """
4314
+ A payment method offered to the buyer at checkout — what to render in the payment picker and pass to `cartSelectPaymentMethod`.
4315
+ """
3874
4316
  type PaymentMethod {
3875
- """Description for customers"""
4317
+ """
4318
+ Optional buyer-facing description shown under the name (e.g. "Pay with your bank app").
4319
+ """
3876
4320
  description: String
3877
4321
 
3878
- """Icon URL or path"""
4322
+ """
4323
+ Optional icon URL configured by the merchant. Use as the method tile artwork.
4324
+ """
3879
4325
  icon: String
3880
4326
 
3881
- """Payment method ID"""
4327
+ """
4328
+ Stable ID of the payment method. Pass to `cartSelectPaymentMethod` to select it.
4329
+ """
3882
4330
  id: ID!
3883
4331
 
3884
- """Whether this is the default payment method"""
4332
+ """
4333
+ True when the merchant has marked this method as the default. Pre-select it in the picker.
4334
+ """
3885
4335
  isDefault: Boolean!
3886
4336
 
3887
- """Display name"""
4337
+ """
4338
+ Display name configured by the merchant (e.g. "BLIK", "Credit card", "Cash on delivery").
4339
+ """
3888
4340
  name: String!
3889
4341
 
3890
- """Display position (lower = higher priority)"""
4342
+ """
4343
+ Merchant-configured display position — lower values come first in the picker.
4344
+ """
3891
4345
  position: Float!
3892
4346
 
3893
- """Provider code (payu, stripe, p24, etc.)"""
4347
+ """
4348
+ Provider code (e.g. "payu", "stripe", "p24", "cash_on_delivery"). Identifies the integration behind the method; do not branch UI on it — use `type` instead.
4349
+ """
3894
4350
  provider: String!
3895
4351
 
3896
- """Supported currency codes"""
4352
+ """
4353
+ ISO 4217 currency codes the method accepts. Null when the method accepts the shop currency without restriction.
4354
+ """
3897
4355
  supportedCurrencies: [String!]
3898
4356
 
3899
- """Type of payment method"""
4357
+ """
4358
+ Category of the method (CARD, BLIK, BANK_TRANSFER, CASH_ON_DELIVERY, OTHER). Drives iconography and copy.
4359
+ """
3900
4360
  type: PaymentMethodType!
3901
4361
  }
3902
4362
 
3903
- """Type of payment method"""
4363
+ """
4364
+ Category of a payment method: CARD, BLIK, BANK_TRANSFER, CASH_ON_DELIVERY or OTHER. Drives iconography and copy in the payment picker; do not branch on `provider` directly.
4365
+ """
3904
4366
  enum PaymentMethodType {
3905
4367
  BANK_TRANSFER
3906
4368
  BLIK
@@ -3909,30 +4371,44 @@ enum PaymentMethodType {
3909
4371
  OTHER
3910
4372
  }
3911
4373
 
3912
- """Sesja płatności utworzona dla zamówienia"""
4374
+ """
4375
+ Payment session created for an order. Branch on `flow` to launch payment: ONLINE_REDIRECT → redirect to `redirectUrl`; ONLINE_EMBEDDED → render an in-page widget using `clientSecret`; INSTANT_DIRECT → the payment is already settled, check `status`.
4376
+ """
3913
4377
  type PaymentSession {
3914
- """Token/secret do widgetu in-page — wypełniony dla flow ONLINE_EMBEDDED"""
4378
+ """
4379
+ Client secret / token for the in-page payment widget. Populated only when `flow` is ONLINE_EMBEDDED. Treat as sensitive — do not log.
4380
+ """
3915
4381
  clientSecret: String
3916
4382
 
3917
- """Kiedy redirectUrl/clientSecret przestaje być ważny (ISO 8601)"""
4383
+ """
4384
+ When the `redirectUrl` / `clientSecret` stops being usable (ISO 8601). The storefront should call `paymentCreate` again to get a fresh session after this time.
4385
+ """
3918
4386
  expiresAt: String
3919
4387
 
3920
- """Sposób uruchomienia — storefront robi switch(flow)"""
4388
+ """
4389
+ How the storefront should launch the payment — branch on this with `switch(flow)`.
4390
+ """
3921
4391
  flow: PaymentInitiationFlow!
3922
4392
 
3923
- """ID rekordu płatności"""
4393
+ """Stable identifier of the payment record."""
3924
4394
  id: ID!
3925
4395
 
3926
- """ID zamówienia"""
4396
+ """ID of the order this payment is for."""
3927
4397
  orderId: ID!
3928
4398
 
3929
- """Kod providera płatności (np. PAYU)"""
4399
+ """
4400
+ Provider code of the integration behind the session (e.g. "PAYU", "STRIPE"). Use for analytics; do not branch UI on it — use `flow` and the order `paymentMethodType` instead.
4401
+ """
3930
4402
  provider: String!
3931
4403
 
3932
- """URL hosted gateway — wypełniony dla flow ONLINE_REDIRECT"""
4404
+ """
4405
+ Hosted-gateway URL to redirect the buyer to. Populated only when `flow` is ONLINE_REDIRECT.
4406
+ """
3933
4407
  redirectUrl: URL
3934
4408
 
3935
- """Status płatności zamówienia"""
4409
+ """
4410
+ Payment status of the order at the time the session was created. For INSTANT_DIRECT, this already reflects the settled outcome.
4411
+ """
3936
4412
  status: OrderPaymentStatus!
3937
4413
  }
3938
4414
 
@@ -3953,6 +4429,46 @@ type PaymentSettings {
3953
4429
  paymentProviders: [String!]!
3954
4430
  }
3955
4431
 
4432
+ """
4433
+ A pickup point (parcel locker or staffed collection point) attached to a delivery address. The buyer picks it in the carrier widget; it is persisted on the cart shipping address and carried through to the order.
4434
+ """
4435
+ type PickupPoint {
4436
+ """
4437
+ Point address as a single human-readable line — show alongside the name on the confirmation page.
4438
+ """
4439
+ address: String
4440
+
4441
+ """Display name of the point as shown in the carrier widget."""
4442
+ name: String
4443
+
4444
+ """
4445
+ Identifier of the point within the provider network (e.g. an InPost parcel locker code such as `KRA010`). Pass back to `PickupPointInput.pointId` when attaching the same point to another address.
4446
+ """
4447
+ pointId: String!
4448
+
4449
+ """
4450
+ Carrier network code that owns the point (e.g. `inpost`, `orlen`, `dpd`).
4451
+ """
4452
+ provider: String!
4453
+ }
4454
+
4455
+ """
4456
+ Pickup point (parcel locker / collection point) for a cart shipping address
4457
+ """
4458
+ input PickupPointInput {
4459
+ """Point address as a single line"""
4460
+ address: String
4461
+
4462
+ """Human-readable point name"""
4463
+ name: String
4464
+
4465
+ """Point identifier within the provider network"""
4466
+ pointId: String!
4467
+
4468
+ """Courier network code (e.g. inpost, orlen, dpd)"""
4469
+ provider: String!
4470
+ }
4471
+
3956
4472
  """Points estimate for an order"""
3957
4473
  type PointsEstimate {
3958
4474
  """Base points to earn"""
@@ -4468,7 +4984,9 @@ enum ProductSortKeys {
4468
4984
  VENDOR
4469
4985
  }
4470
4986
 
4471
- """Product type classification"""
4987
+ """
4988
+ Product type classification. PHYSICAL = ships to an address (requires the shipping step). DIGITAL = delivered electronically. SERVICE = booking / appointment, no shipment. SUBSCRIPTION = recurring billing. GIFT_CARD = issues a redeemable card on completion.
4989
+ """
4472
4990
  enum ProductTypeEnum {
4473
4991
  DIGITAL
4474
4992
  GIFT_CARD
@@ -4477,49 +4995,69 @@ enum ProductTypeEnum {
4477
4995
  SUBSCRIPTION
4478
4996
  }
4479
4997
 
4480
- """Product variant - purchasable unit"""
4998
+ """
4999
+ A purchasable unit of a product — one variant out of the product variants list, identified by its `id` and described by its options.
5000
+ """
4481
5001
  type ProductVariant {
4482
5002
  """Variant custom field values (post-Opcja A unified custom fields)."""
4483
5003
  attributes(namespace: String): [EntityAttributeField!]!
4484
5004
 
4485
5005
  """
4486
- Available stock (computed: stock - reserved). Null when track is disabled.
5006
+ Available stock what the buyer can buy now (on-hand minus active reservations, never below 0). Null when the merchant has disabled stock tracking for this variant (e.g. digital, made-to-order).
4487
5007
  """
4488
5008
  availableStock: Int
4489
5009
 
4490
- """Barcode"""
5010
+ """
5011
+ Barcode (EAN/UPC/etc.) as set by the merchant. Null when not configured.
5012
+ """
4491
5013
  barcode: String
4492
5014
 
4493
- """Compare at price (Money). Null gdy variant nie jest na promocji."""
5015
+ """
5016
+ Strike-through compare-at price when the variant is on sale. Null when the variant is not discounted; show the strike-through only when this is present and greater than `price`.
5017
+ """
4494
5018
  compareAtPrice: Money
4495
5019
 
4496
- """Opt-in: compare-at price with conversion transparency."""
5020
+ """Optional opt-in: `compareAtPrice` with full conversion transparency."""
4497
5021
  compareAtPriceWithConversion: PriceMoney
4498
5022
 
4499
- """Unique identifier"""
5023
+ """
5024
+ Stable identifier of the variant. Pass to `cartAddLines.variantId` to add the variant to a cart.
5025
+ """
4500
5026
  id: ID!
4501
5027
 
4502
- """Variant image"""
5028
+ """
5029
+ Image specific to this variant. Null when the variant inherits the parent product image.
5030
+ """
4503
5031
  image: Image
4504
5032
 
4505
- """Whether variant is available for purchase"""
5033
+ """
5034
+ True when the variant can be purchased right now (in stock, or backorder allowed by the merchant).
5035
+ """
4506
5036
  isAvailable: Boolean!
4507
5037
 
4508
- """Variant price (Money). Default field — industry-standard schema."""
5038
+ """
5039
+ Current price of the variant in the buyer preferred currency (auto-converted from the shop base currency when multi-currency is enabled).
5040
+ """
4509
5041
  price: Money!
4510
5042
 
4511
5043
  """
4512
- Opt-in: price with full conversion transparency. Use dla currency-converter UI.
5044
+ Optional opt-in: `price` with full conversion transparency (original shop-currency amount, exchange rate, conversion timestamp). Use when building a currency-converter UI.
4513
5045
  """
4514
5046
  priceWithConversion: PriceMoney
4515
5047
 
4516
- """Selected options for this variant"""
5048
+ """
5049
+ Option values that define this variant (e.g. Size = Large, Color = Red).
5050
+ """
4517
5051
  selectedOptions: [SelectedOption!]!
4518
5052
 
4519
- """SKU code"""
5053
+ """
5054
+ Stock-keeping unit code as set by the merchant. Null when not configured.
5055
+ """
4520
5056
  sku: String
4521
5057
 
4522
- """Sort order among product variants"""
5058
+ """
5059
+ Display position of this variant within the parent product list. Lower values come first.
5060
+ """
4523
5061
  sortOrder: Int
4524
5062
 
4525
5063
  """
@@ -4539,10 +5077,14 @@ type ProductVariant {
4539
5077
  near: GeoCoordinateInput
4540
5078
  ): StoreAvailabilityConnection
4541
5079
 
4542
- """Variant title (e.g., "Large / Red")"""
5080
+ """
5081
+ Display title of the variant (e.g. "Large / Red"). Composed from the variant options.
5082
+ """
4543
5083
  title: String!
4544
5084
 
4545
- """Variant weight (canonical unit GRAMS — Prisma stores integer grams)"""
5085
+ """
5086
+ Variant weight with its unit. Stored in grams; pick a display unit on the storefront if needed. Null when the merchant has not set a weight.
5087
+ """
4546
5088
  weight: Weight
4547
5089
  }
4548
5090
 
@@ -4586,10 +5128,14 @@ type Query {
4586
5128
  """
4587
5129
  attributeOptionsSearch(input: AttributeOptionsSearchInput!): AttributeFilterValueConnection!
4588
5130
 
4589
- """Get available payment methods"""
5131
+ """
5132
+ Payment methods active for the current shop, plus the merchant default. Shop-level — independent of cart contents in this iteration. Fetch once for the checkout payment step.
5133
+ """
4590
5134
  availablePaymentMethods: AvailablePaymentMethods!
4591
5135
 
4592
- """Get available shipping methods for address"""
5136
+ """
5137
+ Standalone shipping-method preview for an address — does not require a cart. Pass an optional `cart` summary (subtotal, weight, currency) to evaluate price-based / weight-based rules and free-shipping thresholds. For an already-created cart, prefer `cart.availableShippingMethods(address)` — it reads the cart contents directly.
5138
+ """
4593
5139
  availableShippingMethods(address: ShippingAddressInput!, cart: CartShippingInput): AvailableShippingMethodsPayload!
4594
5140
 
4595
5141
  """Get live shipping rates from configured carriers"""
@@ -4640,10 +5186,14 @@ type Query {
4640
5186
  """List blog tags"""
4641
5187
  blogTags(limit: Int = 50): [BlogTag!]!
4642
5188
 
4643
- """Get cart by ID"""
5189
+ """
5190
+ Fetch a cart by ID — returns null when the cart does not exist or has already been completed (converted to an order). Use to hydrate the cart state on page load or after a recovery flow.
5191
+ """
4644
5192
  cart(id: ID!): Cart
4645
5193
 
4646
- """Validate discount code preview (read-only, no cart side effects)"""
5194
+ """
5195
+ Preview whether a discount code is currently applicable to a cart — read-only, no cart side effects. Use for inline feedback while the buyer types a code, before calling `cartDiscountCodesUpdate`. Result depends on the cart subtotal (minimum-order rules) so do not cache aggressively: prefer `fetchPolicy: "network-only"` or include `cart.subtotal` in the cache key.
5196
+ """
4647
5197
  cartValidateDiscountCode(cartId: ID!, discountCode: String!): DiscountValidationResult!
4648
5198
 
4649
5199
  """
@@ -4728,13 +5278,17 @@ type Query {
4728
5278
  code: String!
4729
5279
  ): Currency
4730
5280
 
4731
- """Get authenticated customer (cookie / Authorization Bearer)"""
5281
+ """
5282
+ The authenticated customer for the current request. The request must carry a valid customer access token (in the `Authorization: Bearer ...` header or an HTTP-only auth cookie). Returns null for anonymous requests.
5283
+ """
4732
5284
  customer: Customer
4733
5285
 
4734
5286
  """Get available customer groups"""
4735
5287
  customerGroups: [CustomerGroup!]
4736
5288
 
4737
- """Get single order for authenticated customer"""
5289
+ """
5290
+ Fetch a single order owned by the authenticated customer. Returns null silently when there is no authenticated customer or the order does not belong to them. For guest order access use `orderByToken` instead.
5291
+ """
4738
5292
  customerOrder(orderId: ID!): Order
4739
5293
 
4740
5294
  """Estimate points for an order amount"""
@@ -5402,17 +5956,19 @@ type SearchQuerySuggestion {
5402
5956
  text: String!
5403
5957
  }
5404
5958
 
5405
- """Selected product option"""
5959
+ """
5960
+ One option of a product variant — e.g. `{ name: "Size", value: "Large" }`.
5961
+ """
5406
5962
  type SelectedOption {
5407
- """Option name (e.g., "Size", "Color")"""
5963
+ """Option name (e.g. "Size", "Color")."""
5408
5964
  name: String!
5409
5965
 
5410
5966
  """
5411
- Relational `ProductOptionValue.id`stable FK reference. Null only for legacy variants whose option values have not yet been migrated to the relational model.
5967
+ Stable ID of the option value useful as a key when rendering variant selectors. Null only for legacy variants not yet migrated to relational option values.
5412
5968
  """
5413
5969
  optionValueId: ID
5414
5970
 
5415
- """Option value (e.g., "Large", "Red")"""
5971
+ """Option value for this variant (e.g. "Large", "Red")."""
5416
5972
  value: String!
5417
5973
  }
5418
5974
 
@@ -5558,48 +6114,62 @@ enum ShipmentStatus {
5558
6114
  RETURNED
5559
6115
  }
5560
6116
 
5561
- """Address input for shipping calculation"""
6117
+ """
6118
+ Destination address used to evaluate which shipping methods are available for a cart. Country is required; the rest are optional and improve carrier rate accuracy when provided.
6119
+ """
5562
6120
  input ShippingAddressInput {
5563
- """City"""
6121
+ """City / town."""
5564
6122
  city: String
5565
6123
 
5566
- """ISO 3166-1 alpha-2 country code"""
6124
+ """
6125
+ Destination country (ISO 3166-1 alpha-2). Required — drives carrier eligibility and tax/region rules.
6126
+ """
5567
6127
  country: CountryCode!
5568
6128
 
5569
- """Email address"""
6129
+ """
6130
+ Buyer email — useful when the shipping carrier needs notification contact details.
6131
+ """
5570
6132
  email: String
5571
6133
 
5572
- """First name"""
6134
+ """Buyer first name."""
5573
6135
  firstName: String
5574
6136
 
5575
- """Last name"""
6137
+ """Buyer last name."""
5576
6138
  lastName: String
5577
6139
 
5578
- """Phone number"""
6140
+ """Buyer phone number (free-form)."""
5579
6141
  phone: String
5580
6142
 
5581
- """Postal / ZIP code"""
6143
+ """Postal / ZIP code — required by most carriers for accurate rates."""
5582
6144
  postalCode: String
5583
6145
 
5584
- """State / province / region"""
6146
+ """State / province / region."""
5585
6147
  state: String
5586
6148
 
5587
- """First line of street address"""
6149
+ """First line of the street address (street and house / building number)."""
5588
6150
  streetLine1: String
5589
6151
  }
5590
6152
 
5591
- """Shipping carrier information"""
6153
+ """
6154
+ Shipping carrier associated with a shipping method (e.g. InPost, DPD, DHL).
6155
+ """
5592
6156
  type ShippingCarrier {
5593
- """Carrier provider ID"""
6157
+ """
6158
+ Stable carrier identifier. Null when the method does not map to a registered carrier (e.g. local pickup configured by the merchant).
6159
+ """
5594
6160
  id: ID
5595
6161
 
5596
- """Carrier logo URL"""
6162
+ """
6163
+ URL of the carrier logo. Use for the method tile in the shipping picker.
6164
+ """
5597
6165
  logoUrl: String
5598
6166
 
5599
- """Carrier name (e.g., InPost, DPD, DHL)"""
6167
+ """Carrier display name (e.g. "InPost", "DPD", "DHL")."""
5600
6168
  name: String!
5601
6169
 
5602
- """Service code"""
6170
+ """
6171
+ Carrier service code as configured by the merchant (e.g. "inpost_paczkomat"). Useful when integrating carrier widgets.
6172
+ """
5603
6173
  serviceCode: String
5604
6174
  }
5605
6175
 
@@ -5932,7 +6502,9 @@ type StoreAvailabilityEdge {
5932
6502
  node: StoreAvailability!
5933
6503
  }
5934
6504
 
5935
- """Lifecycle status of an order"""
6505
+ """
6506
+ High-level lifecycle of an order. DRAFT (not yet placed) → PENDING (placed, awaiting confirmation) → CONFIRMED → PROCESSING → COMPLETED. ON_HOLD pauses the order; CANCELLED and EXPIRED are terminal states.
6507
+ """
5936
6508
  enum StorefrontOrderStatus {
5937
6509
  CANCELLED
5938
6510
  COMPLETED
@@ -6064,15 +6636,23 @@ type UrlRedirectConnection {
6064
6636
  pageInfo: PageInfo!
6065
6637
  }
6066
6638
 
6067
- """User-facing error from mutations"""
6639
+ """
6640
+ A validation or business error returned alongside a mutation result. Surfaced as `userErrors[]`; the cart/order itself is null when the mutation could not be applied. Always branch on `code` for UI behaviour — `message` is translated and locale-dependent.
6641
+ """
6068
6642
  type UserError {
6069
- """Error code"""
6643
+ """
6644
+ Stable machine-readable code (e.g. `CART_NOT_FOUND`, `NOT_ENOUGH_IN_STOCK`, `INVALID_DISCOUNT_CODE`). The list of possible codes is defined per mutation by `CartErrorCode`, `CustomerErrorCode`, `PaymentErrorCode`, etc.
6645
+ """
6070
6646
  code: String
6071
6647
 
6072
- """Path to field that caused error"""
6648
+ """
6649
+ Path of the input field that caused the error (e.g. `["input", "lines", 0, "quantity"]`). Use to highlight the offending control in a form.
6650
+ """
6073
6651
  field: [String!]
6074
6652
 
6075
- """Error message"""
6653
+ """
6654
+ Human-readable error message localised to the request locale (e.g. `Accept-Language`). For display only.
6655
+ """
6076
6656
  message: String!
6077
6657
  }
6078
6658
 
@@ -6085,16 +6665,18 @@ input VariantOptionFilter {
6085
6665
  value: String!
6086
6666
  }
6087
6667
 
6088
- """Weight value with unit"""
6668
+ """A weight value paired with its unit."""
6089
6669
  type Weight {
6090
- """Weight unit"""
6670
+ """Unit of the weight (GRAMS, KILOGRAMS, OUNCES or POUNDS)."""
6091
6671
  unit: WeightUnit!
6092
6672
 
6093
- """Weight value"""
6673
+ """Weight magnitude, interpreted according to `unit`."""
6094
6674
  value: Float!
6095
6675
  }
6096
6676
 
6097
- """Weight unit (GRAMS canonical, KILOGRAMS/OUNCES/POUNDS for display)"""
6677
+ """
6678
+ Weight unit. GRAMS is the canonical storage unit; KILOGRAMS / OUNCES / POUNDS are display variants for shipping and checkout UI.
6679
+ """
6098
6680
  enum WeightUnit {
6099
6681
  GRAMS
6100
6682
  KILOGRAMS