@v-office/website-sdk 2.24.0 → 2.25.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 +89 -2
- package/dist/{client-DC4LG3CP.mjs → client-0Lgv-Gb_.mjs} +83 -18
- package/dist/index.d.mts +17 -5
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/creation.md +5 -0
- package/dist/instructions/rentals.md +75 -0
- package/dist/instructions/search.md +1 -2
- package/dist/instructions/versions/2.24.1/CHANGELOG.md +17 -0
- package/dist/instructions/versions/2.24.1/MIGRATION.md +9 -0
- package/dist/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/dist/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/dist/{to-rental-highlights-C1NF2uuE.mjs → operations-DwURbo0b.mjs} +1 -626
- package/dist/{rentals-eqFhtCdT.mjs → rentals-Dn0-kGWD.mjs} +96 -33
- package/dist/{search-CKL-8T8q.mjs → search-BLTTQAsG.mjs} +4 -3
- package/dist/to-rental-highlights-BL5m3Uen.mjs +626 -0
- package/dist/translations/v9/de-DE/core.json +3 -1
- package/dist/translations/v9/en-US/core.json +3 -1
- package/dist/{v9-data-BnYxa2Ek.mjs → v9-data-C3SWtDGs.mjs} +7 -5
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/creation.md +5 -0
- package/instructions/rentals.md +75 -0
- package/instructions/search.md +1 -2
- package/instructions/versions/2.24.1/CHANGELOG.md +17 -0
- package/instructions/versions/2.24.1/MIGRATION.md +9 -0
- package/instructions/versions/2.24.1/release.json +3 -0
- package/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/instructions/versions/2.25.0/release.json +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog: 2.25.0
|
|
2
|
+
|
|
3
|
+
A v9 site can show ratings per review criterion on the rental page (cleanliness, location, …),
|
|
4
|
+
and decide which incomplete v9 feedbacks become review items. Every v9 agency defines its own
|
|
5
|
+
criteria, so their IDs and names differ per site: the site configures them. v9 reviews no
|
|
6
|
+
longer show the guest's surname.
|
|
7
|
+
|
|
8
|
+
## Added
|
|
9
|
+
|
|
10
|
+
- `v9Reviews` option for v9 sites. `criteria` lists the agency's `fb_<id>` criteria in display
|
|
11
|
+
order, each with `type` (`"stars"` or `"text"`) and a label for `de-DE` and `en-US`.
|
|
12
|
+
- A `stars` criterion becomes an entry of `reviews.summary.categories` (`{ label, rating }`):
|
|
13
|
+
the mean of its ratings from 1 to 5 across the rental's included feedbacks. `0` means not
|
|
14
|
+
rated. A criterion no feedback of a rental rated is left out.
|
|
15
|
+
- A `text` criterion is appended to the review item's `text`, as its label and the answer on
|
|
16
|
+
the next line.
|
|
17
|
+
- `showAuthorCity` in `v9Reviews`, `false` by default. When `true`, a v9 review's author reads
|
|
18
|
+
"Anna aus Hamburg" / "Anna from Hamburg" (`reviews.item.authorWithCity`).
|
|
19
|
+
- `includeItemsWithoutText` and `includeItemsWithoutRating` in `v9Reviews`, both `false` by
|
|
20
|
+
default. When `true`, a v9 feedback that has no text or no average rating still becomes a
|
|
21
|
+
review item. `summary.rating` and `summary.count` cover the included items that have a
|
|
22
|
+
rating; when none has one, `reviews` has `items` and no `summary`.
|
|
23
|
+
- `website-sdk --backend v9 review-criteria [--rental-ids <ids>]` lists the `fb_<id>` criteria
|
|
24
|
+
vOffice returns for the five units with the most feedbacks, or for the listed units.
|
|
25
|
+
- Types `V9ReviewsOptions`, `V9ReviewCriterion` and `V9ReviewCriterionDataAttribute`.
|
|
26
|
+
|
|
27
|
+
## Changed
|
|
28
|
+
|
|
29
|
+
- A v9 review's `author` is the guest's forename only ("Anna, verreist im Mai 2025" instead of
|
|
30
|
+
"Anna Beispiel, verreist im Mai 2025"). The SDK no longer requests the surname. A feedback
|
|
31
|
+
without a forename shows `reviews.item.guest` ("Gast", "Guest"); a missing name no longer
|
|
32
|
+
drops a feedback.
|
|
33
|
+
- v9 rentals request only the review criteria a site configures. Earlier versions requested
|
|
34
|
+
three fixed `fb_*` fields that exist for one vOffice account only, and did not use them.
|
|
35
|
+
- `KnownVofficeFeedbackData` no longer lists `fb_1429`, `fb_4905` and `fb_4906`. They are
|
|
36
|
+
account specific like every other `fb_*` field.
|
|
37
|
+
- Invalid `v9Reviews` options fail SDK creation with every issue listed.
|
|
38
|
+
|
|
39
|
+
Without `v9Reviews`, v9 review output is the same as in 2.24.1 apart from the author. v10 does
|
|
40
|
+
not use the option and keeps the full name, but an invalid value fails SDK creation there too. v10 already returns `summary.categories`
|
|
41
|
+
from its feedback forms.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Migration: 2.24.1 to 2.25.0
|
|
2
|
+
|
|
3
|
+
## 1. Upgrade
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @v-office/website-sdk@2.25.0
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
No changes are required. One thing looks different on a v9 site: a review's author is the
|
|
10
|
+
guest's forename only, "Gast" / "Guest" when there is none. The surname is no longer
|
|
11
|
+
available. If the site's own text says "full name" or builds initials from `author`, adjust it.
|
|
12
|
+
To name the guest differently, override `reviews.item.guest` in `translationOverrides`.
|
|
13
|
+
|
|
14
|
+
Everything else in v9 reviews stays as before until the site sets `v9Reviews`.
|
|
15
|
+
|
|
16
|
+
## 2. Optional: ratings per review criterion on a v9 site
|
|
17
|
+
|
|
18
|
+
This is an offer to the site owner, not a required step. The overall rating, the review count
|
|
19
|
+
and the reviews stay either way.
|
|
20
|
+
|
|
21
|
+
1. List the agency's criteria:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
website-sdk --backend v9 review-criteria
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Every entry has the `fb_<id>` and whether it is rated with stars. A `text` criterion usually
|
|
28
|
+
does not appear here; its ID has to come from the site owner.
|
|
29
|
+
|
|
30
|
+
2. Ask the site owner which criteria to show and what they are called, in German and English.
|
|
31
|
+
|
|
32
|
+
3. Set them in the SDK options:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
const options = {
|
|
36
|
+
v9Reviews: {
|
|
37
|
+
criteria: [
|
|
38
|
+
{ v9: "fb_8748", type: "stars", label: { "de-DE": "Sauberkeit", "en-US": "Cleanliness" } },
|
|
39
|
+
{ v9: "fb_8749", type: "stars", label: { "de-DE": "Lage", "en-US": "Location" } },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
4. Render `reviews.summary.categories` if the site does not yet. Each entry is
|
|
46
|
+
`{ label, rating }`, in the configured order; a rental shows only the criteria it has.
|
|
47
|
+
|
|
48
|
+
## 3. Optional: the guest's city on a v9 site
|
|
49
|
+
|
|
50
|
+
Set `showAuthorCity: true` in `v9Reviews` to show "Anna aus Hamburg" instead of "Anna". The
|
|
51
|
+
wording comes from `reviews.item.authorWithCity` and can be overridden. A feedback without a
|
|
52
|
+
city keeps the name alone.
|
|
53
|
+
|
|
54
|
+
## 4. Optional: include incomplete v9 feedbacks
|
|
55
|
+
|
|
56
|
+
By default a v9 feedback needs an average rating and text to become a review item. To show the
|
|
57
|
+
others as well, set `includeItemsWithoutText` or `includeItemsWithoutRating` in `v9Reviews` to
|
|
58
|
+
`true`. Items can then lack `text` or `rating`, as `RentalReview` already allows; render each
|
|
59
|
+
field only when it is present.
|
|
60
|
+
|
|
61
|
+
## 5. If you used `fb_1429`, `fb_4905` or `fb_4906` as known feedback fields
|
|
62
|
+
|
|
63
|
+
They are no longer part of `KnownVofficeFeedbackData`. Where you pass them as feedback data
|
|
64
|
+
attributes, mark them with `customDataAttribute("fb_1429")` instead.
|