@doswiftly/storefront-operations 20.1.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.1.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,41 @@
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
+
3
39
  ## 20.1.0
4
40
 
5
41
  ### Minor Changes
package/fragments.graphql CHANGED
@@ -257,6 +257,8 @@ 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
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # DoSwiftly Storefront Operations — Full Reference
2
2
 
3
- > Schema version: **20.1.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
@@ -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
package/operations.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "20.1.0",
2
+ "schemaVersion": "20.2.0",
3
3
  "queries": [
4
4
  {
5
5
  "name": "Shop",
@@ -2117,7 +2117,7 @@
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 regon\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.1.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
@@ -1049,6 +1049,11 @@ type CartAddLinesPayload {
1049
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
 
@@ -3836,6 +3846,11 @@ enum LoyaltyTransactionType {
3836
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.
3837
3847
  """
3838
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
+
3839
3854
  """City / town."""
3840
3855
  city: String
3841
3856
 
@@ -3853,6 +3868,11 @@ type MailingAddress implements Node {
3853
3868
  """Buyer first name."""
3854
3869
  firstName: String
3855
3870
 
3871
+ """
3872
+ Flat / apartment number as a discrete field — optional companion to `buildingNumber`.
3873
+ """
3874
+ flatNumber: String
3875
+
3856
3876
  """
3857
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).
3858
3878
  """
@@ -3944,6 +3964,11 @@ type MailingAddressEdge {
3944
3964
 
3945
3965
  """Input for mailing address"""
3946
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
+
3947
3972
  """City"""
3948
3973
  city: String
3949
3974
 
@@ -3956,6 +3981,11 @@ input MailingAddressInput {
3956
3981
  """First name"""
3957
3982
  firstName: String
3958
3983
 
3984
+ """
3985
+ Flat / apartment number as a discrete field — optional companion to `buildingNumber`.
3986
+ """
3987
+ flatNumber: String
3988
+
3959
3989
  """Last name"""
3960
3990
  lastName: String
3961
3991