@v-office/website-sdk 2.13.0 → 2.14.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.
@@ -4,6 +4,7 @@ This file is the versioned changelog index for the website SDK instructions.
4
4
 
5
5
  ## Versions
6
6
 
7
+ - `versions/2.14.0/CHANGELOG.md`: `@v-office/website-sdk` 2.14.0 release notes.
7
8
  - `versions/2.13.0/CHANGELOG.md`: `@v-office/website-sdk` 2.13.0 release notes.
8
9
  - `versions/2.12.0/CHANGELOG.md`: `@v-office/website-sdk` 2.12.0 release notes.
9
10
  - `versions/2.11.0/CHANGELOG.md`: `@v-office/website-sdk` 2.11.0 release notes.
@@ -4,6 +4,7 @@ This file is the versioned migration index for the website SDK instructions.
4
4
 
5
5
  ## Available Guides
6
6
 
7
+ - `versions/2.14.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.13.0 to 2.14.0.
7
8
  - `versions/2.13.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.12.0 to 2.13.0.
8
9
  - `versions/2.12.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.11.0 to 2.12.0.
9
10
  - `versions/2.11.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.10.0 to 2.11.0.
@@ -1,7 +1,7 @@
1
1
  # Website SDK Instructions
2
2
 
3
3
  These instructions describe the current source targeted for
4
- `@v-office/website-sdk` 2.13.0. Package versions remain unchanged until the release
4
+ `@v-office/website-sdk` 2.14.0. Package versions remain unchanged until the release
5
5
  workflow performs the coordinated core and website bumps.
6
6
 
7
7
  Use this directory as the consumer-facing reference for the package:
@@ -18,6 +18,9 @@ Use this directory as the consumer-facing reference for the package:
18
18
  - `document-structured-json.md`: `sdk.static.documents.getTermsAndPrivacyPolicy` and structured document JSON rendering rules.
19
19
  - `CHANGELOG.md`: versioned changelog index.
20
20
  - `MIGRATION.md`: versioned migration index.
21
+ - `versions/2.14.0/`: 2.14.0 catalog-backed v9 property types and options,
22
+ corrected option/count rendering and translations, and the 2.13.0-to-2.14.0
23
+ migration guide.
21
24
  - `versions/2.13.0/`: 2.13.0 static search capability discovery, shared v9/v10
22
25
  booking-payment output, corrected remaining-payment deadlines, opaque booking
23
26
  credentials, and the 2.12.0-to-2.13.0 migration guide.
