@v-office/website-sdk 2.16.2 → 2.17.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.
@@ -228,6 +228,54 @@ const toReviews = ({ locale, translations, rental }) => Effect.gen(function* ()
228
228
  };
229
229
  });
230
230
  //#endregion
231
+ //#region src/legacy-v9/parser/rentals/to-rooms.ts
232
+ const ROOM_TYPE_KEY_PREFIX = "Room.type.option";
233
+ const BED_TYPE_KEY_PREFIX = "Bed.type.option";
234
+ const BED_KIND_KEY_PREFIX = "Bed.kind.option";
235
+ const ROOM_ATTRIBUTE_LABEL_KEYS = {
236
+ hasPrivateBathroom: "RoomAttributes.hasPrivateBathroom.label",
237
+ roomDarkeningOption: "RoomAttributes.roomDarkeningOption.label",
238
+ wardrobe: "RoomAttributes.wardrobe.label"
239
+ };
240
+ const BED_ATTRIBUTE_LABEL_KEYS = {
241
+ childrenOnly: "Bed.childrenOnly.label",
242
+ extraLongBeds: "Bed.extraLongBeds.label",
243
+ openFootsection: "Bed.openFootsection.label",
244
+ raisedBeds: "Bed.raisedBeds.label"
245
+ };
246
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
247
+ const nonEmptyString = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
248
+ const positiveInteger = (value) => typeof value === "number" && Number.isInteger(value) && value > 0 ? value : 0;
249
+ const toRooms = ({ locale, translations, roomDetails }) => Effect.gen(function* () {
250
+ const result = [];
251
+ const translate = makeTranslate(translations, locale);
252
+ for (const room of Array.isArray(roomDetails) ? roomDetails : []) {
253
+ if (!isRecord(room)) continue;
254
+ const roomType = nonEmptyString(room.type);
255
+ if (roomType == null) continue;
256
+ const attributes = [];
257
+ for (const [key, labelKey] of Object.entries(ROOM_ATTRIBUTE_LABEL_KEYS)) if (room[key] === true) attributes.push(yield* translate(labelKey, key));
258
+ const beds = [];
259
+ for (const bed of Array.isArray(room.beds) ? room.beds : []) {
260
+ if (!isRecord(bed)) continue;
261
+ const bedType = nonEmptyString(bed.type);
262
+ if (bedType == null) continue;
263
+ const bedValue = { type: yield* translate(`${BED_TYPE_KEY_PREFIX}.${bedType}`, bedType) };
264
+ const bedKind = nonEmptyString(bed.kind);
265
+ if (bedKind != null) bedValue.kind = yield* translate(`${BED_KIND_KEY_PREFIX}.${bedKind}`, bedKind);
266
+ const bedAttributes = [];
267
+ for (const [key, labelKey] of Object.entries(BED_ATTRIBUTE_LABEL_KEYS)) if (bed[key] === true) bedAttributes.push(yield* translate(labelKey, key));
268
+ if (bedAttributes.length > 0) bedValue.attributes = bedAttributes;
269
+ for (let index = 0; index < positiveInteger(bed.amount); index++) beds.push(bedValue);
270
+ }
271
+ const roomValue = { type: yield* translate(`${ROOM_TYPE_KEY_PREFIX}.${roomType}`, roomType) };
272
+ if (attributes.length > 0) roomValue.attributes = attributes;
273
+ if (beds.length > 0) roomValue.beds = beds;
274
+ result.push(roomValue);
275
+ }
276
+ return result;
277
+ });
278
+ //#endregion
231
279
  //#region src/legacy-v9/parser/rentals/to-rental-list-item.ts
