@doswiftly/storefront-operations 20.0.0 → 20.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -27,7 +27,7 @@ consumer's `codegen.ts` references this package's `.graphql` files as
27
27
  live in the consumer's repo.
28
28
 
29
29
  <!-- AUTOGEN:STATS:BEGIN — auto-regenerated, do not edit by hand -->
30
- - **Schema version**: 20.0.0
30
+ - **Schema version**: 20.2.0
31
31
  - **Queries**: 52
32
32
  - **Mutations**: 44
33
33
  - **Fragments**: 104
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 20.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 17fedcf: Addresses now carry a structured building / flat number alongside the free-form street line.
8
+
9
+ **Why**: Polish addresses — and carriers like InPost as well as VAT invoicing — need the building number as a discrete field rather than mixed into a single street line (e.g. `"ul. Piękna 5/3"` must split into building `5`, flat `3`). The `MailingAddress` type and the cart / mailing address inputs now expose `buildingNumber` and `flatNumber` so storefronts can collect and display them precisely.
10
+
11
+ **Additive (backward-compatible)**:
12
+ 1. `MailingAddress` (read) gains `buildingNumber` and `flatNumber` — populated on cart, order and saved customer addresses; `null` when only the free-form line was provided.
13
+ 2. The address inputs (`CartAddressInput`, `MailingAddressInput`) accept optional `buildingNumber` and `flatNumber`. For a Polish street delivery without a pickup point the building number is now required server-side — omitting it returns a `BUILDING_NUMBER_REQUIRED` user error instead of silently guessing it from the street text.
14
+
15
+ **Usage example**:
16
+
17
+ ```ts
18
+ await cartSetShippingAddress({
19
+ cartId,
20
+ address: {
21
+ streetLine1: "ul. Piękna 5/3",
22
+ buildingNumber: "5",
23
+ flatNumber: "3",
24
+ city: "Warszawa",
25
+ postalCode: "00-001",
26
+ country: "PL",
27
+ },
28
+ });
29
+
30
+ // reading it back
31
+ const { buildingNumber, flatNumber } = order.shippingAddress;
32
+ ```
33
+
34
+ **Migration checklist for existing storefronts**:
35
+ - [ ] Add a `buildingNumber` (and optional `flatNumber`) field to your address forms.
36
+ - [ ] For Polish street addresses, send `buildingNumber`, or handle the `BUILDING_NUMBER_REQUIRED` user error returned by the cart address mutations.
37
+ - [ ] Optionally render `buildingNumber` / `flatNumber` when displaying saved or order addresses.
38
+
39
+ ## 20.1.0
40
+
41
+ ### Minor Changes
42
+
43
+ - e1bda76: Cart addresses now carry full B2B invoice identity end to end. `cartSetShippingAddress` and `cartSetBillingAddress` accept an EU VAT number (`vatNumber`, e.g. `PL1234567890`) alongside the existing tax ID and business registry number, and the cart address now returns all three (`taxId`, `vatNumber`, `regon`) — so a storefront can display and re-confirm exactly what the buyer entered. These values are carried onto the resulting order at checkout, ready for reverse-charge and cross-border B2B invoices.
44
+
45
+ Signed-in shoppers also get their saved default shipping and billing address — including those B2B fields — prefilled into the cart automatically when they create a cart or log in. Anything the shopper has already typed is never overwritten.
46
+
3
47
  ## 20.0.0
4
48
 
5
49
  ### Major Changes
package/README.md CHANGED
@@ -472,7 +472,7 @@ full executable body of each operation.
472
472
  | Fragment | On Type | Description |
473
473
  | --- | --- | --- |
474
474
  | `PickupPoint` | `PickupPoint` | Selected pickup point (parcel locker or collection point) attached to a delivery address. Returned on `MailingAddress.pickupPoint` when the buyer chose a non-home delivery method (`deliveryType` other than `HOME`). Null for home delivery. |
