@v-office/website-sdk 2.17.0 → 2.17.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/dist/cli.mjs +2 -2
- package/dist/{client-ScO68LGg.mjs → client-yYl7H82t.mjs} +3 -3
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +1 -0
- package/dist/instructions/MIGRATION.md +1 -0
- package/dist/instructions/README.md +5 -2
- package/dist/instructions/availability.md +6 -7
- package/dist/instructions/versions/2.17.1/CHANGELOG.md +26 -0
- package/dist/instructions/versions/2.17.1/MIGRATION.md +35 -0
- package/dist/{search-zsnAfUtc.mjs → search-DkXUHJt8.mjs} +1 -1
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/README.md +5 -2
- package/instructions/availability.md +6 -7
- package/instructions/versions/2.17.1/CHANGELOG.md +26 -0
- package/instructions/versions/2.17.1/MIGRATION.md +35 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as createWebsiteSDK, zt as defineWebsiteSDKOptions } from "./client-
|
|
2
|
+
import { t as createWebsiteSDK, zt as defineWebsiteSDKOptions } from "./client-yYl7H82t.mjs";
|
|
3
3
|
import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
|
|
4
4
|
import { Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
|
|
5
5
|
import { Command, Flag } from "effect/unstable/cli";
|
|
@@ -16,7 +16,7 @@ var CLICheckFailed = class extends Error {
|
|
|
16
16
|
const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region package.json
|
|
19
|
-
var version = "2.17.
|
|
19
|
+
var version = "2.17.1";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/cli/output.ts
|
|
22
22
|
const toJson = (value) => Effect.try({
|
|
@@ -1375,9 +1375,9 @@ const applyV9CalendarPrices = ({ availability, calendarDays, locale, currency })
|
|
|
1375
1375
|
const result = { ...calendarDays };
|
|
1376
1376
|
for (const [date, day] of Object.entries(calendarDays)) {
|
|
1377
1377
|
const price = availability.caldata_beon[date]?.price;
|
|
1378
|
-
if (day.canBeStartDate && typeof price === "number"
|
|
1378
|
+
if (day.canBeStartDate && typeof price === "number") result[date] = {
|
|
1379
1379
|
...day,
|
|
1380
|
-
formattedPrice: formatCurrency(price, locale, currency)
|
|
1380
|
+
formattedPrice: formatCurrency(price, locale, currency ?? "EUR")
|
|
1381
1381
|
};
|
|
1382
1382
|
}
|
|
1383
1383
|
return result;
|
|
@@ -5512,7 +5512,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
5512
5512
|
return page;
|
|
5513
5513
|
});
|
|
5514
5514
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
5515
|
-
try: () => import("./search-
|
|
5515
|
+
try: () => import("./search-DkXUHJt8.mjs"),
|
|
5516
5516
|
catch: (cause) => new CoreSDKError({
|
|
5517
5517
|
source: "v10",
|
|
5518
5518
|
operation: "v9.search.runtime",
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getRentalsEffect, E as DocumentSummarySchema, Et as getInitialAvailabilityEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsurancePaymentEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, I as ErgoReadPreContractRequestSchema, It as submitContactEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitPaymentOption, M as ErgoCreatePreContractRequestSchema, Mt as searchEffect, N as ErgoPersonSchema, Nt as selectCancellationPolicyEffect, O as ErgoAddressSchema, Ot as getStartDateSelectedAvailabilityEffect, P as ErgoPlanSearchRequestSchema, Pt as selectInsuranceEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOptionEffect, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getFiltersEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, W as QuotePricesPayloadSchema, X as RegionListResponseSchema, Y as RawVofficeObjectSchema, Z as RoomImageSchema, _ as CalendarDaySchema, _t as V1_OPERATIONS, at as TileCollectionResponseSchema, b as CustomerUnitSummarySchema, bt as addAdditionalServiceEffect, c as V0OpenApiClient, ct as TravelInsuranceBookingSchema, d as makeV0OpenApiClientLive, dt as UnitListItemSchema, et as ServiceImageSchema, f as V1OpenApiClient, ft as UnitListResponseSchema, g as ApiEnvelopeBaseSchema, gt as V1_BASE_URL, h as makeV1OpenApiClientLive, ht as UnitServicePriceSchema, it as SetupResponseSchema, j as ErgoCommonFieldsSchema, jt as removeAdditionalServiceEffect, k as ErgoBankSchema, kt as getTermsAndPrivacyPolicyEffect, l as V0OpenApiClientError, lt as TravelInsuranceBookingStoreRequestSchema, m as makeV1OpenApiClientFetchLive, mt as UnitResponseSchema, nt as ServiceListResponseSchema, ot as TileSchema, p as V1OpenApiClientError, pt as UnitOfferSchema, q as QuoteServiceSchema, rt as SetupDataSchema, st as TileTagSchema, t as createWebsiteSDK, tt as ServiceLimitSchema, u as makeV0OpenApiClientFetchLive, ut as UnitIdsResponseSchema, v as CalendarResponseSchema, vt as VideoResponseSchema, w as DocumentStatusSchema, wt as createInsurancePreContractEffect, x as DocumentCollectionResponseSchema, xt as bookEffect, y as CurrentMemberResponseSchema, yt as decodeV1OperationResponse, z as OnOfficeUnitCollectionResponseSchema, zt as defineWebsiteSDKOptions } from "./client-
|
|
1
|
+
import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getRentalsEffect, E as DocumentSummarySchema, Et as getInitialAvailabilityEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsurancePaymentEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, I as ErgoReadPreContractRequestSchema, It as submitContactEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitPaymentOption, M as ErgoCreatePreContractRequestSchema, Mt as searchEffect, N as ErgoPersonSchema, Nt as selectCancellationPolicyEffect, O as ErgoAddressSchema, Ot as getStartDateSelectedAvailabilityEffect, P as ErgoPlanSearchRequestSchema, Pt as selectInsuranceEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOptionEffect, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getFiltersEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, W as QuotePricesPayloadSchema, X as RegionListResponseSchema, Y as RawVofficeObjectSchema, Z as RoomImageSchema, _ as CalendarDaySchema, _t as V1_OPERATIONS, at as TileCollectionResponseSchema, b as CustomerUnitSummarySchema, bt as addAdditionalServiceEffect, c as V0OpenApiClient, ct as TravelInsuranceBookingSchema, d as makeV0OpenApiClientLive, dt as UnitListItemSchema, et as ServiceImageSchema, f as V1OpenApiClient, ft as UnitListResponseSchema, g as ApiEnvelopeBaseSchema, gt as V1_BASE_URL, h as makeV1OpenApiClientLive, ht as UnitServicePriceSchema, it as SetupResponseSchema, j as ErgoCommonFieldsSchema, jt as removeAdditionalServiceEffect, k as ErgoBankSchema, kt as getTermsAndPrivacyPolicyEffect, l as V0OpenApiClientError, lt as TravelInsuranceBookingStoreRequestSchema, m as makeV1OpenApiClientFetchLive, mt as UnitResponseSchema, nt as ServiceListResponseSchema, ot as TileSchema, p as V1OpenApiClientError, pt as UnitOfferSchema, q as QuoteServiceSchema, rt as SetupDataSchema, st as TileTagSchema, t as createWebsiteSDK, tt as ServiceLimitSchema, u as makeV0OpenApiClientFetchLive, ut as UnitIdsResponseSchema, v as CalendarResponseSchema, vt as VideoResponseSchema, w as DocumentStatusSchema, wt as createInsurancePreContractEffect, x as DocumentCollectionResponseSchema, xt as bookEffect, y as CurrentMemberResponseSchema, yt as decodeV1OperationResponse, z as OnOfficeUnitCollectionResponseSchema, zt as defineWebsiteSDKOptions } from "./client-yYl7H82t.mjs";
|
|
2
2
|
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
3
3
|
//#region codegen/v9/heuristic-generation/public-api.ts
|
|
4
4
|
const customDataAttribute = (name) => name;
|
|
@@ -4,6 +4,7 @@ This file is the versioned changelog index for the website SDK instructions.
|
|
|
4
4
|
|
|
5
5
|
## Versions
|
|
6
6
|
|
|
7
|
+
- `versions/2.17.1/CHANGELOG.md`: `@v-office/website-sdk` 2.17.1 release notes.
|
|
7
8
|
- `versions/2.17.0/CHANGELOG.md`: `@v-office/website-sdk` 2.17.0 release notes.
|
|
8
9
|
- `versions/2.16.3/CHANGELOG.md`: `@v-office/website-sdk` 2.16.3 release notes.
|
|
9
10
|
- `versions/2.16.2/CHANGELOG.md`: `@v-office/website-sdk` 2.16.2 documentation release notes.
|
|
@@ -4,6 +4,7 @@ This file is the versioned migration index for the website SDK instructions.
|
|
|
4
4
|
|
|
5
5
|
## Available Guides
|
|
6
6
|
|
|
7
|
+
- `versions/2.17.1/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.17.0 to 2.17.1.
|
|
7
8
|
- `versions/2.17.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.3 to 2.17.0.
|
|
8
9
|
- `versions/2.16.3/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.2 to 2.16.3.
|
|
9
10
|
- `versions/2.16.2/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.1 to 2.16.2.
|
|
@@ -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.17.
|
|
4
|
+
`@v-office/website-sdk` 2.17.1. 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,9 @@ 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.1/`: 2.17.1 legacy-v9 EUR fallback for calendar prices when
|
|
22
|
+
unit currency metadata is unavailable, and the 2.17.0-to-2.17.1 migration
|
|
23
|
+
guide.
|
|
21
24
|
- `versions/2.17.0/`: 2.17.0 legacy-v9 calendar-day prices and structured
|
|
22
25
|
rooms, shared bed-amount expansion, and the 2.16.3-to-2.17.0 migration guide.
|
|
23
26
|
- `versions/2.16.3/`: 2.16.3 browser-origin resolution for relative payment
|
|
@@ -104,5 +107,5 @@ website-sdk --backend v10 search --locale de-DE --query "adults=2" --sort '{"by"
|
|
|
104
107
|
```
|
|
105
108
|
|
|
106
109
|
Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced
|
|
107
|
-
in 2.0.0 and kept in 2.17.
|
|
110
|
+
in 2.0.0 and kept in 2.17.1. v10 config additionally requires `searchEndpoint` as
|
|
108
111
|
of 2.5.0.
|
|
@@ -104,22 +104,21 @@ 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
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
|
|
108
|
-
|
|
109
|
-
include calendar prices.
|
|
107
|
+
the date is unavailable, or the v1 calendar supplies no numeric price.
|
|
108
|
+
Start-date-selected availability does not include calendar prices.
|
|
110
109
|
|
|
111
110
|
When no successful unit lookup is cached, a v9 initial-availability request loads
|
|
112
111
|
the calendar and a unit record. Successful unit responses are cached by unit ID
|
|
113
112
|
for the lifetime of the SDK instance, including responses without a currency.
|
|
114
113
|
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
|
|
116
|
-
|
|
114
|
+
currency or failed unit request does not fail availability. From 2.17.1,
|
|
115
|
+
calendar prices fall back to `EUR`.
|
|
117
116
|
|
|
118
117
|
No new configuration is required. The currency lookup uses the existing
|
|
119
118
|
`v1ApiBaseUrl` and `apiKey`.
|
|
120
119
|
|
|
121
|
-
See `versions/2.17.
|
|
122
|
-
`versions/2.17.
|
|
120
|
+
See `versions/2.17.1/CHANGELOG.md` and
|
|
121
|
+
`versions/2.17.1/MIGRATION.md`.
|
|
123
122
|
|
|
124
123
|
## Configuration
|
|
125
124
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog: 2.17.1
|
|
2
|
+
|
|
3
|
+
This patch restores legacy-v9 initial-availability calendar prices on hubs whose
|
|
4
|
+
v1 unit records do not contain a booking currency.
|
|
5
|
+
|
|
6
|
+
## Fixed
|
|
7
|
+
|
|
8
|
+
- Priced, valid v9 start dates now use `EUR` when the unit currency is missing
|
|
9
|
+
or cannot be loaded, instead of returning `formattedPrice: null`.
|
|
10
|
+
- A failed currency lookup still does not fail the availability request and is
|
|
11
|
+
retried on the next call.
|
|
12
|
+
|
|
13
|
+
## Unchanged
|
|
14
|
+
|
|
15
|
+
- A configured unit currency takes precedence over the `EUR` fallback.
|
|
16
|
+
- Unavailable dates, dates that cannot be used as a start date, and dates
|
|
17
|
+
without a numeric source price continue to return `formattedPrice: null`.
|
|
18
|
+
- v10 initial-availability pricing is unchanged.
|
|
19
|
+
|
|
20
|
+
## Compatibility
|
|
21
|
+
|
|
22
|
+
- Complete v9 availability snapshots can change from `formattedPrice: null` to
|
|
23
|
+
a EUR-formatted value when unit currency metadata is unavailable.
|
|
24
|
+
- No configuration or consumer code change is required.
|
|
25
|
+
|
|
26
|
+
See `versions/2.17.1/MIGRATION.md` and `../../availability.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Migration: 2.17.0 to 2.17.1
|
|
2
|
+
|
|
3
|
+
2.17.1 restores legacy-v9 initial-availability calendar prices when the v1 unit
|
|
4
|
+
record does not provide a booking currency. Public types and service calls are
|
|
5
|
+
unchanged.
|
|
6
|
+
|
|
7
|
+
## 1. Upgrade
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @v-office/website-sdk@2.17.1
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 2. Allow the EUR Fallback
|
|
14
|
+
|
|
15
|
+
When a valid v9 start date has a numeric calendar price:
|
|
16
|
+
|
|
17
|
+
- the configured unit currency is used when available
|
|
18
|
+
- `EUR` is used when the currency is missing or cannot be loaded
|
|
19
|
+
|
|
20
|
+
The fallback keeps availability usable on hubs whose unit records omit
|
|
21
|
+
currency. Failed unit requests remain uncached and are retried by later initial
|
|
22
|
+
availability calls.
|
|
23
|
+
|
|
24
|
+
## Required Consumer Work
|
|
25
|
+
|
|
26
|
+
No code or configuration change is required. Update snapshots that expected
|
|
27
|
+
`formattedPrice: null` solely because currency metadata was unavailable.
|
|
28
|
+
|
|
29
|
+
## Recommended Verification
|
|
30
|
+
|
|
31
|
+
1. Load v9 initial availability for a unit whose v1 record has no currency.
|
|
32
|
+
2. Confirm priced, valid start dates contain a EUR-formatted price.
|
|
33
|
+
3. Confirm unavailable, non-start, and price-less dates retain
|
|
34
|
+
`formattedPrice: null`.
|
|
35
|
+
4. Confirm a configured non-EUR currency still takes precedence.
|
|
@@ -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-
|
|
1
|
+
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-yYl7H82t.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";
|
|
@@ -4,6 +4,7 @@ This file is the versioned changelog index for the website SDK instructions.
|
|
|
4
4
|
|
|
5
5
|
## Versions
|
|
6
6
|
|
|
7
|
+
- `versions/2.17.1/CHANGELOG.md`: `@v-office/website-sdk` 2.17.1 release notes.
|
|
7
8
|
- `versions/2.17.0/CHANGELOG.md`: `@v-office/website-sdk` 2.17.0 release notes.
|
|
8
9
|
- `versions/2.16.3/CHANGELOG.md`: `@v-office/website-sdk` 2.16.3 release notes.
|
|
9
10
|
- `versions/2.16.2/CHANGELOG.md`: `@v-office/website-sdk` 2.16.2 documentation release notes.
|
|
@@ -4,6 +4,7 @@ This file is the versioned migration index for the website SDK instructions.
|
|
|
4
4
|
|
|
5
5
|
## Available Guides
|
|
6
6
|
|
|
7
|
+
- `versions/2.17.1/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.17.0 to 2.17.1.
|
|
7
8
|
- `versions/2.17.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.3 to 2.17.0.
|
|
8
9
|
- `versions/2.16.3/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.2 to 2.16.3.
|
|
9
10
|
- `versions/2.16.2/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.1 to 2.16.2.
|
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.17.
|
|
4
|
+
`@v-office/website-sdk` 2.17.1. 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,9 @@ 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.1/`: 2.17.1 legacy-v9 EUR fallback for calendar prices when
|
|
22
|
+
unit currency metadata is unavailable, and the 2.17.0-to-2.17.1 migration
|
|
23
|
+
guide.
|
|
21
24
|
- `versions/2.17.0/`: 2.17.0 legacy-v9 calendar-day prices and structured
|
|
22
25
|
rooms, shared bed-amount expansion, and the 2.16.3-to-2.17.0 migration guide.
|
|
23
26
|
- `versions/2.16.3/`: 2.16.3 browser-origin resolution for relative payment
|
|
@@ -104,5 +107,5 @@ website-sdk --backend v10 search --locale de-DE --query "adults=2" --sort '{"by"
|
|
|
104
107
|
```
|
|
105
108
|
|
|
106
109
|
Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced
|
|
107
|
-
in 2.0.0 and kept in 2.17.
|
|
110
|
+
in 2.0.0 and kept in 2.17.1. v10 config additionally requires `searchEndpoint` as
|
|
108
111
|
of 2.5.0.
|
|
@@ -104,22 +104,21 @@ 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
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
|
|
108
|
-
|
|
109
|
-
include calendar prices.
|
|
107
|
+
the date is unavailable, or the v1 calendar supplies no numeric price.
|
|
108
|
+
Start-date-selected availability does not include calendar prices.
|
|
110
109
|
|
|
111
110
|
When no successful unit lookup is cached, a v9 initial-availability request loads
|
|
112
111
|
the calendar and a unit record. Successful unit responses are cached by unit ID
|
|
113
112
|
for the lifetime of the SDK instance, including responses without a currency.
|
|
114
113
|
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
|
|
116
|
-
|
|
114
|
+
currency or failed unit request does not fail availability. From 2.17.1,
|
|
115
|
+
calendar prices fall back to `EUR`.
|
|
117
116
|
|
|
118
117
|
No new configuration is required. The currency lookup uses the existing
|
|
119
118
|
`v1ApiBaseUrl` and `apiKey`.
|
|
120
119
|
|
|
121
|
-
See `versions/2.17.
|
|
122
|
-
`versions/2.17.
|
|
120
|
+
See `versions/2.17.1/CHANGELOG.md` and
|
|
121
|
+
`versions/2.17.1/MIGRATION.md`.
|
|
123
122
|
|
|
124
123
|
## Configuration
|
|
125
124
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog: 2.17.1
|
|
2
|
+
|
|
3
|
+
This patch restores legacy-v9 initial-availability calendar prices on hubs whose
|
|
4
|
+
v1 unit records do not contain a booking currency.
|
|
5
|
+
|
|
6
|
+
## Fixed
|
|
7
|
+
|
|
8
|
+
- Priced, valid v9 start dates now use `EUR` when the unit currency is missing
|
|
9
|
+
or cannot be loaded, instead of returning `formattedPrice: null`.
|
|
10
|
+
- A failed currency lookup still does not fail the availability request and is
|
|
11
|
+
retried on the next call.
|
|
12
|
+
|
|
13
|
+
## Unchanged
|
|
14
|
+
|
|
15
|
+
- A configured unit currency takes precedence over the `EUR` fallback.
|
|
16
|
+
- Unavailable dates, dates that cannot be used as a start date, and dates
|
|
17
|
+
without a numeric source price continue to return `formattedPrice: null`.
|
|
18
|
+
- v10 initial-availability pricing is unchanged.
|
|
19
|
+
|
|
20
|
+
## Compatibility
|
|
21
|
+
|
|
22
|
+
- Complete v9 availability snapshots can change from `formattedPrice: null` to
|
|
23
|
+
a EUR-formatted value when unit currency metadata is unavailable.
|
|
24
|
+
- No configuration or consumer code change is required.
|
|
25
|
+
|
|
26
|
+
See `versions/2.17.1/MIGRATION.md` and `../../availability.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Migration: 2.17.0 to 2.17.1
|
|
2
|
+
|
|
3
|
+
2.17.1 restores legacy-v9 initial-availability calendar prices when the v1 unit
|
|
4
|
+
record does not provide a booking currency. Public types and service calls are
|
|
5
|
+
unchanged.
|
|
6
|
+
|
|
7
|
+
## 1. Upgrade
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @v-office/website-sdk@2.17.1
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 2. Allow the EUR Fallback
|
|
14
|
+
|
|
15
|
+
When a valid v9 start date has a numeric calendar price:
|
|
16
|
+
|
|
17
|
+
- the configured unit currency is used when available
|
|
18
|
+
- `EUR` is used when the currency is missing or cannot be loaded
|
|
19
|
+
|
|
20
|
+
The fallback keeps availability usable on hubs whose unit records omit
|
|
21
|
+
currency. Failed unit requests remain uncached and are retried by later initial
|
|
22
|
+
availability calls.
|
|
23
|
+
|
|
24
|
+
## Required Consumer Work
|
|
25
|
+
|
|
26
|
+
No code or configuration change is required. Update snapshots that expected
|
|
27
|
+
`formattedPrice: null` solely because currency metadata was unavailable.
|
|
28
|
+
|
|
29
|
+
## Recommended Verification
|
|
30
|
+
|
|
31
|
+
1. Load v9 initial availability for a unit whose v1 record has no currency.
|
|
32
|
+
2. Confirm priced, valid start dates contain a EUR-formatted price.
|
|
33
|
+
3. Confirm unavailable, non-start, and price-less dates retain
|
|
34
|
+
`formattedPrice: null`.
|
|
35
|
+
4. Confirm a configured non-EUR currency still takes precedence.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.1",
|
|
4
4
|
"description": "Website-facing SDK facade backed by @v-office/sdk-core",
|
|
5
5
|
"bin": {
|
|
6
6
|
"website-sdk": "./dist/cli.mjs"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
45
|
-
"@v-office/sdk-core": "^1.18.
|
|
45
|
+
"@v-office/sdk-core": "^1.18.1",
|
|
46
46
|
"effect": "4.0.0-beta.85",
|
|
47
47
|
"graphql": "17.0.2",
|
|
48
48
|
"yaml": "^2.9.0"
|