@v-office/website-sdk 2.17.1 → 2.18.1
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/README.md +18 -0
- package/dist/cli.mjs +10 -11
- package/dist/{client-yYl7H82t.mjs → client-BnA0oXd_.mjs} +220 -23
- package/dist/index.d.mts +48 -2
- package/dist/index.mjs +2 -2
- package/dist/instructions/CHANGELOG.md +26 -27
- package/dist/instructions/MIGRATION.md +26 -27
- package/dist/instructions/README.md +7 -2
- package/dist/instructions/availability.md +9 -7
- package/dist/instructions/creation.md +46 -1
- package/dist/instructions/custom-attributes.md +7 -0
- package/dist/instructions/quote.md +8 -0
- package/dist/instructions/rentals.md +130 -2
- package/dist/instructions/versions/2.18.0/CHANGELOG.md +133 -0
- package/dist/instructions/versions/2.18.0/MIGRATION.md +364 -0
- package/dist/instructions/versions/2.18.1/CHANGELOG.md +16 -0
- package/dist/instructions/versions/2.18.1/MIGRATION.md +12 -0
- package/dist/{quote-C-Bs3XTE.mjs → quote-cjFdLn0m.mjs} +1 -0
- package/dist/{rentals-BokBV-ze.mjs → rentals-GfJVIv7i.mjs} +205 -12
- package/dist/{search-DkXUHJt8.mjs → search-CR1UjnmR.mjs} +3 -2
- package/dist/to-rental-highlights-CJvDxSLw.mjs +3035 -0
- package/dist/translations/v10/de-DE/core.json +1 -1
- package/dist/translations/v9/de-DE/core.json +7 -1
- package/dist/translations/v9/en-US/core.json +7 -1
- package/dist/{to-rental-highlights-BAsEuxoy.mjs → v9-data-BnYxa2Ek.mjs} +21 -2435
- package/instructions/CHANGELOG.md +26 -27
- package/instructions/MIGRATION.md +26 -27
- package/instructions/README.md +7 -2
- package/instructions/availability.md +9 -7
- package/instructions/creation.md +46 -1
- package/instructions/custom-attributes.md +7 -0
- package/instructions/quote.md +8 -0
- package/instructions/rentals.md +130 -2
- package/instructions/versions/2.18.0/CHANGELOG.md +133 -0
- package/instructions/versions/2.18.0/MIGRATION.md +364 -0
- package/instructions/versions/2.18.0/release.json +3 -0
- package/instructions/versions/2.18.1/CHANGELOG.md +16 -0
- package/instructions/versions/2.18.1/MIGRATION.md +12 -0
- package/instructions/versions/2.18.1/release.json +3 -0
- package/package.json +8 -7
- package/dist/instructions/versions/2.6.0/CHANGELOG.md +0 -6
- package/dist/instructions/versions/2.6.0/MIGRATION.md +0 -6
- package/instructions/versions/2.6.0/CHANGELOG.md +0 -6
- package/instructions/versions/2.6.0/MIGRATION.md +0 -6
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- generated by `node .github/release/cli.mts index`; do not edit by hand -->
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
-
- `versions/2.
|
|
8
|
-
- `versions/2.
|
|
9
|
-
- `versions/2.
|
|
10
|
-
- `versions/2.
|
|
11
|
-
- `versions/2.16.
|
|
12
|
-
- `versions/2.16.
|
|
13
|
-
- `versions/2.
|
|
14
|
-
- `versions/2.
|
|
15
|
-
- `versions/2.
|
|
16
|
-
- `versions/2.
|
|
17
|
-
- `versions/2.
|
|
18
|
-
- `versions/2.
|
|
19
|
-
- `versions/2.
|
|
20
|
-
- `versions/2.
|
|
21
|
-
- `versions/2.
|
|
22
|
-
- `versions/2.
|
|
23
|
-
- `versions/2.
|
|
24
|
-
- `versions/2.
|
|
25
|
-
- `versions/2.4.
|
|
26
|
-
- `versions/2.4.
|
|
27
|
-
- `versions/2.
|
|
28
|
-
- `versions/2.
|
|
29
|
-
- `versions/2.
|
|
30
|
-
|
|
31
|
-
Keep each future release in its own version directory so consumers can see which package version introduced each change.
|
|
7
|
+
- `versions/2.18.1/CHANGELOG.md`: release notes for 2.18.1
|
|
8
|
+
- `versions/2.18.0/CHANGELOG.md`: release notes for 2.18.0
|
|
9
|
+
- `versions/2.17.1/CHANGELOG.md`: release notes for 2.17.1
|
|
10
|
+
- `versions/2.17.0/CHANGELOG.md`: release notes for 2.17.0
|
|
11
|
+
- `versions/2.16.3/CHANGELOG.md`: release notes for 2.16.3
|
|
12
|
+
- `versions/2.16.2/CHANGELOG.md`: release notes for 2.16.2
|
|
13
|
+
- `versions/2.16.1/CHANGELOG.md`: release notes for 2.16.1
|
|
14
|
+
- `versions/2.16.0/CHANGELOG.md`: release notes for 2.16.0
|
|
15
|
+
- `versions/2.15.0/CHANGELOG.md`: release notes for 2.15.0
|
|
16
|
+
- `versions/2.14.0/CHANGELOG.md`: release notes for 2.14.0
|
|
17
|
+
- `versions/2.13.0/CHANGELOG.md`: release notes for 2.13.0
|
|
18
|
+
- `versions/2.12.0/CHANGELOG.md`: release notes for 2.12.0
|
|
19
|
+
- `versions/2.11.0/CHANGELOG.md`: release notes for 2.11.0
|
|
20
|
+
- `versions/2.10.0/CHANGELOG.md`: release notes for 2.10.0
|
|
21
|
+
- `versions/2.9.0/CHANGELOG.md`: release notes for 2.9.0
|
|
22
|
+
- `versions/2.8.0/CHANGELOG.md`: release notes for 2.8.0
|
|
23
|
+
- `versions/2.7.0/CHANGELOG.md`: release notes for 2.7.0
|
|
24
|
+
- `versions/2.5.0/CHANGELOG.md`: release notes for 2.5.0
|
|
25
|
+
- `versions/2.4.3/CHANGELOG.md`: release notes for 2.4.3
|
|
26
|
+
- `versions/2.4.2/CHANGELOG.md`: release notes for 2.4.2
|
|
27
|
+
- `versions/2.4.0/CHANGELOG.md`: release notes for 2.4.0
|
|
28
|
+
- `versions/2.3.0/CHANGELOG.md`: release notes for 2.3.0
|
|
29
|
+
- `versions/2.1.0/CHANGELOG.md`: release notes for 2.1.0
|
|
30
|
+
- `versions/2.0.0/CHANGELOG.md`: release notes for 2.0.0
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
# Migration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- generated by `node .github/release/cli.mts index`; do not edit by hand -->
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
-
- `versions/2.
|
|
8
|
-
- `versions/2.
|
|
9
|
-
- `versions/2.
|
|
10
|
-
- `versions/2.
|
|
11
|
-
- `versions/2.16.
|
|
12
|
-
- `versions/2.16.
|
|
13
|
-
- `versions/2.
|
|
14
|
-
- `versions/2.
|
|
15
|
-
- `versions/2.
|
|
16
|
-
- `versions/2.
|
|
17
|
-
- `versions/2.
|
|
18
|
-
- `versions/2.
|
|
19
|
-
- `versions/2.
|
|
20
|
-
- `versions/2.
|
|
21
|
-
- `versions/2.
|
|
22
|
-
- `versions/2.
|
|
23
|
-
- `versions/2.
|
|
24
|
-
- `versions/2.
|
|
25
|
-
- `versions/2.4.
|
|
26
|
-
- `versions/2.4.
|
|
27
|
-
- `versions/2.
|
|
28
|
-
- `versions/2.
|
|
29
|
-
- `versions/2.
|
|
30
|
-
|
|
31
|
-
Keep each future migration in its own version directory so consumers can clearly see the source and target versions for every upgrade path.
|
|
7
|
+
- `versions/2.18.1/MIGRATION.md`: Migration: 2.18.0 to 2.18.1
|
|
8
|
+
- `versions/2.18.0/MIGRATION.md`: Migration: 2.17.1 to 2.18.0
|
|
9
|
+
- `versions/2.17.1/MIGRATION.md`: Migration: 2.17.0 to 2.17.1
|
|
10
|
+
- `versions/2.17.0/MIGRATION.md`: Migration: 2.16.3 to 2.17.0
|
|
11
|
+
- `versions/2.16.3/MIGRATION.md`: Migration: 2.16.2 to 2.16.3
|
|
12
|
+
- `versions/2.16.2/MIGRATION.md`: Migration: 2.16.1 to 2.16.2
|
|
13
|
+
- `versions/2.16.1/MIGRATION.md`: Migration: 2.16.0 to 2.16.1
|
|
14
|
+
- `versions/2.16.0/MIGRATION.md`: Migration: 2.15.0 to 2.16.0
|
|
15
|
+
- `versions/2.15.0/MIGRATION.md`: Migration: 2.14.0 to 2.15.0
|
|
16
|
+
- `versions/2.14.0/MIGRATION.md`: Migration: 2.13.0 to 2.14.0
|
|
17
|
+
- `versions/2.13.0/MIGRATION.md`: Migration: 2.12.0 to 2.13.0
|
|
18
|
+
- `versions/2.12.0/MIGRATION.md`: Migration: 2.11.0 to 2.12.0
|
|
19
|
+
- `versions/2.11.0/MIGRATION.md`: Migration: 2.10.0 to 2.11.0
|
|
20
|
+
- `versions/2.10.0/MIGRATION.md`: Migration: 2.9.0 to 2.10.0
|
|
21
|
+
- `versions/2.9.0/MIGRATION.md`: Migration: 2.8.0 to 2.9.0
|
|
22
|
+
- `versions/2.8.0/MIGRATION.md`: Migration: 2.7.0 to 2.8.0
|
|
23
|
+
- `versions/2.7.0/MIGRATION.md`: Migration: 2.5.x to 2.7.0
|
|
24
|
+
- `versions/2.5.0/MIGRATION.md`: Migration: 2.4.3 to 2.5.0
|
|
25
|
+
- `versions/2.4.3/MIGRATION.md`: Migration: 2.4.2 to 2.4.3
|
|
26
|
+
- `versions/2.4.2/MIGRATION.md`: Migration: 2.4.1 to 2.4.2
|
|
27
|
+
- `versions/2.4.0/MIGRATION.md`: Migration: 2.3.x to 2.4.0
|
|
28
|
+
- `versions/2.3.0/MIGRATION.md`: Migration: 2.1.0 to 2.3.0
|
|
29
|
+
- `versions/2.1.0/MIGRATION.md`: Migration: 2.0.0 to 2.1.0
|
|
30
|
+
- `versions/2.0.0/MIGRATION.md`: Migration: Legacy 1.x API to 2.0.0
|
package/instructions/README.md
CHANGED
|
@@ -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.
|
|
4
|
+
`@v-office/website-sdk` 2.18.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,11 @@ 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.18.0/`: 2.18.0 opt-in legacy-v9 facility association through
|
|
22
|
+
facility custom attributes and vOffice object groups, configurable v9
|
|
23
|
+
facility `p_*` line-list highlights, initial-availability prices on available
|
|
24
|
+
non-start dates, combined seasonal rent rows on quote booking cards, and the
|
|
25
|
+
2.17.1-to-2.18.0 migration guide.
|
|
21
26
|
- `versions/2.17.1/`: 2.17.1 legacy-v9 EUR fallback for calendar prices when
|
|
22
27
|
unit currency metadata is unavailable, and the 2.17.0-to-2.17.1 migration
|
|
23
28
|
guide.
|
|
@@ -107,5 +112,5 @@ website-sdk --backend v10 search --locale de-DE --query "adults=2" --sort '{"by"
|
|
|
107
112
|
```
|
|
108
113
|
|
|
109
114
|
Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced
|
|
110
|
-
in 2.0.0 and kept in 2.
|
|
115
|
+
in 2.0.0 and kept in 2.18.0. v10 config additionally requires `searchEndpoint` as
|
|
111
116
|
of 2.5.0.
|
|
@@ -61,9 +61,9 @@ Initial availability returns `Promise<InitialAvailabilityOutput>`.
|
|
|
61
61
|
},
|
|
62
62
|
"2026-07-02": {
|
|
63
63
|
"canBeStartDate": false,
|
|
64
|
-
"isAvailableDate":
|
|
64
|
+
"isAvailableDate": true,
|
|
65
65
|
"status": "check_in_not_allowed",
|
|
66
|
-
"formattedPrice":
|
|
66
|
+
"formattedPrice": "120.00 EUR",
|
|
67
67
|
"tooltip": "Arrival is not possible on this date."
|
|
68
68
|
}
|
|
69
69
|
},
|
|
@@ -99,12 +99,14 @@ Common statuses include `available`, `before_today`, `check_in_not_allowed`, `no
|
|
|
99
99
|
### Legacy v9 Calendar-Day Prices
|
|
100
100
|
|
|
101
101
|
From 2.17.0, v9 initial availability uses the numeric price supplied by the v1
|
|
102
|
-
calendar to populate `formattedPrice` on
|
|
102
|
+
calendar to populate `formattedPrice` on available dates. The value is already
|
|
103
103
|
localized and formatted in the rental unit's configured booking currency.
|
|
104
104
|
Render it directly rather than parsing or reformatting it.
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
the
|
|
106
|
+
From 2.18.0, available dates that cannot be used as a start date also expose a
|
|
107
|
+
price when the source supplies one. The same rule applies to v10 initial
|
|
108
|
+
availability. `formattedPrice` remains `null` when the date is unavailable or
|
|
109
|
+
the source supplies no numeric price.
|
|
108
110
|
Start-date-selected availability does not include calendar prices.
|
|
109
111
|
|
|
110
112
|
When no successful unit lookup is cached, a v9 initial-availability request loads
|
|
@@ -117,8 +119,8 @@ calendar prices fall back to `EUR`.
|
|
|
117
119
|
No new configuration is required. The currency lookup uses the existing
|
|
118
120
|
`v1ApiBaseUrl` and `apiKey`.
|
|
119
121
|
|
|
120
|
-
See `versions/2.
|
|
121
|
-
`versions/2.
|
|
122
|
+
See `versions/2.18.0/CHANGELOG.md` and
|
|
123
|
+
`versions/2.18.0/MIGRATION.md`.
|
|
122
124
|
|
|
123
125
|
## Configuration
|
|
124
126
|
|
package/instructions/creation.md
CHANGED
|
@@ -48,10 +48,21 @@ const sdk = createWebsiteSDK({
|
|
|
48
48
|
apiKey: "...",
|
|
49
49
|
imageProxyBaseUrl: "https://images.example.com",
|
|
50
50
|
rentalDataAttributes: ["name", "description"],
|
|
51
|
+
facilityObjectGroupRelationAttributeId: 18962,
|
|
51
52
|
},
|
|
52
53
|
});
|
|
53
54
|
```
|
|
54
55
|
|
|
56
|
+
`facilityObjectGroupRelationAttributeId` is an optional v9-only compatibility
|
|
57
|
+
setting for tenants whose units are associated with facilities through vOffice
|
|
58
|
+
object groups instead of the native facility relation. Its numeric value `N`
|
|
59
|
+
selects the facility data attribute `p_N`. The attribute must contain one or
|
|
60
|
+
more object-group IDs. When omitted, the SDK continues to use each unit's
|
|
61
|
+
native `voffice_facility` relation.
|
|
62
|
+
|
|
63
|
+
See `versions/2.18.0/CHANGELOG.md`, `versions/2.18.0/MIGRATION.md`, and
|
|
64
|
+
`rentals.md`.
|
|
65
|
+
|
|
55
66
|
`v10`:
|
|
56
67
|
|
|
57
68
|
```ts
|
|
@@ -93,6 +104,7 @@ const options = defineWebsiteSDKOptions({
|
|
|
93
104
|
type WebsiteSDKOptions = {
|
|
94
105
|
translationOverrides?: TranslationOverrides;
|
|
95
106
|
customAttributes?: CustomAttributeRegistrySnapshot;
|
|
107
|
+
v9PropertyHighlightSources?: V9PropertyHighlightSourceRegistry;
|
|
96
108
|
customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition[];
|
|
97
109
|
rentalHighlightPrioritization?: readonly RentalHighlightPrioritizationKey[];
|
|
98
110
|
rentalPropertyHighlightPrioritization?: readonly RentalPropertyHighlightPrioritizationKey[];
|
|
@@ -105,7 +117,8 @@ type WebsiteSDKOptions = {
|
|
|
105
117
|
which facts become highlights and set their order. They are ordered allowlists, not
|
|
106
118
|
sorts over every available fact. A key that is not listed is not emitted even when
|
|
107
119
|
the source contains a value. This affects `highlights` only, not `attributes` or
|
|
108
|
-
`vicinity`.
|
|
120
|
+
`vicinity`. v10 uses its property metadata catalog. v9 supports its built-in
|
|
121
|
+
facility fields and configured `p_*` line-list sources.
|
|
109
122
|
|
|
110
123
|
For either option, `undefined` uses the SDK default and `[]` emits no highlights.
|
|
111
124
|
Duplicate keys are emitted once; unknown, unsupported, or unresolved keys are
|
|
@@ -116,6 +129,7 @@ not part of this strongest-view selection.
|
|
|
116
129
|
Unset options are normalized by the SDK:
|
|
117
130
|
|
|
118
131
|
- `customAttributes` defaults to an empty registry.
|
|
132
|
+
- `v9PropertyHighlightSources` defaults to an empty registry.
|
|
119
133
|
- `customAttributeFilterDefinitions` defaults to `[]`.
|
|
120
134
|
- `rentalHighlightPrioritization` defaults to the SDK default rental highlight selection.
|
|
121
135
|
- `rentalPropertyHighlightPrioritization` defaults to the SDK default property highlight selection.
|
|
@@ -123,6 +137,37 @@ Unset options are normalized by the SDK:
|
|
|
123
137
|
- `shouldAddProposedAdditionalServiceAmount` defaults to `false`.
|
|
124
138
|
- `translationOverrides` is omitted unless provided.
|
|
125
139
|
|
|
140
|
+
### v9 Property Highlight Sources
|
|
141
|
+
|
|
142
|
+
Use `defineV9PropertyHighlightSources` when a tenant stores facility highlights
|
|
143
|
+
as newline-separated text in a custom facility field:
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
import { defineV9PropertyHighlightSources, defineWebsiteSDKOptions } from "@v-office/website-sdk";
|
|
147
|
+
|
|
148
|
+
const v9PropertyHighlightSources = defineV9PropertyHighlightSources({
|
|
149
|
+
facilityHighlights: {
|
|
150
|
+
v9: "p_18963",
|
|
151
|
+
type: "line-list",
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const options = defineWebsiteSDKOptions({
|
|
156
|
+
v9PropertyHighlightSources,
|
|
157
|
+
rentalPropertyHighlightPrioritization: [
|
|
158
|
+
"childrenWelcome",
|
|
159
|
+
v9PropertyHighlightSources.keys.facilityHighlights,
|
|
160
|
+
"pets",
|
|
161
|
+
],
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The source is v9-only and affects the existing `property.highlights` array.
|
|
166
|
+
Its field is requested only when the stable source key is selected. Newlines
|
|
167
|
+
separate highlights; surrounding whitespace, empty lines, and duplicate visible
|
|
168
|
+
values are removed. Missing values are ignored. Rental custom attributes remain
|
|
169
|
+
independent and do not feed property highlights.
|
|
170
|
+
|
|
126
171
|
## Rental Scope
|
|
127
172
|
|
|
128
173
|
Use `rentalScope` to restrict all rental lists and searches created by this SDK instance:
|
|
@@ -303,6 +303,13 @@ value is absent — custom attributes are strictly a fallback there.
|
|
|
303
303
|
`getRentals` renders custom attributes into both `attributes` and `highlights`;
|
|
304
304
|
`search` renders them into `highlights` only.
|
|
305
305
|
|
|
306
|
+
These custom attributes belong to rentals, not facilities. From 2.18.0,
|
|
307
|
+
newline-separated facility `p_*` text can feed `property.highlights` through
|
|
308
|
+
the separate `defineV9PropertyHighlightSources` registry and
|
|
309
|
+
`v9PropertyHighlightSources` option. It is selected with
|
|
310
|
+
`rentalPropertyHighlightPrioritization`; see `rentals.md`. It does not add the
|
|
311
|
+
text to property `attributes` or make it searchable.
|
|
312
|
+
|
|
306
313
|
In `attributes`, a custom attribute is placed in the group named by its resolved
|
|
307
314
|
`category`, alongside built-in attributes of that category rather than in a separate
|
|
308
315
|
bucket. The default `OTHER` therefore groups everything you did not categorize
|
package/instructions/quote.md
CHANGED
|
@@ -181,6 +181,14 @@ A zero-total line with subitems can remain because those subitems carry
|
|
|
181
181
|
descriptive content. Do not use the absence or presence of a zero-value price row
|
|
182
182
|
as service-selection state; use the quote's explicit service or selection data.
|
|
183
183
|
|
|
184
|
+
From 2.18.0, included-section subitems that share the same localized `position`
|
|
185
|
+
and the same `appliedCharge` are combined into one row. A stay that crosses
|
|
186
|
+
seasonal rental rates therefore shows a single rent line instead of repeating
|
|
187
|
+
the same included rent row once per season. Lines with different labels, such
|
|
188
|
+
as cleaning or booking fees, stay separate. The inclusive total is unchanged.
|
|
189
|
+
|
|
190
|
+
See `versions/2.18.0/CHANGELOG.md` and `versions/2.18.0/MIGRATION.md`.
|
|
191
|
+
|
|
184
192
|
### Modifiers and Pre-Modifier Totals
|
|
185
193
|
|
|
186
194
|
On `v10`, a booking-card item at
|
package/instructions/rentals.md
CHANGED
|
@@ -123,6 +123,113 @@ list.
|
|
|
123
123
|
|
|
124
124
|
See `versions/2.15.0/CHANGELOG.md` and `versions/2.15.0/MIGRATION.md`.
|
|
125
125
|
|
|
126
|
+
### Legacy v9 Facility Details
|
|
127
|
+
|
|
128
|
+
From 2.18.0, v9 static rentals populate additional fields on the existing
|
|
129
|
+
`property` object when facility data is available:
|
|
130
|
+
|
|
131
|
+
- `propertyType` from the v9 facility `type`
|
|
132
|
+
- `location` from the GeoJSON `loc`
|
|
133
|
+
- `address`, including localized `regionName` as `province`
|
|
134
|
+
- localized `intro`, `headline`, `description`, `altDescription`,
|
|
135
|
+
`arrivalInfo`, `departureInfo`, `locationDescription`, and `directions`
|
|
136
|
+
- built-in `attributes` for allergy suitability, children, pets, and youth
|
|
137
|
+
groups
|
|
138
|
+
|
|
139
|
+
`HOUSE_FAC` and `FLAT_FAC` normalize to `HOLIDAY_HOME_COMPLEX` and
|
|
140
|
+
`APARTMENT_COMPLEX`. The normalized value is localized through
|
|
141
|
+
`Property.propertyType.option.*`; for example, `HOLIDAY_HOME_COMPLEX` is
|
|
142
|
+
returned as `Ferienpark` for `de-DE`. Unknown types and malformed optional data
|
|
143
|
+
are omitted. This fills the existing property schema and does not add public
|
|
144
|
+
fields.
|
|
145
|
+
|
|
146
|
+
The same parser is used for native and object-group facility relations.
|
|
147
|
+
|
|
148
|
+
Use `rentalPropertyHighlightPrioritization` to select and order v9 facility
|
|
149
|
+
highlights. The supported v9 keys are `allergic`, `childrenWelcome`, `pets`, and
|
|
150
|
+
`youthgroups`. Unsupported, duplicate, missing, and non-renderable selections
|
|
151
|
+
are ignored.
|
|
152
|
+
|
|
153
|
+
Tenant-specific facility highlight text can be added without treating it as a
|
|
154
|
+
rental custom attribute:
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
import { defineV9PropertyHighlightSources } from "@v-office/website-sdk";
|
|
158
|
+
|
|
159
|
+
const v9PropertyHighlightSources = defineV9PropertyHighlightSources({
|
|
160
|
+
facilityHighlights: {
|
|
161
|
+
v9: "p_18963",
|
|
162
|
+
type: "line-list",
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const options = {
|
|
167
|
+
v9PropertyHighlightSources,
|
|
168
|
+
rentalPropertyHighlightPrioritization: [
|
|
169
|
+
"childrenWelcome",
|
|
170
|
+
v9PropertyHighlightSources.keys.facilityHighlights,
|
|
171
|
+
"pets",
|
|
172
|
+
],
|
|
173
|
+
};
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The selected field is fetched with facility data for both native and
|
|
177
|
+
object-group relations. A localized `line-list` value is split on Unix or
|
|
178
|
+
Windows newlines. Lines are trimmed, blank and duplicate values are removed,
|
|
179
|
+
and the remainder expands at the selected key's position. A missing or `null`
|
|
180
|
+
field emits nothing. Defining but not selecting a source does not request it.
|
|
181
|
+
Use one highlight per line; semicolons are not separators.
|
|
182
|
+
|
|
183
|
+
### Legacy v9 Facility Relations Through Object Groups
|
|
184
|
+
|
|
185
|
+
Some v9 tenants store a facility-to-object-group relation in a facility custom
|
|
186
|
+
data attribute instead of assigning the facility directly to each unit. Enable
|
|
187
|
+
that compatibility mode on the v9 config:
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
const sdk = createWebsiteSDK({
|
|
191
|
+
config: {
|
|
192
|
+
backend: "v9",
|
|
193
|
+
graphqlUrl: "https://example.com/graphql",
|
|
194
|
+
apiKey: "...",
|
|
195
|
+
imageProxyBaseUrl: "https://images.example.com",
|
|
196
|
+
facilityObjectGroupRelationAttributeId: 18962,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The numeric value selects `p_18962`. The SDK loads facilities once and unit
|
|
202
|
+
details in bounded GraphQL batches, associates units whose
|
|
203
|
+
`voffice_groups[].voffice_group_id` occurs in the facility attribute, and emits
|
|
204
|
+
the resolved facility through the existing `rental.property` field.
|
|
205
|
+
|
|
206
|
+
This mode replaces the native v9 facility association for static rentals. It
|
|
207
|
+
does not fall back to `voffice_facility` per unit and it does not change live
|
|
208
|
+
search. Units with no matching object group omit `property`. Invalid relation
|
|
209
|
+
values, relations claimed by several facilities, and units resolving to
|
|
210
|
+
several facilities fail the static rentals request instead of selecting an
|
|
211
|
+
arbitrary property. The request also fails when no facility has a usable
|
|
212
|
+
configured relation value.
|
|
213
|
+
|
|
214
|
+
The relation attribute may contain positive numeric IDs as numbers, strings,
|
|
215
|
+
localized string records, arrays, or strings separated by whitespace, commas,
|
|
216
|
+
or semicolons. The association is locale-independent. The configured GraphQL
|
|
217
|
+
Hub must expose `voffice_facilities` and must have synchronized both the
|
|
218
|
+
facility relation attribute and unit group memberships.
|
|
219
|
+
|
|
220
|
+
See `versions/2.18.0/CHANGELOG.md` and `versions/2.18.0/MIGRATION.md`.
|
|
221
|
+
|
|
222
|
+
### Legacy v9 Large Catalogue Batching
|
|
223
|
+
|
|
224
|
+
From 2.18.0, v9 static rentals first load the ordered rental IDs. Complete
|
|
225
|
+
rental details and feedbacks are then fetched sequentially in batches of 128
|
|
226
|
+
IDs. This bounds the amount of data the Laravel/PHP Hub must construct in one
|
|
227
|
+
request while preserving the existing result and rental order.
|
|
228
|
+
|
|
229
|
+
Object-group facility mode loads the facility list once. Applications that mock
|
|
230
|
+
or count GraphQL requests must allow multiple detail and feedback requests for
|
|
231
|
+
catalogues larger than 128 rentals.
|
|
232
|
+
|
|
126
233
|
### Structured Bed Quantities
|
|
127
234
|
|
|
128
235
|
From 2.17.0, both backends expand each source bed according to its `amount`.
|
|
@@ -292,8 +399,10 @@ Optional `WebsiteSDKOptions`:
|
|
|
292
399
|
`rentalHighlightPrioritization` selects which facts become rental `highlights` and
|
|
293
400
|
sets their order. It is an ordered allowlist, not a sort over every available fact.
|
|
294
401
|
A key that is not listed is not emitted even when the source contains a value.
|
|
295
|
-
`rentalPropertyHighlightPrioritization` has the same semantics for
|
|
296
|
-
highlights.
|
|
402
|
+
`rentalPropertyHighlightPrioritization` has the same semantics for property
|
|
403
|
+
highlights. v9 supports its typed built-in facility fields and configured
|
|
404
|
+
line-list sources; v10 uses its property metadata catalog. Both options affect
|
|
405
|
+
`highlights` only, not `attributes` or `vicinity`.
|
|
297
406
|
|
|
298
407
|
For either option, `undefined` uses the SDK default and `[]` emits no highlights.
|
|
299
408
|
Duplicate keys are emitted once; unknown, unsupported, or unresolved keys are
|
|
@@ -312,6 +421,25 @@ In CLI JSON, `customAttributes` contains catalog and selection inputs; the CLI b
|
|
|
312
421
|
the validated registry. Typed applications normally call `defineCustomAttributes`
|
|
313
422
|
and pass its result instead.
|
|
314
423
|
|
|
424
|
+
The same authored-input rule applies to v9 property highlight sources. A v9 CLI
|
|
425
|
+
options file can contain:
|
|
426
|
+
|
|
427
|
+
```json
|
|
428
|
+
{
|
|
429
|
+
"v9PropertyHighlightSources": {
|
|
430
|
+
"facilityHighlights": {
|
|
431
|
+
"v9": "p_18963",
|
|
432
|
+
"type": "line-list"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"rentalPropertyHighlightPrioritization": ["childrenWelcome", "facilityHighlights", "pets"]
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
The CLI validates the stable key, positive-integer `p_*` binding, `line-list`
|
|
440
|
+
type, binding uniqueness, and collisions with built-in v9 facility highlight
|
|
441
|
+
keys before SDK creation.
|
|
442
|
+
|
|
315
443
|
Custom attributes configured through `customAttributes` add values to rental output on
|
|
316
444
|
both backends. A value appears in `highlights` only when its key is listed in
|
|
317
445
|
`rentalHighlightPrioritization`, and in `attributes` under the group named by its
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Changelog: 2.18.0
|
|
2
|
+
|
|
3
|
+
This release adds an opt-in legacy-v9 compatibility mode for tenants that
|
|
4
|
+
associate facilities and rentals through vOffice object groups instead of the
|
|
5
|
+
native unit-to-facility relation. Initial-availability calendar days also
|
|
6
|
+
expose a localized `formattedPrice` on available dates that cannot be used as
|
|
7
|
+
a start date. Quote booking cards also combine repeated included rent rows
|
|
8
|
+
when a stay crosses seasonal rates.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- `WebsiteV9Config` accepts the optional positive integer
|
|
13
|
+
`facilityObjectGroupRelationAttributeId`.
|
|
14
|
+
- When configured with an ID such as `18962`, legacy-v9 static rentals request
|
|
15
|
+
the facility data attribute `p_18962`.
|
|
16
|
+
- The v9 static rentals GraphQL operation can load top-level facilities and
|
|
17
|
+
each unit's `voffice_groups[].voffice_group_id` in one request.
|
|
18
|
+
- The SDK associates matching units with the facility and exposes it through
|
|
19
|
+
the existing optional `rental.property` field.
|
|
20
|
+
- Legacy-v9 facilities populate additional existing `rental.property` fields:
|
|
21
|
+
`propertyType`, `location`, `address`, complete description components, and
|
|
22
|
+
supported built-in `attributes`.
|
|
23
|
+
- Facility types are normalized to the existing property-type values and then
|
|
24
|
+
localized through `Property.propertyType.option.*`.
|
|
25
|
+
- `rentalPropertyHighlightPrioritization` now selects and orders built-in v9
|
|
26
|
+
facility highlights.
|
|
27
|
+
- Added `defineV9PropertyHighlightSources` and the
|
|
28
|
+
`v9PropertyHighlightSources` website option. A tenant-specific facility
|
|
29
|
+
`p_*` field can now contribute newline-separated text to the existing
|
|
30
|
+
`rental.property.highlights` array without becoming a rental custom
|
|
31
|
+
attribute.
|
|
32
|
+
- Configured facility highlight fields are requested only when their stable
|
|
33
|
+
key is selected by `rentalPropertyHighlightPrioritization`. Lines are
|
|
34
|
+
trimmed, empty lines and duplicates are removed, and the remaining lines
|
|
35
|
+
expand at that key's configured position.
|
|
36
|
+
- Facility relation values support positive numbers, numeric strings,
|
|
37
|
+
localized records, arrays, and strings separated by whitespace, commas, or
|
|
38
|
+
semicolons.
|
|
39
|
+
|
|
40
|
+
## Changed
|
|
41
|
+
|
|
42
|
+
- Legacy-v9 static rentals first load the rental IDs and then request complete
|
|
43
|
+
rental details in sequential batches of 128 IDs.
|
|
44
|
+
- Legacy-v9 rental feedback requests use the same sequential 128-ID batches.
|
|
45
|
+
This limits the amount of rental data the Hub must construct and serialize in
|
|
46
|
+
one PHP request.
|
|
47
|
+
- Object-group compatibility mode loads top-level facilities once instead of
|
|
48
|
+
repeating facility data for every rental-detail batch.
|
|
49
|
+
- The CLI validates authored `v9PropertyHighlightSources` from the JSON options
|
|
50
|
+
file, as it already does for authored custom-attribute inputs.
|
|
51
|
+
|
|
52
|
+
## Fixed
|
|
53
|
+
|
|
54
|
+
- Initial availability exposes `formattedPrice` on available dates that cannot
|
|
55
|
+
be used as a start date (`check_in_not_allowed` and
|
|
56
|
+
`no_valid_check_out_from_start`) when the source supplies a numeric price.
|
|
57
|
+
- Legacy-v9 uses the existing v1 calendar `price`. v10 uses the existing
|
|
58
|
+
guest-summary rent series. Both already computed that value and previously
|
|
59
|
+
returned `formattedPrice: null` on those statuses.
|
|
60
|
+
- Unavailable dates and dates without a numeric source price continue to
|
|
61
|
+
return `formattedPrice: null`.
|
|
62
|
+
- Quote booking cards combine included subitems that share the same localized
|
|
63
|
+
`position` and `appliedCharge` into one row on v9 and v10.
|
|
64
|
+
- A stay that crosses seasonal rental prices no longer repeats the rent line
|
|
65
|
+
once per season. Distinct included labels remain separate rows. The
|
|
66
|
+
inclusive total is unchanged.
|
|
67
|
+
|
|
68
|
+
## Unchanged
|
|
69
|
+
|
|
70
|
+
- Omitting `facilityObjectGroupRelationAttributeId` retains the existing
|
|
71
|
+
`voffice_facility` association and existing GraphQL operation.
|
|
72
|
+
- The public `getRentals` input and output types are unchanged.
|
|
73
|
+
- The shared core `RentalPropertySchema` is unchanged; configured facility
|
|
74
|
+
highlight lines use its existing `highlights` field.
|
|
75
|
+
- Rental and property IDs keep their existing semantics.
|
|
76
|
+
- The compatibility mode affects only
|
|
77
|
+
`sdk.static.rentals.getRentals({ locale })`.
|
|
78
|
+
- `sdk.live.availability.getInitialAvailability(input)` keeps its existing
|
|
79
|
+
signature and public TypeScript contract.
|
|
80
|
+
- Start-date-selected availability output does not gain calendar prices.
|
|
81
|
+
- Live search, booking, contact, and the shared core rental domain are
|
|
82
|
+
unchanged. Quote inputs and booking-card types are unchanged.
|
|
83
|
+
- No booking or mutation request is introduced.
|
|
84
|
+
|
|
85
|
+
## Validation and Failure Behavior
|
|
86
|
+
|
|
87
|
+
- Configuration fails during SDK creation when the relation attribute ID is
|
|
88
|
+
zero, negative, fractional, or not a safe integer.
|
|
89
|
+
- Property-highlight source definition fails for invalid stable keys, keys
|
|
90
|
+
reserved by built-in v9 facility highlights, invalid positive-integer `p_*`
|
|
91
|
+
bindings, unsupported types, or duplicate bindings.
|
|
92
|
+
- The static rentals request fails when no facility has a usable configured
|
|
93
|
+
relation value.
|
|
94
|
+
- The static rentals request fails when a non-empty relation value is malformed,
|
|
95
|
+
one object group is claimed by several facilities, or one rental resolves to
|
|
96
|
+
several different facilities.
|
|
97
|
+
- A facility relation that references no current unit is valid.
|
|
98
|
+
- Rentals without a matching configured object group remain in the result and
|
|
99
|
+
omit `property`.
|
|
100
|
+
- When compatibility mode is enabled, the SDK does not fall back to the native
|
|
101
|
+
facility relation for unmatched rentals.
|
|
102
|
+
|
|
103
|
+
## Compatibility
|
|
104
|
+
|
|
105
|
+
- Existing v9 and v10 configurations require no changes.
|
|
106
|
+
- Tenants enabling the new mode need a GraphQL Hub that exposes
|
|
107
|
+
`voffice_facilities` and synchronizes both the configured facility `p_*`
|
|
108
|
+
attribute and unit object-group memberships.
|
|
109
|
+
- Complete snapshots can gain `property` on rentals that previously had no
|
|
110
|
+
native facility relation.
|
|
111
|
+
- Existing v9 property snapshots can gain `propertyType`, `location`, `address`,
|
|
112
|
+
more description fields, and built-in attributes when the Hub supplies them.
|
|
113
|
+
- Configuring a v9 property highlight source has no output effect until its key
|
|
114
|
+
is also selected. Once selected and synchronized in GraphQL, complete rental
|
|
115
|
+
snapshots can gain one highlight per non-empty source line.
|
|
116
|
+
- Large v9 catalogues perform several bounded detail and feedback queries
|
|
117
|
+
instead of one oversized request. The returned rental order and public output
|
|
118
|
+
remain unchanged.
|
|
119
|
+
- Complete initial-availability snapshots can change from
|
|
120
|
+
`formattedPrice: null` to a formatted value on available non-start dates.
|
|
121
|
+
- The v10 calendar-price change is delivered through `@v-office/sdk-core`.
|
|
122
|
+
Refresh the lockfile when upgrading so the website package resolves the
|
|
123
|
+
coordinated core version shipped for 2.18.0.
|
|
124
|
+
- No configuration or consumer code change is required for the calendar-price
|
|
125
|
+
change. Render `formattedPrice` directly when non-null.
|
|
126
|
+
- Complete quote snapshots that listed one included rent row per seasonal
|
|
127
|
+
rate period now contain a single combined rent row. Render `subItems` as
|
|
128
|
+
returned. The v10 quote change is delivered through `@v-office/sdk-core`.
|
|
129
|
+
Refresh the lockfile when upgrading so the website package resolves the
|
|
130
|
+
coordinated core version shipped for 2.18.0.
|
|
131
|
+
|
|
132
|
+
See `versions/2.18.0/MIGRATION.md`, `../../creation.md`,
|
|
133
|
+
`../../rentals.md`, `../../availability.md`, and `../../quote.md`.
|