@v-office/website-sdk 2.28.0 → 2.28.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 { Ht as defineWebsiteSDKOptions, Wt as defineV9PropertyHighlightSourcesFromUnknown, c as makeV9GraphQLClient, d as makeV0OpenApiClientFetchLive, l as V0OpenApiClient, t as createWebsiteSDK } from "./client-DCXrq6T9.mjs";
2
+ import { Ht as defineWebsiteSDKOptions, Wt as defineV9PropertyHighlightSourcesFromUnknown, c as makeV9GraphQLClient, d as makeV0OpenApiClientFetchLive, l as V0OpenApiClient, t as createWebsiteSDK } from "./client-EtS0Qm3i.mjs";
3
3
  import { c as parseVofficeRatingData } from "./v9-data-C3SWtDGs.mjs";
4
4
  import { s as rentalsAllWithoutFeedbacksQuery } from "./operations-DwURbo0b.mjs";
5
5
  import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
@@ -18,7 +18,7 @@ var CLICheckFailed = class extends Error {
18
18
  const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
19
19
  //#endregion
20
20
  //#region package.json
21
- var version = "2.28.0";
21
+ var version = "2.28.1";
22
22
  //#endregion
23
23
  //#region src/cli/output.ts
24
24
  const toJson = (value) => Effect.try({
@@ -1636,10 +1636,14 @@ const toChangeOverAtDay = (changeOver) => {
1636
1636
  //#region src/legacy-v9/parser/availability/to-availability-restrictions-by-date.ts
1637
1637
  const toAvailabilityRestrictionsByDate = ({ availability }) => {
1638
1638
  const availabilityRestrictionsByDate = {};
1639
- for (const [date, day] of Object.entries(availability.caldata_beon)) availabilityRestrictionsByDate[date] = {
1640
- minStay: day.class === "unavailable" ? 0 : day.minStay,
1641
- changeOver: toChangeOverAtDay(day.changeOver)
1642
- };
1639
+ const lastCheckOutDate = availability.max_date;
1640
+ for (const [date, day] of Object.entries(availability.caldata_beon)) {
1641
+ const isPricedNight = lastCheckOutDate === null || date < lastCheckOutDate;
1642
+ availabilityRestrictionsByDate[date] = {
1643
+ minStay: day.class === "unavailable" || !isPricedNight ? 0 : day.minStay,
1644
+ changeOver: toChangeOverAtDay(day.changeOver)
1645
+ };
1646
+ }
1643
1647
  return availabilityRestrictionsByDate;
1644
1648
  };
1645
1649
  //#endregion
@@ -5895,7 +5899,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
5895
5899
  return page;
5896
5900
  });
5897
5901
  const loadV9SearchRuntime = Effect.tryPromise({
5898
- try: () => import("./search-BHnJI-nl.mjs"),
5902
+ try: () => import("./search-B-lvOmXL.mjs"),
5899
5903
  catch: (cause) => new CoreSDKError({
5900
5904
  source: "v9",
5901
5905
  operation: "v9.search.runtime",
@@ -6542,7 +6546,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
6542
6546
  });
6543
6547
  };
6544
6548
  const loadV9RentalsRuntime = Effect.tryPromise({
6545
- try: () => import("./rentals-BocKluYN.mjs"),
6549
+ try: () => import("./rentals-B4g91vwW.mjs"),
6546
6550
  catch: (cause) => new CoreSDKError({
6547
6551
  source: "v9",
6548
6552
  operation: "v9.rentals.runtime",
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as SearchPropertiesResponseSchema, A as ErgoBankSchema, At as getStartDateSelectedAvailabilityEffect, B as OnOfficeUnitCollectionResponseSchema, Bt as submitPaymentOption, C as DocumentResourceResponseSchema, Ct as bookInsuranceEffect, D as DocumentSummarySchema, Dt as getFiltersEffect, E as DocumentStatusUpdateRequestSchema, Et as getBankTransferDetailsEffect, F as ErgoPlanSearchRequestSchema, Ft as searchEffect, G as QuotePricesPayloadSchema, H as PaymentScheduleItemSchema, Ht as defineWebsiteSDKOptions, I as ErgoPolicyNumberRequestSchema, It as selectCancellationPolicyEffect, J as QuoteServiceSchema, K as QuotePricesResponseSchema, L as ErgoReadPreContractRequestSchema, Lt as selectInsuranceEffect, M as ErgoCommonFieldsSchema, Mt as mapSearchEffect, N as ErgoCreatePreContractRequestSchema, Nt as quoteEffect, O as DocumentTypeSchema, Ot as getInitialAvailabilityEffect, P as ErgoPersonSchema, Pt as removeAdditionalServiceEffect, Q as RoomImageSchema, R as ErgoTripAndCustomerRequestSchema, Rt as selectInsurancePaymentEffect, S as DocumentCollectionResponseSchema, St as bookEffect, T as DocumentStatusSchema, Tt as createInsurancePreContractEffect, U as PaymentScheduleSchema, Ut as defineV9PropertyHighlightSources, V as OnOfficeUnitSchema, Vt as submitPaymentOptionEffect, W as QuoteLineSchema, Wt as defineV9PropertyHighlightSourcesFromUnknown, X as RawVofficeObjectSchema, Y as RawObjectResponseSchema, Z as RegionListResponseSchema, _ as ApiEnvelopeBaseSchema, _t as V1_BASE_URL, at as SetupResponseSchema, b as CurrentMemberResponseSchema, bt as decodeV1OperationResponse, ct as TileTagSchema, d as makeV0OpenApiClientFetchLive, dt as UnitIdsResponseSchema, et as ServiceBeonDataSchema, f as makeV0OpenApiClientLive, ft as UnitListItemSchema, g as makeV1OpenApiClientLive, gt as UnitServicePriceSchema, h as makeV1OpenApiClientFetchLive, ht as UnitResponseSchema, it as SetupDataSchema, j as ErgoBookRequestSchema, jt as getTermsAndPrivacyPolicyEffect, k as ErgoAddressSchema, kt as getRentalsEffect, l as V0OpenApiClient, lt as TravelInsuranceBookingSchema, m as V1OpenApiClientError, mt as UnitOfferSchema, nt as ServiceLimitSchema, ot as TileCollectionResponseSchema, p as V1OpenApiClient, pt as UnitListResponseSchema, q as QuoteSchema, rt as ServiceListResponseSchema, st as TileSchema, t as createWebsiteSDK, tt as ServiceImageSchema, u as V0OpenApiClientError, ut as TravelInsuranceBookingStoreRequestSchema, v as CalendarDaySchema, vt as V1_OPERATIONS, w as DocumentResourceSchema, wt as clearAdditionalServicesEffect, x as CustomerUnitSummarySchema, xt as addAdditionalServiceEffect, y as CalendarResponseSchema, yt as VideoResponseSchema, z as FacilityListResponseSchema, zt as submitContactEffect } from "./client-DCXrq6T9.mjs";
1
+ import { $ as SearchPropertiesResponseSchema, A as ErgoBankSchema, At as getStartDateSelectedAvailabilityEffect, B as OnOfficeUnitCollectionResponseSchema, Bt as submitPaymentOption, C as DocumentResourceResponseSchema, Ct as bookInsuranceEffect, D as DocumentSummarySchema, Dt as getFiltersEffect, E as DocumentStatusUpdateRequestSchema, Et as getBankTransferDetailsEffect, F as ErgoPlanSearchRequestSchema, Ft as searchEffect, G as QuotePricesPayloadSchema, H as PaymentScheduleItemSchema, Ht as defineWebsiteSDKOptions, I as ErgoPolicyNumberRequestSchema, It as selectCancellationPolicyEffect, J as QuoteServiceSchema, K as QuotePricesResponseSchema, L as ErgoReadPreContractRequestSchema, Lt as selectInsuranceEffect, M as ErgoCommonFieldsSchema, Mt as mapSearchEffect, N as ErgoCreatePreContractRequestSchema, Nt as quoteEffect, O as DocumentTypeSchema, Ot as getInitialAvailabilityEffect, P as ErgoPersonSchema, Pt as removeAdditionalServiceEffect, Q as RoomImageSchema, R as ErgoTripAndCustomerRequestSchema, Rt as selectInsurancePaymentEffect, S as DocumentCollectionResponseSchema, St as bookEffect, T as DocumentStatusSchema, Tt as createInsurancePreContractEffect, U as PaymentScheduleSchema, Ut as defineV9PropertyHighlightSources, V as OnOfficeUnitSchema, Vt as submitPaymentOptionEffect, W as QuoteLineSchema, Wt as defineV9PropertyHighlightSourcesFromUnknown, X as RawVofficeObjectSchema, Y as RawObjectResponseSchema, Z as RegionListResponseSchema, _ as ApiEnvelopeBaseSchema, _t as V1_BASE_URL, at as SetupResponseSchema, b as CurrentMemberResponseSchema, bt as decodeV1OperationResponse, ct as TileTagSchema, d as makeV0OpenApiClientFetchLive, dt as UnitIdsResponseSchema, et as ServiceBeonDataSchema, f as makeV0OpenApiClientLive, ft as UnitListItemSchema, g as makeV1OpenApiClientLive, gt as UnitServicePriceSchema, h as makeV1OpenApiClientFetchLive, ht as UnitResponseSchema, it as SetupDataSchema, j as ErgoBookRequestSchema, jt as getTermsAndPrivacyPolicyEffect, k as ErgoAddressSchema, kt as getRentalsEffect, l as V0OpenApiClient, lt as TravelInsuranceBookingSchema, m as V1OpenApiClientError, mt as UnitOfferSchema, nt as ServiceLimitSchema, ot as TileCollectionResponseSchema, p as V1OpenApiClient, pt as UnitListResponseSchema, q as QuoteSchema, rt as ServiceListResponseSchema, st as TileSchema, t as createWebsiteSDK, tt as ServiceImageSchema, u as V0OpenApiClientError, ut as TravelInsuranceBookingStoreRequestSchema, v as CalendarDaySchema, vt as V1_OPERATIONS, w as DocumentResourceSchema, wt as clearAdditionalServicesEffect, x as CustomerUnitSummarySchema, xt as addAdditionalServiceEffect, y as CalendarResponseSchema, yt as VideoResponseSchema, z as FacilityListResponseSchema, zt as submitContactEffect } from "./client-EtS0Qm3i.mjs";
2
2
  import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, 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.28.1/CHANGELOG.md`: release notes for 2.28.1
7
8
  - `versions/2.28.0/CHANGELOG.md`: release notes for 2.28.0
8
9
  - `versions/2.27.0/CHANGELOG.md`: release notes for 2.27.0
9
10
  - `versions/2.26.0/CHANGELOG.md`: release notes for 2.26.0
@@ -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.28.1/MIGRATION.md`: Migration: 2.28.0 to 2.28.1
7
8
  - `versions/2.28.0/MIGRATION.md`: Migration: 2.27.0 to 2.28.0
8
9
  - `versions/2.27.0/MIGRATION.md`: Migration: 2.26.0 to 2.27.0
9
10
  - `versions/2.26.0/MIGRATION.md`: Migration: 2.25.0 to 2.26.0
@@ -0,0 +1,16 @@
1
+ # Changelog: 2.28.1
2
+
3
+ On v9, the availability calendar now ends where the rental's prices end. Until now a guest
4
+ could pick dates after the last priced night; the calendar showed no price for them and the
5
+ quote then failed.
6
+
7
+ ## Fixed
8
+
9
+ - v9 `sdk.live.availability.getInitialAvailability` no longer offers a check-in whose stay
10
+ runs past the last priced night. Days after the last priced night are unavailable and carry
11
+ no price.
12
+ - v9 `sdk.live.availability.getStartDateSelectedAvailability` offers the day after the last
13
+ priced night as the latest check-out and no day after it.
14
+
15
+ A rental whose prices have no end date keeps its calendar as before. v10 availability is
16
+ unchanged.
@@ -0,0 +1,11 @@
1
+ # Migration: 2.28.0 to 2.28.1
2
+
3
+ ## 1. Upgrade
4
+
5
+ ```sh
6
+ pnpm add @v-office/website-sdk@2.28.1
7
+ ```
8
+
9
+ No changes are required. On a v9 site, days after the rental's last priced night come back
10
+ as unavailable from both availability calls, so a calendar built on them stops offering
11
+ those dates without any change.
@@ -1,4 +1,4 @@
1
- import { Gt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-DCXrq6T9.mjs";
1
+ import { Gt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-EtS0Qm3i.mjs";
2
2
  import { i as VofficeUnitDataPropertyMetadata, l as parseVofficeUnitData, n as VofficeUnitDataPropertyCategoryLabelKeys, o as parseVofficeFacilityData, r as VofficeUnitDataPropertyCategoryValues, s as parseVofficeFeedbackData, t as VofficeUnitDataFieldSchemas } from "./v9-data-C3SWtDGs.mjs";
3
3
  import { a as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, i as rentalIdsQuery, o as rentalsAllFeedbacksQuery, r as rentalFacilitiesForObjectGroupRelationQuery, s as rentalsAllWithoutFeedbacksQuery } from "./operations-DwURbo0b.mjs";
4
4
  import { a as toFacilityImages, c as toLocalizedString, i as toLocation, o as toImages, r as renderVofficePropertyAttribute, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-BL5m3Uen.mjs";
@@ -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-DCXrq6T9.mjs";
1
+ import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-EtS0Qm3i.mjs";
2
2
  import { l as parseVofficeUnitData } from "./v9-data-C3SWtDGs.mjs";
3
3
  import { n as searchQuery, t as mapSearchQuery } from "./operations-DwURbo0b.mjs";
4
4
  import { i as toLocation, n as toV9RentalHighlightKey, o as toImages, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-BL5m3Uen.mjs";
@@ -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.28.1/CHANGELOG.md`: release notes for 2.28.1
7
8
  - `versions/2.28.0/CHANGELOG.md`: release notes for 2.28.0
8
9
  - `versions/2.27.0/CHANGELOG.md`: release notes for 2.27.0
9
10
  - `versions/2.26.0/CHANGELOG.md`: release notes for 2.26.0
@@ -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.28.1/MIGRATION.md`: Migration: 2.28.0 to 2.28.1
7
8
  - `versions/2.28.0/MIGRATION.md`: Migration: 2.27.0 to 2.28.0
8
9
  - `versions/2.27.0/MIGRATION.md`: Migration: 2.26.0 to 2.27.0
9
10
  - `versions/2.26.0/MIGRATION.md`: Migration: 2.25.0 to 2.26.0
@@ -0,0 +1,16 @@
1
+ # Changelog: 2.28.1
2
+
3
+ On v9, the availability calendar now ends where the rental's prices end. Until now a guest
4
+ could pick dates after the last priced night; the calendar showed no price for them and the
5
+ quote then failed.
6
+
7
+ ## Fixed
8
+
9
+ - v9 `sdk.live.availability.getInitialAvailability` no longer offers a check-in whose stay
10
+ runs past the last priced night. Days after the last priced night are unavailable and carry
11
+ no price.
12
+ - v9 `sdk.live.availability.getStartDateSelectedAvailability` offers the day after the last
13
+ priced night as the latest check-out and no day after it.
14
+
15
+ A rental whose prices have no end date keeps its calendar as before. v10 availability is
16
+ unchanged.
@@ -0,0 +1,11 @@
1
+ # Migration: 2.28.0 to 2.28.1
2
+
3
+ ## 1. Upgrade
4
+
5
+ ```sh
6
+ pnpm add @v-office/website-sdk@2.28.1
7
+ ```
8
+
9
+ No changes are required. On a v9 site, days after the rental's last priced night come back
10
+ as unavailable from both availability calls, so a calendar built on them stops offering
11
+ those dates without any change.
@@ -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.28.0",
3
+ "version": "2.28.1",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "bin": {
6
6
  "website-sdk": "./dist/cli.mjs"
@@ -86,7 +86,7 @@
86
86
  "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",
87
87
  "test:v9:rentals": "node --test src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts src/legacy-v9/parser/rentals/to-reviews.test.ts",
88
88
  "test:v9:graphql": "node --test src/legacy-v9/graphql/client.test.ts",
89
- "test:v9:availability": "node --test src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts src/legacy-v9/parser/availability/to-occupancy-limits.test.ts",
89
+ "test:v9:availability": "node --test src/legacy-v9/parser/availability/to-availability-restrictions-by-date.test.ts src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts src/legacy-v9/parser/availability/to-occupancy-limits.test.ts",
90
90
  "test:v9:search": "node --test src/legacy-v9/parser/search/resolve-exact-match.test.ts",
91
91
  "test:v9:booking": "node --test src/legacy-v9/parser/booking/output/to-payment-schedules.test.ts",
92
92
  "playground:custom-attributes": "pnpm run build && node --env-file=.env playground/custom-attributes.ts"