475
- | `MailingAddress` | `MailingAddress` | Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries. |
475
+ | `MailingAddress` | `MailingAddress` | Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`, `regon`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries. |
476
476
  | `CustomerAccessToken` | `CustomerAccessToken` | Customer access token returned by `customerLogin` / `customerSignup` / `customerActivate` / `customerResetPassword` / `customerRefreshToken`. The token's JWT TTL is 24h; cookie max-age is 30d. |
477
477
  | `Customer` | `Customer` | Customer profile — basic info plus B2B fields (`taxId`, `vatNumber`, `regon`, `companyName`), default address, lifetime stats (`orderCount`, `totalSpent`), marketing preferences. Use on profile / settings pages. |
478
478
  | `Order` | `Order` | Order summary — number, totals (cost / tax / shipping), payment + fulfillment status, shipping address, item count, lifecycle timestamps, plus payment capability signal (`canCreatePayment` + `paymentMethodType`) the storefront uses to decide post-completion payment flow without hard-coded provider checks. Spread on the order list, order detail, and the `cartComplete` mutation result. Line items are not included here. |
package/fragments.graphql CHANGED
@@ -252,11 +252,13 @@ fragment PickupPoint on PickupPoint {
252
252
  address
253
253
  }
254
254
 
255
- # Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries.
255
+ # Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`, `regon`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries.
256
256
  fragment MailingAddress on MailingAddress {
257
257
  id
258
258
  streetLine1
259
259
  streetLine2
260
+ buildingNumber
261
+ flatNumber
260
262
  city
261
263
  company
262
264
  country
@@ -271,6 +273,7 @@ fragment MailingAddress on MailingAddress {
271
273
  isDefault
272
274
  taxId
273
275
  vatNumber
276
+ regon
274
277
  pickupPoint {
275
278
  ...PickupPoint
276
279
  }
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # DoSwiftly Storefront Operations — Full Reference
2
2
 
3
- > Schema version: **20.0.0**
3
+ > Schema version: **20.2.0**
4
4
  > 52 queries · 44 mutations · 104 fragments
5
5
 
6
6
  Auto-generated from `.graphql` source files. Do not edit by hand — this file is
@@ -2927,7 +2927,7 @@ fragment PickupPoint on PickupPoint {
2927
2927
 
2928
2928
  **Section**: Customer
2929
2929
 
2930
- **Description**: Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries.
2930
+ **Description**: Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`, `regon`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries.
2931
2931
 
2932
2932
  **Uses fragments**: `PickupPoint`
2933
2933
 
@@ -2937,6 +2937,8 @@ fragment MailingAddress on MailingAddress {
2937
2937
  id
2938
2938
  streetLine1
2939
2939
  streetLine2
2940
+ buildingNumber
2941
+ flatNumber
2940
2942
  city
2941
2943
  company
2942
2944
  country
@@ -2951,6 +2953,7 @@ fragment MailingAddress on MailingAddress {
2951
2953
  isDefault
2952
2954
  taxId
2953
2955
  vatNumber
2956
+ regon
2954
2957
  pickupPoint {
2955
2958
  ...PickupPoint
2956
2959
  }
package/operations.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "20.0.0",
2
+ "schemaVersion": "20.2.0",
3
3
  "queries": [
4
4
  {
5
5
  "name": "Shop",
@@ -2112,12 +2112,12 @@
2112
2112
  "name": "MailingAddress",
2113
2113
  "kind": "fragment",
2114
2114
  "section": "Customer",
2115
- "description": "Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries.",
2115
+ "description": "Customer mailing address — full street/city/state/country/postal code with names and phone. `isDefault` flips when this address is the default for shipping. Carries B2B invoicing fields (`taxId`, `vatNumber`, `regon`) and the selected `pickupPoint` for parcel locker / collection point deliveries. Spread on the address book UI, checkout shipping/billing forms, and order summaries.",
2116
2116
  "variables": [],
2117
2117
  "fragmentRefs": [
2118
2118
  "PickupPoint"
2119
2119
  ],
2120
- "body": "fragment MailingAddress on MailingAddress {\n id\n streetLine1\n streetLine2\n city\n company\n country\n countryCode\n firstName\n lastName\n name\n phone\n state\n stateCode\n postalCode\n isDefault\n taxId\n vatNumber\n pickupPoint {\n ...PickupPoint\n }\n}",
2120
+ "body": "fragment MailingAddress on MailingAddress {\n id\n streetLine1\n streetLine2\n buildingNumber\n flatNumber\n city\n company\n country\n countryCode\n firstName\n lastName\n name\n phone\n state\n stateCode\n postalCode\n isDefault\n taxId\n vatNumber\n regon\n pickupPoint {\n ...PickupPoint\n }\n}",
2121
2121
  "onType": "MailingAddress"
2122
2122
  },
2123
2123
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doswiftly/storefront-operations",
3
- "version": "20.0.0",
3
+ "version": "20.2.0",
4
4
  "description": "GraphQL operations for DoSwiftly Storefront - SSOT from backend",
5
5
  "homepage": "https://doswiftly.pl",
6
6
  "publishConfig": {
package/schema.graphql CHANGED
@@ -1046,9 +1046,14 @@ type CartAddLinesPayload {
1046
1046
  }
1047
1047
 
1048
1048
  """
1049
- 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`).
1049
+ 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`, `vatNumber`, `regon`).
1050
1050
  """
1051
1051
  input CartAddressInput {
1052
+ """
1053
+ Building / house number as a discrete field, overlaid on `streetLine1`. Required for delivery and billing addresses in Poland (`country: PL`) without a `pickupPoint` — carriers (e.g. InPost) and invoicing need the building number split out from the street name.
1054
+ """
1055
+ buildingNumber: String
1056
+
1052
1057
  """City"""
1053
1058
  city: String!
1054
1059
 
@@ -1061,6 +1066,11 @@ input CartAddressInput {
1061
1066
  """First name"""
1062
1067
  firstName: String
1063
1068
 
1069
+ """
1070
+ Flat / apartment number as a discrete field — optional companion to `buildingNumber`.
1071
+ """
1072
+ flatNumber: String
1073
+
1064
1074
  """Last name"""
1065
1075
  lastName: String
1066
1076
 
@@ -1093,6 +1103,11 @@ input CartAddressInput {
1093
1103
  Buyer tax ID for B2B invoicing (Polish NIP). Persisted on the resulting order at checkout completion.
1094
1104
  """
1095
1105
  taxId: String
1106
+
1107
+ """
1108
+ Buyer EU VAT number for cross-border B2B invoicing (e.g. PL1234567890). Persisted on the resulting order at checkout completion.
1109
+ """
1110
+ vatNumber: String
1096
1111
  }
1097
1112
 
1098
1113
  """
@@ -3828,9 +3843,14 @@ enum LoyaltyTransactionType {
3828
3843
  }
3829
3844
 
3830
3845
  """
3831
- 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.
3846
+ 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`, `regon`) and an optional `pickupPoint` for parcel locker / collection-point delivery.
3832
3847
  """
3833
3848
  type MailingAddress implements Node {
3849
+ """
3850
+ Building / house number as a discrete field, overlaid on `streetLine1`. Populated for structured addresses (required for PL delivery / billing without a pickup point); null when only the free-form `streetLine1` was provided.
3851
+ """
3852
+ buildingNumber: String
3853
+
3834
3854
  """City / town."""
3835
3855
  city: String
3836
3856
 
@@ -3848,6 +3868,11 @@ type MailingAddress implements Node {
3848
3868
  """Buyer first name."""
3849
3869
  firstName: String
3850
3870
 
3871
+ """
3872
+ Flat / apartment number as a discrete field — optional companion to `buildingNumber`.
3873
+ """
3874
+ flatNumber: String
3875
+
3851
3876
  """
3852
3877
  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).