@@ -87,5 +90,5 @@ website-sdk --backend v10 search --locale de-DE --query "adults=2" --sort '{"by"
87
90
  ```
88
91
 
89
92
  Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced
90
- in 2.0.0 and kept in 2.13.0. v10 config additionally requires `searchEndpoint` as
93
+ in 2.0.0 and kept in 2.14.0. v10 config additionally requires `searchEndpoint` as
91
94
  of 2.5.0.
@@ -54,7 +54,7 @@ Sample item:
54
54
  "headline": "Holiday apartment near the sea",
55
55
  "description": "Short localized rental description."
56
56
  },
57
- "highlights": ["2 bedrooms", "WiFi", "Parking"],
57
+ "highlights": ["2 bedrooms", "Wi-Fi", "Parking"],
58
58
  "attributes": [
59
59
  {
60
60
  "label": "Amenities",
@@ -87,6 +87,51 @@ Sample item:
87
87
 
88
88
  Optional fields include `scope`, `address`, `property`, `rooms`, `roomSummary`, `vicinity`, and `reviews`.
89
89
 
90
+ ### Legacy v9 Built-In Attributes
91
+
92
+ From 2.14.0, built-in v9 property types and ordered option values come from the
93
+ vOffice property catalog rather than example-value inference. The SDK keeps
94
+ observed-only fields for compatibility, but examples do not redefine catalog
95
+ fields.
96
+
97
+ v9 `OPT` values are zero-based numeric indexes. The SDK resolves them to
98
+ localized display text before adding them to `attributes`, `highlights`, or
99
+ `vicinity`. For example:
100
+
101
+ ```text
102
+ youthgroups = 0 → Jugendgruppen: willkommen
103
+ youthgroups = 1 → Jugendgruppen: nicht erlaubt
104
+ youthgroups = 2 → Jugendgruppen: auf Anfrage
105
+ ```
106
+
107
+ An option index of `0` is a valid value, not Boolean `false`. Invalid,
108
+ fractional, negative, and out-of-range indexes are omitted.
109
+
110
+ Source-defined v9 `INT` values retain their numeric value, including `1`. Known
111
+ count attributes use localized singular and plural nouns:
112
+
113
+ ```text
114
+ bedrooms = 1 → 1 Schlafzimmer
115
+ bedrooms = 2 → 2 Schlafzimmer
116
+ bedrooms = 1 → 1 bedroom
117
+ bedrooms = 2 → 2 bedrooms
118
+ ```
119
+
120
+ Boolean behavior is unchanged: disabled values are omitted and enabled values
121
+ are rendered as the localized label.
122
+
123
+ Translation overrides use these key forms:
124
+
125
+ ```text
126
+ RentalAttributes.<attribute>.label
127
+ RentalAttributes.<attribute>.option.<zero-based-index>
128
+ RentalAttributes.<attribute>.count.one
129
+ RentalAttributes.<attribute>.count.other
130
+ ```
131
+
132
+ See `versions/2.14.0/CHANGELOG.md` and
133
+ `versions/2.14.0/MIGRATION.md`.
134
+
90
135
  ### Review Items
91
136
 
92
137
  Each review item contains at least `rating` or `text`. `id`, `author`, `label`, and `createdAt` are optional:
@@ -0,0 +1,72 @@
1
+ # Changelog: 2.14.0
2
+
3
+ This release makes the vOffice v9 property catalog authoritative for built-in
4
+ rental attribute types and option values. It fixes legacy option rendering,
5
+ preserves numeric room counts of one, and improves the German and English
6
+ attribute translations.
7
+
8
+ ## Added
9
+
10
+ - Generated v9 property metadata now retains the source property type and every
11
+ ordered `OPT` value from the vOffice property export.
12
+ - All 31 v9 `OPT` attributes have localized German and English option labels.
13
+ - v9 option translations use stable numeric keys:
14
+
15
+ ```text
16
+ RentalAttributes.<attribute>.option.<zero-based-index>
17
+ ```
18
+
19
+ - Count attributes can use localized singular and plural labels through:
20
+
21
+ ```text
22
+ RentalAttributes.<attribute>.count.one
23
+ RentalAttributes.<attribute>.count.other
24
+ ```
25
+
26
+ - Property generation validates all 420 catalog fields, all 30 observed-only
27
+ compatibility fields, option-index ranges in the fixture corpus, and complete
28
+ option translation coverage.
29
+
30
+ ## Fixed
31
+
32
+ - v9 `OPT` index `0` is no longer mistaken for a disabled Boolean value.
33
+ - v9 `OPT` index `1` is no longer rendered as a bare Boolean-style label.
34
+ - Higher option indexes are no longer rendered as quantities such as
35
+ `2 Jugendgruppen`.
36
+ - `youthgroups` now maps its zero-based values correctly:
37
+ - `0`: `willkommen` / `welcome`
38
+ - `1`: `nicht erlaubt` / `not allowed`
39
+ - `2`: `auf Anfrage` / `on request`
40
+ - Option rendering is consistent across rental attributes, highlights, and
41
+ vicinity output.
42
+ - Numeric v9 `INT` attributes retain a value of `1`. For example, bedroom counts
43
+ now render as `1 Schlafzimmer` or `1 bedroom` instead of only the label.
44
+ - Known count attributes use grammatically correct singular and plural forms.
45
+ - German and English v9 rental, filter, and option copy has corrected grammar,
46
+ spelling, capitalization, punctuation, terminology, and unit formatting.
47
+ - Corrected semantic translation errors, including German sea-view filtering
48
+ previously labeled as `Seeblick`.
49
+
50
+ ## Changed
51
+
52
+ - Source-defined v9 property schemas no longer depend on whichever values happen
53
+ to occur in example fixtures. Examples remain inputs only for compatibility
54
+ fields absent from the catalog and for validation.
55
+ - Invalid, fractional, negative, or out-of-range v9 option indexes are omitted
56
+ instead of being exposed as misleading display text.
57
+ - English v9 rental type `FLAT` is now displayed as `Apartment`.
58
+ - Official Spanish Modelo 179 terminology remains Spanish in both locales to
59
+ avoid changing legal and cadastral meanings.
60
+
61
+ ## Compatibility
62
+
63
+ - No SDK construction, configuration, service-call, or public TypeScript shape
64
+ changes are required.
65
+ - Existing Boolean behavior is unchanged: disabled values remain omitted and
66
+ enabled values remain label-only.
67
+ - Existing custom attributes and observed-only v9 compatibility fields remain
68
+ supported.
69
+ - Consumer snapshots, string comparisons, or UI tests that depend on the former
70
+ incorrect v9 strings must be updated.
71
+
72
+ See `versions/2.14.0/MIGRATION.md` and `../../rentals.md`.
@@ -0,0 +1,148 @@
1
+ # Migration: 2.13.0 to 2.14.0
2
+
3
+ 2.14.0 corrects presentation of built-in v9 rental attributes. The public SDK
4
+ types and service calls are unchanged, but applications that snapshot, compare,
5
+ filter, or parse localized attribute strings must account for corrected output.
6
+
7
+ Consumers that use only v10 are not affected by the v9 parsing changes.
8
+
9
+ ## 1. Expect Correct v9 Option Labels
10
+
11
+ Before 2.14.0, numeric v9 option indexes passed through Boolean and quantity
12
+ heuristics. A `youthgroups` value could therefore produce:
13
+
14
+ ```text
15
+ 0 → omitted
16
+ 1 → Jugendgruppen
17
+ 2 → 2 Jugendgruppen
18
+ ```
19
+
20
+ From 2.14.0, values resolve through the ordered vOffice option catalog:
21
+
22
+ ```text
23
+ 0 → Jugendgruppen: willkommen
24
+ 1 → Jugendgruppen: nicht erlaubt
25
+ 2 → Jugendgruppen: auf Anfrage
26
+ ```
27
+
28
+ English output is equivalent:
29
+
30
+ ```text
31
+ 0 → Youth groups: welcome
32
+ 1 → Youth groups: not allowed
33
+ 2 → Youth groups: on request
34
+ ```
35
+
36
+ This applies to all 31 built-in v9 option attributes and to every output surface
37
+ that renders them:
38
+
39
+ - rental `attributes`
40
+ - rental `highlights`
41
+ - rental `vicinity`
42
+
43
+ Do not parse a visible option string back into an index. Treat these values as
44
+ localized display text.
45
+
46
+ ## 2. Preserve Numeric Counts of One
47
+
48
+ Before 2.14.0, the shared legacy renderer interpreted numeric `1` as Boolean
49
+ `true`, so a bedroom count could be reduced to only its label.
50
+
51
+ From 2.14.0, source-defined `INT` values remain numeric display values:
52
+
53
+ ```text
54
+ 1 Schlafzimmer
55
+ 2 Schlafzimmer
56
+ 1 bedroom
57
+ 2 bedrooms
58
+ ```
59
+
60
+ Known count attributes use localized singular and plural nouns. Distance and
61
+ square-meter formatting retain their specialized output.
62
+
63
+ Update snapshots or UI assertions that expected a bare label for a count of one.
64
+
65
+ ## 3. Expect Corrected Translation Copy
66
+
67
+ The v9 German and English catalogs have been proofread. Visible changes include:
68
+
69
+ - corrected compound words, capitalization, punctuation, and unit notation
70
+ - natural US English instead of generated key-like labels
71
+ - corrected German terminology and post-1996 spelling
72
+ - `Apartment` instead of `Flat` for the English v9 `FLAT` rental type
73
+ - corrected filter labels such as German `Meerblick`
74
+
75
+ Applications should render SDK output directly. Avoid branching on translated
76
+ labels because wording can be corrected without changing an attribute's
77
+ underlying meaning.
78
+
79
+ ## 4. Update Translation Overrides if Needed
80
+
81
+ Attribute label overrides continue to use:
82
+
83
+ ```text
84
+ RentalAttributes.<attribute>.label
85
+ ```
86
+
87
+ v9 built-in option overrides use their zero-based source index:
88
+
89
+ ```text
90
+ RentalAttributes.youthgroups.option.0
91
+ RentalAttributes.youthgroups.option.1
92
+ RentalAttributes.youthgroups.option.2
93
+ ```
94
+
95
+ Count noun overrides can distinguish singular and plural:
96
+
97
+ ```text
98
+ RentalAttributes.bedrooms.count.one
99
+ RentalAttributes.bedrooms.count.other
100
+ ```
101
+
102
+ Example:
103
+
104
+ ```ts
105
+ const options = defineWebsiteSDKOptions({
106
+ translationOverrides: {
107
+ "en-US": {
108
+ "RentalAttributes.youthgroups.option.0": "Youth groups welcome",
109
+ "RentalAttributes.bedrooms.count.one": "sleeping room",
110
+ "RentalAttributes.bedrooms.count.other": "sleeping rooms",
111
+ },
112
+ },
113
+ });
114
+ ```
115
+
116
+ Do not reuse v10 named enum keys for v9 numeric options unless the application
117
+ deliberately supplies both key forms.
118
+
119
+ ## 5. Invalid Option Values
120
+
121
+ The parser accepts the numeric wire format used by v9, then resolves only finite
122
+ integer indexes present in the catalog. Invalid, fractional, negative, and
123
+ out-of-range values are omitted from display output.
124
+
125
+ This preserves non-failing rental parsing while preventing unknown values from
126
+ appearing as fabricated quantities.
127
+
128
+ ## Required Consumer Work
129
+
130
+ No configuration or API migration is required. Check the following when the
131
+ application consumes v9:
132
+
133
+ 1. Update snapshots and visual tests for corrected option and count strings.
134
+ 2. Remove code that compensates for missing option index `0`.
135
+ 3. Remove parsing or special casing for strings such as `2 Jugendgruppen`.
136
+ 4. Review translation overrides for corrected built-in copy.
137
+ 5. Verify room counts of one and two in both supported locales.
138
+ 6. Verify any configured option-valued highlight now displays its option label.
139
+
140
+ ## Recommended Verification
141
+
142
+ 1. Render `youthgroups` with values `0`, `1`, and `2`.
143
+ 2. Render `bedrooms` with values `1` and `2`.
144
+ 3. Confirm a Boolean value of `0` remains omitted and `1` remains label-only.
145
+ 4. Confirm a LOCATION option such as `beachtype` appears correctly in
146
+ `vicinity`.
147
+ 5. Confirm invalid option indexes do not appear.
148
+ 6. Run consumer snapshots in `de-DE` and `en-US`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-sdk",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "bin": {
6
6
  "website-sdk": "./dist/cli.mjs"
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@graphql-typed-document-node/core": "3.2.0",
45
- "@v-office/sdk-core": "^1.13.0",
45
+ "@v-office/sdk-core": "^1.14.0",
46
46
  "effect": "4.0.0-beta.85",
47
47
  "graphql": "17.0.2",
48
48
  "yaml": "^2.9.0"
@@ -67,8 +67,9 @@
67
67
  "playground:parser": "node playground/query-parser.ts",
68
68
  "cli": "node --env-file=.env dist/cli.mjs",
69
69
  "build": "tsdown",
70
+ "codegen:v9:properties": "node codegen/v9/heuristic-generation/generate/index.ts && oxfmt codegen/v9/heuristic-generation/v9-data.ts",
70
71
  "codegen:v9:graphql": "graphql-codegen --config codegen/v9/graphql-codegen/codegen.ts",
71
- "codegen": "pnpm run codegen:v9:graphql",
72
+ "codegen": "pnpm run codegen:v9:properties && pnpm run codegen:v9:graphql",
72
73
  "dev": "tsdown --watch",
73
74
  "typecheck": "tsc --noEmit",
74
75
  "lint": "oxlint .",
@@ -76,7 +77,8 @@
76
77
  "fmt": "oxfmt",
77
78
  "fmt:check": "oxfmt --check",
78
79
  "check": "pnpm run typecheck && pnpm run lint && pnpm run fmt:check",
79
- "test": "pnpm run build && node --test test/*.test.mjs",
80
+ "test": "pnpm run test:v9:properties && pnpm run build && node --test test/*.test.mjs",
81
+ "test:v9:properties": "node --test codegen/v9/heuristic-generation/generate/property.test.ts src/legacy-v9/parser/rentals/render-property-attribute.test.ts",
80
82
  "playground:custom-attributes": "pnpm run build && node --env-file=.env playground/custom-attributes.ts"
81
83
  }
82
84
  }