@v-office/website-sdk 2.37.0 → 2.38.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/dist/cli.mjs +3 -3
- package/dist/{client-D53W9Uas.mjs → client-CE4V_ybW.mjs} +175 -77
- package/dist/index.d.mts +46 -2
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/quote.md +7 -0
- package/dist/instructions/rentals.md +65 -4
- package/dist/instructions/search.md +2 -1
- package/dist/instructions/versions/2.37.1/CHANGELOG.md +11 -0
- package/dist/instructions/versions/2.37.1/MIGRATION.md +10 -0
- package/dist/instructions/versions/2.38.0/CHANGELOG.md +123 -0
- package/dist/instructions/versions/2.38.0/MIGRATION.md +37 -0
- package/dist/{operations-C1VMQYN2.mjs → operations-DMqLD3e2.mjs} +333 -1
- package/dist/{rentals-BxkYXAVn.mjs → rentals-BsHvdwQt.mjs} +10 -14
- package/dist/{search-pFLiI6QI.mjs → search-DqdRIJwF.mjs} +8 -4
- package/dist/{to-rental-highlights-BdxQPpBU.mjs → to-rental-highlights-BE6TdXYa.mjs} +23 -5
- package/dist/translations/shared/de-DE/insurance.json +1 -0
- package/dist/translations/shared/de-DE/reviews.json +5 -4
- package/dist/translations/shared/en-US/insurance.json +1 -0
- package/dist/translations/shared/en-US/reviews.json +5 -4
- package/dist/translations/v10/de-DE/core.json +17 -4
- package/dist/translations/v10/en-US/core.json +53 -40
- package/dist/translations/v9/de-DE/core.json +0 -6
- package/dist/translations/v9/de-DE/filter.json +4 -0
- package/dist/translations/v9/de-DE/rental-attributes.json +2 -2
- package/dist/translations/v9/en-US/core.json +0 -6
- package/dist/translations/v9/en-US/filter.json +4 -0
- package/dist/translations/v9/en-US/rental-attributes.json +2 -2
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/quote.md +7 -0
- package/instructions/rentals.md +65 -4
- package/instructions/search.md +2 -1
- package/instructions/versions/2.37.1/CHANGELOG.md +11 -0
- package/instructions/versions/2.37.1/MIGRATION.md +10 -0
- package/instructions/versions/2.37.1/release.json +3 -0
- package/instructions/versions/2.38.0/CHANGELOG.md +123 -0
- package/instructions/versions/2.38.0/MIGRATION.md +37 -0
- package/instructions/versions/2.38.0/release.json +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Changelog: 2.38.0
|
|
2
|
+
|
|
3
|
+
Rentals and search items state their counts as numbers, the same on v9 and v10, so a website
|
|
4
|
+
no longer parses them out of translated text that changes with the locale. The SDK's own texts
|
|
5
|
+
read correctly in English and German: counts in their plural form, rating words with one meaning
|
|
6
|
+
per band in both languages, a natural reviewer line, labels instead of key names, a
|
|
7
|
+
translated v10 property type and a translated v10 "no insurance" option. Texts missing in the
|
|
8
|
+
requested language come back in German and are marked as German, on both backends.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- `capacity` on rentals (`getRentals`, `getRentalsByIds`) and on search items, on v9 and v10:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
capacity?: {
|
|
16
|
+
maxGuests?: number;
|
|
17
|
+
maxAdults?: number;
|
|
18
|
+
bedrooms?: number;
|
|
19
|
+
bathrooms?: number;
|
|
20
|
+
rooms?: number;
|
|
21
|
+
livingAreaSqm?: number;
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The values do not depend on the locale or on `translationOverrides`. A count the backend
|
|
26
|
+
does not state, or states as 0, is omitted, never 0; `capacity` itself is omitted when no
|
|
27
|
+
count is stated.
|
|
28
|
+
- v10: from the room summary (`maxPersons` as `maxGuests`, `maxAdults`, `bedrooms`,
|
|
29
|
+
`bathrooms`, `rooms`) and `attributes.squareMeters`.
|
|
30
|
+
- v9: from the unit's `beds` (sleeping places, as `maxGuests`), `bedrooms`, `bathrooms`,
|
|
31
|
+
`rooms` and `squareMeters`. v9 states no adults, so `maxAdults` is always omitted. A v9
|
|
32
|
+
search now also requests these five attributes.
|
|
33
|
+
|
|
34
|
+
- The type `RentalCapacity`.
|
|
35
|
+
- `descriptionFallbacks` on rentals and their `property` (`getRentals`, `getRentalsByIds`):
|
|
36
|
+
the description fields served in another language than requested, with that language
|
|
37
|
+
(`{ "description": "de-DE" }`), so a site can mark German texts on an English page. Omitted
|
|
38
|
+
when every text is in the requested locale, and always for `de-DE`.
|
|
39
|
+
|
|
40
|
+
## Changed
|
|
41
|
+
|
|
42
|
+
- v10: a description field without a text in the requested locale takes its German text and
|
|
43
|
+
is listed in `descriptionFallbacks`. Before, the field was omitted, so an English rental
|
|
44
|
+
without English texts had no description at all.
|
|
45
|
+
- v9: for a locale other than `de-DE`, `getRentals` and `getRentalsByIds` also ask the be-on!
|
|
46
|
+
Hub for the German texts (one extra query per 128 rentals that selects only the texts, plus one facility query with
|
|
47
|
+
`facilityObjectGroupRelationAttributeId`) and mark the fields the Hub served in German. The
|
|
48
|
+
texts themselves are unchanged: the Hub already served German.
|
|
49
|
+
- Counts render in the plural form of their number, on both backends: "1 guest", "2 bedrooms",
|
|
50
|
+
"1 Gast", "4 Gäste" in `highlights` and v10 `roomSummary`, and "1 bedroom", "2 bedrooms" in
|
|
51
|
+
the v9 bedroom and bathroom filter options. The guest count reads as guests on both backends
|
|
52
|
+
(it was "Maximale Personenzahl" on v10 and "Schlafmöglichkeiten" on v9).
|
|
53
|
+
- The rating words (`reviews.summary.classification`) carry one meaning per band in both
|
|
54
|
+
languages, and both German and English change: a 4.9 rating reads "Hervorragend" /
|
|
55
|
+
"Exceptional". The bands themselves are unchanged (≥ 4.5, ≥ 4.0, ≥ 3.0, ≥ 2.0, below).
|
|
56
|
+
- The English reviewer line reads "Ada, stayed in July 2026" (was "visited on").
|
|
57
|
+
- One rating reads "1 review" / "1 Bewertung" (was "1 reviews" / "1 Bewertungen").
|
|
58
|
+
- v10 `property.propertyType` is translated ("Apartment complex", "Apartmentanlage") as on v9,
|
|
59
|
+
instead of the enum (`APARTMENT_COMPLEX`). Both backends read the labels from one table now:
|
|
60
|
+
v9 kept its own copy, which said "Appartement Komplex" and "Ferienpark".
|
|
61
|
+
- English attribute labels and options that showed their key name now have texts, and all
|
|
62
|
+
English view labels share one spelling ("Sea view", "Mountain view", "Beach view").
|
|
63
|
+
- `valleyViewType` has its own label ("Valley view type", "Art des Talblicks") instead of the
|
|
64
|
+
valley view label.
|
|
65
|
+
- v10 quotes: the `none` insurance option reads "Keine Versicherung" for de-DE and "No
|
|
66
|
+
insurance" for en-US, from the new key `insurance.notOffered.label`, in `quote`,
|
|
67
|
+
`selectInsurance`, `createInsurancePreContract` and `selectInsurancePayment`. It was the
|
|
68
|
+
English "No insurance" in every locale. A v9 quote without an insurance provider reads the
|
|
69
|
+
same key (its text was already localized). With offers, the `none` option stays "Ich
|
|
70
|
+
verzichte auf den angebotenen Reiseschutz" (`insurance.none.label`) on v9, and will on v10.
|
|
71
|
+
- Every changed or new text. A site that overrides one of these keys with `translationOverrides`
|
|
72
|
+
keeps its override; check whether you still need it:
|
|
73
|
+
|
|
74
|
+
| Key | Locale | Before | Now |
|
|
75
|
+
| ---------------------------------------------------------------------------------------------------------------------------- | ------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| `RoomSummary.<field>.count.one` / `.other` (new; `maxPersons`, `maxAdults`, `bedrooms`, `bathrooms`, `rooms`, `livingrooms`) | de-DE | — | Gast / Gäste, Erwachsener / Erwachsene, Schlafzimmer, Badezimmer, Zimmer, Wohnzimmer |
|
|
77
|
+
| same | en-US | — | guest / guests, adult / adults, bedroom / bedrooms, bathroom / bathrooms, room / rooms, living room / living rooms |
|
|
78
|
+
| `RentalAttributes.beds.count.one` / `.other` (v9) | de-DE | Schlafmöglichkeit / Schlafmöglichkeiten | Gast / Gäste |
|
|
79
|
+
| same | en-US | sleeping arrangement / sleeping arrangements | guest / guests |
|
|
80
|
+
| `filter.bedrooms.count.one` / `.other`, `filter.bathrooms.count.one` / `.other` (v9, new) | de-DE | — | Schlafzimmer, Badezimmer |
|
|
81
|
+
| same | en-US | — | bedroom / bedrooms, bathroom / bathrooms |
|
|
82
|
+
| `insurance.notOffered.label` (new) | de-DE / en-US | — (hard-coded "No insurance" on v10 in every locale) | Keine Versicherung / No insurance |
|
|
83
|
+
| `reviews.summary.classification.excellent` | de-DE | Sehr gut | Hervorragend |
|
|
84
|
+
| `reviews.summary.classification.very-good` | de-DE | Gut | Sehr gut |
|
|
85
|
+
| `reviews.summary.classification.good` | de-DE | Ansprechend | Gut |
|
|
86
|
+
| `reviews.summary.classification.fair` | de-DE | Mittelmäßig | Ordentlich |
|
|
87
|
+
| `reviews.summary.classification.poor` | de-DE | Ausreichend | Ausreichend (unchanged) |
|
|
88
|
+
| `reviews.summary.classification.excellent` | en-US | Excellent | Exceptional |
|
|
89
|
+
| `reviews.summary.classification.fair` | en-US | Fair | Decent |
|
|
90
|
+
| `reviews.summary.classification.poor` | en-US | Poor | Adequate |
|
|
91
|
+
| `reviews.summary.count.one` (new) | de-DE / en-US | — | {count} Bewertung / {count} review |
|
|
92
|
+
| `reviews.item.authorWithDate` | en-US | {author}, visited on {date} | {author}, stayed in {date} |
|
|
93
|
+
| `Property.propertyType.option.APARTMENT_COMPLEX` | de-DE | Appartement Komplex | Apartmentanlage (v9 and v10) |
|
|
94
|
+
| `Property.propertyType.option.HOLIDAY_HOME_COMPLEX` | de-DE | Ferienpark (v9 only) | Ferienhausanlage (v9 and v10) |
|
|
95
|
+
| `Property.propertyType.option.HOLIDAY_HOME_COMPLEX` | en-US | Holiday Home Complex | Holiday home complex (v9 and v10) |
|
|
96
|
+
| `RentalAttributes.valleyViewType.label` (new) | de-DE / en-US | — (used the valley view label) | Art des Talblicks / Valley view type |
|
|
97
|
+
| `RentalAttributes.lakeviewType.option.EXCEPTIONALLY_GOOD` | de-DE | außergewöhnlich gut | Außergewöhnlich gut |
|
|
98
|
+
| `RentalAttributes.seaviewType.option.EXCEPTIONALLY_GOOD` | de-DE | außergewöhnlich gut | Außergewöhnlich gut |
|
|
99
|
+
| `RentalAttributes.seaviewType.option.LIMITED` | de-DE | eingeschränkt | Eingeschränkt |
|
|
100
|
+
| `RentalAttributes.beachview.label` | en-US | Beachview | Beach view |
|
|
101
|
+
| `RentalAttributes.cityView.label` | en-US | City View | City view |
|
|
102
|
+
| `RentalAttributes.countrysideView.label` | en-US | Countryside View | Countryside view |
|
|
103
|
+
| `RentalAttributes.countrysideViewType.label` | en-US | Countryside View Type | Countryside view type |
|
|
104
|
+
| `RentalAttributes.gardenView.label` | en-US | Garden View | Garden view |
|
|
105
|
+
| `RentalAttributes.innerCourtView.label` | en-US | Inner Court View | Courtyard view |
|
|
106
|
+
| `RentalAttributes.mountainview.label` | en-US | Mountainview | Mountain view |
|
|
107
|
+
| `RentalAttributes.mountainviewType.label` | en-US | Mountainview Type | Mountain view type |
|
|
108
|
+
| `RentalAttributes.poolView.label` | en-US | Pool View | Pool view |
|
|
109
|
+
| `RentalAttributes.quietStreetView.label` | en-US | Quiet Street View | Quiet street view |
|
|
110
|
+
| `RentalAttributes.riverView.label` | en-US | River View | River view |
|
|
111
|
+
| `RentalAttributes.valleyView.label` | en-US | valleyView | Valley view |
|
|
112
|
+
| `RentalAttributes.lakeviewType.label` | en-US | lakeviewType | Lake view type |
|
|
113
|
+
| `RentalAttributes.seaviewType.label` | en-US | seaviewType | Sea view type |
|
|
114
|
+
| `RentalAttributes.lakeviewType.option.*`, `seaviewType.option.*` | en-US | the key | Exceptionally good, Good, Limited |
|
|
115
|
+
| `RentalAttributes.heatingSystem.option.*` | en-US | the key | Central heating, Electric, Gas bottle, Gas tank, Oil, Stove (`OVEN`), Solar, Air conditioning (`VIA_AC`) |
|
|
116
|
+
| `RentalAttributes.stoveType.option.*` | en-US | the key | Ceramic hob, Gas, Induction, 3-burner stove, 4-burner stove |
|
|
117
|
+
| `RentalAttributes.kitchenType.option.CLOSED` | en-US | the key | Closed |
|
|
118
|
+
| `RentalAttributes.dryerAccess.option.EXKLUSIVE`, `washerAccess.option.EXKLUSIVE` | en-US | the key | Exclusive use |
|
|
119
|
+
| `RentalAttributes.relaxationRoom.label` | en-US | relaxationRoom | Relaxation room |
|
|
120
|
+
| `RentalAttributes.saunaIsPrivate.label` | en-US | saunaIsPrivate | Private sauna |
|
|
121
|
+
| `RentalAttributes.fitnessroom.label` | en-US | fitnessroom | Fitness room |
|
|
122
|
+
|
|
123
|
+
- `highlights` and `roomSummary` still hold text; read counts from `capacity`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Migration: 2.37.1 to 2.38.0
|
|
2
|
+
|
|
3
|
+
No changes required.
|
|
4
|
+
|
|
5
|
+
## 1. Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @v-office/website-sdk@2.38.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 2. Optional: read counts from `capacity`
|
|
12
|
+
|
|
13
|
+
A site that reads guests, bedrooms, bathrooms, rooms or the living area out of `highlights` or
|
|
14
|
+
`roomSummary` ("4 Maximale Personenzahl", "88 m²") can read `rental.capacity` and
|
|
15
|
+
`item.capacity` instead. Treat a missing field as "not stated" and print nothing for it.
|
|
16
|
+
`@v-office/website-headless` 1.4.0 reads `capacity` for its counts.
|
|
17
|
+
|
|
18
|
+
## 3. Check texts you parse, compare or override
|
|
19
|
+
|
|
20
|
+
- A site that reads counts out of `highlights` or `roomSummary` by their wording breaks: the
|
|
21
|
+
guest count now reads "4 Gäste" / "4 guests". Read `capacity` instead, or upgrade
|
|
22
|
+
`@v-office/website-headless` to 1.4.0 in the same commit (it reads both).
|
|
23
|
+
- A site that compares v10 `property.propertyType` with `APARTMENT_COMPLEX` or another enum
|
|
24
|
+
value breaks: the field now holds the translated label, as on v9.
|
|
25
|
+
- German rental pages show the new rating words: a rating that read "Sehr gut" now reads
|
|
26
|
+
"Hervorragend", "Gut" reads "Sehr gut", and so on. A site that wants the old words sets them
|
|
27
|
+
with `translationOverrides` (`reviews.summary.classification.<band>`).
|
|
28
|
+
- An override of `RoomSummary.<field>.label` (v10) or `RentalAttributes.beds.label` (v9) no
|
|
29
|
+
longer changes a count line; override the `.count.one` and `.count.other` keys in the
|
|
30
|
+
CHANGELOG instead.
|
|
31
|
+
|
|
32
|
+
## 4. English pages show German texts where no English exists
|
|
33
|
+
|
|
34
|
+
v10 rentals without an English text now return the German text (before: no text), and both
|
|
35
|
+
backends list such fields in `descriptionFallbacks`. A site that hides a section without an
|
|
36
|
+
English text can check `descriptionFallbacks` instead and decide per field: show the German text
|
|
37
|
+
marked as German (`lang="de"`), or hide it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "Website-facing SDK facade backed by @v-office/sdk-core",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
51
|
-
"@v-office/sdk-core": "1.
|
|
51
|
+
"@v-office/sdk-core": "1.29.0",
|
|
52
52
|
"effect": "4.0.0-rc.115",
|
|
53
53
|
"graphql": "17.0.2",
|
|
54
54
|
"yaml": "^2.9.0"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"test": "pnpm run test:cli && pnpm run test:v9:openapi && pnpm run test:v9:properties && pnpm run test:v9:rentals && pnpm run test:v9:graphql && pnpm run test:v9:availability && pnpm run test:v9:search && pnpm run test:v9:booking && pnpm run test:v9:videos && pnpm run build && node --test test/*.test.mjs",
|
|
91
91
|
"test:cli": "node --test src/cli/v9-hub-filters.test.ts",
|
|
92
92
|
"test:v9:openapi": "node --test codegen/v9/php-record.test.ts src/legacy-v9/openapi/setup-response.test.ts src/legacy-v9/openapi/quote-response.test.ts",
|
|
93
|
-
"test:v9:properties": "node --test codegen/v9/heuristic-generation/generate/property.test.ts src/legacy-v9/property-highlight-sources.test.ts src/legacy-v9/parser/rentals/render-property-attribute.test.ts src/legacy-v9/parser/rentals/to-property.test.ts src/legacy-v9/parser/rentals/to-rooms.test.ts",
|
|
93
|
+
"test:v9:properties": "node --test codegen/v9/heuristic-generation/generate/property.test.ts src/legacy-v9/property-highlight-sources.test.ts src/legacy-v9/parser/rentals/render-property-attribute.test.ts src/legacy-v9/parser/rentals/to-property.test.ts src/legacy-v9/parser/rentals/to-rooms.test.ts src/legacy-v9/parser/rentals/to-capacity.test.ts",
|
|
94
94
|
"test:v9:rentals": "node --test src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts src/legacy-v9/parser/rentals/to-reviews.test.ts src/legacy-v9/parser/rentals/to-image.test.ts",
|
|
95
95
|
"test:v9:graphql": "node --test src/legacy-v9/graphql/client.test.ts",
|
|
96
96
|
"test:v9:availability": "node --test src/legacy-v9/parser/availability/to-availability-restrictions-by-date.test.ts src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts src/legacy-v9/parser/availability/to-occupancy-limits.test.ts src/legacy-v9/parser/availability/to-rent-night-prices.test.ts src/legacy-v9/parser/availability/to-start-date-selected-calendar-days.test.ts src/legacy-v9/parser/blocked-ranges/collect-v9-blocked-ranges.test.ts src/legacy-v9/parser/blocked-ranges/to-rental-blocked-ranges.test.ts",
|