3853
3878
  """
@@ -3881,6 +3906,11 @@ type MailingAddress implements Node {
3881
3906
  """Postal / ZIP code."""
3882
3907
  postalCode: String
3883
3908
 
3909
+ """
3910
+ Buyer business registry number (Polish REGON) carried on a cart address for B2B invoicing. Populated on cart shipping/billing addresses; null on customer address-book entries (REGON is customer-level).
3911
+ """
3912
+ regon: String
3913
+
3884
3914
  """State / province / region name."""
3885
3915
  state: String
3886
3916
 
@@ -3934,6 +3964,11 @@ type MailingAddressEdge {
3934
3964
 
3935
3965
  """Input for mailing address"""
3936
3966
  input MailingAddressInput {
3967
+ """
3968
+ Building / house number as a discrete field, overlaid on `streetLine1`. Required for saved Polish addresses (`country: PL`) — used for carrier delivery and invoicing.
3969
+ """
3970
+ buildingNumber: String
3971
+
3937
3972
  """City"""
3938
3973
  city: String
3939
3974
 
@@ -3946,6 +3981,11 @@ input MailingAddressInput {
3946
3981
  """First name"""
3947
3982
  firstName: String
3948
3983
 
3984
+ """
3985
+ Flat / apartment number as a discrete field — optional companion to `buildingNumber`.
3986
+ """
3987
+ flatNumber: String
3988
+
3949
3989
  """Last name"""
3950
3990
  lastName: String
3951
3991