@v-office/website-sdk 2.21.0 → 2.22.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Bt as defineWebsiteSDKOptions, Ht as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK } from "./client-dWCukmLr.mjs";
2
+ import { Bt as defineWebsiteSDKOptions, Ht as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK } from "./client-BtZ30vTP.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.21.0";
19
+ var version = "2.22.0";
20
20
  //#endregion
21
21
  //#region src/cli/output.ts
22
22
  const toJson = (value) => Effect.try({
@@ -5687,7 +5687,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
5687
5687
  return page;
5688
5688
  });
5689
5689
  const loadV9SearchRuntime = Effect.tryPromise({
5690
- try: () => import("./search-D9xq3Z-m.mjs"),
5690
+ try: () => import("./search-CZ1TRGAB.mjs"),
5691
5691
  catch: (cause) => new CoreSDKError({
5692
5692
  source: "v10",
5693
5693
  operation: "v9.search.runtime",
@@ -5709,7 +5709,7 @@ const makeV9SearchApi = ({ config, options }) => {
5709
5709
  })
5710
5710
  }));
5711
5711
  return { search: (input) => Effect.runPromise(limitSearch(Effect.gen(function* () {
5712
- const { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toAlternativePeriods, toQueryInput, toSearchOutputItem } = yield* loadV9SearchRuntime;
5712
+ const { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toQueryInput, toSearchOutputItem, toSearchPeriods } = yield* loadV9SearchRuntime;
5713
5713
  const dataAttributes = [
5714
5714
  ...defaultSearchDataAttributes,
5715
5715
  ...config.rentalDataAttributes ?? [],
@@ -5748,17 +5748,26 @@ const makeV9SearchApi = ({ config, options }) => {
5748
5748
  exactMatchCalc,
5749
5749
  translations
5750
5750
  });
5751
- if (isExactMatch) return {
5752
- type: "item",
5753
- item
5754
- };
5751
+ if (isExactMatch) {
5752
+ const matchingPeriods = yield* toSearchPeriods({
5753
+ locale: input.locale,
5754
+ periods
5755
+ });
5756
+ return {
5757
+ type: "item",
5758
+ item: matchingPeriods.length > 0 ? {
5759
+ ...item,
5760
+ matchingPeriods
5761
+ } : item
5762
+ };
5763
+ }
5755
5764
  if (periods.length === 0) return {
5756
5765
  type: "item",
5757
5766
  item
5758
5767
  };
5759
- const alternativePeriods = yield* toAlternativePeriods({
5768
+ const alternativePeriods = yield* toSearchPeriods({
5760
5769
  locale: input.locale,
5761
- alternatives: periods
5770
+ periods
5762
5771
  });
5763
5772
  if (alternativePeriods.length === 0) return {
5764
5773
  type: "item",
@@ -6085,7 +6094,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
6085
6094
  });
6086
6095
  };
6087
6096
  const loadV9RentalsRuntime = Effect.tryPromise({
6088
- try: () => import("./rentals-CIhOx3dS.mjs"),
6097
+ try: () => import("./rentals-DfNu7s7w.mjs"),
6089
6098
  catch: (cause) => new CoreSDKError({
6090
6099
  source: "v10",
6091
6100
  operation: "v9.rentals.runtime",
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, LocaleSchema, QuoteAddAdditionalServiceInput, QuoteAddAdditionalServiceOutput, QuoteBookInsuranceInput, QuoteBookInsuranceOutput, QuoteClearAdditionalServicesInput, QuoteClearAdditionalServicesOutput, QuoteCreateInsurancePreContractInput, QuoteCreateInsurancePreContractOutput, QuoteQuoteInput, QuoteQuoteInput as QuoteQuoteInput$1, QuoteQuoteOutput, QuoteQuoteOutput as QuoteQuoteOutput$1, QuoteRemoveAdditionalServiceInput, QuoteRemoveAdditionalServiceOutput, QuoteSelectCancellationPolicyInput, QuoteSelectCancellationPolicyOutput, QuoteSelectInsuranceInput, QuoteSelectInsuranceOutput, QuoteSelectInsurancePaymentInput, QuoteSelectInsurancePaymentOutput, QuoteService as QuoteService$1, RentalGetRentalsInput, RentalGetRentalsInput as RentalGetRentalsInput$1, RentalGetRentalsOutput, RentalGetRentalsOutput as RentalGetRentalsOutput$1, RentalHighlightPrioritizationKey, RentalHighlightPrioritizationKey as RentalHighlightPrioritizationKey$1, RentalPropertyHighlightPrioritizationKey, RentalPropertyHighlightPrioritizationKey as RentalPropertyHighlightPrioritizationKey$1, RentalScope, RentalService, ResolvedCustomAttribute, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
1
+ import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, LocaleSchema, QuoteAddAdditionalServiceInput, QuoteAddAdditionalServiceOutput, QuoteBookInsuranceInput, QuoteBookInsuranceOutput, QuoteClearAdditionalServicesInput, QuoteClearAdditionalServicesOutput, QuoteCreateInsurancePreContractInput, QuoteCreateInsurancePreContractOutput, QuoteQuoteInput, QuoteQuoteInput as QuoteQuoteInput$1, QuoteQuoteOutput, QuoteQuoteOutput as QuoteQuoteOutput$1, QuoteRemoveAdditionalServiceInput, QuoteRemoveAdditionalServiceOutput, QuoteSelectCancellationPolicyInput, QuoteSelectCancellationPolicyOutput, QuoteSelectInsuranceInput, QuoteSelectInsuranceOutput, QuoteSelectInsurancePaymentInput, QuoteSelectInsurancePaymentOutput, QuoteService as QuoteService$1, RentalGetRentalsInput, RentalGetRentalsInput as RentalGetRentalsInput$1, RentalGetRentalsOutput, RentalGetRentalsOutput as RentalGetRentalsOutput$1, RentalHighlightPrioritizationKey, RentalHighlightPrioritizationKey as RentalHighlightPrioritizationKey$1, RentalPropertyHighlightPrioritizationKey, RentalPropertyHighlightPrioritizationKey as RentalPropertyHighlightPrioritizationKey$1, RentalScope, RentalService, ResolvedCustomAttribute, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
3
  import { HttpClient } from "effect/unstable/http";
4
4
  //#region src/legacy-v9/property-highlight-sources.d.ts
@@ -77,6 +77,14 @@ type V9SearchSearchInput = Omit<SearchSearchInput$1, "rentalIdsIn" | "voucher" |
77
77
  readonly sort?: V9SearchSearchSort;
78
78
  };
79
79
  //#endregion
80
+ //#region src/legacy-v9/search-output.d.ts
81
+ type V9SearchSearchOutputItem = SearchSearchOutputItem & {
82
+ readonly matchingPeriods?: SearchSearchAlternative["alternativePeriods"];
83
+ };
84
+ type V9SearchSearchOutput = Omit<SearchSearchOutput$1, "items"> & {
85
+ readonly items: readonly V9SearchSearchOutputItem[];
86
+ };
87
+ //#endregion
80
88
  //#region src/client.d.ts
81
89
  type WebsiteSDKSharedStatic = {
82
90
  readonly rentals: {
@@ -130,7 +138,7 @@ type WebsiteSDKSharedLive = {
130
138
  type WebsiteSDKV10Live = WebsiteSDKSharedLive;
131
139
  type WebsiteSDKV9Live = Omit<WebsiteSDKSharedLive, "search"> & {
132
140
  readonly search: {
133
- readonly search: (input: V9SearchSearchInput) => Promise<SearchSearchOutput$1>;
141
+ readonly search: (input: V9SearchSearchInput) => Promise<V9SearchSearchOutput>;
134
142
  };
135
143
  };
136
144
  type WebsiteSDKBase<Static extends WebsiteSDKSharedStatic, Live> = {
@@ -7518,4 +7526,4 @@ export type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
7518
7526
  export type RentalSearchInput = SearchSearchInput$1;
7519
7527
  export type RentalSearchOutput = SearchSearchOutput$1;
7520
7528
  //#endregion
7521
- export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9SearchSearchInput, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
7529
+ export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as getTermsAndPrivacyPolicyEffect, B as OnOfficeUnitSchema, Bt as defineWebsiteSDKOptions, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getInitialAvailabilityEffect, E as DocumentSummarySchema, Et as getFiltersEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsuranceEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, Ht as defineV9PropertyHighlightSourcesFromUnknown, I as ErgoReadPreContractRequestSchema, It as selectInsurancePaymentEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitContactEffect, M as ErgoCreatePreContractRequestSchema, Mt as removeAdditionalServiceEffect, N as ErgoPersonSchema, Nt as searchEffect, O as ErgoAddressSchema, Ot as getRentalsEffect, P as ErgoPlanSearchRequestSchema, Pt as selectCancellationPolicyEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOption, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getBankTransferDetailsEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, Vt as defineV9PropertyHighlightSources, 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 quoteEffect, k as ErgoBankSchema, kt as getStartDateSelectedAvailabilityEffect, 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 submitPaymentOptionEffect } from "./client-dWCukmLr.mjs";
1
+ import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as getTermsAndPrivacyPolicyEffect, B as OnOfficeUnitSchema, Bt as defineWebsiteSDKOptions, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getInitialAvailabilityEffect, E as DocumentSummarySchema, Et as getFiltersEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsuranceEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, Ht as defineV9PropertyHighlightSourcesFromUnknown, I as ErgoReadPreContractRequestSchema, It as selectInsurancePaymentEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitContactEffect, M as ErgoCreatePreContractRequestSchema, Mt as removeAdditionalServiceEffect, N as ErgoPersonSchema, Nt as searchEffect, O as ErgoAddressSchema, Ot as getRentalsEffect, P as ErgoPlanSearchRequestSchema, Pt as selectCancellationPolicyEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOption, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getBankTransferDetailsEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, Vt as defineV9PropertyHighlightSources, 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 quoteEffect, k as ErgoBankSchema, kt as getStartDateSelectedAvailabilityEffect, 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 submitPaymentOptionEffect } from "./client-BtZ30vTP.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.22.0/CHANGELOG.md`: release notes for 2.22.0
7
8
  - `versions/2.21.0/CHANGELOG.md`: release notes for 2.21.0
8
9
  - `versions/2.20.4/CHANGELOG.md`: release notes for 2.20.4
9
10
  - `versions/2.20.3/CHANGELOG.md`: release notes for 2.20.3
@@ -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.22.0/MIGRATION.md`: Migration: 2.21.0 to 2.22.0
7
8
  - `versions/2.21.0/MIGRATION.md`: Migration: 2.20.4 to 2.21.0
8
9
  - `versions/2.20.4/MIGRATION.md`: Migration: 2.20.3 to 2.20.4
9
10
  - `versions/2.20.3/MIGRATION.md`: Migration: 2.20.2 to 2.20.3
@@ -374,6 +374,35 @@ requested locale; backend numeric amounts and modifier type keys are not exposed
374
374
  individual modifier lines. Exact-period results are returned in `items`;
375
375
  alternative-period suggestions are returned in root-level `alternatives`.
376
376
 
377
+ On legacy v9 only, an exact match may include `matchingPeriods` when the backend
378
+ chose the dates itself in a window search (`start`/`end` plus `minNights`/`maxNights`).
379
+ The field exists only on the v9 facade: `sdk.live.search.search` of a
380
+ `WebsiteSDKV9` returns `V9SearchSearchOutput`, whose items are
381
+ `V9SearchSearchOutputItem`. Narrow on `sdk.backend === "v9"` to read it. Each entry has the same shape as an `alternativePeriods` entry: `start`, `end`,
382
+ and the optional `formattedTotal` and `discount` for that period. Entries keep the
383
+ backend order. The item's own `formattedTotal` and `discount` are the price of the
384
+ first entry when that entry has one; otherwise they are the backend's overall price
385
+ for the hit. Show `matchingPeriods[0]` as the dates the card price is for, and open
386
+ the rental page with those dates so card and detail price agree. For a
387
+ fixed-period search without a window, the dates are the requested ones and
388
+ `matchingPeriods` is absent, never an empty array.
389
+
390
+ ```json
391
+ {
392
+ "id": "214950",
393
+ "nameOrLabel": "Ferienhaus Seeblick",
394
+ "timeZone": "Europe/Berlin",
395
+ "formattedTotal": "1.144,10 €",
396
+ "matchingPeriods": [
397
+ {
398
+ "start": "2026-10-01",
399
+ "end": "2026-10-08",
400
+ "formattedTotal": "1.144,10 €"
401
+ }
402
+ ]
403
+ }
404
+ ```
405
+
377
406
  `appliedFilters` reports what the backend actually applied, and is what a "remove
378
407
  this filter" chip should be built from. `label` is localized presentation and can
379
408
  repeat, so it cannot identify a filter; `key` plus `value` can. `value` is the
@@ -421,6 +450,10 @@ projection:
421
450
  and booking flow.
422
451
  - Pagination uses the backend `from`/`size` window behind the same opaque `cursor`,
423
452
  capped at 1,000 results.
453
+ - v10 items have no `matchingPeriods`. A v10 hit counts as exact only when its period
454
+ equals the requested fixed period; a hit the backend priced for other dates,
455
+ including every hit of a `minNights`/`maxNights` window search, is returned in
456
+ `alternatives` with its dates in `alternativePeriods`.
424
457
 
425
458
  ### Legacy v9
426
459
 
@@ -442,6 +475,12 @@ shape:
442
475
  formatted original total.
443
476
  - The same mapping applies to exact-period items and individual alternative
444
477
  periods.
478
+ - For an exact match, every `additional_voffice_data.matchingPeriods` entry with
479
+ both dates becomes a `matchingPeriods` entry (`fromdate`/`tilldate` become
480
+ `start`/`end`, its `calc` becomes the period's price fields); entries without
481
+ dates are dropped. In a window search the guest enters a window and a stay
482
+ length, not the stay itself. The backend returns the bookable stays inside the
483
+ window, earliest first; the SDK keeps that order.
445
484
  - v9 never executes a custom-attribute search filter.
446
485
 
447
486
  The field is omitted when v9 returns no final total or when its original total is
@@ -0,0 +1,30 @@
1
+ # Changelog: 2.22.0
2
+
3
+ On a v9 hub, a search over a date window (`start`/`end` with `minNights`/`maxNights`)
4
+ lets the hub pick the stay itself: the earliest bookable stay in the window. Such a hit came back as an exact result with a price but without the
5
+ dates that price was for. A site could only link the rental page with the
6
+ window the guest typed, and the detail page then showed a different price than
7
+ the card.
8
+
9
+ ## Added
10
+
11
+ - `v9`: exact search results carry `matchingPeriods` when the hub chose the
12
+ dates. Each entry has `start`, `end` and the optional `formattedTotal` and
13
+ `discount` for that period, in the hub's order. The field is absent for a
14
+ fixed-period search, never an empty array.
15
+ - Types `V9SearchSearchOutput` and `V9SearchSearchOutputItem`.
16
+ `sdk.live.search.search` of a `WebsiteSDKV9` now returns
17
+ `V9SearchSearchOutput`; narrow on `sdk.backend === "v9"` to read
18
+ `matchingPeriods`.
19
+
20
+ ## Changed
21
+
22
+ - `v9`: the `formattedTotal` and `discount` of an exact result are the price of
23
+ its first `matchingPeriods` entry when that entry has a price.
24
+
25
+ ## Unchanged
26
+
27
+ - Fixed-period searches on v9: same items, same prices, no new field.
28
+ - Alternatives and their `alternativePeriods`.
29
+ - The v10 backend. v10 items have no `matchingPeriods`; a v10 hit for other
30
+ dates than the requested ones is still returned in `alternatives`.
@@ -0,0 +1,27 @@
1
+ # Migration: 2.21.0 to 2.22.0
2
+
3
+ ## 1. Upgrade
4
+
5
+ ```sh
6
+ pnpm add @v-office/website-sdk@2.22.0
7
+ ```
8
+
9
+ No changes are required. The v9 search result type is a superset of the
10
+ previous one, so existing code compiles and renders as before.
11
+
12
+ ## 2. Show the dates of a window-search hit (`v9`)
13
+
14
+ A v9 site that offers a date window with a night range should show
15
+ `matchingPeriods[0]` on the result card as the dates the price is for, and open
16
+ the rental page with those dates instead of the typed window. Card and detail
17
+ page then show the same price.
18
+
19
+ ```ts
20
+ if (sdk.backend === "v9") {
21
+ const output = await sdk.live.search.search(input);
22
+ for (const item of output.items) {
23
+ const period = item.matchingPeriods?.[0];
24
+ // period?.start, period?.end: dates for the card and the rental link
25
+ }
26
+ }
27
+ ```
@@ -1,4 +1,4 @@
1
- import { Ut as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-dWCukmLr.mjs";
1
+ import { Ut as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-BtZ30vTP.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-dWCukmLr.mjs";
1
+ import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-BtZ30vTP.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";
@@ -235,12 +235,18 @@ const toQueryInput = ({ query, sort, customAttributeFilterDefinitions, locale, t
235
235
  //#region src/legacy-v9/parser/search/resolve-exact-match.ts
236
236
  const resolveExactMatch = (additionalData) => {
237
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
+ const matchingPeriods = additionalData?.matchingPeriods ?? [];
239
+ const calcCandidates = [
240
+ matchingPeriods.find((period) => period.fromdate != null && period.tilldate != null)?.calc,
241
+ additionalData?.calc,
242
+ matchingPeriods[0]?.calc
243
+ ];
244
+ const calc = calcCandidates.find((candidate) => candidate?.total != null);
245
+ const isExactMatch = additionalData?.foundExactMatch === true || additionalData?.foundExactMatch == null && alternatives.length === 0 && calcCandidates.some((candidate) => candidate != null);
240
246
  return {
241
247
  isExactMatch,
242
248
  exactMatchCalc: isExactMatch ? calc : void 0,
243
- periods: isExactMatch ? [] : alternatives
249
+ periods: isExactMatch ? matchingPeriods : alternatives
244
250
  };
245
251
  };
246
252
  //#endregion
@@ -302,15 +308,15 @@ const toSearchOutputItem = ({ locale, imageProxyBaseUrl, rentalHighlightPrioriti
302
308
  return item;
303
309
  });
304
310
  //#endregion
305
- //#region src/legacy-v9/parser/search/output/to-alternative-periods.ts
306
- const toAlternativePeriods = ({ locale, alternatives }) => Effect.succeed((alternatives ?? []).flatMap((alternative) => {
307
- if (alternative.fromdate == null || alternative.tilldate == null) return [];
311
+ //#region src/legacy-v9/parser/search/output/to-search-periods.ts
312
+ const toSearchPeriods = ({ locale, periods }) => Effect.succeed((periods ?? []).flatMap((period) => {
313
+ if (period.fromdate == null || period.tilldate == null) return [];
308
314
  return [{
309
- start: alternative.fromdate,
310
- end: alternative.tilldate,
315
+ start: period.fromdate,
316
+ end: period.tilldate,
311
317
  ...toSearchPriceFields({
312
318
  locale,
313
- calc: alternative.calc
319
+ calc: period.calc
314
320
  })
315
321
  }];
316
322
  }));
@@ -318,4 +324,4 @@ const toAlternativePeriods = ({ locale, alternatives }) => Effect.succeed((alter
318
324
  //#region src/legacy-v9/runtime/search.ts
319
325
  const defaultSearchDataAttributes = Object.keys(VofficeUnitDataFieldSchemas);
320
326
  //#endregion
321
- export { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toAlternativePeriods, toQueryInput, toSearchOutputItem };
327
+ export { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toQueryInput, toSearchOutputItem, toSearchPeriods };
@@ -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.22.0/CHANGELOG.md`: release notes for 2.22.0
7
8
  - `versions/2.21.0/CHANGELOG.md`: release notes for 2.21.0
8
9
  - `versions/2.20.4/CHANGELOG.md`: release notes for 2.20.4
9
10
  - `versions/2.20.3/CHANGELOG.md`: release notes for 2.20.3
@@ -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.22.0/MIGRATION.md`: Migration: 2.21.0 to 2.22.0
7
8
  - `versions/2.21.0/MIGRATION.md`: Migration: 2.20.4 to 2.21.0
8
9
  - `versions/2.20.4/MIGRATION.md`: Migration: 2.20.3 to 2.20.4
9
10
  - `versions/2.20.3/MIGRATION.md`: Migration: 2.20.2 to 2.20.3
@@ -374,6 +374,35 @@ requested locale; backend numeric amounts and modifier type keys are not exposed
374
374
  individual modifier lines. Exact-period results are returned in `items`;
375
375
  alternative-period suggestions are returned in root-level `alternatives`.
376
376
 
377
+ On legacy v9 only, an exact match may include `matchingPeriods` when the backend
378
+ chose the dates itself in a window search (`start`/`end` plus `minNights`/`maxNights`).
379
+ The field exists only on the v9 facade: `sdk.live.search.search` of a
380
+ `WebsiteSDKV9` returns `V9SearchSearchOutput`, whose items are
381
+ `V9SearchSearchOutputItem`. Narrow on `sdk.backend === "v9"` to read it. Each entry has the same shape as an `alternativePeriods` entry: `start`, `end`,
382
+ and the optional `formattedTotal` and `discount` for that period. Entries keep the
383
+ backend order. The item's own `formattedTotal` and `discount` are the price of the
384
+ first entry when that entry has one; otherwise they are the backend's overall price
385
+ for the hit. Show `matchingPeriods[0]` as the dates the card price is for, and open
386
+ the rental page with those dates so card and detail price agree. For a
387
+ fixed-period search without a window, the dates are the requested ones and
388
+ `matchingPeriods` is absent, never an empty array.
389
+
390
+ ```json
391
+ {
392
+ "id": "214950",
393
+ "nameOrLabel": "Ferienhaus Seeblick",
394
+ "timeZone": "Europe/Berlin",
395
+ "formattedTotal": "1.144,10 €",
396
+ "matchingPeriods": [
397
+ {
398
+ "start": "2026-10-01",
399
+ "end": "2026-10-08",
400
+ "formattedTotal": "1.144,10 €"
401
+ }
402
+ ]
403
+ }
404
+ ```
405
+
377
406
  `appliedFilters` reports what the backend actually applied, and is what a "remove
378
407
  this filter" chip should be built from. `label` is localized presentation and can
379
408
  repeat, so it cannot identify a filter; `key` plus `value` can. `value` is the
@@ -421,6 +450,10 @@ projection:
421
450
  and booking flow.
422
451
  - Pagination uses the backend `from`/`size` window behind the same opaque `cursor`,
423
452
  capped at 1,000 results.
453
+ - v10 items have no `matchingPeriods`. A v10 hit counts as exact only when its period
454
+ equals the requested fixed period; a hit the backend priced for other dates,
455
+ including every hit of a `minNights`/`maxNights` window search, is returned in
456
+ `alternatives` with its dates in `alternativePeriods`.
424
457
 
425
458
  ### Legacy v9
426
459
 
@@ -442,6 +475,12 @@ shape:
442
475
  formatted original total.
443
476
  - The same mapping applies to exact-period items and individual alternative
444
477
  periods.
478
+ - For an exact match, every `additional_voffice_data.matchingPeriods` entry with
479
+ both dates becomes a `matchingPeriods` entry (`fromdate`/`tilldate` become
480
+ `start`/`end`, its `calc` becomes the period's price fields); entries without
481
+ dates are dropped. In a window search the guest enters a window and a stay
482
+ length, not the stay itself. The backend returns the bookable stays inside the
483
+ window, earliest first; the SDK keeps that order.
445
484
  - v9 never executes a custom-attribute search filter.
446
485
 
447
486
  The field is omitted when v9 returns no final total or when its original total is
@@ -0,0 +1,30 @@
1
+ # Changelog: 2.22.0
2
+
3
+ On a v9 hub, a search over a date window (`start`/`end` with `minNights`/`maxNights`)
4
+ lets the hub pick the stay itself: the earliest bookable stay in the window. Such a hit came back as an exact result with a price but without the
5
+ dates that price was for. A site could only link the rental page with the
6
+ window the guest typed, and the detail page then showed a different price than
7
+ the card.
8
+
9
+ ## Added
10
+
11
+ - `v9`: exact search results carry `matchingPeriods` when the hub chose the
12
+ dates. Each entry has `start`, `end` and the optional `formattedTotal` and
13
+ `discount` for that period, in the hub's order. The field is absent for a
14
+ fixed-period search, never an empty array.
15
+ - Types `V9SearchSearchOutput` and `V9SearchSearchOutputItem`.
16
+ `sdk.live.search.search` of a `WebsiteSDKV9` now returns
17
+ `V9SearchSearchOutput`; narrow on `sdk.backend === "v9"` to read
18
+ `matchingPeriods`.
19
+
20
+ ## Changed
21
+
22
+ - `v9`: the `formattedTotal` and `discount` of an exact result are the price of
23
+ its first `matchingPeriods` entry when that entry has a price.
24
+
25
+ ## Unchanged
26
+
27
+ - Fixed-period searches on v9: same items, same prices, no new field.
28
+ - Alternatives and their `alternativePeriods`.
29
+ - The v10 backend. v10 items have no `matchingPeriods`; a v10 hit for other
30
+ dates than the requested ones is still returned in `alternatives`.
@@ -0,0 +1,27 @@
1
+ # Migration: 2.21.0 to 2.22.0
2
+
3
+ ## 1. Upgrade
4
+
5
+ ```sh
6
+ pnpm add @v-office/website-sdk@2.22.0
7
+ ```
8
+
9
+ No changes are required. The v9 search result type is a superset of the
10
+ previous one, so existing code compiles and renders as before.
11
+
12
+ ## 2. Show the dates of a window-search hit (`v9`)
13
+
14
+ A v9 site that offers a date window with a night range should show
15
+ `matchingPeriods[0]` on the result card as the dates the price is for, and open
16
+ the rental page with those dates instead of the typed window. Card and detail
17
+ page then show the same price.
18
+
19
+ ```ts
20
+ if (sdk.backend === "v9") {
21
+ const output = await sdk.live.search.search(input);
22
+ for (const item of output.items) {
23
+ const period = item.matchingPeriods?.[0];
24
+ // period?.start, period?.end: dates for the card and the rental link
25
+ }
26
+ }
27
+ ```
@@ -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.21.0",
3
+ "version": "2.22.0",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "bin": {
6
6
  "website-sdk": "./dist/cli.mjs"