@v-office/website-sdk 2.20.0 → 2.20.2

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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, Bt as defineV9PropertyHighlightSources, 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, Vt as defineV9PropertyHighlightSourcesFromUnknown, 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-ssUMkYeM.mjs";
1
+ import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, Bt as defineV9PropertyHighlightSources, 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, Vt as defineV9PropertyHighlightSourcesFromUnknown, 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-BC2JLEak.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,8 @@
4
4
 
5
5
  Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
6
6
 
7
+ - `versions/2.20.2/CHANGELOG.md`: release notes for 2.20.2
8
+ - `versions/2.20.1/CHANGELOG.md`: release notes for 2.20.1
7
9
  - `versions/2.20.0/CHANGELOG.md`: release notes for 2.20.0
8
10
  - `versions/2.19.0/CHANGELOG.md`: release notes for 2.19.0
9
11
  - `versions/2.18.2/CHANGELOG.md`: release notes for 2.18.2
@@ -4,6 +4,8 @@
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.20.2/MIGRATION.md`: Migration: 2.20.1 to 2.20.2
8
+ - `versions/2.20.1/MIGRATION.md`: Migration: 2.20.0 to 2.20.1
7
9
  - `versions/2.20.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
8
10
  - `versions/2.19.0/MIGRATION.md`: Migration: 2.18.2 to 2.19.0
9
11
  - `versions/2.18.2/MIGRATION.md`: Migration: 2.18.1 to 2.18.2
