@v-office/website-sdk 2.11.0 → 2.13.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/README.md +6 -1
- package/dist/capabilities/search.d.mts +2 -0
- package/dist/capabilities/search.mjs +2 -0
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/{client-DYAHnU5F.mjs → client-Ma0daa2H.mjs} +140 -68
- package/dist/index.d.mts +569 -344
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/README.md +12 -4
- package/dist/instructions/booking.md +56 -40
- package/dist/instructions/quote.md +100 -6
- package/dist/instructions/search.md +99 -12
- package/dist/instructions/versions/2.12.0/CHANGELOG.md +56 -0
- package/dist/instructions/versions/2.12.0/MIGRATION.md +194 -0
- package/dist/instructions/versions/2.13.0/CHANGELOG.md +87 -0
- package/dist/instructions/versions/2.13.0/MIGRATION.md +315 -0
- package/dist/instructions/versions/2.5.0/MIGRATION.md +3 -0
- package/dist/{quote-Cs6jGoRS.mjs → quote-Qy_affum.mjs} +4 -4
- package/dist/{rentals-CFod9H4m.mjs → rentals-BG1diZoo.mjs} +7 -4
- package/dist/{search-QlZrI7ue.mjs → search-Byi6XboR.mjs} +39 -19
- package/dist/{to-rental-highlights-B6a_fi0j.mjs → to-rental-highlights-BVikT4Iz.mjs} +4 -2
- package/dist/translations/shared/de-DE/booking.json +7 -0
- package/dist/translations/shared/en-US/booking.json +7 -0
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/README.md +12 -4
- package/instructions/booking.md +56 -40
- package/instructions/quote.md +100 -6
- package/instructions/search.md +99 -12
- package/instructions/versions/2.12.0/CHANGELOG.md +56 -0
- package/instructions/versions/2.12.0/MIGRATION.md +194 -0
- package/instructions/versions/2.13.0/CHANGELOG.md +87 -0
- package/instructions/versions/2.13.0/MIGRATION.md +315 -0
- package/instructions/versions/2.5.0/MIGRATION.md +3 -0
- package/package.json +16 -13
package/instructions/search.md
CHANGED
|
@@ -77,6 +77,28 @@ Common stable query keys:
|
|
|
77
77
|
- Occupancy: `adults`, `children`, `childrenAges`, `babies`, `pets`, `petsCount`.
|
|
78
78
|
- Filters: use `searchParameterQueryKey` values from `sdk.static.filter.getFilters(...)`.
|
|
79
79
|
|
|
80
|
+
### Static Backend Capabilities
|
|
81
|
+
|
|
82
|
+
Search capabilities that only depend on a backend name are available without
|
|
83
|
+
constructing an SDK:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import {
|
|
87
|
+
getSupportedPeriodQueryKeys,
|
|
88
|
+
supportsFlexiblePeriodSearch,
|
|
89
|
+
} from "@v-office/website-sdk/capabilities/search";
|
|
90
|
+
|
|
91
|
+
supportsFlexiblePeriodSearch("v9"); // false
|
|
92
|
+
supportsFlexiblePeriodSearch("v10"); // true
|
|
93
|
+
|
|
94
|
+
getSupportedPeriodQueryKeys("v9").has("month"); // false
|
|
95
|
+
getSupportedPeriodQueryKeys("v10").has("month"); // true
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The returned read-only set contains the stable period query keys accepted by the
|
|
99
|
+
selected backend, including aliases such as `from` and `till`. Key support does
|
|
100
|
+
not replace validation of complete query combinations.
|
|
101
|
+
|
|
80
102
|
## Query Structure
|
|
81
103
|
|
|
82
104
|
The `query` field is a URL query-string style value without a leading `?`.
|
|
@@ -87,17 +109,38 @@ Use `&` to combine period, occupancy, and filter parameters:
|
|
|
87
109
|
"start=20-06-2026&end=27-06-2026&adults=2&wifi";
|
|
88
110
|
```
|
|
89
111
|
|
|
112
|
+
### Empty Queries
|
|
113
|
+
|
|
114
|
+
On v9, an empty query returns the first page of searchable inventory under the
|
|
115
|
+
configured rental scope:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
await sdk.live.search.search({
|
|
119
|
+
locale: "de-DE",
|
|
120
|
+
query: "",
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The v9 facade serializes an empty backend-filter set as GraphQL `data: null`.
|
|
125
|
+
Pagination and the configured `limit` still apply; an undated query does not
|
|
126
|
+
assert availability for a particular stay.
|
|
127
|
+
|
|
90
128
|
### Period Queries
|
|
91
129
|
|
|
92
130
|
Use one supported period structure per query.
|
|
93
131
|
|
|
94
|
-
|
|
132
|
+
Fixed-period search is supported by both v9 and v10:
|
|
95
133
|
|
|
96
134
|
```ts
|
|
97
135
|
"start=20-06-2026&end=27-06-2026";
|
|
98
136
|
```
|
|
99
137
|
|
|
100
|
-
Flexible search by month
|
|
138
|
+
Flexible-period search is supported by v10 only. Legacy v9 rejects the `month`,
|
|
139
|
+
`dates`, `nights`, and `weekend` keys before transport instead of silently
|
|
140
|
+
returning an unpriced item list. Keep the flexible selector unavailable on v9
|
|
141
|
+
sites and use `start` plus `end` for a fixed-period search.
|
|
142
|
+
|
|
143
|
+
Flexible v10 search by month:
|
|
101
144
|
|
|
102
145
|
```ts
|
|
103
146
|
"month=06-2026&nights=7";
|
|
@@ -106,7 +149,7 @@ Flexible search by month:
|
|
|
106
149
|
"month=06-2026&month=07-2026&weekend";
|
|
107
150
|
```
|
|
108
151
|
|
|
109
|
-
Flexible search by exact date tuples:
|
|
152
|
+
Flexible v10 search by exact date tuples:
|
|
110
153
|
|
|
111
154
|
```ts
|
|
112
155
|
"dates=20-06-2026,22-06-2026&nights=2";
|
|
@@ -134,6 +177,9 @@ Boolean filters can be provided as presence-only flags when supported:
|
|
|
134
177
|
|
|
135
178
|
### Invalid Combinations
|
|
136
179
|
|
|
180
|
+
The following flexible-query validation rules apply to v10. Legacy v9 rejects
|
|
181
|
+
every flexible-period key as described above.
|
|
182
|
+
|
|
137
183
|
Do not mix exact period search with flexible period options:
|
|
138
184
|
|
|
139
185
|
```ts
|
|
@@ -155,7 +201,7 @@ Flexible queries require either `nights` or `weekend`, but not both:
|
|
|
155
201
|
"month=06-2026&nights=7&weekend";
|
|
156
202
|
```
|
|
157
203
|
|
|
158
|
-
|
|
204
|
+
Flexible date tuples accept `DD-MM-YYYY` and `YYYY-MM-DD`; months use `MM-YYYY`.
|
|
159
205
|
|
|
160
206
|
Use `rentalIdsIn` to restrict results to specific rental IDs. This option is currently supported by `v10` only.
|
|
161
207
|
Use `voucher` to price v10 search results with a voucher code. This option is currently supported by `v10` only.
|
|
@@ -349,17 +395,58 @@ the expanded leaf entries. A UI may collapse those leaves under the composition
|
|
|
349
395
|
display, but should keep the returned keys and canonical values when removing direct
|
|
350
396
|
filters.
|
|
351
397
|
|
|
352
|
-
##
|
|
398
|
+
## Backend Behavior
|
|
399
|
+
|
|
400
|
+
### v10
|
|
353
401
|
|
|
354
|
-
v10 search runs against the dedicated REST search backend (`POST` to the configured
|
|
402
|
+
v10 search runs against the dedicated REST search backend (`POST` to the configured
|
|
403
|
+
`searchEndpoint`). Existing calls and the output type remain compatible, while the
|
|
404
|
+
input additionally supports optional sorting. v10 results reflect the REST
|
|
405
|
+
projection:
|
|
355
406
|
|
|
356
407
|
- At most five images per item, and no image `category`.
|
|
357
|
-
- `property` is the minimal `{ id, nameOrLabel }` shape. Hydrate
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
-
|
|
361
|
-
|
|
362
|
-
|
|
408
|
+
- `property` is the minimal `{ id, nameOrLabel }` shape. Hydrate
|
|
409
|
+
`property.location`, `property.images`, or `property.address` from
|
|
410
|
+
`sdk.static.rentals.getRentals(...)` when a card needs them.
|
|
411
|
+
- Custom-attribute search filters and highlights require the `customAttributes`
|
|
412
|
+
registry. A definition with no catalog ID cannot be executed, so its query key
|
|
413
|
+
is left in `unusedFilterKeys`. See `custom-attributes.md`.
|
|
414
|
+
- Fixed-period and flexible searches are priced by the REST backend and require
|
|
415
|
+
occupancy.
|
|
416
|
+
- Priced items and alternative periods may include localized `discount` details
|
|
417
|
+
with multiple applied modifiers when the REST backend returns them.
|
|
418
|
+
- The v10 public search input shape is unchanged. The SDK keeps
|
|
419
|
+
alternative-cancellation-policy
|
|
420
|
+
pricing out of search; cancellation-policy selection remains part of the quote
|
|
421
|
+
and booking flow.
|
|
422
|
+
- Pagination uses the backend `from`/`size` window behind the same opaque `cursor`,
|
|
423
|
+
capped at 1,000 results.
|
|
424
|
+
|
|
425
|
+
### Legacy v9
|
|
426
|
+
|
|
427
|
+
Legacy v9 maps its aggregated search calculation into the shared price and discount
|
|
428
|
+
shape:
|
|
429
|
+
|
|
430
|
+
- Flexible-period keys (`month`, `dates`, `nights`, and `weekend`) are rejected
|
|
431
|
+
before transport. v9 sites must use a fixed `start`/`end` period.
|
|
432
|
+
- Empty basic-filter sets are sent as GraphQL `data: null`, allowing an empty
|
|
433
|
+
query to browse the scoped searchable inventory without a dummy occupancy
|
|
434
|
+
value.
|
|
435
|
+
- `calc.total` becomes `formattedTotal`.
|
|
436
|
+
- `discount` is included only when `calc.oTotal` is greater than `calc.total`.
|
|
437
|
+
- `calc.oTotal` becomes `discount.formattedOriginalTotal`.
|
|
438
|
+
- A non-empty `calc.discountName` becomes the label of the single `applied` entry.
|
|
439
|
+
- The applied amount is the formatted negative difference
|
|
440
|
+
`calc.total - calc.oTotal`.
|
|
441
|
+
- Missing discount names produce an empty `applied` array without discarding the
|
|
442
|
+
formatted original total.
|
|
443
|
+
- The same mapping applies to exact-period items and individual alternative
|
|
444
|
+
periods.
|
|
445
|
+
- v9 never executes a custom-attribute search filter.
|
|
446
|
+
|
|
447
|
+
The field is omitted when v9 returns no final total or when its original total is
|
|
448
|
+
not greater than the final total. v9 exposes at most one aggregated applied entry,
|
|
449
|
+
whereas v10 can expose multiple detailed modifiers.
|
|
363
450
|
|
|
364
451
|
## Configuration
|
|
365
452
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Changelog: 2.12.0
|
|
2
|
+
|
|
3
|
+
This release extends the optional search discount output introduced in 2.11.0 to
|
|
4
|
+
legacy v9 search results, keeps zero-value lines out of quote booking-card
|
|
5
|
+
breakdowns, and completes v10 card-level pre-modifier totals across all modifier
|
|
6
|
+
presentation paths. It also rejects unsupported v9 flexible-period searches before
|
|
7
|
+
transport and restores empty-query inventory browsing on v9.
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- Priced legacy v9 exact-period items may include the shared optional `discount`
|
|
12
|
+
output.
|
|
13
|
+
- Individual legacy v9 alternative periods expose the same optional discount
|
|
14
|
+
shape.
|
|
15
|
+
- v9 maps its aggregated original total and discount name into
|
|
16
|
+
`formattedOriginalTotal` and at most one localized `applied` entry.
|
|
17
|
+
|
|
18
|
+
## Changed
|
|
19
|
+
|
|
20
|
+
- Legacy v9 search now rejects the unsupported flexible-period query keys
|
|
21
|
+
`month`, `dates`, `nights`, and `weekend` before transport instead of silently
|
|
22
|
+
returning an unpriced item list. Fixed `start`/`end` searches are unchanged.
|
|
23
|
+
- Legacy v9 search serializes an empty backend-filter set as GraphQL `data: null`
|
|
24
|
+
instead of `data: []`. Empty queries can therefore browse searchable inventory
|
|
25
|
+
without seeding a dummy occupancy value.
|
|
26
|
+
- When a v9 discount is present, `formattedTotal` remains the final price and the
|
|
27
|
+
applied amount is the formatted difference from the original total.
|
|
28
|
+
- v10 search discount behavior is unchanged from 2.11.0 and can continue to expose
|
|
29
|
+
multiple applied modifiers.
|
|
30
|
+
- Quote booking cards now omit zero-value lines without subitems from the `other`
|
|
31
|
+
section on both v10 and legacy v9, matching the existing empty-line behavior of
|
|
32
|
+
the included and tax sections.
|
|
33
|
+
- If an `other` section contains both zero-value and non-zero lines, only the
|
|
34
|
+
non-zero lines remain. The section is omitted when no lines remain.
|
|
35
|
+
- v10 derives card-level `totalBeforeModifiers` from all backend modifiers,
|
|
36
|
+
including negative modifiers rendered as dedicated booking-card lines.
|
|
37
|
+
- Booking-card items omit the optional `modifiers` field when no modifier entries
|
|
38
|
+
are present instead of producing `modifiers: []`.
|
|
39
|
+
|
|
40
|
+
## Migration Impact
|
|
41
|
+
|
|
42
|
+
- Existing supported search calls require no changes because `discount` remains
|
|
43
|
+
optional. v9 sites must keep flexible search unavailable and use `start`/`end`
|
|
44
|
+
period queries.
|
|
45
|
+
- v9 sites that inject `adults=1` only to make an empty query return results
|
|
46
|
+
should remove that workaround. Real occupancy filters remain supported.
|
|
47
|
+
- Search configuration, the public input type, and the discount schema are
|
|
48
|
+
unchanged. Runtime validation is stricter for unsupported v9 flexible-period
|
|
49
|
+
keys.
|
|
50
|
+
- Cross-backend sites can use one discount renderer for v9 and v10, while allowing
|
|
51
|
+
v9 to return at most one applied entry.
|
|
52
|
+
- Quote inputs and booking-card types are unchanged. Consumers may receive fewer
|
|
53
|
+
booking-card lines and may now receive the existing optional card-level
|
|
54
|
+
`totalBeforeModifiers` in additional v10 modifier cases. Do not rely on
|
|
55
|
+
zero-value rows to represent declined services.
|
|
56
|
+
- See `versions/2.12.0/MIGRATION.md`, `../../search.md`, and `../../quote.md`.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Migration: 2.11.0 to 2.12.0
|
|
2
|
+
|
|
3
|
+
2.12.0 adds optional discount information to priced legacy v9 search results,
|
|
4
|
+
normalizes empty quote booking-card lines across v9 and v10, and completes v10
|
|
5
|
+
card-level pre-modifier totals across all modifier presentation paths. It also
|
|
6
|
+
rejects unsupported v9 flexible-period searches before transport and restores
|
|
7
|
+
empty-query inventory browsing on v9. Existing supported calls remain valid
|
|
8
|
+
without changes.
|
|
9
|
+
|
|
10
|
+
## 1. Reuse the Shared Discount Output
|
|
11
|
+
|
|
12
|
+
Legacy v9 now uses the same optional shape introduced for v10 in 2.11.0:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
type SearchDiscount = {
|
|
16
|
+
readonly formattedOriginalTotal: string;
|
|
17
|
+
readonly applied: readonly {
|
|
18
|
+
readonly label: string;
|
|
19
|
+
readonly formattedAmount: string;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For exact-period results, read `discount` from the item:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
result.items[0]?.discount;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For nearby suggestions, read it from the individual alternative period:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
result.alternatives?.[0]?.alternativePeriods[0]?.discount;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 2. Understand the Legacy v9 Mapping
|
|
37
|
+
|
|
38
|
+
For priced v9 results:
|
|
39
|
+
|
|
40
|
+
- `calc.total` remains the final `formattedTotal`.
|
|
41
|
+
- `discount` is present only when `calc.oTotal` is greater than `calc.total`.
|
|
42
|
+
- `discount.formattedOriginalTotal` is formatted from `calc.oTotal`.
|
|
43
|
+
- A non-empty `calc.discountName` becomes the label of the single applied entry.
|
|
44
|
+
- The applied amount is the formatted negative difference
|
|
45
|
+
`calc.total - calc.oTotal`.
|
|
46
|
+
- If the backend supplies no usable discount name, `applied` is empty while the
|
|
47
|
+
formatted original total remains available.
|
|
48
|
+
|
|
49
|
+
The SDK omits `discount` when there is no final total or when the original total is
|
|
50
|
+
not greater than the final total.
|
|
51
|
+
|
|
52
|
+
## 3. Account for Backend Detail Differences
|
|
53
|
+
|
|
54
|
+
v9 exposes one aggregated discount name and therefore returns at most one
|
|
55
|
+
`discount.applied` entry. v10 search can expose multiple `discount.applied`
|
|
56
|
+
entries. Consumers should render the array without assuming a fixed length.
|
|
57
|
+
|
|
58
|
+
Both backends return presentation-ready localized strings. Backend numeric amounts
|
|
59
|
+
and internal modifier keys are not part of the public output.
|
|
60
|
+
|
|
61
|
+
## 4. Account for Booking-Card Cleanup
|
|
62
|
+
|
|
63
|
+
Quote booking cards on both backends now omit numeric zero-value lines without
|
|
64
|
+
subitems from the `other` section, matching the existing handling of included and
|
|
65
|
+
tax sections.
|
|
66
|
+
|
|
67
|
+
- A zero-only `other` section is omitted.
|
|
68
|
+
- A mixed `other` section retains its non-zero lines unchanged.
|
|
69
|
+
- Lines with subitems remain available because they still carry descriptive
|
|
70
|
+
content.
|
|
71
|
+
|
|
72
|
+
No required booking-card property was added and the public schema remains
|
|
73
|
+
source-compatible. Runtime output can contain fewer empty rows. Sites that used a
|
|
74
|
+
zero-value row to represent a declined service should use explicit selection or
|
|
75
|
+
service state instead of inferring that state from the price breakdown.
|
|
76
|
+
|
|
77
|
+
## 5. Render v10 Quote Modifiers
|
|
78
|
+
|
|
79
|
+
On v10, an item at `bookingCardInformation.sections[].lines[].item` can include:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
{
|
|
83
|
+
modifiers?: readonly {
|
|
84
|
+
label: string;
|
|
85
|
+
amount: string;
|
|
86
|
+
}[];
|
|
87
|
+
totalBeforeModifiers?: string;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The card can also include `bookingCardInformation.totalBeforeModifiers`.
|
|
92
|
+
`appliedCharge` and `total` are the final amounts after modifiers. The
|
|
93
|
+
corresponding `totalBeforeModifiers` is the formatted amount before modifiers and
|
|
94
|
+
is omitted when there is no non-zero net modifier effect. `modifiers` is omitted
|
|
95
|
+
when the item has none; entries with the same localized label are grouped and
|
|
96
|
+
their amounts are summed before formatting.
|
|
97
|
+
|
|
98
|
+
Included, tax, and other lines attach their adjustments to `item.modifiers`.
|
|
99
|
+
Negative modifiers from backend lines that do not map to those sections may
|
|
100
|
+
instead appear as dedicated booking-card lines. In 2.12.0, card-level
|
|
101
|
+
`totalBeforeModifiers` accounts for both forms. v9 quote cards omit these fields.
|
|
102
|
+
|
|
103
|
+
Example for `de-DE`:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"bookingCardInformation": {
|
|
108
|
+
"sections": [
|
|
109
|
+
{
|
|
110
|
+
"lines": [
|
|
111
|
+
{
|
|
112
|
+
"item": {
|
|
113
|
+
"position": "Inklusivpreis",
|
|
114
|
+
"appliedCharge": "1.554,00 €",
|
|
115
|
+
"modifiers": [
|
|
116
|
+
{
|
|
117
|
+
"label": "Frühbucher/Last-Minute",
|
|
118
|
+
"amount": "-140,00 €"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"totalBeforeModifiers": "1.694,00 €"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"total": "1.596,70 €",
|
|
128
|
+
"totalBeforeModifiers": "1.736,70 €"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Do not assume a voucher appears as its own section line. Use
|
|
134
|
+
`quote.voucher.status` for voucher application status and the booking-card fields
|
|
135
|
+
for price presentation. To keep price arithmetic visible, render the pre-modifier
|
|
136
|
+
amount, modifier rows, and final amount separately. Whether to display or strike
|
|
137
|
+
through a reference price remains the consuming site's product and legal
|
|
138
|
+
decision.
|
|
139
|
+
|
|
140
|
+
## 6. Keep Flexible Search Disabled on v9
|
|
141
|
+
|
|
142
|
+
No configuration or supported request migration is required. Legacy v9 now rejects
|
|
143
|
+
the unsupported flexible-period keys `month`, `dates`, `nights`, and `weekend`
|
|
144
|
+
before transport instead of silently returning an unpriced item list. Keep
|
|
145
|
+
flexible search unavailable on v9 sites and use fixed `start`/`end` period
|
|
146
|
+
queries. v10 flexible search is unchanged.
|
|
147
|
+
|
|
148
|
+
The rejection is a `CoreSDKError` with operation `v9.search` and occurs before a
|
|
149
|
+
GraphQL request is sent. The public `SearchSearchInput` type remains unchanged
|
|
150
|
+
because its `query` field is an opaque query string.
|
|
151
|
+
|
|
152
|
+
This release enriches v9 search output when its existing response contains
|
|
153
|
+
sufficient discount data, removes empty quote breakdown rows from both backends,
|
|
154
|
+
and can return the existing optional card-level `totalBeforeModifiers` in
|
|
155
|
+
additional v10 cases.
|
|
156
|
+
|
|
157
|
+
## 7. Remove Dummy Occupancy from Empty v9 Searches
|
|
158
|
+
|
|
159
|
+
Legacy v9 now sends an empty backend-filter set as GraphQL `data: null` instead of
|
|
160
|
+
`data: []`. An empty query can therefore browse the first page of searchable
|
|
161
|
+
inventory under the configured rental scope:
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
await sdk.live.search.search({
|
|
165
|
+
locale: "de-DE",
|
|
166
|
+
query: "",
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Remove workarounds that inject `adults=1` only to make an empty query return
|
|
171
|
+
results. Real occupancy, period, and non-empty backend filters keep their existing
|
|
172
|
+
mapping. Pagination and `limit` still apply, and an undated result does not assert
|
|
173
|
+
availability for a particular stay.
|
|
174
|
+
|
|
175
|
+
## Recommended Verification
|
|
176
|
+
|
|
177
|
+
1. Run a priced v9 exact-period search where the original total exceeds the final
|
|
178
|
+
total and verify the formatted values and label.
|
|
179
|
+
2. Verify discounted v9 alternative periods independently.
|
|
180
|
+
3. Run a v9 search without a discount and confirm existing rendering is unchanged.
|
|
181
|
+
4. Verify a missing v9 discount name produces an empty `applied` array.
|
|
182
|
+
5. Verify v9 rejects `month`, `dates`, `nights`, and `weekend` before transport.
|
|
183
|
+
6. Run an empty v9 query and confirm it returns searchable inventory without a
|
|
184
|
+
dummy occupancy value.
|
|
185
|
+
7. Recheck a discounted v10 search and confirm its existing multi-entry behavior
|
|
186
|
+
remains unchanged.
|
|
187
|
+
8. Quote a v9 and v10 rental with a zero-value `other` service and confirm the
|
|
188
|
+
empty section is absent.
|
|
189
|
+
9. Confirm a mixed `other` section retains only its non-zero lines.
|
|
190
|
+
10. Quote a discounted v10 rental and render `item.modifiers`, item-level
|
|
191
|
+
`totalBeforeModifiers`, and card-level `totalBeforeModifiers`.
|
|
192
|
+
11. Confirm a v9 quote continues to omit the modifier fields.
|
|
193
|
+
12. Verify a v10 modifier rendered as a dedicated line still contributes to the
|
|
194
|
+
card-level `totalBeforeModifiers`.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Changelog: 2.13.0
|
|
2
|
+
|
|
3
|
+
This release adds static backend search capability discovery and replaces the
|
|
4
|
+
ambiguous flat booking payment schedule with a shared, presentation-ready payment
|
|
5
|
+
model for v9 and v10. It preserves every known remaining payment step, separates
|
|
6
|
+
contractual steps from full-payment alternatives, and keeps backend credentials
|
|
7
|
+
out of the public booking output.
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- `@v-office/website-sdk/capabilities/search` exposes pure, instance-independent
|
|
12
|
+
helpers for checking flexible-period support and the supported period query keys
|
|
13
|
+
for a backend.
|
|
14
|
+
- `BookingOutput.payment.schedule` contains the remaining contractual payment
|
|
15
|
+
steps known after booking.
|
|
16
|
+
- `BookingOutput.payment.alternatives` contains optional ways to settle the
|
|
17
|
+
complete outstanding balance.
|
|
18
|
+
- Schedule entries have a stable `kind`: `prepayment`, `remaining_payment`,
|
|
19
|
+
`installment`, or `deposit`.
|
|
20
|
+
- Full-payment alternatives use `kind: "full_amount"`.
|
|
21
|
+
- v10 booking output includes all remaining online, on-site, and external payment
|
|
22
|
+
steps instead of exposing only the next online step.
|
|
23
|
+
- v10 schedule entries can include translated `paymentAt` text derived from the
|
|
24
|
+
backend payment location and recipient.
|
|
25
|
+
- Legacy v9 now preserves its independently supplied remaining-payment amount and
|
|
26
|
+
deadline.
|
|
27
|
+
|
|
28
|
+
## Changed
|
|
29
|
+
|
|
30
|
+
- `dueOn` is now a complete translated, long-form display string such as
|
|
31
|
+
`Zahlbar bis zum 6. Februar 2027`.
|
|
32
|
+
- Schedule and alternative amounts use the `amount` field and remain
|
|
33
|
+
locale-formatted display strings.
|
|
34
|
+
- `paymentOptions` is present on a schedule entry only when the SDK can currently
|
|
35
|
+
perform that payment. Informational future, on-site, and external steps remain
|
|
36
|
+
visible without payment options.
|
|
37
|
+
- A synthesized v9 full-payment alternative no longer copies the prepayment
|
|
38
|
+
deadline. An explicit backend total deadline can still be retained.
|
|
39
|
+
- v10 initializes Adyen only for the next payable online step and the
|
|
40
|
+
full-outstanding alternative.
|
|
41
|
+
- v9 initializes Stripe only for currently payable choices.
|
|
42
|
+
- Post-booking insurance now receives the opaque booking result:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
await sdk.live.quote.bookInsurance({ quote, booking });
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Removed
|
|
49
|
+
|
|
50
|
+
- `BookingOutput.paymentSchedules`
|
|
51
|
+
- Public `BookingOutput.guestToken`
|
|
52
|
+
- ISO-like or locale-short date assumptions for booking payment output
|
|
53
|
+
|
|
54
|
+
The private v9 guest token remains attached to the live opaque booking object and
|
|
55
|
+
is used internally when completing insurance. It is not enumerable or
|
|
56
|
+
serializable.
|
|
57
|
+
|
|
58
|
+
## Backend Mapping
|
|
59
|
+
|
|
60
|
+
- v9 `prepayment` becomes `kind: "prepayment"`.
|
|
61
|
+
- v9 `rest` becomes `kind: "remaining_payment"`.
|
|
62
|
+
- v9 `total` becomes a `full_amount` alternative.
|
|
63
|
+
- v10 `INSTALLMENT` becomes `kind: "installment"`.
|
|
64
|
+
- v10 `DEPOSIT` becomes `kind: "deposit"`.
|
|
65
|
+
- v10 `financials.outstanding` becomes a `full_amount` alternative when it is a
|
|
66
|
+
distinct payable choice.
|
|
67
|
+
|
|
68
|
+
## Migration Impact
|
|
69
|
+
|
|
70
|
+
This is a breaking output and insurance-input change. Consumers must:
|
|
71
|
+
|
|
72
|
+
1. Replace reads of `paymentSchedules` with `payment.schedule` and
|
|
73
|
+
`payment.alternatives`.
|
|
74
|
+
2. Read `amount` instead of the former schedule `total`.
|
|
75
|
+
3. Treat schedule `paymentOptions` as optional.
|
|
76
|
+
4. Render `dueOn`, `paymentAt`, labels, amounts, and line amounts directly without
|
|
77
|
+
reparsing or reformatting them.
|
|
78
|
+
5. Pass the live `booking` object to `bookInsurance` instead of passing
|
|
79
|
+
`bookingNumber` and `guestToken`.
|
|
80
|
+
6. Keep the booking object in memory until optional v9 insurance booking is
|
|
81
|
+
complete; private credentials do not survive JSON serialization.
|
|
82
|
+
|
|
83
|
+
The search capability API is additive. Consumers with hardcoded backend period-key
|
|
84
|
+
tables can replace them with the new helpers.
|
|
85
|
+
|
|
86
|
+
See `versions/2.13.0/MIGRATION.md`, `../../search.md`, `../../booking.md`, and
|
|
87
|
+
`../../quote.md`.
|