@v-office/website-sdk 2.5.1 → 2.8.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/README.md +28 -1
- package/dist/cli.mjs +25 -4
- package/dist/{client-C5ojrNQA.mjs → client-BNbBfJtO.mjs} +468 -189
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +3 -3
- package/dist/instructions/CHANGELOG.md +3 -0
- package/dist/instructions/MIGRATION.md +3 -0
- package/dist/instructions/README.md +8 -2
- package/dist/instructions/booking.md +39 -3
- package/dist/instructions/creation.md +65 -64
- package/dist/instructions/custom-attributes.md +556 -0
- package/dist/instructions/filter.md +51 -23
- package/dist/instructions/rentals.md +26 -2
- package/dist/instructions/search.md +29 -3
- package/dist/instructions/versions/2.5.0/MIGRATION.md +5 -0
- package/dist/instructions/versions/2.6.0/CHANGELOG.md +6 -0
- package/dist/instructions/versions/2.6.0/MIGRATION.md +6 -0
- package/dist/instructions/versions/2.7.0/CHANGELOG.md +44 -0
- package/dist/instructions/versions/2.7.0/MIGRATION.md +79 -0
- package/dist/instructions/versions/2.8.0/CHANGELOG.md +63 -0
- package/dist/instructions/versions/2.8.0/MIGRATION.md +252 -0
- package/dist/{rentals-Lw1qUKIj.mjs → rentals-cCejb_2d.mjs} +21 -21
- package/dist/{search-9yzAqHCg.mjs → search-Dzzra6IW.mjs} +16 -133
- package/dist/{to-rental-highlights-CxWlq76f.mjs → to-rental-highlights-OvNe9ZQS.mjs} +8 -6
- package/dist/translations/v10/de-DE/core.json +2 -0
- package/dist/translations/v10/en-US/core.json +2 -0
- package/instructions/CHANGELOG.md +3 -0
- package/instructions/MIGRATION.md +3 -0
- package/instructions/README.md +8 -2
- package/instructions/booking.md +39 -3
- package/instructions/creation.md +65 -64
- package/instructions/custom-attributes.md +556 -0
- package/instructions/filter.md +51 -23
- package/instructions/rentals.md +26 -2
- package/instructions/search.md +29 -3
- package/instructions/versions/2.5.0/MIGRATION.md +5 -0
- package/instructions/versions/2.6.0/CHANGELOG.md +6 -0
- package/instructions/versions/2.6.0/MIGRATION.md +6 -0
- package/instructions/versions/2.7.0/CHANGELOG.md +44 -0
- package/instructions/versions/2.7.0/MIGRATION.md +79 -0
- package/instructions/versions/2.8.0/CHANGELOG.md +63 -0
- package/instructions/versions/2.8.0/MIGRATION.md +252 -0
- package/package.json +5 -3
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, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPaymentOption, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1,
|
|
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, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPaymentOption, 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";
|
|
2
2
|
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
3
|
import { HttpClient } from "effect/unstable/http";
|
|
4
4
|
|
|
@@ -19,9 +19,9 @@ type WebsiteV10Config = V10CoreConfig & {
|
|
|
19
19
|
};
|
|
20
20
|
type WebsiteSDKConfig = WebsiteV10Config | WebsiteV9Config;
|
|
21
21
|
type WebsiteSDKOptions = {
|
|
22
|
-
readonly translationOverrides?: TranslationOverrides$1;
|
|
22
|
+
readonly translationOverrides?: TranslationOverrides$1; /** The validated registry returned by `defineCustomAttributes`. */
|
|
23
|
+
readonly customAttributes?: CustomAttributeRegistrySnapshot$1;
|
|
23
24
|
readonly customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition$1[];
|
|
24
|
-
readonly customAttributeDefinitionManifest?: CustomAttributeDefinitionManifest$1;
|
|
25
25
|
readonly rentalHighlightPrioritization?: readonly RentalHighlightPrioritizationKey$1[];
|
|
26
26
|
readonly rentalPropertyHighlightPrioritization?: readonly RentalPropertyHighlightPrioritizationKey$1[];
|
|
27
27
|
readonly rentalScope?: RentalScope;
|
|
@@ -432,6 +432,7 @@ declare const searchEffect: (input: SearchSearchInput$1) => Effect.Effect<{
|
|
|
432
432
|
readonly appliedFilters: readonly {
|
|
433
433
|
readonly key: string;
|
|
434
434
|
readonly label: string;
|
|
435
|
+
readonly value?: string;
|
|
435
436
|
}[];
|
|
436
437
|
readonly unusedFilterKeys: readonly string[];
|
|
437
438
|
readonly pageInfo: {
|
|
@@ -7180,4 +7181,4 @@ type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
|
|
|
7180
7181
|
type RentalSearchInput = SearchSearchInput$1;
|
|
7181
7182
|
type RentalSearchOutput = SearchSearchOutput$1;
|
|
7182
7183
|
//#endregion
|
|
7183
|
-
export { AdditionalServiceLimitExceeded, ApiEnvelopeBase, ApiEnvelopeBaseSchema, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBookInput, type BookingBookOutput, BookingInput, BookingOutput, type BookingPaymentOption, CMSError, CalendarDay, CalendarDaySchema, CalendarResponse, CalendarResponseSchema, ContactInput, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, CurrentMemberResponse, CurrentMemberResponseSchema, type
|
|
7184
|
+
export { AdditionalServiceLimitExceeded, ApiEnvelopeBase, ApiEnvelopeBaseSchema, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBookInput, type BookingBookOutput, BookingInput, BookingOutput, type BookingPaymentOption, CMSError, CalendarDay, CalendarDaySchema, CalendarResponse, CalendarResponseSchema, ContactInput, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, CurrentMemberResponse, CurrentMemberResponseSchema, 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, CustomerUnitSummary, CustomerUnitSummarySchema, type DataAttribute, DefineDataAttributes, DocumentCollectionResponse, DocumentCollectionResponseSchema, DocumentResource, DocumentResourceResponse, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatus, DocumentStatusSchema, DocumentStatusUpdateRequest, DocumentStatusUpdateRequestSchema, DocumentSummary, DocumentSummarySchema, DocumentType, DocumentTypeSchema, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, ErgoAddress, ErgoAddressSchema, ErgoBank, ErgoBankSchema, ErgoBookRequest, ErgoBookRequestSchema, ErgoCommonFields, ErgoCommonFieldsSchema, ErgoCreatePreContractRequest, ErgoCreatePreContractRequestSchema, ErgoPerson, ErgoPersonSchema, ErgoPlanSearchRequest, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequest, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequest, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequest, ErgoTripAndCustomerRequestSchema, FacilityListResponse, FacilityListResponseSchema, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, InitialAvailabilityInput, InitialAvailabilityOutput, 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, OnOfficeUnit, OnOfficeUnitCollectionResponse, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, PaymentSchedule, PaymentScheduleItem, PaymentScheduleItemSchema, PaymentScheduleSchema, Quote, QuoteLine, QuoteLineSchema, QuotePricesPayload, QuotePricesPayloadSchema, QuotePricesResponse, QuotePricesResponseSchema, type QuoteQuoteInput, type QuoteQuoteOutput, QuoteSchema, QuoteService, QuoteServiceSchema, RawObjectResponse, RawObjectResponseSchema, RawVofficeObject, RawVofficeObjectSchema, RegionListResponse, RegionListResponseSchema, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, RentalRentalsInput, RentalRentalsOutput, RentalSearchInput, RentalSearchOutput, type ResolvedCustomAttribute, RoomImage, RoomImageSchema, SearchPropertiesResponse, SearchPropertiesResponseSchema, 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, ServiceBeonData, ServiceBeonDataSchema, ServiceImage, ServiceImageSchema, ServiceLimit, ServiceLimitSchema, ServiceListResponse, ServiceListResponseSchema, SetupData, SetupDataSchema, SetupResponse, SetupResponseSchema, StartDateSelectedAvailabilityInput, StartDateSelectedAvailabilityOutput, type SubmittableBookingPaymentOption, Tile, TileCollectionResponse, TileCollectionResponseSchema, TileSchema, TileTag, TileTagSchema, type TranslationOverrides, TravelInsuranceBooking, TravelInsuranceBookingSchema, TravelInsuranceBookingStoreRequest, TravelInsuranceBookingStoreRequestSchema, UnitIdsResponse, UnitIdsResponseSchema, UnitListItem, UnitListItemSchema, UnitListResponse, UnitListResponseSchema, UnitOffer, UnitOfferSchema, UnitResponse, UnitResponseSchema, UnitServicePrice, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, V1DecodedResponse, V1HttpMethod, V1OpenApiClient, V1OpenApiClientError, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, V1OperationId, V1OperationRuntime, V1OperationSchema, V1SchemaDecodeError, V1_BASE_URL, V1_OPERATIONS, type V9OnlyCustomAttributeInput, type V9SearchSearchInput, type V9SearchSearchSort, VideoResponse, VideoResponseSchema, 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, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, defineDataAttributes, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, fetchCustomAttributeCatalog, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, parseCustomAttributeCatalog, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
1
|
+
import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getRentalsEffect, E as DocumentSummarySchema, Et as getInitialAvailabilityEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsurancePaymentEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, I as ErgoReadPreContractRequestSchema, It as submitContactEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitPaymentOption, M as ErgoCreatePreContractRequestSchema, Mt as searchEffect, N as ErgoPersonSchema, Nt as selectCancellationPolicyEffect, O as ErgoAddressSchema, Ot as getStartDateSelectedAvailabilityEffect, P as ErgoPlanSearchRequestSchema, Pt as selectInsuranceEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOptionEffect, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getFiltersEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, W as QuotePricesPayloadSchema, X as RegionListResponseSchema, Y as RawVofficeObjectSchema, Z as RoomImageSchema, _ as CalendarDaySchema, _t as V1_OPERATIONS, at as TileCollectionResponseSchema, b as CustomerUnitSummarySchema, bt as addAdditionalServiceEffect, c as V0OpenApiClient, ct as TravelInsuranceBookingSchema, d as makeV0OpenApiClientLive, dt as UnitListItemSchema, et as ServiceImageSchema, f as V1OpenApiClient, ft as UnitListResponseSchema, g as ApiEnvelopeBaseSchema, gt as V1_BASE_URL, h as makeV1OpenApiClientLive, ht as UnitServicePriceSchema, it as SetupResponseSchema, j as ErgoCommonFieldsSchema, jt as removeAdditionalServiceEffect, k as ErgoBankSchema, kt as getTermsAndPrivacyPolicyEffect, l as V0OpenApiClientError, lt as TravelInsuranceBookingStoreRequestSchema, m as makeV1OpenApiClientFetchLive, mt as UnitResponseSchema, nt as ServiceListResponseSchema, ot as TileSchema, p as V1OpenApiClientError, pt as UnitOfferSchema, q as QuoteServiceSchema, rt as SetupDataSchema, st as TileTagSchema, t as createWebsiteSDK, tt as ServiceLimitSchema, u as makeV0OpenApiClientFetchLive, ut as UnitIdsResponseSchema, v as CalendarResponseSchema, vt as VideoResponseSchema, w as DocumentStatusSchema, wt as createInsurancePreContractEffect, x as DocumentCollectionResponseSchema, xt as bookEffect, y as CurrentMemberResponseSchema, yt as decodeV1OperationResponse, z as OnOfficeUnitCollectionResponseSchema, zt as defineWebsiteSDKOptions } from "./client-BNbBfJtO.mjs";
|
|
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;
|
|
5
5
|
const defineDataAttributes = () => (attributes) => attributes;
|
|
@@ -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, 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, 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, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineDataAttributes, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, 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, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, 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, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, defineDataAttributes, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, fetchCustomAttributeCatalog, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, parseCustomAttributeCatalog, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
|
|
@@ -4,6 +4,9 @@ This file is the versioned changelog index for the website SDK instructions.
|
|
|
4
4
|
|
|
5
5
|
## Versions
|
|
6
6
|
|
|
7
|
+
- `versions/2.8.0/CHANGELOG.md`: `@v-office/website-sdk` 2.8.0 release notes.
|
|
8
|
+
- `versions/2.7.0/CHANGELOG.md`: `@v-office/website-sdk` 2.7.0 release notes.
|
|
9
|
+
- `versions/2.6.0/CHANGELOG.md`: compatibility note for an unreleased version label.
|
|
7
10
|
- `versions/2.5.0/CHANGELOG.md`: `@v-office/website-sdk` 2.5.0 release notes.
|
|
8
11
|
- `versions/2.4.3/CHANGELOG.md`: `@v-office/website-sdk` 2.4.3 documentation release notes.
|
|
9
12
|
- `versions/2.4.2/CHANGELOG.md`: `@v-office/website-sdk` 2.4.2 release notes.
|
|
@@ -4,6 +4,9 @@ This file is the versioned migration index for the website SDK instructions.
|
|
|
4
4
|
|
|
5
5
|
## Available Guides
|
|
6
6
|
|
|
7
|
+
- `versions/2.8.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.7.0 to 2.8.0.
|
|
8
|
+
- `versions/2.7.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.5.x to 2.7.0.
|
|
9
|
+
- `versions/2.6.0/MIGRATION.md`: compatibility note for an unreleased version label.
|
|
7
10
|
- `versions/2.5.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.4.3 to 2.5.0.
|
|
8
11
|
- `versions/2.4.3/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.4.2 to 2.4.3.
|
|
9
12
|
- `versions/2.4.2/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.4.1 to 2.4.2.
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Website SDK Instructions
|
|
2
2
|
|
|
3
|
-
These instructions describe
|
|
3
|
+
These instructions describe the current source targeted for
|
|
4
|
+
`@v-office/website-sdk` 2.8.0. Package versions remain unchanged until the release
|
|
5
|
+
workflow performs the coordinated core and website bumps.
|
|
4
6
|
|
|
5
7
|
Use this directory as the consumer-facing reference for the package:
|
|
6
8
|
|
|
7
9
|
- `creation.md`: SDK construction, config, options, and CLI config files.
|
|
8
10
|
- `rentals.md`: `sdk.static.rentals.getRentals`.
|
|
9
11
|
- `filter.md`: `sdk.static.filter.getFilters`.
|
|
12
|
+
- `custom-attributes.md`: custom attribute catalog, configuration, per-backend behaviour, and the v9-to-v10 move.
|
|
10
13
|
- `search.md`: `sdk.live.search.search`.
|
|
11
14
|
- `availability.md`: date-picker availability flows.
|
|
12
15
|
- `quote.md`: quote, additional services, cancellation policy, and insurance flows.
|
|
@@ -15,6 +18,9 @@ Use this directory as the consumer-facing reference for the package:
|
|
|
15
18
|
- `document-structured-json.md`: `sdk.static.documents.getTermsAndPrivacyPolicy` and structured document JSON rendering rules.
|
|
16
19
|
- `CHANGELOG.md`: versioned changelog index.
|
|
17
20
|
- `MIGRATION.md`: versioned migration index.
|
|
21
|
+
- `versions/2.8.0/`: 2.8.0 custom-attribute release notes and 2.7.0-to-2.8.0 migration guide.
|
|
22
|
+
- `versions/2.7.0/`: 2.7.0 release notes and 2.5.x-to-2.7.0 migration guide.
|
|
23
|
+
- `versions/2.6.0/`: compatibility pointers for the unreleased 2.6.0 version label.
|
|
18
24
|
- `versions/2.5.0/`: 2.5.0 release notes and 2.4.3-to-2.5.0 migration guide.
|
|
19
25
|
- `versions/2.4.3/`: 2.4.3 documentation release notes and migration guide.
|
|
20
26
|
- `versions/2.4.2/`: 2.4.2 release notes and 2.4.1-to-2.4.2 migration guide.
|
|
@@ -68,4 +74,4 @@ website-sdk --backend v10 search --locale de-DE --query "adults=2"
|
|
|
68
74
|
website-sdk --backend v10 search --locale de-DE --query "adults=2" --sort '{"by":"field","orderBy":{"label":"ASC"}}'
|
|
69
75
|
```
|
|
70
76
|
|
|
71
|
-
Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced in 2.0.0 and kept in 2.
|
|
77
|
+
Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced in 2.0.0 and kept in 2.8.0. v10 config additionally requires `searchEndpoint` as of 2.5.0.
|
|
@@ -100,6 +100,13 @@ Sample:
|
|
|
100
100
|
"provider": "adyen",
|
|
101
101
|
"label": "Credit card",
|
|
102
102
|
"url": "https://checkout.example.com"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "stripe_checkout",
|
|
106
|
+
"provider": "stripe",
|
|
107
|
+
"label": "Credit card",
|
|
108
|
+
"sessionId": "cs_live_a1Upmvi1v62AdILeDZl4l",
|
|
109
|
+
"accountId": "acct_1MpAB7AFrTg9gw7b"
|
|
103
110
|
}
|
|
104
111
|
]
|
|
105
112
|
}
|
|
@@ -113,13 +120,42 @@ Payment option variants:
|
|
|
113
120
|
- `bank_transfer`: display-only payment details.
|
|
114
121
|
- `redirect`: redirect the browser to the payment URL.
|
|
115
122
|
- `form_post`: submit a generated HTML form, currently used for PayPal-style flows.
|
|
116
|
-
- `stripe_checkout`:
|
|
123
|
+
- `stripe_checkout`: open Stripe Checkout. Emitted on `v9` only.
|
|
124
|
+
|
|
125
|
+
## Payment Submission
|
|
126
|
+
|
|
127
|
+
Use `sdk.live.booking.submitPaymentOption(option)` or the top-level `submitPaymentOption(option)` export for every option except `bank_transfer`, which is display-only. Submission requires a browser environment and fails outside one.
|
|
128
|
+
|
|
129
|
+
Render a button for every submittable option. Do not gate rendering on `url`: a `stripe_checkout` option is submittable as soon as it carries a `sessionId`.
|
|
130
|
+
|
|
131
|
+
Stripe Checkout is opened one of two ways:
|
|
132
|
+
|
|
133
|
+
- When the option has a `url`, the browser is redirected to it.
|
|
134
|
+
- Otherwise the SDK loads Stripe.js from `https://js.stripe.com/v3/` and opens the session with `sessionId`, passing `accountId` as the connected account. The vOffice platform publishable keys are built in, and test (`cs_test_`) and live (`cs_live_`) sessions are handled automatically, so Stripe needs no configuration.
|
|
135
|
+
|
|
136
|
+
Stripe.js is fetched on first use and reused afterwards, and an existing `window.Stripe` instance is reused when the page already provides one. A failed load is retried by the next submission instead of being remembered, so a guest can retry a Stripe payment without reloading the page. Sites with a Content-Security-Policy must allow `script-src https://js.stripe.com` and `frame-src https://js.stripe.com https://hooks.stripe.com`.
|
|
137
|
+
|
|
138
|
+
Booking creation and payment are separate steps. When a payment option is on screen the reservation already exists, so present a submission failure as an unpaid booking rather than a failed booking:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
try {
|
|
142
|
+
await sdk.live.booking.submitPaymentOption(option);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
showPaymentFailure({ bookingNumber: booking.bookingNumber, error });
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Payment Return
|
|
149
|
+
|
|
150
|
+
Online payment providers return the guest to a URL derived from `relativeRedirectUrl`. Stripe returns to that path with `payment=stripe&success=true` after payment and `payment=stripe&cancel=true` after cancellation, so the path must exist in your site and should read those query parameters.
|
|
151
|
+
|
|
152
|
+
`relativeRedirectUrl` is supplied before the reservation exists, so the return URL cannot carry the booking number or guest token. Persist whatever the return page needs, for example in `sessionStorage`, before submitting a payment option.
|
|
117
153
|
|
|
118
|
-
|
|
154
|
+
A successful return means the provider sent the browser back, not that the payment has settled. Confirmation reaches vOffice through the provider's webhook.
|
|
119
155
|
|
|
120
156
|
## Configuration
|
|
121
157
|
|
|
122
|
-
Booking requests are rate-limited to one backend request per second with a queue size of five. `v9` books through the v0 `book` action and
|
|
158
|
+
Booking requests are rate-limited to one backend request per second with a queue size of five. `v9` books through the v0 `book` action and initializes one Stripe Checkout Session per payment schedule option when the property has Stripe enabled. `v10` books through GraphQL and initializes Adyen redirect payment options.
|
|
123
159
|
|
|
124
160
|
## CLI Usage
|
|
125
161
|
|
|
@@ -81,6 +81,7 @@ const options = defineWebsiteSDKOptions({
|
|
|
81
81
|
},
|
|
82
82
|
rentalHighlightPrioritization: ["bedrooms", "bathrooms", "maxPersons", "wifi"],
|
|
83
83
|
rentalPropertyHighlightPrioritization: ["wifi", "parking"],
|
|
84
|
+
customAttributes,
|
|
84
85
|
customAttributeFilterDefinitions: [],
|
|
85
86
|
translationOverrides: {},
|
|
86
87
|
});
|
|
@@ -91,8 +92,8 @@ const options = defineWebsiteSDKOptions({
|
|
|
91
92
|
```ts
|
|
92
93
|
type WebsiteSDKOptions = {
|
|
93
94
|
translationOverrides?: TranslationOverrides;
|
|
95
|
+
customAttributes?: CustomAttributeRegistrySnapshot;
|
|
94
96
|
customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition[];
|
|
95
|
-
customAttributeDefinitionManifest?: CustomAttributeDefinitionManifest;
|
|
96
97
|
rentalHighlightPrioritization?: readonly RentalHighlightPrioritizationKey[];
|
|
97
98
|
rentalPropertyHighlightPrioritization?: readonly RentalPropertyHighlightPrioritizationKey[];
|
|
98
99
|
rentalScope?: RentalScope;
|
|
@@ -102,8 +103,8 @@ type WebsiteSDKOptions = {
|
|
|
102
103
|
|
|
103
104
|
Unset options are normalized by the SDK:
|
|
104
105
|
|
|
106
|
+
- `customAttributes` defaults to an empty registry.
|
|
105
107
|
- `customAttributeFilterDefinitions` defaults to `[]`.
|
|
106
|
-
- `customAttributeDefinitionManifest` is omitted unless provided; an absent manifest is treated as empty.
|
|
107
108
|
- `rentalHighlightPrioritization` defaults to the SDK default rental highlight order.
|
|
108
109
|
- `rentalPropertyHighlightPrioritization` defaults to the SDK default property highlight order.
|
|
109
110
|
- `rentalScope` defaults to `{}`.
|
|
@@ -130,31 +131,45 @@ const options = defineWebsiteSDKOptions({
|
|
|
130
131
|
|
|
131
132
|
The scope is always applied internally and is not returned by `static.filter.getFilters(...)`. Use it for website-level or tenant-level constraints.
|
|
132
133
|
|
|
133
|
-
## Custom
|
|
134
|
+
## Custom Attributes
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
Custom attributes are configured through `customAttributes`, built by
|
|
137
|
+
`defineCustomAttributes` from the workspace catalog plus your product policy:
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
const customAttributes = defineCustomAttributes({
|
|
141
|
+
catalog,
|
|
142
|
+
select: {
|
|
143
|
+
region: {
|
|
144
|
+
label: { "de-DE": "Region", "en-US": "Region" },
|
|
145
|
+
filter: true,
|
|
146
|
+
optionLabels: {
|
|
147
|
+
north: { "de-DE": "Nord", "en-US": "North" },
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const options = defineWebsiteSDKOptions({ customAttributes });
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
See `custom-attributes.md` for the catalog, the selection shape, per-backend
|
|
157
|
+
behaviour, and the v9-to-v10 move.
|
|
158
|
+
|
|
159
|
+
## Backend Filters and Composed Filters
|
|
160
|
+
|
|
161
|
+
`customAttributeFilterDefinitions` holds the two filter concepts that are _not_
|
|
162
|
+
custom attributes:
|
|
136
163
|
|
|
137
164
|
```ts
|
|
138
165
|
const options = defineWebsiteSDKOptions({
|
|
139
166
|
customAttributeFilterDefinitions: [
|
|
140
167
|
{
|
|
141
|
-
key: "
|
|
142
|
-
source: "
|
|
143
|
-
category: "
|
|
144
|
-
label: {
|
|
145
|
-
|
|
146
|
-
"en-US": "Region",
|
|
147
|
-
},
|
|
148
|
-
type: "option",
|
|
149
|
-
options: [
|
|
150
|
-
{
|
|
151
|
-
value: "north",
|
|
152
|
-
label: {
|
|
153
|
-
"de-DE": "Nord",
|
|
154
|
-
"en-US": "North",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
],
|
|
168
|
+
key: "atLeastTwoBedrooms",
|
|
169
|
+
source: "backendFilter",
|
|
170
|
+
category: "LIVING_SLEEPING",
|
|
171
|
+
label: { "de-DE": "Mind. zwei Schlafzimmer", "en-US": "At least two bedrooms" },
|
|
172
|
+
type: "boolean",
|
|
158
173
|
searchable: true,
|
|
159
174
|
internal: false,
|
|
160
175
|
},
|
|
@@ -165,59 +180,27 @@ const options = defineWebsiteSDKOptions({
|
|
|
165
180
|
Supported filter types:
|
|
166
181
|
|
|
167
182
|
- `boolean`: accepts enabled query values such as `?key`, `?key=true`, or `?key=1`.
|
|
168
|
-
- `int`: accepts integer query values
|
|
183
|
+
- `int`: accepts integer query values. The definition includes a `numericBounds`
|
|
184
|
+
object; omit its `min` and `max` fields when the UI needs no bounds.
|
|
169
185
|
- `option`: accepts one of the configured `options` values and exposes those options through `getFilters`.
|
|
170
186
|
- `string`: accepts any non-empty query value as an exact raw value.
|
|
171
187
|
- `complex`: composition-only type that expands one boolean query-string filter into other configured filters.
|
|
172
188
|
|
|
173
189
|
Supported sources:
|
|
174
190
|
|
|
175
|
-
- `
|
|
176
|
-
- `
|
|
177
|
-
|
|
191
|
+
- `backendFilter`: backed by backend-defined search filter keys, mainly for v9 hub filters. Advertised and executed by v9 only.
|
|
192
|
+
- `composition`: expands one boolean query-string filter into other configured
|
|
193
|
+
filters. It is advertised only when every configured leaf can execute on the
|
|
194
|
+
active backend, and no generated leaf is committed unless all leaves are valid.
|
|
195
|
+
Nested compositions are rejected while recursive expansion is unsupported.
|
|
178
196
|
|
|
179
|
-
|
|
197
|
+
Exposure:
|
|
180
198
|
|
|
181
199
|
- `internal: false` exposes searchable filters through `static.filter.getFilters(...)`.
|
|
182
200
|
- `internal: true` keeps filters usable by search and compositions but hides them from `getFilters`.
|
|
183
|
-
- `searchable: false` keeps custom attributes as display metadata only.
|
|
184
201
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
The v10 REST search backend filters and returns custom attributes by definition ID, while SDK configuration and query strings use keys. Because definition IDs are workspace/environment specific, use `customAttributeDefinitionManifest` to give the SDK a key-to-ID and ID-to-key mapping:
|
|
188
|
-
|
|
189
|
-
```ts
|
|
190
|
-
const options = defineWebsiteSDKOptions({
|
|
191
|
-
customAttributeDefinitionManifest: {
|
|
192
|
-
byKey: {
|
|
193
|
-
region: { id: "def-1", key: "region", type: "OPTION", visibility: "PUBLIC" },
|
|
194
|
-
},
|
|
195
|
-
byId: {
|
|
196
|
-
"def-1": { id: "def-1", key: "region", type: "OPTION", visibility: "PUBLIC" },
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
});
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
```ts
|
|
203
|
-
type CustomAttributeDefinitionManifestEntry = {
|
|
204
|
-
id: string;
|
|
205
|
-
key: string;
|
|
206
|
-
type: "BOOLEAN" | "INT" | "STRING" | "OPTION";
|
|
207
|
-
visibility: "PUBLIC" | string | null;
|
|
208
|
-
options?: readonly { value: string; label?: Record<string, string> }[];
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
type CustomAttributeDefinitionManifest = {
|
|
212
|
-
byKey: Record<string, CustomAttributeDefinitionManifestEntry>;
|
|
213
|
-
byId: Record<string, CustomAttributeDefinitionManifestEntry>;
|
|
214
|
-
};
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
- Generate the manifest at build time from your definitions source, and pass a separate manifest per workspace/environment because IDs are not portable.
|
|
218
|
-
- Custom-attribute keys that have no manifest entry are left in `unusedFilterKeys` instead of being applied as filters.
|
|
219
|
-
- Only definitions with `visibility` of `PUBLIC` (or `null`) are surfaced as v10 search highlights; others are ignored.
|
|
220
|
-
- The manifest is only used by v10 search. v9 and the non-search v10 endpoints ignore it.
|
|
202
|
+
`internal` is a UI-visibility choice, not a security boundary — an internal filter is
|
|
203
|
+
still parseable from a query string. See `custom-attributes.md`.
|
|
221
204
|
|
|
222
205
|
## Translation Overrides
|
|
223
206
|
|
|
@@ -262,8 +245,26 @@ Example `website-sdk-options.json`:
|
|
|
262
245
|
"rentalScope": {
|
|
263
246
|
"propertyId": "property-1"
|
|
264
247
|
},
|
|
265
|
-
"
|
|
248
|
+
"customAttributes": {
|
|
249
|
+
"catalog": {
|
|
250
|
+
"privateSauna": {
|
|
251
|
+
"id": "GQYKYgMVh28X7VLGursbkt",
|
|
252
|
+
"type": "BOOLEAN"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"select": {
|
|
256
|
+
"privateSauna": {
|
|
257
|
+
"label": { "de-DE": "Sauna", "en-US": "Sauna" },
|
|
258
|
+
"filter": true
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"rentalHighlightPrioritization": ["bedrooms", "privateSauna", "wifi"],
|
|
266
263
|
"customAttributeFilterDefinitions": [],
|
|
267
264
|
"translationOverrides": {}
|
|
268
265
|
}
|
|
269
266
|
```
|
|
267
|
+
|
|
268
|
+
CLI options carry the custom-attribute **catalog and selection inputs**, not a
|
|
269
|
+
pre-built registry. The CLI validates and joins them before creating the SDK. See
|
|
270
|
+
`custom-attributes.md` for the complete shape and key-collision rules.
|