@v-office/website-sdk 2.20.0 → 2.20.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Vt as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK, zt as defineWebsiteSDKOptions } from "./client-ssUMkYeM.mjs";
2
+ import { Vt as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK, zt as defineWebsiteSDKOptions } from "./client-Bl21lJQb.mjs";
3
3
  import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
4
4
  import { ByteSize, 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.20.0";
19
+ var version = "2.20.1";
20
20
  //#endregion
21
21
  //#region src/cli/output.ts
22
22
  const toJson = (value) => Effect.try({
@@ -5623,7 +5623,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
5623
5623
  return page;
5624
5624
  });
5625
5625
  const loadV9SearchRuntime = Effect.tryPromise({
5626
- try: () => import("./search-BCQzRzvO.mjs"),
5626
+ try: () => import("./search-DfS6TdRv.mjs"),
5627
5627
  catch: (cause) => new CoreSDKError({
5628
5628
  source: "v10",
5629
5629
  operation: "v9.search.runtime",
@@ -6021,7 +6021,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
6021
6021
  });
6022
6022
  };
6023
6023
  const loadV9RentalsRuntime = Effect.tryPromise({
6024
- try: () => import("./rentals-BxAIq-V4.mjs"),
6024
+ try: () => import("./rentals-BdsPN0zJ.mjs"),
6025
6025
  catch: (cause) => new CoreSDKError({
6026
6026
  source: "v10",
6027
6027
  operation: "v9.rentals.runtime",
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-Bl21lJQb.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 @@
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.1/CHANGELOG.md`: release notes for 2.20.1
7
8
  - `versions/2.20.0/CHANGELOG.md`: release notes for 2.20.0
8
9
  - `versions/2.19.0/CHANGELOG.md`: release notes for 2.19.0
9
10
  - `versions/2.18.2/CHANGELOG.md`: release notes for 2.18.2
@@ -4,6 +4,7 @@
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.1/MIGRATION.md`: Migration: 2.20.0 to 2.20.1
7
8
  - `versions/2.20.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
8
9
  - `versions/2.19.0/MIGRATION.md`: Migration: 2.18.2 to 2.19.0
9
10
  - `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,9 @@
1
+ # Migration: 2.20.0 to 2.20.1
2
+
3
+ <!-- What a consumer has to do to move to this version. "No changes required." is a complete guide for a compatible release. -->
4
+
5
+ ## 1. Upgrade
6
+
7
+ ```sh
8
+ pnpm add @v-office/website-sdk@2.20.1
9
+ ```
@@ -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-Bl21lJQb.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-Bl21lJQb.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,7 @@
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.1/CHANGELOG.md`: release notes for 2.20.1
7
8
  - `versions/2.20.0/CHANGELOG.md`: release notes for 2.20.0
8
9
  - `versions/2.19.0/CHANGELOG.md`: release notes for 2.19.0
9
10
  - `versions/2.18.2/CHANGELOG.md`: release notes for 2.18.2
@@ -4,6 +4,7 @@
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.1/MIGRATION.md`: Migration: 2.20.0 to 2.20.1
7
8
  - `versions/2.20.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
8
9
  - `versions/2.19.0/MIGRATION.md`: Migration: 2.18.2 to 2.19.0
9
10
  - `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,9 @@
1
+ # Migration: 2.20.0 to 2.20.1
2
+
3
+ <!-- What a consumer has to do to move to this version. "No changes required." is a complete guide for a compatible release. -->
4
+
5
+ ## 1. Upgrade
6
+
7
+ ```sh
8
+ pnpm add @v-office/website-sdk@2.20.1
9
+ ```
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": ["searchResults"]
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.1",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "bin": {
6
6
  "website-sdk": "./dist/cli.mjs"