@v-office/website-sdk 2.24.1 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +89 -2
- package/dist/{client-DC4LG3CP.mjs → client--T_tQSjV.mjs} +237 -70
- package/dist/index.d.mts +22 -5
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/README.md +1 -1
- package/dist/instructions/creation.md +5 -0
- package/dist/instructions/rentals.md +75 -0
- package/dist/instructions/search.md +48 -3
- package/dist/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/dist/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/dist/instructions/versions/2.26.0/CHANGELOG.md +33 -0
- package/dist/instructions/versions/2.26.0/MIGRATION.md +31 -0
- package/dist/{to-rental-highlights-C1NF2uuE.mjs → operations-DwURbo0b.mjs} +1 -626
- package/dist/{rentals-eqFhtCdT.mjs → rentals-D4wmqjzL.mjs} +96 -33
- package/dist/{search-CKL-8T8q.mjs → search-DtBtzIGf.mjs} +5 -4
- package/dist/to-rental-highlights-BL5m3Uen.mjs +626 -0
- package/dist/translations/v9/de-DE/core.json +3 -1
- package/dist/translations/v9/en-US/core.json +3 -1
- package/dist/{v9-data-BnYxa2Ek.mjs → v9-data-C3SWtDGs.mjs} +7 -5
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/README.md +1 -1
- package/instructions/creation.md +5 -0
- package/instructions/rentals.md +75 -0
- package/instructions/search.md +48 -3
- package/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/instructions/versions/2.25.0/release.json +3 -0
- package/instructions/versions/2.26.0/CHANGELOG.md +33 -0
- package/instructions/versions/2.26.0/MIGRATION.md +31 -0
- package/instructions/versions/2.26.0/release.json +3 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, LocaleSchema, QuoteAddAdditionalServiceInput, QuoteAddAdditionalServiceOutput, QuoteBookInsuranceInput, QuoteBookInsuranceOutput, QuoteClearAdditionalServicesInput, QuoteClearAdditionalServicesOutput, QuoteCreateInsurancePreContractInput, QuoteCreateInsurancePreContractOutput, QuoteQuoteInput, QuoteQuoteInput as QuoteQuoteInput$1, QuoteQuoteOutput, QuoteQuoteOutput as QuoteQuoteOutput$1, QuoteRemoveAdditionalServiceInput, QuoteRemoveAdditionalServiceOutput, QuoteSelectCancellationPolicyInput, QuoteSelectCancellationPolicyOutput, QuoteSelectInsuranceInput, QuoteSelectInsuranceOutput, QuoteSelectInsurancePaymentInput, QuoteSelectInsurancePaymentOutput, QuoteService as QuoteService$1, RentalGetRentalsInput, RentalGetRentalsInput as RentalGetRentalsInput$1, RentalGetRentalsOutput, RentalGetRentalsOutput as RentalGetRentalsOutput$1, RentalHighlightPrioritizationKey, RentalHighlightPrioritizationKey as RentalHighlightPrioritizationKey$1, RentalPropertyHighlightPrioritizationKey, RentalPropertyHighlightPrioritizationKey as RentalPropertyHighlightPrioritizationKey$1, RentalScope, RentalService, ResolvedCustomAttribute, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchAllRentalsAtOnceInput, SearchAllRentalsAtOnceInput as SearchAllRentalsAtOnceInput$1, SearchMapSearchInput, SearchMapSearchInput as SearchMapSearchInput$1, SearchMapSearchInputSchema, SearchMapSearchOutput, SearchMapSearchOutput as SearchMapSearchOutput$1, SearchMapSearchOutputItem, SearchMapSearchOutputSchema, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
1
|
+
import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, Locale as Locale$1, 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, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchAllRentalsAtOnceInput, SearchAllRentalsAtOnceInput as SearchAllRentalsAtOnceInput$1, SearchMapSearchInput, SearchMapSearchInput as SearchMapSearchInput$1, SearchMapSearchInputSchema, SearchMapSearchOutput, SearchMapSearchOutput as SearchMapSearchOutput$1, SearchMapSearchOutputItem, SearchMapSearchOutputSchema, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
2
2
|
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
3
|
import { HttpClient } from "effect/unstable/http";
|
|
4
4
|
//#region src/legacy-v9/property-highlight-sources.d.ts
|
|
@@ -18,6 +18,20 @@ type V9PropertyHighlightSourceRegistry<Key extends string = string> = {
|
|
|
18
18
|
export declare const defineV9PropertyHighlightSources: <const Sources extends V9PropertyHighlightSourcesInput>(sources: Sources) => V9PropertyHighlightSourceRegistry<keyof Sources & string>;
|
|
19
19
|
export declare const defineV9PropertyHighlightSourcesFromUnknown: (input: unknown) => V9PropertyHighlightSourceRegistry;
|
|
20
20
|
//#endregion
|
|
21
|
+
//#region src/legacy-v9/review-options.d.ts
|
|
22
|
+
type V9ReviewCriterionDataAttribute = `fb_${number}`;
|
|
23
|
+
type V9ReviewCriterion = {
|
|
24
|
+
readonly v9: V9ReviewCriterionDataAttribute;
|
|
25
|
+
readonly type: "stars" | "text";
|
|
26
|
+
readonly label: Readonly<Record<Locale$1, string>>;
|
|
27
|
+
};
|
|
28
|
+
type V9ReviewsOptions = {
|
|
29
|
+
readonly criteria?: readonly V9ReviewCriterion[];
|
|
30
|
+
readonly showAuthorCity?: boolean;
|
|
31
|
+
readonly includeItemsWithoutText?: boolean;
|
|
32
|
+
readonly includeItemsWithoutRating?: boolean;
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
21
35
|
//#region src/legacy-v9/config.d.ts
|
|
22
36
|
type WebsiteV9Config = {
|
|
23
37
|
readonly backend: "v9";
|
|
@@ -42,6 +56,7 @@ type WebsiteSDKOptions = {
|
|
|
42
56
|
readonly customAttributes?: CustomAttributeRegistrySnapshot$1;
|
|
43
57
|
/** Validated v9 p_* line-list sources returned by `defineV9PropertyHighlightSources`. */
|
|
44
58
|
readonly v9PropertyHighlightSources?: V9PropertyHighlightSourceRegistry;
|
|
59
|
+
readonly v9Reviews?: V9ReviewsOptions;
|
|
45
60
|
readonly customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition$1[];
|
|
46
61
|
/**
|
|
47
62
|
* Selects and orders rental highlights. This is an ordered allowlist, not a sort
|
|
@@ -82,6 +97,10 @@ type V9SearchSearchInput = Omit<SearchSearchInput$1, "rentalIdsIn" | "voucher" |
|
|
|
82
97
|
readonly voucher?: never;
|
|
83
98
|
readonly sort?: V9SearchSearchSort;
|
|
84
99
|
};
|
|
100
|
+
type V9SearchPagesInput = Omit<V9SearchSearchInput, "cursor" | "limit"> & {
|
|
101
|
+
readonly cursor?: never;
|
|
102
|
+
readonly limit?: never;
|
|
103
|
+
};
|
|
85
104
|
/** `search` input with `searchAllRentalsAtOnce: true`: one call returns every result, so there are no pages. */
|
|
86
105
|
type V9SearchAllRentalsAtOnceInput = Omit<V9SearchSearchInput, "cursor" | "limit"> & {
|
|
87
106
|
readonly cursor?: never;
|
|
@@ -164,6 +183,7 @@ type WebsiteSDKV9Live = Omit<WebsiteSDKSharedLive, "search"> & {
|
|
|
164
183
|
readonly search: {
|
|
165
184
|
readonly search: (input: V9SearchSearchInput) => Promise<V9SearchSearchOutput>;
|
|
166
185
|
readonly mapSearch: WebsiteSDKSharedLive["search"]["mapSearch"];
|
|
186
|
+
readonly searchPages: (input: V9SearchPagesInput) => AsyncIterable<V9SearchSearchOutput>;
|
|
167
187
|
};
|
|
168
188
|
};
|
|
169
189
|
/** `live` of a v9 SDK created with `searchAllRentalsAtOnce: true`. */
|
|
@@ -7529,9 +7549,6 @@ declare const VofficeFeedbackDataFieldSchemas: {
|
|
|
7529
7549
|
readonly surname: Schema.NullOr<Schema.String>;
|
|
7530
7550
|
readonly city: Schema.NullOr<Schema.String>;
|
|
7531
7551
|
readonly text: Schema.NullOr<Schema.String>;
|
|
7532
|
-
readonly fb_1429: Schema.Number;
|
|
7533
|
-
readonly fb_4905: Schema.Number;
|
|
7534
|
-
readonly fb_4906: Schema.Number;
|
|
7535
7552
|
readonly avgRating: Schema.Number;
|
|
7536
7553
|
};
|
|
7537
7554
|
type KnownVofficeFeedbackData = KnownJsonData<typeof VofficeFeedbackDataFieldSchemas>;
|
|
@@ -7600,4 +7617,4 @@ export type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
|
|
|
7600
7617
|
export type RentalSearchInput = SearchSearchInput$1;
|
|
7601
7618
|
export type RentalSearchOutput = SearchSearchOutput$1;
|
|
7602
7619
|
//#endregion
|
|
7603
|
-
export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9SearchAllRentalsAtOnceInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
|
|
7620
|
+
export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9ReviewCriterion, type V9ReviewCriterionDataAttribute, type V9ReviewsOptions, type V9SearchAllRentalsAtOnceInput, type V9SearchPagesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
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--T_tQSjV.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,8 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.26.0/CHANGELOG.md`: release notes for 2.26.0
|
|
8
|
+
- `versions/2.25.0/CHANGELOG.md`: release notes for 2.25.0
|
|
7
9
|
- `versions/2.24.1/CHANGELOG.md`: release notes for 2.24.1
|
|
8
10
|
- `versions/2.24.0/CHANGELOG.md`: release notes for 2.24.0
|
|
9
11
|
- `versions/2.23.0/CHANGELOG.md`: release notes for 2.23.0
|
|
@@ -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/2.26.0/MIGRATION.md`: Migration: 2.25.0 to 2.26.0
|
|
8
|
+
- `versions/2.25.0/MIGRATION.md`: Migration: 2.24.1 to 2.25.0
|
|
7
9
|
- `versions/2.24.1/MIGRATION.md`: Migration: 2.24.0 to 2.24.1
|
|
8
10
|
- `versions/2.24.0/MIGRATION.md`: Migration: 2.23.0 to 2.24.0
|
|
9
11
|
- `versions/2.23.0/MIGRATION.md`: Migration: 2.22.0 to 2.23.0
|
|
@@ -10,7 +10,7 @@ Use this directory as the consumer-facing reference for the package:
|
|
|
10
10
|
- `rentals.md`: `sdk.static.rentals.getRentals`.
|
|
11
11
|
- `filter.md`: `sdk.static.filter.getFilters`.
|
|
12
12
|
- `custom-attributes.md`: custom attribute catalog, configuration, per-backend behaviour, and the v9-to-v10 move.
|
|
13
|
-
- `search.md`: `sdk.live.search.search`.
|
|
13
|
+
- `search.md`: `sdk.live.search.search` and, on v9, `sdk.live.search.searchPages`.
|
|
14
14
|
- `availability.md`: date-picker availability flows.
|
|
15
15
|
- `quote.md`: quote booking-card modifiers, additional services, cancellation policy, and insurance flows.
|
|
16
16
|
- `booking.md`: booking, payment option submission, and
|
|
@@ -105,6 +105,7 @@ type WebsiteSDKOptions = {
|
|
|
105
105
|
translationOverrides?: TranslationOverrides;
|
|
106
106
|
customAttributes?: CustomAttributeRegistrySnapshot;
|
|
107
107
|
v9PropertyHighlightSources?: V9PropertyHighlightSourceRegistry;
|
|
108
|
+
v9Reviews?: V9ReviewsOptions;
|
|
108
109
|
customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition[];
|
|
109
110
|
rentalHighlightPrioritization?: readonly RentalHighlightPrioritizationKey[];
|
|
110
111
|
rentalPropertyHighlightPrioritization?: readonly RentalPropertyHighlightPrioritizationKey[];
|
|
@@ -114,6 +115,10 @@ type WebsiteSDKOptions = {
|
|
|
114
115
|
};
|
|
115
116
|
```
|
|
116
117
|
|
|
118
|
+
`v9Reviews` configures v9 review criteria, whether a v9 review's author shows the
|
|
119
|
+
guest's city, and which incomplete v9 feedbacks become review items. v10 does not use it, but an invalid value fails SDK creation on
|
|
120
|
+
both backends. See "Legacy v9 Reviews" in `rentals.md`.
|
|
121
|
+
|
|
117
122
|
`searchAllRentalsAtOnce` selects how a site searches, on v9 and v10 alike: every
|
|
118
123
|
result with prices in one call (portfolios of up to 100 rentals), or paged results
|
|
119
124
|
plus `mapSearch`. See `search.md`.
|
|
@@ -344,6 +344,81 @@ For v10, public answers with the same form-response ID are combined into one rev
|
|
|
344
344
|
|
|
345
345
|
`createdAt` is the form response's creation timestamp, not a travel date. A text-only rental can have `reviews.items` without `reviews.summary`, so check the summary independently. The localized `summary.count` describes form responses with valid ratings and does not necessarily equal `items.length`.
|
|
346
346
|
|
|
347
|
+
### Legacy v9 Reviews
|
|
348
|
+
|
|
349
|
+
v9 feedbacks carry an overall `avgRating`, a free `text`, and one field per
|
|
350
|
+
review criterion, `fb_<id>`. The criteria are tenant specific: every agency
|
|
351
|
+
defines its own in vOffice, so their IDs, number and labels differ per site, and
|
|
352
|
+
vOffice provides no labels. Configure them per site with `v9Reviews`:
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
const options = {
|
|
356
|
+
v9Reviews: {
|
|
357
|
+
criteria: [
|
|
358
|
+
{ v9: "fb_8748", type: "stars", label: { "de-DE": "Sauberkeit", "en-US": "Cleanliness" } },
|
|
359
|
+
{ v9: "fb_8749", type: "stars", label: { "de-DE": "Lage", "en-US": "Location" } },
|
|
360
|
+
{ v9: "fb_9415", type: "text", label: { "de-DE": "Anmerkung", "en-US": "Note" } },
|
|
361
|
+
],
|
|
362
|
+
showAuthorCity: false,
|
|
363
|
+
includeItemsWithoutText: false,
|
|
364
|
+
includeItemsWithoutRating: false,
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
- A `stars` criterion becomes an entry of `reviews.summary.categories`, in the
|
|
370
|
+
configured order, with the `label` of the requested locale and the mean of its
|
|
371
|
+
ratings from 1 to 5 (`0` means not rated and does not count). A criterion that
|
|
372
|
+
no included feedback of a rental rated is left out, so a rental shows only the
|
|
373
|
+
criteria it has.
|
|
374
|
+
- A `text` criterion is appended to the review item's `text`: the feedback text
|
|
375
|
+
first, then each answered text criterion as its label and the answer on the
|
|
376
|
+
next line, separated by blank lines.
|
|
377
|
+
- Without `criteria`, `summary.categories` stays empty.
|
|
378
|
+
|
|
379
|
+
Every criterion needs a non-empty label for `de-DE` and `en-US`, a positive
|
|
380
|
+
`fb_<id>`, and a `type` of `stars` or `text`. Invalid options fail SDK creation
|
|
381
|
+
with every issue listed.
|
|
382
|
+
|
|
383
|
+
Review criteria are optional. Without them the site keeps the overall rating,
|
|
384
|
+
the review count and the review items. When you work on reviews for a v9 site,
|
|
385
|
+
offer the criteria to the site owner as an option. Do not ask for them as a
|
|
386
|
+
required step, and do not block other work on the answer. If the owner wants
|
|
387
|
+
them, ask which criteria to show and what they are called. To find the IDs, run
|
|
388
|
+
the CLI against the site's v9 config:
|
|
389
|
+
|
|
390
|
+
```sh
|
|
391
|
+
website-sdk --backend v9 review-criteria
|
|
392
|
+
website-sdk --backend v9 review-criteria --rental-ids 212350,212351
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
It reads the `fb_<id>` fields vOffice returns for the five units with the most
|
|
396
|
+
feedbacks, or for the listed units, and prints each ID with its type and the
|
|
397
|
+
units that have it. vOffice returns averages there only for `stars` criteria, so
|
|
398
|
+
a `text` criterion usually does not appear and its ID must come from the site
|
|
399
|
+
owner. Units vOffice cannot load are listed under `skippedRentalIds`.
|
|
400
|
+
|
|
401
|
+
A v9 review item's `author` is the guest's forename only. The SDK does not
|
|
402
|
+
request the surname. Without a forename the author is `reviews.item.guest`
|
|
403
|
+
("Gast", "Guest"). With `showAuthorCity: true` the guest's city follows, through
|
|
404
|
+
`reviews.item.authorWithCity` ("Anna aus Hamburg", "Guest from Hamburg"); a
|
|
405
|
+
feedback without a city keeps the name alone. Both keys can be changed with
|
|
406
|
+
`translationOverrides`.
|
|
407
|
+
|
|
408
|
+
By default a v9 feedback becomes a review item only when it has an `avgRating`
|
|
409
|
+
of at least 1 and text. The two switches include feedbacks that miss one of
|
|
410
|
+
these:
|
|
411
|
+
|
|
412
|
+
| Switch | When `true` |
|
|
413
|
+
| --------------------------- | ------------------------------------------------------------------------ |
|
|
414
|
+
| `includeItemsWithoutText` | a rated feedback without text becomes an item with `rating` only |
|
|
415
|
+
| `includeItemsWithoutRating` | a feedback with text but no `avgRating` becomes an item with `text` only |
|
|
416
|
+
|
|
417
|
+
A feedback with neither rating nor text is never an item. `summary.rating` and
|
|
418
|
+
`summary.count` cover the included items with a rating, and `summary.categories`
|
|
419
|
+
covers the included items. When no included item has a rating, `reviews` has
|
|
420
|
+
`items` and no `summary`. A text answer to a `text` criterion counts as text.
|
|
421
|
+
|
|
347
422
|
## Configuration
|
|
348
423
|
|
|
349
424
|
`v9` config:
|
|
@@ -207,7 +207,49 @@ Use `rentalIdsIn` to restrict results to specific rental IDs. This option is cur
|
|
|
207
207
|
Use `voucher` to price v10 search results with a voucher code. This option is currently supported by `v10` only.
|
|
208
208
|
For v10, `pets` is a mapped BooleanFilter exposed by `getFilters` and maps to one pet; use `petsCount` for an exact count and do not send both keys in one query.
|
|
209
209
|
|
|
210
|
-
`limit` defaults to `20`. Treat `cursor` as opaque and pass back `pageInfo.nextCursor` unchanged
|
|
210
|
+
`limit` defaults to `20`. Treat `cursor` as opaque and pass back `pageInfo.nextCursor` unchanged,
|
|
211
|
+
with the same `limit` as the call that returned it: the cursor points into pages of that size.
|
|
212
|
+
|
|
213
|
+
### v9: at most 128 priced results per request
|
|
214
|
+
|
|
215
|
+
The v9 hub prices at most the first 128 results of one request. It answers a larger
|
|
216
|
+
`limit` without an error, but every result past position 128 comes back without
|
|
217
|
+
`formattedTotal` and without `discount`. The SDK handles this for you:
|
|
218
|
+
|
|
219
|
+
- `limit` up to 128: one request, as before.
|
|
220
|
+
- `limit` above 128: the SDK splits the call into hub requests of 128 each, up to
|
|
221
|
+
eight of them in parallel. The promise resolves once every request has answered,
|
|
222
|
+
with all results merged and priced. `search({ limit: 1500 })` is one unpriced
|
|
223
|
+
count request plus up to 13 priced requests of 128 (12 for the first page; later
|
|
224
|
+
pages start mid-way into a hub page) and returns up to 1,500 priced results. If a
|
|
225
|
+
booking shifts the results while the requests run, the SDK fetches the call once
|
|
226
|
+
more. `pageInfo` and `nextCursor` behave as for any other `limit`. For the search
|
|
227
|
+
rate limit the whole call counts as one request.
|
|
228
|
+
|
|
229
|
+
To show the first results while the rest still loads, use `searchPages` (v9 only). It
|
|
230
|
+
yields the search page by page, 128 priced results per page, and ends after the last
|
|
231
|
+
page:
|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
for await (const page of sdk.live.search.searchPages({ locale: "de-DE", query })) {
|
|
235
|
+
renderCards(page.items, page.alternatives);
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
- An SDK whose config can be v9 or v10 has `searchPages` only after
|
|
240
|
+
`if (sdk.backend === "v9")`.
|
|
241
|
+
- The input is the `search` input without `cursor` and `limit`; the SDK pages itself.
|
|
242
|
+
- Every page is one `search` call and counts as one request for the rate limit, so
|
|
243
|
+
the SDK starts at most one page per second.
|
|
244
|
+
- A rental appears on one page only, even when a booking moves it between two pages.
|
|
245
|
+
- Each page carries its own `pageInfo`; `pageInfo.totalCount` is the total over all
|
|
246
|
+
pages.
|
|
247
|
+
- Not available with `searchAllRentalsAtOnce: true`; the loop then rejects with a
|
|
248
|
+
`CoreSDKError` whose `operation` is `search.searchPages`.
|
|
249
|
+
|
|
250
|
+
Use `search` with a large `limit` when the page needs every result before it renders
|
|
251
|
+
(a sorted list, a map with prices). Use `searchPages` when the first cards should
|
|
252
|
+
appear before the last page is priced.
|
|
211
253
|
|
|
212
254
|
## Sorting
|
|
213
255
|
|
|
@@ -486,7 +528,8 @@ if (map.totalCount <= SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS) {
|
|
|
486
528
|
}
|
|
487
529
|
```
|
|
488
530
|
|
|
489
|
-
In this mode a `search` call is one backend request, whatever its `limit
|
|
531
|
+
In this mode a `search` call is one backend request, whatever its `limit`, except on
|
|
532
|
+
v9 above a `limit` of 128 (see [v9: at most 128 priced results per request](#v9-at-most-128-priced-results-per-request)).
|
|
490
533
|
|
|
491
534
|
### How each backend does it
|
|
492
535
|
|
|
@@ -497,7 +540,9 @@ In this mode a `search` call is one backend request, whatever its `limit`.
|
|
|
497
540
|
requested. When a booking between the requests moves rentals across page
|
|
498
541
|
boundaries, the pages disagree with the count; the SDK then asks for all results in
|
|
499
542
|
one request, a consistent snapshot, instead of returning a set with a gap. `mapSearch` selects no prices and loads up to 1,000 matches per request,
|
|
500
|
-
as many requests as the matches need.
|
|
543
|
+
as many requests as the matches need. A paged `search` above a `limit` of 128 counts
|
|
544
|
+
the matches without prices first, then fetches the window as requests of 128, at
|
|
545
|
+
most eight at a time.
|
|
501
546
|
- v10 answers the whole result set in one request. `searchAllRentalsAtOnce` asks for
|
|
502
547
|
101 results and refuses the search when the response total is above 100.
|
|
503
548
|
`mapSearch` is one request without prices that returns only the location, for up
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog: 2.25.0
|
|
2
|
+
|
|
3
|
+
A v9 site can show ratings per review criterion on the rental page (cleanliness, location, …),
|
|
4
|
+
and decide which incomplete v9 feedbacks become review items. Every v9 agency defines its own
|
|
5
|
+
criteria, so their IDs and names differ per site: the site configures them. v9 reviews no
|
|
6
|
+
longer show the guest's surname.
|
|
7
|
+
|
|
8
|
+
## Added
|
|
9
|
+
|
|
10
|
+
- `v9Reviews` option for v9 sites. `criteria` lists the agency's `fb_<id>` criteria in display
|
|
11
|
+
order, each with `type` (`"stars"` or `"text"`) and a label for `de-DE` and `en-US`.
|
|
12
|
+
- A `stars` criterion becomes an entry of `reviews.summary.categories` (`{ label, rating }`):
|
|
13
|
+
the mean of its ratings from 1 to 5 across the rental's included feedbacks. `0` means not
|
|
14
|
+
rated. A criterion no feedback of a rental rated is left out.
|
|
15
|
+
- A `text` criterion is appended to the review item's `text`, as its label and the answer on
|
|
16
|
+
the next line.
|
|
17
|
+
- `showAuthorCity` in `v9Reviews`, `false` by default. When `true`, a v9 review's author reads
|
|
18
|
+
"Anna aus Hamburg" / "Anna from Hamburg" (`reviews.item.authorWithCity`).
|
|
19
|
+
- `includeItemsWithoutText` and `includeItemsWithoutRating` in `v9Reviews`, both `false` by
|
|
20
|
+
default. When `true`, a v9 feedback that has no text or no average rating still becomes a
|
|
21
|
+
review item. `summary.rating` and `summary.count` cover the included items that have a
|
|
22
|
+
rating; when none has one, `reviews` has `items` and no `summary`.
|
|
23
|
+
- `website-sdk --backend v9 review-criteria [--rental-ids <ids>]` lists the `fb_<id>` criteria
|
|
24
|
+
vOffice returns for the five units with the most feedbacks, or for the listed units.
|
|
25
|
+
- Types `V9ReviewsOptions`, `V9ReviewCriterion` and `V9ReviewCriterionDataAttribute`.
|
|
26
|
+
|
|
27
|
+
## Changed
|
|
28
|
+
|
|
29
|
+
- A v9 review's `author` is the guest's forename only ("Anna, verreist im Mai 2025" instead of
|
|
30
|
+
"Anna Beispiel, verreist im Mai 2025"). The SDK no longer requests the surname. A feedback
|
|
31
|
+
without a forename shows `reviews.item.guest` ("Gast", "Guest"); a missing name no longer
|
|
32
|
+
drops a feedback.
|
|
33
|
+
- v9 rentals request only the review criteria a site configures. Earlier versions requested
|
|
34
|
+
three fixed `fb_*` fields that exist for one vOffice account only, and did not use them.
|
|
35
|
+
- `KnownVofficeFeedbackData` no longer lists `fb_1429`, `fb_4905` and `fb_4906`. They are
|
|
36
|
+
account specific like every other `fb_*` field.
|
|
37
|
+
- Invalid `v9Reviews` options fail SDK creation with every issue listed.
|
|
38
|
+
|
|
39
|
+
Without `v9Reviews`, v9 review output is the same as in 2.24.1 apart from the author. v10 does
|
|
40
|
+
not use the option and keeps the full name, but an invalid value fails SDK creation there too. v10 already returns `summary.categories`
|
|
41
|
+
from its feedback forms.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Migration: 2.24.1 to 2.25.0
|
|
2
|
+
|
|
3
|
+
## 1. Upgrade
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @v-office/website-sdk@2.25.0
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
No changes are required. One thing looks different on a v9 site: a review's author is the
|
|
10
|
+
guest's forename only, "Gast" / "Guest" when there is none. The surname is no longer
|
|
11
|
+
available. If the site's own text says "full name" or builds initials from `author`, adjust it.
|
|
12
|
+
To name the guest differently, override `reviews.item.guest` in `translationOverrides`.
|
|
13
|
+
|
|
14
|
+
Everything else in v9 reviews stays as before until the site sets `v9Reviews`.
|
|
15
|
+
|
|
16
|
+
## 2. Optional: ratings per review criterion on a v9 site
|
|
17
|
+
|
|
18
|
+
This is an offer to the site owner, not a required step. The overall rating, the review count
|
|
19
|
+
and the reviews stay either way.
|
|
20
|
+
|
|
21
|
+
1. List the agency's criteria:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
website-sdk --backend v9 review-criteria
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Every entry has the `fb_<id>` and whether it is rated with stars. A `text` criterion usually
|
|
28
|
+
does not appear here; its ID has to come from the site owner.
|
|
29
|
+
|
|
30
|
+
2. Ask the site owner which criteria to show and what they are called, in German and English.
|
|
31
|
+
|
|
32
|
+
3. Set them in the SDK options:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
const options = {
|
|
36
|
+
v9Reviews: {
|
|
37
|
+
criteria: [
|
|
38
|
+
{ v9: "fb_8748", type: "stars", label: { "de-DE": "Sauberkeit", "en-US": "Cleanliness" } },
|
|
39
|
+
{ v9: "fb_8749", type: "stars", label: { "de-DE": "Lage", "en-US": "Location" } },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
4. Render `reviews.summary.categories` if the site does not yet. Each entry is
|
|
46
|
+
`{ label, rating }`, in the configured order; a rental shows only the criteria it has.
|
|
47
|
+
|
|
48
|
+
## 3. Optional: the guest's city on a v9 site
|
|
49
|
+
|
|
50
|
+
Set `showAuthorCity: true` in `v9Reviews` to show "Anna aus Hamburg" instead of "Anna". The
|
|
51
|
+
wording comes from `reviews.item.authorWithCity` and can be overridden. A feedback without a
|
|
52
|
+
city keeps the name alone.
|
|
53
|
+
|
|
54
|
+
## 4. Optional: include incomplete v9 feedbacks
|
|
55
|
+
|
|
56
|
+
By default a v9 feedback needs an average rating and text to become a review item. To show the
|
|
57
|
+
others as well, set `includeItemsWithoutText` or `includeItemsWithoutRating` in `v9Reviews` to
|
|
58
|
+
`true`. Items can then lack `text` or `rating`, as `RentalReview` already allows; render each
|
|
59
|
+
field only when it is present.
|
|
60
|
+
|
|
61
|
+
## 5. If you used `fb_1429`, `fb_4905` or `fb_4906` as known feedback fields
|
|
62
|
+
|
|
63
|
+
They are no longer part of `KnownVofficeFeedbackData`. Where you pass them as feedback data
|
|
64
|
+
attributes, mark them with `customDataAttribute("fb_1429")` instead.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog: 2.26.0
|
|
2
|
+
|
|
3
|
+
A v9 search with a `limit` above 128 now returns every result with its price. The v9 hub
|
|
4
|
+
prices at most the first 128 results of one request and returns the rest without a price and
|
|
5
|
+
without an error, so a search with `limit: 1000` showed prices and discounts for 128 rentals
|
|
6
|
+
only.
|
|
7
|
+
|
|
8
|
+
## Added
|
|
9
|
+
|
|
10
|
+
- `sdk.live.search.searchPages(input)` on v9: an `AsyncIterable` that yields the search page
|
|
11
|
+
by page, 128 priced results per page, so a list can show the first cards while the next
|
|
12
|
+
page loads. The input is the `search` input without `cursor` and `limit`. A rental appears
|
|
13
|
+
on one page only. Every page counts as one request for the search rate limit. Not available
|
|
14
|
+
with `searchAllRentalsAtOnce: true`; the loop then rejects with the `operation`
|
|
15
|
+
`search.searchPages`.
|
|
16
|
+
- Type `V9SearchPagesInput`.
|
|
17
|
+
|
|
18
|
+
## Fixed
|
|
19
|
+
|
|
20
|
+
- v9 `sdk.live.search.search` with a `limit` above 128 prices every result. The SDK fetches
|
|
21
|
+
the results as hub requests of 128, up to eight in parallel, and returns them merged, each
|
|
22
|
+
rental once. If a booking shifts the results while the requests run, the SDK fetches the
|
|
23
|
+
call once more. `pageInfo` and `nextCursor` behave as for any other `limit`: the cursor
|
|
24
|
+
continues with the same `limit`. The call counts as one request for the search rate limit.
|
|
25
|
+
- Errors from the v9 backend code report `source: "v9"`: every error from the hub and the v9
|
|
26
|
+
errors of search, rentals, quote, booking, availability, contact and config. Most of them
|
|
27
|
+
reported `source: "v10"`. Errors from code both backends share, such as payment
|
|
28
|
+
submission, keep `source: "core"`. The two errors for a service the SDK runtime does not
|
|
29
|
+
provide, with the `operation` `booking.getBankTransferDetails` or `search.mapSearch`, now
|
|
30
|
+
report `source: "core"` as well.
|
|
31
|
+
|
|
32
|
+
A v9 search with a `limit` up to 128 is unchanged: one request, the same cursor. Search on v10
|
|
33
|
+
is unchanged.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Migration: 2.25.0 to 2.26.0
|
|
2
|
+
|
|
3
|
+
## 1. Upgrade
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @v-office/website-sdk@2.26.0
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
No changes are required, except for code that checks `error.source` on a v9 site (below).
|
|
10
|
+
On a v9 site, a search with a `limit` above 128 now returns prices and discounts for every
|
|
11
|
+
result instead of the first 128. A site that worked around this by paging with a `limit` of
|
|
12
|
+
128 or less can keep doing so.
|
|
13
|
+
|
|
14
|
+
Errors from the v9 backend code, such as every error from the hub, now report `source: "v9"`
|
|
15
|
+
instead of `"v10"`. Code that recognizes them by `error.source === "v10"` checks `"v9"`
|
|
16
|
+
instead. Errors from code both backends share, such as payment submission, still report
|
|
17
|
+
`source: "core"`; leave checks for `"core"` as they are.
|
|
18
|
+
|
|
19
|
+
## 2. Optional: show the first results sooner on a v9 site
|
|
20
|
+
|
|
21
|
+
A search with a large `limit` answers once every result is priced. To render the first cards
|
|
22
|
+
earlier, loop over `searchPages` instead:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
for await (const page of sdk.live.search.searchPages({ locale: "de-DE", query })) {
|
|
26
|
+
renderCards(page.items, page.alternatives);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Keep `search` with a large `limit` where the page needs every result before it renders, for
|
|
31
|
+
example a list sorted on the client or a map with prices.
|