@@ -0,0 +1,18 @@
1
+ # Changelog: 2.20.1
2
+
3
+ Follow-up to 2.20.0: another case of legacy-v9 search returning an exact-date
4
+ match without its price is now fixed.
5
+
6
+ ## Fixed
7
+
8
+ - A search result for the ordinary (non-split) case, where the requested
9
+ period exactly matches the rental's availability, now shows its formatted
10
+ price again. 2.20.0 only covered the case where the vOffice response
11
+ explicitly flagged an exact match; this release also treats a result with
12
+ no alternative periods and a price as an exact match.
13
+
14
+ ## Unchanged
15
+
16
+ - The public `getSearch` input and output types.
17
+ - How alternative date periods are resolved and rendered when a rental does
18
+ not exactly match the requested dates.
@@ -0,0 +1,13 @@
1
+ # Migration: 2.20.0 to 2.20.1
2
+
3
+ No changes required. The `getSearch` signature and output type are unchanged;
4
+ only the price of an exact-date match in the legacy-v9 path is affected (see
5
+ the changelog). The published tarball of 2.20.1 still carries the scaffold
6
+ comment in this file; it was written on 2026-09-15, the day the release gate
7
+ learned to refuse scaffold notes.
8
+
9
+ ## 1. Upgrade
10
+
11
+ ```sh
12
+ pnpm add @v-office/website-sdk@2.20.1
13
+ ```
@@ -0,0 +1,19 @@
1
+ # Changelog: 2.20.2
2
+
3
+ Quoting a rental against a v9 hub failed outright whenever the agency had no
4
+ add-on products booked. The price had already been loaded in full at that point
5
+ and was discarded anyway.
6
+
7
+ ## Fixed
8
+
9
+ - `quote` now returns a price against a v9 hub even when the hub sends its
10
+ add-on settings as an empty list instead of an empty object. Before, the
11
+ whole quote request aborted there: the website showed no price and a booking
12
+ was not possible. The same fix covers every other free-form settings map the
13
+ hub can return empty.
14
+
15
+ ## Unchanged
16
+
17
+ - The input and output types of `quote`.
18
+ - Price, line items and insurance options when the hub does have add-on
19
+ products.
@@ -0,0 +1,11 @@
1
+ # Migration: 2.20.1 to 2.20.2
2
+
3
+ No changes required. The `quote` signature and its result type are unchanged;
4
+ only whether a price comes back at all against certain v9 hubs is affected (see
5
+ the changelog).
6
+
7
+ ## 1. Upgrade
8
+
9
+ ```sh
10
+ pnpm add @v-office/website-sdk@2.20.2
11
+ ```
@@ -1,4 +1,4 @@
1
- import { Ht as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-ssUMkYeM.mjs";
1
+ import { Ht as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-BC2JLEak.mjs";
2
2
  import { c as parseVofficeUnitData, i as VofficeUnitDataPropertyMetadata, n as VofficeUnitDataPropertyCategoryLabelKeys, o as parseVofficeFacilityData, r as VofficeUnitDataPropertyCategoryValues, s as parseVofficeFeedbackData, t as VofficeUnitDataFieldSchemas } from "./v9-data-BnYxa2Ek.mjs";
3
3
  import { a as toAddress, c as rentalFacilitiesForObjectGroupRelationQuery, d as rentalsAllFeedbacksQuery, f as rentalsAllWithoutFeedbacksQuery, i as toImages, l as rentalIdsQuery, n as renderVofficePropertyAttribute, o as toLocalizedString, r as toFacilityImages, t as toRentalHighlights, u as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery } from "./to-rental-highlights-CN-wpRh3.mjs";
4
4
  import { CoreSDKError, makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } from "@v-office/sdk-core";
@@ -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-ssUMkYeM.mjs";
1
+ import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-BC2JLEak.mjs";
2
2
  import { c as parseVofficeUnitData, t as VofficeUnitDataFieldSchemas } from "./v9-data-BnYxa2Ek.mjs";
3
3
  import { a as toAddress, i as toImages, s as searchQuery, t as toRentalHighlights } from "./to-rental-highlights-CN-wpRh3.mjs";
4
4
  import { CoreSDKError, STABLE_SEARCH_INPUTS, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, parseChildrenAges, parseOccupancyCount, resolveExpandedCompositions, toFormattedSearchPrice, toIsoDateFromPeriodQueryDate, toStableSearchInputBackendQueryKeys, toStableSearchInputParameterValues, toStableSearchInputQueryKeys, toUnusedFilterKeys } from "@v-office/sdk-core";
@@ -234,11 +234,13 @@ const toQueryInput = ({ query, sort, customAttributeFilterDefinitions, locale, t
234
234
  //#endregion
235
235
  //#region src/legacy-v9/parser/search/resolve-exact-match.ts
236
236
  const resolveExactMatch = (additionalData) => {
237
- const isExactMatch = additionalData?.foundExactMatch === true;
237
+ const alternatives = additionalData?.alternatives ?? [];
238
+ const calc = additionalData?.calc ?? additionalData?.matchingPeriods?.[0]?.calc;
239
+ const isExactMatch = additionalData?.foundExactMatch === true || additionalData?.foundExactMatch == null && alternatives.length === 0 && calc != null;
238
240
  return {
239
241
  isExactMatch,
240
- exactMatchCalc: isExactMatch ? additionalData?.calc ?? additionalData?.matchingPeriods?.[0]?.calc : void 0,
241
- periods: isExactMatch ? [] : additionalData?.alternatives ?? []
242
+ exactMatchCalc: isExactMatch ? calc : void 0,
243
+ periods: isExactMatch ? [] : alternatives
242
244
  };
243
245
  };
244
246
  //#endregion
@@ -4,6 +4,8 @@
4
4
 
5
5
  Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
6
6
 
7
+ - `versions/2.20.2/CHANGELOG.md`: release notes for 2.20.2
8
+ - `versions/2.20.1/CHANGELOG.md`: release notes for 2.20.1
7
9
  - `versions/2.20.0/CHANGELOG.md`: release notes for 2.20.0
8
10
  - `versions/2.19.0/CHANGELOG.md`: release notes for 2.19.0
9
11
  - `versions/2.18.2/CHANGELOG.md`: release notes for 2.18.2
@@ -4,6 +4,8 @@
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.20.2/MIGRATION.md`: Migration: 2.20.1 to 2.20.2
8
+ - `versions/2.20.1/MIGRATION.md`: Migration: 2.20.0 to 2.20.1
7
9
  - `versions/2.20.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
8
10
  - `versions/2.19.0/MIGRATION.md`: Migration: 2.18.2 to 2.19.0
9
11
  - `versions/2.18.2/MIGRATION.md`: Migration: 2.18.1 to 2.18.2
@@ -0,0 +1,18 @@
1
+ # Changelog: 2.20.1
2
+
3
+ Follow-up to 2.20.0: another case of legacy-v9 search returning an exact-date
4
+ match without its price is now fixed.
5
+
6
+ ## Fixed
7
+
8
+ - A search result for the ordinary (non-split) case, where the requested
9
+ period exactly matches the rental's availability, now shows its formatted
10
+ price again. 2.20.0 only covered the case where the vOffice response
11
+ explicitly flagged an exact match; this release also treats a result with
12
+ no alternative periods and a price as an exact match.
13
+
14
+ ## Unchanged
15
+
16
+ - The public `getSearch` input and output types.
17
+ - How alternative date periods are resolved and rendered when a rental does
18
+ not exactly match the requested dates.
@@ -0,0 +1,13 @@
1
+ # Migration: 2.20.0 to 2.20.1
2
+
3
+ No changes required. The `getSearch` signature and output type are unchanged;
4
+ only the price of an exact-date match in the legacy-v9 path is affected (see
5
+ the changelog). The published tarball of 2.20.1 still carries the scaffold
6
+ comment in this file; it was written on 2026-09-15, the day the release gate
7
+ learned to refuse scaffold notes.
8
+
9
+ ## 1. Upgrade
10
+
11
+ ```sh
12
+ pnpm add @v-office/website-sdk@2.20.1
13
+ ```
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": ["searchResults"]
3
+ }
@@ -0,0 +1,19 @@
1
+ # Changelog: 2.20.2
2
+
3
+ Quoting a rental against a v9 hub failed outright whenever the agency had no
4
+ add-on products booked. The price had already been loaded in full at that point
5
+ and was discarded anyway.
6
+
7
+ ## Fixed
8
+
9
+ - `quote` now returns a price against a v9 hub even when the hub sends its
10
+ add-on settings as an empty list instead of an empty object. Before, the
11
+ whole quote request aborted there: the website showed no price and a booking
12
+ was not possible. The same fix covers every other free-form settings map the
13
+ hub can return empty.
14
+
15
+ ## Unchanged
16
+
17
+ - The input and output types of `quote`.
18
+ - Price, line items and insurance options when the hub does have add-on
19
+ products.
@@ -0,0 +1,11 @@
1
+ # Migration: 2.20.1 to 2.20.2
2
+
3
+ No changes required. The `quote` signature and its result type are unchanged;
4
+ only whether a price comes back at all against certain v9 hubs is affected (see
5
+ the changelog).
6
+
7
+ ## 1. Upgrade
8
+
9
+ ```sh
10
+ pnpm add @v-office/website-sdk@2.20.2
11
+ ```
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": []
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-sdk",
3
- "version": "2.20.0",
3
+ "version": "2.20.2",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "bin": {
6
6
  "website-sdk": "./dist/cli.mjs"
@@ -77,7 +77,8 @@
77
77
  "fmt": "oxfmt",
78
78
  "fmt:check": "oxfmt --check",
79
79
  "check": "pnpm run typecheck && pnpm run lint && pnpm run fmt:check",
80
- "test": "pnpm run test:v9:properties && pnpm run test:v9:rentals && pnpm run test:v9:availability && pnpm run test:v9:search && pnpm run build && node --test test/*.test.mjs",
80
+ "test": "pnpm run test:v9:openapi && pnpm run test:v9:properties && pnpm run test:v9:rentals && pnpm run test:v9:availability && pnpm run test:v9:search && pnpm run build && node --test test/*.test.mjs",
81
+ "test:v9:openapi": "node --test codegen/v9/php-record.test.ts src/legacy-v9/openapi/setup-response.test.ts src/legacy-v9/openapi/quote-response.test.ts",
81
82
  "test:v9:properties": "node --test codegen/v9/heuristic-generation/generate/property.test.ts src/legacy-v9/property-highlight-sources.test.ts src/legacy-v9/parser/rentals/render-property-attribute.test.ts src/legacy-v9/parser/rentals/to-property.test.ts src/legacy-v9/parser/rentals/to-rooms.test.ts",
82
83
  "test:v9:rentals": "node --test src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts",
83
84
  "test:v9:availability": "node --test src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts",