@v-office/website-sdk 3.2.1 → 3.4.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.
Files changed (29) hide show
  1. package/dist/cli.mjs +3 -3
  2. package/dist/{client-F2V6hCg6.mjs → client-BEL6ow0i.mjs} +122 -119
  3. package/dist/index.d.mts +214 -166
  4. package/dist/index.mjs +2 -2
  5. package/dist/instructions/CHANGELOG.md +2 -0
  6. package/dist/instructions/MIGRATION.md +2 -0
  7. package/dist/instructions/quote.md +2 -2
  8. package/dist/instructions/rentals.md +82 -1
  9. package/dist/instructions/search.md +2 -1
  10. package/dist/instructions/versions/3.3.0/CHANGELOG.md +22 -0
  11. package/dist/instructions/versions/3.3.0/MIGRATION.md +22 -0
  12. package/dist/instructions/versions/3.4.0/CHANGELOG.md +39 -0
  13. package/dist/instructions/versions/3.4.0/MIGRATION.md +44 -0
  14. package/dist/{operations-Bc3WxjV8.mjs → operations-DY2e_2Hd.mjs} +235 -13
  15. package/dist/{rentals-DfDeL0Qk.mjs → rentals-DVMCyGI9.mjs} +65 -4
  16. package/dist/{search-_gISebZ1.mjs → search-6EvRB-i0.mjs} +3 -3
  17. package/dist/{to-rental-highlights-9AbqVIso.mjs → to-rental-highlights-DptWc7-q.mjs} +1 -1
  18. package/instructions/CHANGELOG.md +2 -0
  19. package/instructions/MIGRATION.md +2 -0
  20. package/instructions/quote.md +2 -2
  21. package/instructions/rentals.md +82 -1
  22. package/instructions/search.md +2 -1
  23. package/instructions/versions/3.3.0/CHANGELOG.md +22 -0
  24. package/instructions/versions/3.3.0/MIGRATION.md +22 -0
  25. package/instructions/versions/3.3.0/release.json +3 -0
  26. package/instructions/versions/3.4.0/CHANGELOG.md +39 -0
  27. package/instructions/versions/3.4.0/MIGRATION.md +44 -0
  28. package/instructions/versions/3.4.0/release.json +3 -0
  29. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as QuoteSchema, A as DocumentResourceSchema, At as bookInsuranceEffect, B as ErgoPersonSchema, Bt as quoteEffect, C as ApiEnvelopeBaseSchema, Ct as V1_BASE_URL, D as CustomerUnitSummarySchema, Dt as decodeV1OperationResponse, E as CurrentMemberResponseSchema, Et as VideoResponseSchema, F as ErgoAddressSchema, Ft as getInitialAvailabilityEffect, G as FacilityListResponseSchema, Gt as selectInsurancePaymentEffect, H as ErgoPolicyNumberRequestSchema, Ht as searchEffect, I as ErgoBankSchema, It as getRentalsEffect, J as PaymentScheduleItemSchema, Jt as submitPaymentOptionEffect, K as OnOfficeUnitCollectionResponseSchema, Kt as submitContactEffect, L as ErgoBookRequestSchema, Lt as getStartDateSelectedAvailabilityEffect, M as DocumentStatusUpdateRequestSchema, Mt as createInsurancePreContractEffect, N as DocumentSummarySchema, Nt as getBankTransferDetailsEffect, O as DocumentCollectionResponseSchema, Ot as addAdditionalServiceEffect, P as DocumentTypeSchema, Pt as getFiltersEffect, Q as QuotePricesResponseSchema, R as ErgoCommonFieldsSchema, Rt as getTermsAndPrivacyPolicyEffect, S as makeV1OpenApiClientLive, St as UnitServicePriceSchema, T as CalendarResponseSchema, Tt as VideoListResponseSchema, U as ErgoReadPreContractRequestSchema, Ut as selectCancellationPolicyEffect, V as ErgoPlanSearchRequestSchema, Vt as removeAdditionalServiceEffect, W as ErgoTripAndCustomerRequestSchema, Wt as selectInsuranceEffect, X as QuoteLineSchema, Xt as defineV9PropertyHighlightSources, Y as PaymentScheduleSchema, Yt as defineWebsiteSDKOptions, Z as QuotePricesPayloadSchema, Zt as defineV9PropertyHighlightSourcesFromUnknown, _t as UnitIdsResponseSchema, at as SearchPropertiesResponseSchema, b as V1OpenApiClientError, bt as UnitOfferSchema, ct as ServiceLimitSchema, dt as SetupResponseSchema, et as QuoteServiceSchema, ft as TileCollectionResponseSchema, g as makeV0OpenApiClientLive, gt as TravelInsuranceBookingStoreRequestSchema, h as makeV0OpenApiClientFetchLive, ht as TravelInsuranceBookingSchema, it as RoomImageSchema, j as DocumentStatusSchema, jt as clearAdditionalServicesEffect, k as DocumentResourceResponseSchema, kt as bookEffect, lt as ServiceListResponseSchema, m as V0OpenApiClientError, mt as TileTagSchema, nt as RawVofficeObjectSchema, ot as ServiceBeonDataSchema, p as V0OpenApiClient, pt as TileSchema, q as OnOfficeUnitSchema, qt as submitPaymentOption, rt as RegionListResponseSchema, st as ServiceImageSchema, t as createWebsiteSDK, tt as RawObjectResponseSchema, ut as SetupDataSchema, vt as UnitListItemSchema, w as CalendarDaySchema, wt as V1_OPERATIONS, x as makeV1OpenApiClientFetchLive, xt as UnitResponseSchema, y as V1OpenApiClient, yt as UnitListResponseSchema, z as ErgoCreatePreContractRequestSchema, zt as mapSearchEffect } from "./client-F2V6hCg6.mjs";
1
+ import { $ as QuotePricesPayloadSchema, A as DocumentResourceSchema, At as bookEffect, B as ErgoCommonFieldsSchema, Bt as mapSearchEffect, C as ApiEnvelopeBaseSchema, Ct as UnitServicePriceSchema, D as CustomerUnitSummarySchema, Dt as VideoResponseSchema, E as CurrentMemberResponseSchema, Et as VideoListResponseSchema, F as ErgoAddressSchema, Ft as getFiltersEffect, G as ErgoTripAndCustomerRequestSchema, Gt as selectInsuranceEffect, H as ErgoPersonSchema, Ht as removeAdditionalServiceEffect, I as ErgoBankSchema, It as getInitialAvailabilityEffect, J as OnOfficeUnitCollectionResponseSchema, Jt as submitPaymentOption, K as FacilityListResponseSchema, Kt as selectInsurancePaymentEffect, L as ErgoBookRequestSchema, Lt as getRentalsEffect, M as DocumentStatusUpdateRequestSchema, Mt as clearAdditionalServicesEffect, N as DocumentSummarySchema, Nt as createInsurancePreContractEffect, O as DocumentCollectionResponseSchema, Ot as decodeV1OperationResponse, P as DocumentTypeSchema, Pt as getBankTransferDetailsEffect, Q as QuoteLineSchema, Qt as defineV9PropertyHighlightSourcesFromUnknown, R as ErgoBookingIdentityRequestSchema, Rt as getStartDateSelectedAvailabilityEffect, S as makeV1OpenApiClientLive, St as UnitResponseSchema, T as CalendarResponseSchema, Tt as V1_OPERATIONS, U as ErgoPlanSearchRequestSchema, Ut as searchEffect, V as ErgoCreatePreContractRequestSchema, Vt as quoteEffect, W as ErgoReadPreContractRequestSchema, Wt as selectCancellationPolicyEffect, X as PaymentScheduleItemSchema, Xt as defineWebsiteSDKOptions, Y as OnOfficeUnitSchema, Yt as submitPaymentOptionEffect, Z as PaymentScheduleSchema, Zt as defineV9PropertyHighlightSources, _t as TravelInsuranceBookingSchema, at as RegionListResponseSchema, b as V1OpenApiClientError, bt as UnitListResponseSchema, ct as ServiceBeonDataSchema, dt as ServiceListResponseSchema, et as QuotePricesResponseSchema, ft as SetupDataSchema, g as makeV0OpenApiClientLive, gt as TileTagSchema, h as makeV0OpenApiClientFetchLive, ht as TileSchema, it as RawVofficeObjectSchema, j as DocumentStatusSchema, jt as bookInsuranceEffect, k as DocumentResourceResponseSchema, kt as addAdditionalServiceEffect, lt as ServiceImageSchema, m as V0OpenApiClientError, mt as TileCollectionResponseSchema, nt as QuoteServiceSchema, ot as RoomImageSchema, p as V0OpenApiClient, pt as SetupResponseSchema, q as HubErrorSchema, qt as submitContactEffect, rt as RawObjectResponseSchema, st as SearchPropertiesResponseSchema, t as createWebsiteSDK, tt as QuoteSchema, ut as ServiceLimitSchema, vt as UnitIdsResponseSchema, w as CalendarDaySchema, wt as V1_BASE_URL, x as makeV1OpenApiClientFetchLive, xt as UnitOfferSchema, y as V1OpenApiClient, yt as UnitListItemSchema, z as ErgoBookingIdentitySchema, zt as getTermsAndPrivacyPolicyEffect } from "./client-BEL6ow0i.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;
@@ -13,4 +13,4 @@ const defineVofficeOfferDataAttributes = defineDataAttributes();
13
13
  const defineVofficeRatingDataAttributes = defineDataAttributes();
14
14
  const defineVofficeTotalRatingDataAttributes = defineDataAttributes();
15
15
  //#endregion
16
- export { AdditionalServiceLimitExceeded, ApiEnvelopeBaseSchema, CMSError, CalendarDaySchema, CalendarResponseSchema, CoreSDKError, CurrentMemberResponseSchema, CustomAttributeCatalogSchema, CustomerUnitSummarySchema, DocumentCollectionResponseSchema, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatusSchema, DocumentStatusUpdateRequestSchema, DocumentSummarySchema, DocumentTypeSchema, ErgoAddressSchema, ErgoBankSchema, ErgoBookRequestSchema, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchPropertiesResponseSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, ServiceBeonDataSchema, ServiceImageSchema, ServiceLimitSchema, ServiceListResponseSchema, SetupDataSchema, SetupResponseSchema, TileCollectionResponseSchema, TileSchema, TileTagSchema, TravelInsuranceBookingSchema, TravelInsuranceBookingStoreRequestSchema, UnitIdsResponseSchema, UnitListItemSchema, UnitListResponseSchema, UnitOfferSchema, UnitResponseSchema, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, V1OpenApiClient, V1OpenApiClientError, V1_BASE_URL, V1_OPERATIONS, VideoListResponseSchema, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, defineDataAttributes, defineV9PropertyHighlightSources, defineV9PropertyHighlightSourcesFromUnknown, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, fetchCustomAttributeCatalog, getBankTransferDetailsEffect, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, mapSearchEffect, parseCustomAttributeCatalog, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
16
+ export { AdditionalServiceLimitExceeded, ApiEnvelopeBaseSchema, CMSError, CalendarDaySchema, CalendarResponseSchema, CoreSDKError, CurrentMemberResponseSchema, CustomAttributeCatalogSchema, CustomerUnitSummarySchema, DocumentCollectionResponseSchema, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatusSchema, DocumentStatusUpdateRequestSchema, DocumentSummarySchema, DocumentTypeSchema, ErgoAddressSchema, ErgoBankSchema, ErgoBookRequestSchema, ErgoBookingIdentityRequestSchema, ErgoBookingIdentitySchema, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, GuestQuoteSchema, HubErrorSchema, InvalidAdditionalServiceQuantity, LocaleSchema, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchPropertiesResponseSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, ServiceBeonDataSchema, ServiceImageSchema, ServiceLimitSchema, ServiceListResponseSchema, SetupDataSchema, SetupResponseSchema, TileCollectionResponseSchema, TileSchema, TileTagSchema, TravelInsuranceBookingSchema, UnitIdsResponseSchema, UnitListItemSchema, UnitListResponseSchema, UnitOfferSchema, UnitResponseSchema, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, V1OpenApiClient, V1OpenApiClientError, V1_BASE_URL, V1_OPERATIONS, VideoListResponseSchema, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, defineDataAttributes, defineV9PropertyHighlightSources, defineV9PropertyHighlightSourcesFromUnknown, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, fetchCustomAttributeCatalog, getBankTransferDetailsEffect, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, mapSearchEffect, parseCustomAttributeCatalog, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
@@ -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/3.4.0/CHANGELOG.md`: release notes for 3.4.0
8
+ - `versions/3.3.0/CHANGELOG.md`: release notes for 3.3.0
7
9
  - `versions/3.2.1/CHANGELOG.md`: release notes for 3.2.1
8
10
  - `versions/3.2.0/CHANGELOG.md`: release notes for 3.2.0
9
11
  - `versions/3.1.1/CHANGELOG.md`: release notes for 3.1.1
@@ -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/3.4.0/MIGRATION.md`: Migration: 3.3.0 to 3.4.0
8
+ - `versions/3.3.0/MIGRATION.md`: Migration: 3.2.1 to 3.3.0
7
9
  - `versions/3.2.1/MIGRATION.md`: Migration: 3.2.0 to 3.2.1
8
10
  - `versions/3.2.0/MIGRATION.md`: Migration: 3.1.1 to 3.2.0
9
11
  - `versions/3.1.1/MIGRATION.md`: Migration: 3.1.0 to 3.1.1
@@ -478,10 +478,10 @@ const insuranceBooking = await sdk.live.quote.bookInsurance({
478
478
  This is a breaking change in 2.13.0. The former public `guestToken` input is no
479
479
  longer used; see `versions/2.13.0/MIGRATION.md`.
480
480
 
481
- `v9` supports real insurance option refresh, pre-contract, payment selection, and booking. With ERGO, issued policies can be read and revoked (rejects on other accounts); revoking rejects with ERGO's reason when ERGO refuses:
481
+ `v9` supports real insurance option refresh, pre-contract, payment selection, and booking. With ERGO, the booking's active policy can be read and revoked (rejects on other accounts). Both need the booking and reject when it has no active policy with that number; revoking rejects with ERGO's reason when ERGO refuses:
482
482
 
483
483
  ```ts
484
- const policy = await sdk.live.insurance.readPolicy({ policyNumber });
484
+ const policy = await sdk.live.insurance.readPolicy({ policyNumber, booking });
485
485
  const revoked = await sdk.live.insurance.revokePolicy({ policyNumber, booking });
486
486
  ```
487
487
 
@@ -96,7 +96,7 @@ Sample item:
96
96
  }
97
97
  ```
98
98
 
99
- Optional fields include `scope`, `address`, `property`, `rooms`, `roomSummary`, `vicinity`, and `reviews`.
99
+ Optional fields include `scope`, `address`, `property`, `rooms`, `roomSummary`, `vicinity`, `reviews`, and `links`.
100
100
 
101
101
  ### Texts in another language
102
102
 
@@ -182,6 +182,46 @@ count the backend does not state, or states as 0, is omitted, never 0.
182
182
 
183
183
  Search items carry the same `capacity`.
184
184
 
185
+ ### Links and 3D tours
186
+
187
+ `links` lists the links the agency keeps on the rental, each `{ type, url, language? }`.
188
+ `type` is `THREE_D` (a 3D tour, usually Matterport), `VIDEO`, `EXPOSE`, `HP` (the rental's
189
+ own website) or `OTHER`. `language` is the language the PMS states for the link, omitted when
190
+ it states none. The field is omitted when the rental has no link. Search items do not
191
+ carry `links`; read them from `getRentals` or the rental details.
192
+
193
+ ```json
194
+ "links": [{ "type": "THREE_D", "url": "https://my.matterport.com/show/?m=ukGhLPgstJm" }]
195
+ ```
196
+
197
+ Where the agency maintains a 3D tour:
198
+
199
+ | Backend | Where in the PMS |
200
+ | ------- | --------------------------------------------------------------------------------- |
201
+ | v10 | the rental's links, type "3D-Tour" |
202
+ | v9 | the unit's feature "Matterport ID" (general): the model ID or the Matterport link |
203
+
204
+ On v9 the SDK turns the Matterport ID into a `THREE_D` link and drops a value that is neither
205
+ a model ID nor an `https` Matterport link. v9 has no other link types. When a rental has no
206
+ tour, tell the agency where to maintain it instead of building a placeholder.
207
+
208
+ To show a tour on the rental page, add a button labelled "3D-Rundgang" / "3D tour" that opens
209
+ a modal with the tour. Render the iframe only once the modal opens, so the page does not load
210
+ Matterport for every visitor:
211
+
212
+ ```html
213
+ <iframe
214
+ src="https://my.matterport.com/show/?m=ukGhLPgstJm"
215
+ title="3D-Rundgang"
216
+ allow="fullscreen; xr-spatial-tracking"
217
+ allowfullscreen
218
+ style="width: 100%; aspect-ratio: 16 / 9; border: 0"
219
+ ></iframe>
220
+ ```
221
+
222
+ Embed only URLs on `matterport.com`. Other providers often refuse to be framed: open their
223
+ `url` in a new tab (`target="_blank" rel="noopener"`).
224
+
185
225
  ### Legacy v9 Images
186
226
 
187
227
  v9 rental `images` and facility `property.images` come from vOffice's image service
@@ -538,6 +578,47 @@ A feedback with neither rating nor text is never an item. `summary.rating` and
538
578
  covers the included items. When no included item has a rating, `reviews` has
539
579
  `items` and no `summary`. A text answer to a `text` criterion counts as text.
540
580
 
581
+ ### Legacy v9 Special Offers
582
+
583
+ On v9, every item of `getRentals` and `getRentalsByIds` has `offers`: the special offers
584
+ vOffice links to the rental, without a period. Use them for an "Angebot" badge on a rental
585
+ page, an offers overview, or a campaign page. A rental without offers has `offers: []`;
586
+ that is the normal case, so hide the offer UI then instead of showing an empty state.
587
+
588
+ ```ts
589
+ type V9RentalOffer = {
590
+ id: string; // vOffice offer ID
591
+ name: string; // in the requested locale where vOffice has a translation
592
+ discount:
593
+ | { type: "percent"; percent: number } // 15 = 15 %
594
+ | { type: "amount"; amount: { amount: number; currency: string } } // minor unit, 2000 = 20,00 €
595
+ | { type: "stayPay"; stayNights: number; payNights: number }; // stay 7, pay 5
596
+ minNights?: number;
597
+ arrivalWithinDays?: number; // last minute: arrival at most this many days away
598
+ validFrom?: string; // YYYY-MM-DD, the arrival is not before this day
599
+ validUntil?: string; // YYYY-MM-DD, the departure is not after this day
600
+ };
601
+ ```
602
+
603
+ - `id` is the value the `offer` search filter takes
604
+ ([Special Offers](search.md#special-offers)), so a campaign page can link to a search
605
+ for its rentals. It is the Hub's `voffice_offer_id`. The Hub's `data(attributes: ["id"])`
606
+ is its own row ID and filters nothing, and the dates are `fromdate`/`tilldate`
607
+ (`validfrom`, `from_date` and similar spellings return `null`). Read `offers` instead of
608
+ querying the Hub.
609
+ - The SDK leaves out offers vOffice does not show to websites and offers redeemed with a
610
+ voucher code. The code never reaches the page.
611
+ - Offers come from the be-on! Hub's last import of the vOffice data, like the rest of
612
+ the rental. An offer can be linked and still apply to no stay in a given period: only a
613
+ search with dates says what it costs. Do not render "12 rentals on offer" as a property
614
+ of the campaign; it holds for one period only.
615
+ - `validFrom` and `validUntil` are the vOffice dates as stored. Hide an offer whose
616
+ `validUntil` has passed in the browser, not only at build time, since a static page can
617
+ outlive it.
618
+ - Many rentals share the same offer. For an overview page, group by `id`.
619
+
620
+ v10 rentals have no `offers`.
621
+
541
622
  ## Legacy v9 Rentals By ID
542
623
 
543
624
  `sdk.live.rentals.getRentalsByIds` loads the rentals with the given IDs, for example the
@@ -398,7 +398,8 @@ the `p_` number. Confirm the field with the user before you offer the filter.
398
398
  page about one campaign, for example an early-booking deal. It checks neither whether
399
399
  the offer is shown to websites nor whether it applies to the requested period, so a
400
400
  rental can match after its offer has ended. When the question is "which rentals have
401
- a deal right now", use `offers`. Request `--offer`.
401
+ a deal right now", use `offers`. Request `--offer`. The offer ID is the `id` of a
402
+ rental's `offers` entry ([Legacy v9 Special Offers](rentals.md#legacy-v9-special-offers)).
402
403
 
403
404
  `offers` is a `boolean` definition and `offer` an `int` definition with the offer ID:
404
405
 
@@ -0,0 +1,22 @@
1
+ # Changelog: 3.3.0
2
+
3
+ A site can show a rental's 3D tour (Matterport) from one field on v9 and v10, and v9 no longer
4
+ lists the Matterport ID as an amenity.
5
+
6
+ ## Added
7
+
8
+ - `links` on rentals and rental details: `{ type, url, language? }` per link, where `type` is
9
+ `THREE_D` (3D tour), `VIDEO`, `EXPOSE`, `HP` (the rental's own website) or `OTHER`. The field
10
+ is omitted when the rental has no link. Search items do not carry it.
11
+ - v10: the links of the rental in the PMS, as the PMS states them.
12
+ - v9: one `THREE_D` link from the unit's feature "Matterport ID". A model ID becomes
13
+ `https://my.matterport.com/show/?m=<id>`, a pasted `https` Matterport link is kept in
14
+ its normalized URL form (lowercase host, characters such as `"` percent-encoded),
15
+ any other value gives no link. v9 has no other link types.
16
+ - `rentals.md` ("Links and 3D tours"): where the agency maintains the tour on each backend and
17
+ how to show it as a "3D-Rundgang" button with a modal.
18
+
19
+ ## Changed
20
+
21
+ - v9: the Matterport ID is no longer an attribute. `attributes` no longer has the item
22
+ "Matterport ID: …" and its fact with the key `matterport`; read the tour from `links`.
@@ -0,0 +1,22 @@
1
+ # Migration: 3.2.1 to 3.3.0
2
+
3
+ No changes required.
4
+
5
+ ## 1. Upgrade
6
+
7
+ ```sh
8
+ pnpm add @v-office/website-sdk@3.3.0
9
+ ```
10
+
11
+ ## 2. Optional: drop the Matterport filter on v9
12
+
13
+ A v9 site that removes the item "Matterport ID: …" or the fact with the key `matterport` from
14
+ its amenity list can drop that filter: `attributes` no longer contains either. Nothing else in
15
+ `attributes` changes.
16
+
17
+ ## 3. Optional: show the 3D tour
18
+
19
+ Read the tour from `links` (`type === "THREE_D"`) and show it as described in `rentals.md`,
20
+ "Links and 3D tours": a "3D-Rundgang" button on the rental page that opens a modal with the
21
+ Matterport iframe. When a rental has no tour, the agency maintains it in the PMS: on v10 as a
22
+ link of type "3D-Tour", on v9 as the unit's feature "Matterport ID".
@@ -0,0 +1,39 @@
1
+ # Changelog: 3.4.0
2
+
3
+ ERGO insurance on v9 works again. The be-on! Hub now gives ERGO policies only to a guest who
4
+ proves the booking, and it refused every ERGO call of 3.3.0 and earlier, from the pre-contract
5
+ on. The SDK now sends the booking's guest token, reservation number and booking ID with every
6
+ ERGO call. A v9 site can also show a rental's special offers without a period: an "Angebot"
7
+ badge on the rental page, an offers overview or a campaign page.
8
+
9
+ ## Added
10
+
11
+ - v9: `offers` on every item of `sdk.static.rentals.getRentals` and
12
+ `sdk.live.rentals.getRentalsByIds`, `[]` when the rental has none. Each offer has `id` (the
13
+ vOffice offer ID, the value the `offer` search filter takes), `name`, `discount` (`percent`,
14
+ `amount` or `stayPay`), and when vOffice states them `minNights`, `arrivalWithinDays`,
15
+ `validFrom` and `validUntil`. Offers that vOffice does not show to websites and offers redeemed
16
+ with a voucher code are left out.
17
+ - Types `V9RentalOffer`, `V9RentalOfferDiscount`, `V9RentalGetRentalsOutput` and
18
+ `V9RentalGetRentalsOutputItem`.
19
+ - `rentals.md` ("Legacy v9 Special Offers"): the offer fields, the empty case, and what a page
20
+ must not conclude from them.
21
+
22
+ ## Changed
23
+
24
+ - `live.insurance.readPolicy` takes the booking: `readPolicy({ policyNumber, booking })`, the same
25
+ input as `revokePolicy`. It returns the booking's active policy and rejects when the booking has
26
+ no active policy or holds a different one. A revoked policy can no longer be read.
27
+ - `revokePolicy` checks that the booking's active policy has the given number before it asks ERGO
28
+ to revoke it. When it has another number or there is none, it rejects and nothing is revoked.
29
+ - ERGO errors from the Hub (booking not confirmed, no active policy, a policy already active,
30
+ vOffice unreachable) reject with the Hub's message.
31
+ - v9: `KnownVofficeOfferData` (`VofficeOfferDataFieldSchemas`) declares the fields the be-on! Hub
32
+ returns: `name`, `description`, `type`, `discountType`, `value`, `minStay`, `timeSpan`,
33
+ `voucherCode`, `fromdate`, `tilldate` and `visible4interfaces`. `discount` is gone; the Hub
34
+ never returned it. `description` is nullable.
35
+
36
+ ## Fixed
37
+
38
+ - v9 ERGO: `createInsurancePreContract`, `bookInsurance`, `readPolicy` and `revokePolicy` were
39
+ refused by the Hub (HTTP 422).
@@ -0,0 +1,44 @@
1
+ # Migration: 3.3.0 to 3.4.0
2
+
3
+ Only a v9 site that calls `live.insurance.readPolicy` has to change. Everything else works without
4
+ changes.
5
+
6
+ ## 1. Upgrade
7
+
8
+ ```sh
9
+ pnpm add @v-office/website-sdk@3.4.0
10
+ ```
11
+
12
+ ## 2. Pass the booking to `readPolicy`
13
+
14
+ ```ts
15
+ // Before
16
+ const policy = await sdk.live.insurance.readPolicy({ policyNumber });
17
+
18
+ // After
19
+ const policy = await sdk.live.insurance.readPolicy({ policyNumber, booking });
20
+ ```
21
+
22
+ `booking` is the result of `live.booking.book`, as for `revokePolicy`. `readPolicy` now returns
23
+ only the booking's active policy; after `revokePolicy` it rejects instead of returning the revoked
24
+ policy, so keep the policy that `revokePolicy` returned when the page needs to show it.
25
+
26
+ ## 3. Optional: show special offers on v9
27
+
28
+ Read a rental's `offers` and show them as described in `rentals.md`, "Legacy v9 Special Offers".
29
+ Hide the offer UI when `offers` is empty, which is the normal case.
30
+
31
+ A site that queried the be-on! Hub directly for offers (GraphQL `voffice_offers` or v1
32
+ `/Units/{id}/offers`) can switch to `offers`. The SDK already leaves out offers with a voucher
33
+ code, so the page cannot leak one.
34
+
35
+ ## 4. Only if you used `defineVofficeOfferDataAttributes`
36
+
37
+ The known attribute `discount` is gone. Use `discountType` and `value`, or read `offers`.
38
+
39
+ ## What stays the same
40
+
41
+ - v10: nothing changes.
42
+ - v9 with URV insurance: nothing changes.
43
+ - `createInsurancePreContract`, `selectInsurancePayment`, `bookInsurance` and `revokePolicy` keep
44
+ their inputs and outputs.