232
280
  const toRentalRentalsOutput = ({ rental, locale, translations, imageProxyBaseUrl, rentalHighlightPrioritization, customAttributes }) => Effect.gen(function* () {
233
281
  const data = parseVofficeUnitData(rental.data);
@@ -259,6 +307,11 @@ const toRentalRentalsOutput = ({ rental, locale, translations, imageProxyBaseUrl
259
307
  customAttributes,
260
308
  attributes: data
261
309
  });
310
+ const rooms = yield* toRooms({
311
+ locale,
312
+ translations,
313
+ roomDetails: data.known.roomDetails ?? data.unknown.roomDetails
314
+ });
262
315
  const reviews = yield* toReviews({
263
316
  locale,
264
317
  translations,
@@ -277,6 +330,7 @@ const toRentalRentalsOutput = ({ rental, locale, translations, imageProxyBaseUrl
277
330
  if (attributes != null) item.attributes = attributes;
278
331
  if (vicinity != null) item.vicinity = vicinity;
279
332
  if (highlights != null) item.highlights = highlights;
333
+ if (rooms.length > 0) item.rooms = rooms;
280
334
  if (rental.voffice_facility != null) item.property = toProperty(rental.voffice_facility, locale);
281
335
  if (reviews != null) item.reviews = reviews;
282
336
  return item;
@@ -1,4 +1,4 @@
1
- import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-CaZZGJAW.mjs";
1
+ import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-ScO68LGg.mjs";
2
2
  import { a as toAddress, g as parseVofficeUnitData, i as toImages, s as searchQuery, t as toRentalHighlights, u as VofficeUnitDataFieldSchemas } from "./to-rental-highlights-BAsEuxoy.mjs";
3
3
  import { CoreSDKError, STABLE_SEARCH_INPUTS, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, parseChildrenAges, parseOccupancyCount, resolveExpandedCompositions, toFormattedSearchPrice, toIsoDateFromPeriodQueryDate, toStableSearchInputBackendQueryKeys, toStableSearchInputParameterValues, toStableSearchInputQueryKeys, toUnusedFilterKeys } from "@v-office/sdk-core";
4
4
  import { Effect } from "effect";
@@ -3004,6 +3004,8 @@
3004
3004
  "PropertyAttributes.communalLoungeTvRoom.label": "Fernsehzimmer",
3005
3005
  "PropertyAttributes.conciergeService.help": "Concierge Hilfe",
3006
3006
  "PropertyAttributes.conciergeService.label": "Concierge",
3007
+ "PropertyAttributes.constructionDate.help": "Jahr oder Datum, in dem die Immobilie gebaut wurde",
3008
+ "PropertyAttributes.constructionDate.label": "Baudatum",
3007
3009
  "PropertyAttributes.contactlessCheckinAvailable.help": "Kontaktloser Check-in verfügbar Hilfe",
3008
3010
  "PropertyAttributes.contactlessCheckinAvailable.label": "Kontaktloser Check-in verfügbar",
3009
3011
  "PropertyAttributes.couplesMassage.help": "Paar Massagen Hilfe",
@@ -3121,6 +3123,8 @@
3121
3123
  "PropertyAttributes.kidMeals.label": "Kinder Gerichte",
3122
3124
  "PropertyAttributes.kidsClub.help": "Kinder-Club Hilfe",
3123
3125
  "PropertyAttributes.kidsClub.label": "Kinder-Club",
3126
+ "PropertyAttributes.lastRenovationDate.help": "Datum der letzten Renovierung",
3127
+ "PropertyAttributes.lastRenovationDate.label": "Letzte Renovierung",
3124
3128
  "PropertyAttributes.laundryService.help": "PropertyAttributes.laundryService.help",
3125
3129
  "PropertyAttributes.laundryService.label": "Wäscheservice",
3126
3130
  "PropertyAttributes.library.help": "Bibliothek Hilfe",
@@ -4516,9 +4520,15 @@
4516
4520
  "RentalAttributes.marquee.help": "Pavillon / Partyzelt verfügbar",
4517
4521
  "RentalAttributes.marquee.label": "Festzelt",
4518
4522
  "RentalAttributes.marquee.placeholder": "Platzhalter",
4523
+ "RentalAttributes.maxAge.help": "Höchstalter der Gäste",
4524
+ "RentalAttributes.maxAge.label": "Höchstalter",
4525
+ "RentalAttributes.maxAge.placeholder": "Platzhalter",
4519
4526
  "RentalAttributes.microwave.help": "Mikrowelle vorhanden",
4520
4527
  "RentalAttributes.microwave.label": "Mikrowelle",
4521
4528
  "RentalAttributes.microwave.placeholder": "Platzhalter",
4529
+ "RentalAttributes.minAge.help": "Mindestalter der Gäste",
4530
+ "RentalAttributes.minAge.label": "Mindestalter",
4531
+ "RentalAttributes.minAge.placeholder": "Platzhalter",
4522
4532
  "RentalAttributes.minibar.help": "Minibar (gefüllt oder leer) vorhanden",
4523
4533
  "RentalAttributes.minibar.label": "Minibar",
4524
4534
  "RentalAttributes.minibar.placeholder": "Platzhalter",
@@ -3004,6 +3004,8 @@
3004
3004
  "PropertyAttributes.communalLoungeTvRoom.label": "communal lounge / tv room",
3005
3005
  "PropertyAttributes.conciergeService.help": "Concierge HELP",
3006
3006
  "PropertyAttributes.conciergeService.label": "Concierge",
3007
+ "PropertyAttributes.constructionDate.help": "Year or date the property was built",
3008
+ "PropertyAttributes.constructionDate.label": "Construction Date",
3007
3009
  "PropertyAttributes.contactlessCheckinAvailable.help": "contactless check-in available HELP",
3008
3010
  "PropertyAttributes.contactlessCheckinAvailable.label": "contactless check-in available",
3009
3011
  "PropertyAttributes.couplesMassage.help": "Couples massages HELP",
@@ -3121,6 +3123,8 @@
3121
3123
  "PropertyAttributes.kidMeals.label": "Kids meals",
3122
3124
  "PropertyAttributes.kidsClub.help": "Kids club HELP",
3123
3125
  "PropertyAttributes.kidsClub.label": "Kids club",
3126
+ "PropertyAttributes.lastRenovationDate.help": "Date of the most recent renovation",
3127
+ "PropertyAttributes.lastRenovationDate.label": "Last Renovation Date",
3124
3128
  "PropertyAttributes.laundryService.help": "Propertyattributes.laundryservice.help",
3125
3129
  "PropertyAttributes.laundryService.label": "Laundry Service",
3126
3130
  "PropertyAttributes.library.help": "Library HELP",
@@ -4516,9 +4520,15 @@
4516
4520
  "RentalAttributes.marquee.help": "Marquee / garden tent available",
4517
4521
  "RentalAttributes.marquee.label": "Marquee",
4518
4522
  "RentalAttributes.marquee.placeholder": "RentalAttributes.marquee.placeholder",
4523
+ "RentalAttributes.maxAge.help": "Maximum guest age allowed",
4524
+ "RentalAttributes.maxAge.label": "Maximum Age",
4525
+ "RentalAttributes.maxAge.placeholder": "RentalAttributes.maxAge.placeholder",
4519
4526
  "RentalAttributes.microwave.help": "Microwave available",
4520
4527
  "RentalAttributes.microwave.label": "Microwave",
4521
4528
  "RentalAttributes.microwave.placeholder": "RentalAttributes.microwave.placeholder",
4529
+ "RentalAttributes.minAge.help": "Minimum guest age required",
4530
+ "RentalAttributes.minAge.label": "Minimum Age",
4531
+ "RentalAttributes.minAge.placeholder": "RentalAttributes.minAge.placeholder",
4522
4532
  "RentalAttributes.minibar.help": "Minibar available (stocked or empty)",
4523
4533
  "RentalAttributes.minibar.label": "Mini-bar",
4524
4534
  "RentalAttributes.minibar.placeholder": "RentalAttributes.minibar.placeholder",
@@ -4,6 +4,8 @@ This file is the versioned changelog index for the website SDK instructions.
4
4
 
5
5
  ## Versions
6
6
 
7
+ - `versions/2.17.0/CHANGELOG.md`: `@v-office/website-sdk` 2.17.0 release notes.
8
+ - `versions/2.16.3/CHANGELOG.md`: `@v-office/website-sdk` 2.16.3 release notes.
7
9
  - `versions/2.16.2/CHANGELOG.md`: `@v-office/website-sdk` 2.16.2 documentation release notes.
8
10
  - `versions/2.16.1/CHANGELOG.md`: `@v-office/website-sdk` 2.16.1 release notes.
9
11
  - `versions/2.16.0/CHANGELOG.md`: `@v-office/website-sdk` 2.16.0 release notes.
@@ -4,6 +4,8 @@ This file is the versioned migration index for the website SDK instructions.
4
4
 
5
5
  ## Available Guides
6
6
 
7
+ - `versions/2.17.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.3 to 2.17.0.
8
+ - `versions/2.16.3/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.2 to 2.16.3.
7
9
  - `versions/2.16.2/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.1 to 2.16.2.
8
10
  - `versions/2.16.1/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.0 to 2.16.1.
9
11
  - `versions/2.16.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.15.0 to 2.16.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.16.2. Package versions remain unchanged until the release
4
+ `@v-office/website-sdk` 2.17.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,10 @@ 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.17.0/`: 2.17.0 legacy-v9 calendar-day prices and structured
22
+ rooms, shared bed-amount expansion, and the 2.16.3-to-2.17.0 migration guide.
23
+ - `versions/2.16.3/`: 2.16.3 browser-origin resolution for relative payment
24
+ return URLs and the 2.16.2-to-2.16.3 migration guide.
21
25
  - `versions/2.16.2/`: 2.16.2 documentation release notes and migration guide.
22
26
  - `versions/2.16.1/`: 2.16.1 v10 multi-rate resolution restricted to rent rates,
23
27
  restored additional-service availability, and the 2.16.0-to-2.16.1 migration
@@ -100,5 +104,5 @@ website-sdk --backend v10 search --locale de-DE --query "adults=2" --sort '{"by"
100
104
  ```
101
105
 
102
106
  Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced
103
- in 2.0.0 and kept in 2.16.2. v10 config additionally requires `searchEndpoint` as
107
+ in 2.0.0 and kept in 2.17.0. v10 config additionally requires `searchEndpoint` as
104
108
  of 2.5.0.
@@ -96,6 +96,31 @@ Start-date-selected availability returns `Promise<StartDateSelectedAvailabilityO
96
96
 
97
97
  Common statuses include `available`, `before_today`, `check_in_not_allowed`, `no_valid_check_out_from_start`, `after_last_bookable_date`, and `unavailable`. End-date results can also return `same_day`, `not_after_selected_start`, `minimum_stay_not_met`, `check_out_not_allowed`, and range-crossing statuses.
98
98
 
99
+ ### Legacy v9 Calendar-Day Prices
100
+
101
+ From 2.17.0, v9 initial availability uses the numeric price supplied by the v1
102
+ calendar to populate `formattedPrice` on valid start dates. The value is already
103
+ localized and formatted in the rental unit's configured booking currency.
104
+ Render it directly rather than parsing or reformatting it.
105
+
106
+ `formattedPrice` remains `null` when the date cannot be used as a start date,
107
+ the date is unavailable, the v1 calendar supplies no numeric price, or the
108
+ unit's currency cannot be loaded. Start-date-selected availability does not
109
+ include calendar prices.
110
+
111
+ When no successful unit lookup is cached, a v9 initial-availability request loads
112
+ the calendar and a unit record. Successful unit responses are cached by unit ID
113
+ for the lifetime of the SDK instance, including responses without a currency.
114
+ Failed unit requests are not cached and are retried on the next call. A missing
115
+ currency or failed unit request does not fail availability; calendar prices
116
+ remain `null`.
117
+
118
+ No new configuration is required. The currency lookup uses the existing
119
+ `v1ApiBaseUrl` and `apiKey`.
120
+
121
+ See `versions/2.17.0/CHANGELOG.md` and
122
+ `versions/2.17.0/MIGRATION.md`.
123
+
99
124
  ## Configuration
100
125
 
101
126
  Use flat `WebsiteSDKConfig` files.
@@ -68,6 +68,10 @@ const booking = await sdk.live.booking.book({
68
68
  `kind: "OPTION"` creates an option booking on v10 and legacy v9. Omitting `kind`,
69
69
  or passing `"CONFIRMED"`, retains the existing confirmed-booking behavior.
70
70
  `relativeRedirectUrl` is used for online payment redirects after booking creation.
71
+ In a browser, the SDK resolves a relative value against `window.location.origin`
72
+ before initializing a v10 Adyen payment. An absolute HTTP or HTTPS URL is passed
73
+ through unchanged. Server-side callers must provide an absolute HTTP or HTTPS URL
74
+ because no browser origin is available.
71
75
 
72
76
  ## Output
73
77
 
@@ -167,7 +171,13 @@ try {
167
171
 
168
172
  ## Payment Return
169
173
 
170
- Online payment providers return the guest to a URL derived from `relativeRedirectUrl`. Stripe returns to that path with `payment=stripe&success=true` after payment and `payment=stripe&cancel=true` after cancellation, so the path must exist in your site and should read those query parameters.
174
+ Online payment providers return the guest to a URL derived from
175
+ `relativeRedirectUrl`. A relative value such as `/booking/payment-return` uses
176
+ the active browser origin, including `http://localhost:<port>` during local
177
+ development and the deployed website origin in production. Stripe returns to
178
+ that path with `payment=stripe&success=true` after payment and
179
+ `payment=stripe&cancel=true` after cancellation, so the path must exist in your
180
+ site and should read those query parameters.
171
181
 
172
182
  `relativeRedirectUrl` is supplied before the reservation exists, so the return URL cannot carry the booking number. Persist whatever the return page needs, for example in `sessionStorage`, before submitting a payment option.
173
183
 
@@ -123,6 +123,47 @@ list.
123
123
 
124
124
  See `versions/2.15.0/CHANGELOG.md` and `versions/2.15.0/MIGRATION.md`.
125
125
 
126
+ ### Structured Bed Quantities
127
+
128
+ From 2.17.0, both backends expand each source bed according to its `amount`.
129
+ Because the public bed shape has no quantity field, a source amount greater than
130
+ one is returned as that many identical entries in `rooms[].beds`. Each entry
131
+ represents one bed and must not be deduplicated by its visible value.
132
+
133
+ The v10 behavior is delivered by `@v-office/sdk-core`. Refresh the lockfile when
134
+ upgrading so the website package resolves the coordinated core version shipped
135
+ for 2.17.0.
136
+
137
+ ### Legacy v9 Structured Rooms
138
+
139
+ From 2.17.0, when vOffice supplies `roomDetails`, v9 rentals return them as
140
+ `rooms`. Room types, bed types, bed kinds, and supported room and bed attributes
141
+ are localized.
142
+
143
+ Supported per-room Boolean attributes are `hasPrivateBathroom`,
144
+ `roomDarkeningOption`, and `wardrobe`. Supported per-bed Boolean attributes are
145
+ `childrenOnly`, `extraLongBeds`, `openFootsection`, and `raisedBeds`.
146
+
147
+ Translation overrides use:
148
+
149
+ ```text
150
+ Room.type.option.<TYPE>
151
+ RoomAttributes.<attribute>.label
152
+ Bed.type.option.<TYPE>
153
+ Bed.kind.option.<KIND>
154
+ Bed.<attribute>.label
155
+ ```
156
+
157
+ Incomplete room details are handled independently: rooms without a type and beds
158
+ without a type or positive integer amount are omitted. The rental remains
159
+ available, and `rooms` is omitted when no usable room remains.
160
+
161
+ v9 rooms do not expose per-room descriptions, source `maxGuests`, a structured
162
+ bed amount, room IDs or room-image associations, or `roomSummary`.
163
+
164
+ See `versions/2.17.0/CHANGELOG.md` and
165
+ `versions/2.17.0/MIGRATION.md`.
166
+
126
167
  ### Legacy v9 Built-In Attributes
127
168
 
128
169
  From 2.14.0, built-in v9 property types and ordered option values come from the
@@ -0,0 +1,31 @@
1
+ # Changelog: 2.16.3
2
+
3
+ This release fixes v10 Adyen payment return URLs when booking is initiated with
4
+ a relative `relativeRedirectUrl`.
5
+
6
+ ## Fixed
7
+
8
+ - Relative payment return URLs are resolved against `window.location.origin`
9
+ before the SDK initializes an Adyen payment.
10
+ - Adyen receives the website's complete return URL instead of an unresolved
11
+ path that could be interpreted relative to the payment provider's origin.
12
+ - Local development can initialize test payments with return URLs such as
13
+ `http://localhost:4321/booking/payment-return`.
14
+
15
+ ## Unchanged
16
+
17
+ - `sdk.live.booking.book`, its input, and its output keep the same public types.
18
+ - Existing relative values such as `/booking/payment-return` require no code
19
+ changes.
20
+ - Absolute HTTP and HTTPS return URLs continue to be passed through unchanged.
21
+ - Legacy v9 booking and payment behavior is unchanged.
22
+
23
+ ## Compatibility
24
+
25
+ - No consumer code change is required. Upgrade the website SDK and refresh the
26
+ lockfile.
27
+ - Browser callers can keep supplying a site-relative return path. Server-side
28
+ callers must supply an absolute HTTP or HTTPS URL because no browser origin is
29
+ available.
30
+
31
+ See `versions/2.16.3/MIGRATION.md` and `../../booking.md`.
@@ -0,0 +1,51 @@
1
+ # Migration: 2.16.2 to 2.16.3
2
+
3
+ 2.16.3 fixes relative v10 Adyen payment return URLs through
4
+ `@v-office/sdk-core` 1.16.2. No public type, service call, input, or result shape
5
+ changes.
6
+
7
+ ## 1. Upgrade
8
+
9
+ ```sh
10
+ pnpm add @v-office/website-sdk@2.16.3
11
+ ```
12
+
13
+ Refresh the lockfile so the website SDK resolves `@v-office/sdk-core` 1.16.2.
14
+
15
+ ## 2. Keep the Existing Return Path
16
+
17
+ No application code change is required. Existing relative return paths continue
18
+ to work:
19
+
20
+ ```ts
21
+ const booking = await sdk.live.booking.book({
22
+ quote,
23
+ contact,
24
+ relativeRedirectUrl: "/booking/payment-return",
25
+ });
26
+ ```
27
+
28
+ In a browser, the SDK now resolves that path against `window.location.origin`.
29
+ For example:
30
+
31
+ ```text
32
+ http://localhost:4321 + /booking/payment-return
33
+ → http://localhost:4321/booking/payment-return
34
+ ```
35
+
36
+ Absolute HTTP and HTTPS return URLs remain unchanged. Server-side callers must
37
+ provide an absolute URL because `window.location.origin` is unavailable.
38
+
39
+ ## Required Consumer Work
40
+
41
+ None beyond upgrading the dependency and refreshing the lockfile.
42
+
43
+ ## Recommended Verification
44
+
45
+ 1. Start the website locally and create a deliberate v10 test booking.
46
+ 2. Confirm the Adyen initiation request contains the local website origin in its
47
+ `redirectUrl`.
48
+ 3. Complete or cancel the hosted test payment and confirm the browser returns to
49
+ the local payment-return page.
50
+ 4. Confirm a deployed website uses its own active origin for the same relative
51
+ return path.
@@ -0,0 +1,83 @@
1
+ # Changelog: 2.17.0
2
+
3
+ This release restores presentation-ready prices to legacy-v9 initial
4
+ availability calendars and exposes structured v9 room and bed data through the
5
+ shared rental contract. Bed quantities are represented consistently on v9 and
6
+ v10 by returning one public bed entry for each source bed amount.
7
+
8
+ ## Added
9
+
10
+ - Legacy-v9 static rentals expose source `roomDetails` through the existing
11
+ optional `rooms` field.
12
+ - v9 room output includes localized room types, bed types, bed kinds, and the
13
+ supported room and bed attributes supplied by vOffice.
14
+ - Supported v9 room attributes are `hasPrivateBathroom`,
15
+ `roomDarkeningOption`, and `wardrobe`. Supported bed attributes are
16
+ `childrenOnly`, `extraLongBeds`, `openFootsection`, and `raisedBeds`.
17
+
18
+ ## Fixed
19
+
20
+ - Legacy-v9 initial availability calendar days once again expose a localized
21
+ `formattedPrice` when the date is a valid start date and the v1 calendar
22
+ supplies a numeric price.
23
+ - Unavailable dates, dates that cannot be used as a start date, and dates without
24
+ a numeric source price continue to return `formattedPrice: null`.
25
+
26
+ ## Changed
27
+
28
+ - v9 calendar prices use the rental unit's configured booking currency. The SDK
29
+ loads that currency through the existing v1 unit endpoint and caches successful
30
+ unit lookups for the lifetime of the SDK instance.
31
+ - v9 calendar prices remain `null` when the unit currency is missing or cannot
32
+ be loaded. A currency lookup failure does not make the availability request
33
+ fail.
34
+ - A source bed with `amount: 3` is represented as three identical entries in
35
+ `rooms[].beds`. This applies to v9 and v10, whose shared public bed shape does
36
+ not contain a separate amount field.
37
+ - The first initial v9 availability request for a unit loads both its calendar
38
+ and unit record. Subsequent calls reuse a successfully loaded unit response,
39
+ including one that contains no currency. Failed unit requests are not cached
40
+ and are retried on the next call.
41
+ - v9 room data that does not satisfy the stricter generated heuristic schema is
42
+ read leniently from the preserved unknown data instead of being discarded as a
43
+ complete array.
44
+ - One incomplete v9 room or bed does not remove otherwise usable room data or
45
+ fail the rental.
46
+
47
+ ## Unchanged
48
+
49
+ - `sdk.live.availability.getInitialAvailability(input)` and
50
+ `sdk.static.rentals.getRentals({ locale })` keep their existing signatures and
51
+ public TypeScript contracts.
52
+ - No new v9 configuration value or endpoint is required. The existing
53
+ `v1ApiBaseUrl` and API key are used for the unit-currency lookup, and
54
+ `roomDetails` is already requested by the v9 rentals GraphQL operation.
55
+ - v10 initial-availability pricing is unchanged.
56
+ - Start-date-selected availability output does not gain calendar prices.
57
+ - v9 `rooms` remains optional and is omitted when vOffice supplies no usable
58
+ room details.
59
+ - v9 still does not expose per-room descriptions, source `maxGuests`, a
60
+ structured bed amount, room IDs or room-image associations, or `roomSummary`.
61
+ - Existing localized `attributes` and `highlights` remain available and are not
62
+ removed when structured rooms are present.
63
+
64
+ ## Compatibility
65
+
66
+ - Both features are additive for consumers that read selected fields.
67
+ - Complete v9 availability snapshots can now contain non-null `formattedPrice`
68
+ values on valid start dates.
69
+ - Complete v9 rental snapshots can now contain `rooms`.
70
+ - v9 and v10 snapshots or UIs that assumed one public bed entry per source bed
71
+ record must account for repeated entries when the source amount is greater
72
+ than one.
73
+ - Consumers must not deduplicate identical bed entries: repetition represents
74
+ the source quantity.
75
+ - The v10 bed expansion is delivered through `@v-office/sdk-core`. Refresh the
76
+ lockfile when upgrading so the website package resolves the coordinated core
77
+ version shipped for 2.17.0.
78
+ - A first initial-availability request for a v9 rental can perform one additional
79
+ v1 unit request for its currency. Applications with request-level mocks or
80
+ network assertions must account for it.
81
+
82
+ See `versions/2.17.0/MIGRATION.md`, `../../availability.md`, and
83
+ `../../rentals.md`.