@v-office/website-sdk 2.33.0 → 2.34.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 +17 -6
- package/dist/cli.mjs +2 -2
- package/dist/{client-BSyJzzk0.mjs → client-C1McSXf1.mjs} +17 -12
- package/dist/index.d.mts +9 -1
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +1 -0
- package/dist/instructions/MIGRATION.md +1 -0
- package/dist/instructions/availability.md +1 -1
- package/dist/instructions/booking.md +1 -1
- package/dist/instructions/contact.md +1 -1
- package/dist/instructions/creation.md +11 -0
- package/dist/instructions/quote.md +1 -1
- package/dist/instructions/search.md +2 -2
- package/dist/instructions/versions/2.34.0/CHANGELOG.md +18 -0
- package/dist/instructions/versions/2.34.0/MIGRATION.md +9 -0
- package/dist/{rentals-Be1Zs2DQ.mjs → rentals-yMGMrIHJ.mjs} +1 -1
- package/dist/{search-Dv5e8hNc.mjs → search-DiEV8NhE.mjs} +1 -1
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/availability.md +1 -1
- package/instructions/booking.md +1 -1
- package/instructions/contact.md +1 -1
- package/instructions/creation.md +11 -0
- package/instructions/quote.md +1 -1
- package/instructions/search.md +2 -2
- package/instructions/versions/2.34.0/CHANGELOG.md +18 -0
- package/instructions/versions/2.34.0/MIGRATION.md +9 -0
- package/instructions/versions/2.34.0/release.json +3 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -82,27 +82,38 @@ const options = defineWebsiteSDKOptions({
|
|
|
82
82
|
|
|
83
83
|
## SDK Surface
|
|
84
84
|
|
|
85
|
-
The facade exposes
|
|
85
|
+
The facade exposes asynchronous static and live APIs (Promises; v9's `searchPages` is an
|
|
86
|
+
`AsyncIterable`). Search, availability, quote, booking and contact are live on both backends:
|
|
86
87
|
|
|
87
88
|
```ts
|
|
88
89
|
sdk.static.rentals.getRentals(input);
|
|
89
90
|
sdk.static.filter.getFilters(input);
|
|
90
|
-
// v10 only:
|
|
91
|
-
sdk.static.documents.getTermsAndPrivacyPolicy(input);
|
|
92
91
|
|
|
93
92
|
sdk.live.search.search(input);
|
|
94
|
-
|
|
95
|
-
sdk.live.rentals.getRentalsByIds(input);
|
|
96
|
-
sdk.live.voucher.validate(input);
|
|
93
|
+
sdk.live.search.mapSearch(input);
|
|
97
94
|
sdk.live.availability.getInitialAvailability(input);
|
|
98
95
|
sdk.live.availability.getStartDateSelectedAvailability(input);
|
|
99
96
|
sdk.live.quote.quote(input);
|
|
100
97
|
sdk.live.booking.book(input);
|
|
98
|
+
sdk.live.booking.submitPaymentOption(option);
|
|
101
99
|
sdk.live.contact.submit(input);
|
|
102
100
|
|
|
101
|
+
// v10 only:
|
|
102
|
+
sdk.static.documents.getTermsAndPrivacyPolicy(input);
|
|
103
|
+
sdk.static.payment.getBankTransferDetails();
|
|
104
|
+
|
|
105
|
+
// v9 only:
|
|
106
|
+
sdk.static.videos.getVideos(input);
|
|
107
|
+
sdk.live.search.searchPages(input);
|
|
108
|
+
sdk.live.rentals.getRentalsByIds(input);
|
|
109
|
+
sdk.live.voucher.validate(input);
|
|
110
|
+
|
|
103
111
|
await sdk.dispose();
|
|
104
112
|
```
|
|
105
113
|
|
|
114
|
+
On v9, `search.search` takes and returns v9 types, and the two availability methods return v9
|
|
115
|
+
outputs; their inputs are the same on both backends.
|
|
116
|
+
|
|
106
117
|
Both backends support fixed `start`/`end` search periods. Flexible-period query
|
|
107
118
|
keys (`month`, `dates`, `nights`, and `weekend`) are v10-only and are rejected
|
|
108
119
|
before transport by the v9 facade. An empty v9 query browses the scoped searchable
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $t as V9_HUB_FACILITY_SCOPE_FILTER_KEY, Yt as defineWebsiteSDKOptions, Zt as defineV9PropertyHighlightSourcesFromUnknown, _ as rental_attributes_default$1, an as V9_HUB_REGION_FILTER_KEY, cn as V9_SDK_OWNED_HUB_FILTER_KEYS, en as V9_HUB_FACILITY_SEARCH_FILTER_KEY, f as makeV9GraphQLClient, h as makeV0OpenApiClientFetchLive, i as toV9SdkOwnedHubFilterKeys, in as V9_HUB_OFFER_FILTER_KEY, ln as stable_filters_default, n as checkV9HubFilters, nn as V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY, on as V9_HUB_RENTAL_IDS_FILTER_KEY, p as V0OpenApiClient, r as toV9RequiredHubFilterKeys, rn as V9_HUB_OFFERS_FILTER_KEY, sn as V9_HUB_UNIT_TYPE_FILTER_KEY, t as createWebsiteSDK, tn as V9_HUB_OBJECT_GROUP_FILTER_KEY, v as rental_attributes_default } from "./client-
|
|
2
|
+
import { $t as V9_HUB_FACILITY_SCOPE_FILTER_KEY, Yt as defineWebsiteSDKOptions, Zt as defineV9PropertyHighlightSourcesFromUnknown, _ as rental_attributes_default$1, an as V9_HUB_REGION_FILTER_KEY, cn as V9_SDK_OWNED_HUB_FILTER_KEYS, en as V9_HUB_FACILITY_SEARCH_FILTER_KEY, f as makeV9GraphQLClient, h as makeV0OpenApiClientFetchLive, i as toV9SdkOwnedHubFilterKeys, in as V9_HUB_OFFER_FILTER_KEY, ln as stable_filters_default, n as checkV9HubFilters, nn as V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY, on as V9_HUB_RENTAL_IDS_FILTER_KEY, p as V0OpenApiClient, r as toV9RequiredHubFilterKeys, rn as V9_HUB_OFFERS_FILTER_KEY, sn as V9_HUB_UNIT_TYPE_FILTER_KEY, t as createWebsiteSDK, tn as V9_HUB_OBJECT_GROUP_FILTER_KEY, v as rental_attributes_default } from "./client-C1McSXf1.mjs";
|
|
3
3
|
import { a as hubRentalDataQuery, g as parseJsonData, i as hubFiltersQuery, m as VofficeUnitDataPropertyMetadata, u as rentalsAllWithoutFeedbacksQuery, y as parseVofficeRatingData } from "./operations-CUWcmNGK.mjs";
|
|
4
4
|
import { STABLE_SEARCH_INPUTS, SearchSearchSortSchema, defineCustomAttributesFromUnknown, toStableSearchInputQueryKeys } from "@v-office/sdk-core";
|
|
5
5
|
import { ByteSize, Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
|
|
@@ -17,7 +17,7 @@ var CLICheckFailed = class extends Error {
|
|
|
17
17
|
const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "2.
|
|
20
|
+
var version = "2.34.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/cli/output.ts
|
|
23
23
|
const toJson = (value) => Effect.try({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as parseVofficeUnitData, h as customDataAttribute, t as voucherValidityQuery } from "./operations-CUWcmNGK.mjs";
|
|
2
|
-
import { AvailabilityService, BookingBookOutput, BookingService, ContactService, CoreSDKError, DEFAULT_RENTAL_HIGHLIGHT_PRIORITIZATION, DEFAULT_RENTAL_PROPERTY_HIGHLIGHT_PRIORITIZATION, DocumentsService, EMPTY_CUSTOM_ATTRIBUTE_REGISTRY, FilterService, QuoteService, RentalService, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchService, TranslationService, addGuestQuoteAdditionalServiceSelection, asArray, asRecord, assertNoNestedCustomAttributeFilterCompositions, assertNoReservedQueryKeys, assertUniqueCustomFilterQueryKeys, assertUniqueFilterQueryKeys, clearGuestQuoteAdditionalServiceSelections, collectQueryParameters, createCoreRuntime, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, firstNumber, firstString, formatCurrency, formatLocalDate, getBookingBookGuestToken, getGuestQuoteBackendContext, getGuestQuoteInput, isDisplayableCustomAttribute, localeToLanguage, makeMinIntervalLimiter, makeTranslationLive, parseQueryParameters, refreshGuestQuoteInsurancePassthrough, removeGuestQuoteAdditionalServiceSelection, selectGuestQuoteCancellationPolicySelection, toCustomAttributeFilterLabel, toCustomAttributeFilterOutputItem, toCustomAttributeList, toInitialAvailabilityCalendarDays, toIsoDateFromPeriodQueryDate, toQueryString, toResolvedCustomAttributeCategoryTranslationKey, toStartDateSelectedCalendarDays, validateContactSubmitInput, withGuestQuoteInsurance, withGuestQuoteInsuranceRefresh } from "@v-office/sdk-core";
|
|
2
|
+
import { AvailabilityService, BookingBookOutput, BookingService, ContactService, CoreSDKError, DEFAULT_RENTAL_HIGHLIGHT_PRIORITIZATION, DEFAULT_RENTAL_PROPERTY_HIGHLIGHT_PRIORITIZATION, DocumentsService, EMPTY_CUSTOM_ATTRIBUTE_REGISTRY, FilterService, QuoteService, RentalService, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchService, TranslationService, addGuestQuoteAdditionalServiceSelection, asArray, asRecord, assertNoNestedCustomAttributeFilterCompositions, assertNoReservedQueryKeys, assertUniqueCustomFilterQueryKeys, assertUniqueFilterQueryKeys, clearGuestQuoteAdditionalServiceSelections, collectQueryParameters, createCoreRuntime, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, firstNumber, firstString, formatCurrency, formatLocalDate, getBookingBookGuestToken, getGuestQuoteBackendContext, getGuestQuoteInput, isDisplayableCustomAttribute, localeToLanguage, makeMinIntervalLimiter, makeTranslationLive, normalizeV10RateBudget, parseQueryParameters, refreshGuestQuoteInsurancePassthrough, removeGuestQuoteAdditionalServiceSelection, selectGuestQuoteCancellationPolicySelection, toCustomAttributeFilterLabel, toCustomAttributeFilterOutputItem, toCustomAttributeList, toInitialAvailabilityCalendarDays, toIsoDateFromPeriodQueryDate, toQueryString, toResolvedCustomAttributeCategoryTranslationKey, toStartDateSelectedCalendarDays, validateContactSubmitInput, withGuestQuoteInsurance, withGuestQuoteInsuranceRefresh } from "@v-office/sdk-core";
|
|
3
3
|
import { Clock, Context, Data, DateTime, Duration, Effect, Layer, Schema, SchemaGetter } from "effect";
|
|
4
4
|
import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http";
|
|
5
5
|
import { Kind, print, visit } from "graphql";
|
|
@@ -325,6 +325,10 @@ const normalizeWebsiteSDKOptions = (options = {}) => {
|
|
|
325
325
|
assertUniqueCustomFilterQueryKeys(options);
|
|
326
326
|
assertNoNestedCustomAttributeFilterCompositions(options.customAttributeFilterDefinitions ?? []);
|
|
327
327
|
return {
|
|
328
|
+
rateBudget: normalizeV10RateBudget({
|
|
329
|
+
budget: options.rateBudget,
|
|
330
|
+
option: "rateBudget"
|
|
331
|
+
}),
|
|
328
332
|
...options.translationOverrides === void 0 ? {} : { translationOverrides: options.translationOverrides },
|
|
329
333
|
customAttributes: options.customAttributes ?? EMPTY_CUSTOM_ATTRIBUTE_REGISTRY,
|
|
330
334
|
v9PropertyHighlightSources: options.v9PropertyHighlightSources ?? EMPTY_V9_PROPERTY_HIGHLIGHT_SOURCE_REGISTRY,
|
|
@@ -351,6 +355,7 @@ const toV9Options = (options) => {
|
|
|
351
355
|
message: `${sdkOwnedKeys.join(", ")} ${sdkOwnedKeys.length === 1 ? "is" : "are"} set by the SDK and cannot be a backendFilter key. Rename the configured custom filter.`
|
|
352
356
|
});
|
|
353
357
|
return {
|
|
358
|
+
rateBudget: options.rateBudget,
|
|
354
359
|
...options.translationOverrides === void 0 ? {} : { translationOverrides: options.translationOverrides },
|
|
355
360
|
customAttributes: options.customAttributes,
|
|
356
361
|
v9PropertyHighlightSources: options.v9PropertyHighlightSources,
|
|
@@ -423,6 +428,7 @@ const V9_CONFIG_FIELDS = {
|
|
|
423
428
|
rentalIdsSearch: true
|
|
424
429
|
};
|
|
425
430
|
const OPTION_FIELDS = {
|
|
431
|
+
rateBudget: true,
|
|
426
432
|
translationOverrides: true,
|
|
427
433
|
customAttributes: true,
|
|
428
434
|
v9PropertyHighlightSources: true,
|
|
@@ -5218,8 +5224,7 @@ const makeV9BookingApi = ({ config, options }) => {
|
|
|
5218
5224
|
...config.v0ApiBaseUrl === void 0 ? {} : { baseUrl: config.v0ApiBaseUrl }
|
|
5219
5225
|
});
|
|
5220
5226
|
const limitBooking = Effect.runSync(makeMinIntervalLimiter({
|
|
5221
|
-
|
|
5222
|
-
maxQueueSize: 5,
|
|
5227
|
+
...options.rateBudget,
|
|
5223
5228
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
5224
5229
|
source: "v9",
|
|
5225
5230
|
operation: "v9.booking",
|
|
@@ -5311,8 +5316,7 @@ const makeV9ContactApi = ({ config, options }) => {
|
|
|
5311
5316
|
...config.v0ApiBaseUrl === void 0 ? {} : { baseUrl: config.v0ApiBaseUrl }
|
|
5312
5317
|
});
|
|
5313
5318
|
const limitContact = Effect.runSync(makeMinIntervalLimiter({
|
|
5314
|
-
|
|
5315
|
-
maxQueueSize: 5,
|
|
5319
|
+
...options.rateBudget,
|
|
5316
5320
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
5317
5321
|
source: "v9",
|
|
5318
5322
|
operation: "v9.contact",
|
|
@@ -5766,8 +5770,7 @@ const quote = (client, v0Client, translations, limitQuote, input, shouldAddPropo
|
|
|
5766
5770
|
const makeV9QuoteApi = ({ config, options }) => {
|
|
5767
5771
|
const translations = makeV9TranslationService(options.translationOverrides);
|
|
5768
5772
|
const limitQuote = Effect.runSync(makeMinIntervalLimiter({
|
|
5769
|
-
|
|
5770
|
-
maxQueueSize: 5,
|
|
5773
|
+
...options.rateBudget,
|
|
5771
5774
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
5772
5775
|
source: "v9",
|
|
5773
5776
|
operation: "v9.quote",
|
|
@@ -6089,7 +6092,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
6089
6092
|
return page;
|
|
6090
6093
|
});
|
|
6091
6094
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
6092
|
-
try: () => import("./search-
|
|
6095
|
+
try: () => import("./search-DiEV8NhE.mjs"),
|
|
6093
6096
|
catch: (cause) => new CoreSDKError({
|
|
6094
6097
|
source: "v9",
|
|
6095
6098
|
operation: "v9.search.runtime",
|
|
@@ -6135,8 +6138,7 @@ const makeV9SearchApi = ({ config, options }) => {
|
|
|
6135
6138
|
const propertyKind = toV9RentalScopePropertyKind(config);
|
|
6136
6139
|
const customAttributeDataAttributes = toCustomAttributeRentalDataAttributes(options.customAttributes);
|
|
6137
6140
|
const limitSearch = Effect.runSync(makeMinIntervalLimiter({
|
|
6138
|
-
|
|
6139
|
-
maxQueueSize: 5,
|
|
6141
|
+
...options.rateBudget,
|
|
6140
6142
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
6141
6143
|
source: "v9",
|
|
6142
6144
|
operation: "v9.search",
|
|
@@ -6838,7 +6840,7 @@ const orderRentalsById = ({ rentalIds, rentals, missing }) => {
|
|
|
6838
6840
|
});
|
|
6839
6841
|
};
|
|
6840
6842
|
const loadV9RentalsRuntime = Effect.tryPromise({
|
|
6841
|
-
try: () => import("./rentals-
|
|
6843
|
+
try: () => import("./rentals-yMGMrIHJ.mjs"),
|
|
6842
6844
|
catch: (cause) => new CoreSDKError({
|
|
6843
6845
|
source: "v9",
|
|
6844
6846
|
operation: "v9.rentals.runtime",
|
|
@@ -7113,7 +7115,10 @@ function createWebsiteSDK({ config, options }) {
|
|
|
7113
7115
|
}
|
|
7114
7116
|
const runtime = createCoreRuntime({
|
|
7115
7117
|
config,
|
|
7116
|
-
options:
|
|
7118
|
+
options: {
|
|
7119
|
+
...normalizedOptions,
|
|
7120
|
+
v10RateBudget: normalizedOptions.rateBudget
|
|
7121
|
+
}
|
|
7117
7122
|
});
|
|
7118
7123
|
const sdk = {
|
|
7119
7124
|
backend: "v10",
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdditionalServiceLimitExceeded, AvailabilityEndDateOption, 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, LocalDateString, 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";
|
|
1
|
+
import { AdditionalServiceLimitExceeded, AvailabilityEndDateOption, 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, LocalDateString, 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, V10RateBudget, 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
|
import "@graphql-typed-document-node/core";
|
|
@@ -55,6 +55,14 @@ type WebsiteV10Config = V10CoreConfig & {
|
|
|
55
55
|
};
|
|
56
56
|
type WebsiteSDKConfig = WebsiteV10Config | WebsiteV9Config;
|
|
57
57
|
type WebsiteSDKOptions = {
|
|
58
|
+
/**
|
|
59
|
+
* How often the SDK may start a PMS request of one kind (search, quote, booking, contact, and on
|
|
60
|
+
* v10 availability and feedback), and how many of that kind may be running or waiting at once
|
|
61
|
+
* (`maxQueueSize`, the running one included), on either backend. Defaults to one start a second
|
|
62
|
+
* and five at once, what one visitor's browser needs. A server that serves many
|
|
63
|
+
* visitors through one SDK (the AI Studio website chat) widens it; `maxQueueSize` is at least 1.
|
|
64
|
+
*/
|
|
65
|
+
readonly rateBudget?: Partial<V10RateBudget>;
|
|
58
66
|
readonly translationOverrides?: TranslationOverrides$1;
|
|
59
67
|
/** The validated registry returned by `defineCustomAttributes`. */
|
|
60
68
|
readonly customAttributes?: CustomAttributeRegistrySnapshot$1;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as QuoteSchema, A as DocumentResourceSchema, At as bookInsuranceEffect, B as ErgoPersonSchema, Bt as quoteEffect, C as ApiEnvelopeBaseSchema, Ct as V1_BASE_URL, D as CustomerUnitSummarySchema, Dt as decodeV1OperationResponse, E as CurrentMemberResponseSchema, Et as VideoResponseSchema, F as ErgoAddressSchema, Ft as getInitialAvailabilityEffect, G as FacilityListResponseSchema, Gt as selectInsurancePaymentEffect, H as ErgoPolicyNumberRequestSchema, Ht as searchEffect, I as ErgoBankSchema, It as getRentalsEffect, J as PaymentScheduleItemSchema, Jt as submitPaymentOptionEffect, K as OnOfficeUnitCollectionResponseSchema, Kt as submitContactEffect, L as ErgoBookRequestSchema, Lt as getStartDateSelectedAvailabilityEffect, M as DocumentStatusUpdateRequestSchema, Mt as createInsurancePreContractEffect, N as DocumentSummarySchema, Nt as getBankTransferDetailsEffect, O as DocumentCollectionResponseSchema, Ot as addAdditionalServiceEffect, P as DocumentTypeSchema, Pt as getFiltersEffect, Q as QuotePricesResponseSchema, R as ErgoCommonFieldsSchema, Rt as getTermsAndPrivacyPolicyEffect, S as makeV1OpenApiClientLive, St as UnitServicePriceSchema, T as CalendarResponseSchema, Tt as VideoListResponseSchema, U as ErgoReadPreContractRequestSchema, Ut as selectCancellationPolicyEffect, V as ErgoPlanSearchRequestSchema, Vt as removeAdditionalServiceEffect, W as ErgoTripAndCustomerRequestSchema, Wt as selectInsuranceEffect, X as QuoteLineSchema, Xt as defineV9PropertyHighlightSources, Y as PaymentScheduleSchema, Yt as defineWebsiteSDKOptions, Z as QuotePricesPayloadSchema, Zt as defineV9PropertyHighlightSourcesFromUnknown, _t as UnitIdsResponseSchema, at as SearchPropertiesResponseSchema, b as V1OpenApiClientError, bt as UnitOfferSchema, ct as ServiceLimitSchema, dt as SetupResponseSchema, et as QuoteServiceSchema, ft as TileCollectionResponseSchema, g as makeV0OpenApiClientLive, gt as TravelInsuranceBookingStoreRequestSchema, h as makeV0OpenApiClientFetchLive, ht as TravelInsuranceBookingSchema, it as RoomImageSchema, j as DocumentStatusSchema, jt as clearAdditionalServicesEffect, k as DocumentResourceResponseSchema, kt as bookEffect, lt as ServiceListResponseSchema, m as V0OpenApiClientError, mt as TileTagSchema, nt as RawVofficeObjectSchema, ot as ServiceBeonDataSchema, p as V0OpenApiClient, pt as TileSchema, q as OnOfficeUnitSchema, qt as submitPaymentOption, rt as RegionListResponseSchema, st as ServiceImageSchema, t as createWebsiteSDK, tt as RawObjectResponseSchema, ut as SetupDataSchema, vt as UnitListItemSchema, w as CalendarDaySchema, wt as V1_OPERATIONS, x as makeV1OpenApiClientFetchLive, xt as UnitResponseSchema, y as V1OpenApiClient, yt as UnitListResponseSchema, z as ErgoCreatePreContractRequestSchema, zt as mapSearchEffect } from "./client-
|
|
1
|
+
import { $ as QuoteSchema, A as DocumentResourceSchema, At as bookInsuranceEffect, B as ErgoPersonSchema, Bt as quoteEffect, C as ApiEnvelopeBaseSchema, Ct as V1_BASE_URL, D as CustomerUnitSummarySchema, Dt as decodeV1OperationResponse, E as CurrentMemberResponseSchema, Et as VideoResponseSchema, F as ErgoAddressSchema, Ft as getInitialAvailabilityEffect, G as FacilityListResponseSchema, Gt as selectInsurancePaymentEffect, H as ErgoPolicyNumberRequestSchema, Ht as searchEffect, I as ErgoBankSchema, It as getRentalsEffect, J as PaymentScheduleItemSchema, Jt as submitPaymentOptionEffect, K as OnOfficeUnitCollectionResponseSchema, Kt as submitContactEffect, L as ErgoBookRequestSchema, Lt as getStartDateSelectedAvailabilityEffect, M as DocumentStatusUpdateRequestSchema, Mt as createInsurancePreContractEffect, N as DocumentSummarySchema, Nt as getBankTransferDetailsEffect, O as DocumentCollectionResponseSchema, Ot as addAdditionalServiceEffect, P as DocumentTypeSchema, Pt as getFiltersEffect, Q as QuotePricesResponseSchema, R as ErgoCommonFieldsSchema, Rt as getTermsAndPrivacyPolicyEffect, S as makeV1OpenApiClientLive, St as UnitServicePriceSchema, T as CalendarResponseSchema, Tt as VideoListResponseSchema, U as ErgoReadPreContractRequestSchema, Ut as selectCancellationPolicyEffect, V as ErgoPlanSearchRequestSchema, Vt as removeAdditionalServiceEffect, W as ErgoTripAndCustomerRequestSchema, Wt as selectInsuranceEffect, X as QuoteLineSchema, Xt as defineV9PropertyHighlightSources, Y as PaymentScheduleSchema, Yt as defineWebsiteSDKOptions, Z as QuotePricesPayloadSchema, Zt as defineV9PropertyHighlightSourcesFromUnknown, _t as UnitIdsResponseSchema, at as SearchPropertiesResponseSchema, b as V1OpenApiClientError, bt as UnitOfferSchema, ct as ServiceLimitSchema, dt as SetupResponseSchema, et as QuoteServiceSchema, ft as TileCollectionResponseSchema, g as makeV0OpenApiClientLive, gt as TravelInsuranceBookingStoreRequestSchema, h as makeV0OpenApiClientFetchLive, ht as TravelInsuranceBookingSchema, it as RoomImageSchema, j as DocumentStatusSchema, jt as clearAdditionalServicesEffect, k as DocumentResourceResponseSchema, kt as bookEffect, lt as ServiceListResponseSchema, m as V0OpenApiClientError, mt as TileTagSchema, nt as RawVofficeObjectSchema, ot as ServiceBeonDataSchema, p as V0OpenApiClient, pt as TileSchema, q as OnOfficeUnitSchema, qt as submitPaymentOption, rt as RegionListResponseSchema, st as ServiceImageSchema, t as createWebsiteSDK, tt as RawObjectResponseSchema, ut as SetupDataSchema, vt as UnitListItemSchema, w as CalendarDaySchema, wt as V1_OPERATIONS, x as makeV1OpenApiClientFetchLive, xt as UnitResponseSchema, y as V1OpenApiClient, yt as UnitListResponseSchema, z as ErgoCreatePreContractRequestSchema, zt as mapSearchEffect } from "./client-C1McSXf1.mjs";
|
|
2
2
|
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
3
3
|
//#region codegen/v9/heuristic-generation/public-api.ts
|
|
4
4
|
const customDataAttribute = (name) => name;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.34.0/CHANGELOG.md`: release notes for 2.34.0
|
|
7
8
|
- `versions/2.33.0/CHANGELOG.md`: release notes for 2.33.0
|
|
8
9
|
- `versions/2.32.0/CHANGELOG.md`: release notes for 2.32.0
|
|
9
10
|
- `versions/2.31.1/CHANGELOG.md`: release notes for 2.31.1
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/2.34.0/MIGRATION.md`: Migration: 2.33.0 to 2.34.0
|
|
7
8
|
- `versions/2.33.0/MIGRATION.md`: Migration: 2.32.0 to 2.33.0
|
|
8
9
|
- `versions/2.32.0/MIGRATION.md`: Migration: 2.31.1 to 2.32.0
|
|
9
10
|
- `versions/2.31.1/MIGRATION.md`: Migration: 2.31.0 to 2.31.1
|
|
@@ -195,7 +195,7 @@ Use flat `WebsiteSDKConfig` files.
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
Availability uses localized tooltips from the translation service. `v10` availability queries
|
|
198
|
+
Availability uses localized tooltips from the translation service. By default, `v10` availability queries start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). They are cached per rental for 30 seconds.
|
|
199
199
|
|
|
200
200
|
## CLI Usage
|
|
201
201
|
|
|
@@ -221,7 +221,7 @@ A successful return means the provider sent the browser back, not that the payme
|
|
|
221
221
|
|
|
222
222
|
## Configuration
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
By default, booking requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). `v9` books through the v0 `book` action and initializes Stripe only for currently payable choices when the property has Stripe enabled. `v10` books through GraphQL, preserves all remaining payment steps for display, and initializes Adyen for the next payable online step and the full-outstanding alternative.
|
|
225
225
|
|
|
226
226
|
## CLI Usage
|
|
227
227
|
|
|
@@ -86,7 +86,7 @@ Contact input is validated before submitting to either backend. Validation failu
|
|
|
86
86
|
|
|
87
87
|
## Configuration
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
By default, contact requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`).
|
|
90
90
|
|
|
91
91
|
## CLI Usage
|
|
92
92
|
|
|
@@ -123,6 +123,7 @@ type WebsiteSDKOptions = {
|
|
|
123
123
|
rentalScope?: RentalScope;
|
|
124
124
|
shouldAddProposedAdditionalServiceAmount?: boolean;
|
|
125
125
|
searchAllRentalsAtOnce?: boolean;
|
|
126
|
+
rateBudget?: { interval?: Duration.Input; maxQueueSize?: number };
|
|
126
127
|
};
|
|
127
128
|
```
|
|
128
129
|
|
|
@@ -130,6 +131,15 @@ type WebsiteSDKOptions = {
|
|
|
130
131
|
guest's city, and which incomplete v9 feedbacks become review items. v10 does not use it, but an invalid value fails SDK creation on
|
|
131
132
|
both backends. See "Legacy v9 Reviews" in `rentals.md`.
|
|
132
133
|
|
|
134
|
+
`rateBudget` sets how often the SDK may start a PMS request of one kind (search, quote,
|
|
135
|
+
booking, contact, and on v10 availability and feedback) and how many of that kind may be
|
|
136
|
+
running or waiting at once (`maxQueueSize`, the running one included), on v9 and v10 alike. The
|
|
137
|
+
next request past that fails right away. The default, one start a second and five at once, is
|
|
138
|
+
what one visitor's browser needs: **a website keeps it and sets nothing.** Only a server that
|
|
139
|
+
serves many visitors through one SDK widens it, for example
|
|
140
|
+
`{ interval: "250 millis", maxQueueSize: 25 }`. `maxQueueSize` must be at least 1 and `interval`
|
|
141
|
+
a positive duration, or SDK creation fails.
|
|
142
|
+
|
|
133
143
|
`searchAllRentalsAtOnce` selects how a site searches, on v9 and v10 alike: every
|
|
134
144
|
result with prices in one call (portfolios of up to 100 rentals), or paged results
|
|
135
145
|
plus `mapSearch`. See `search.md`.
|
|
@@ -157,6 +167,7 @@ Unset options are normalized by the SDK:
|
|
|
157
167
|
- `rentalScope` defaults to `{}`.
|
|
158
168
|
- `shouldAddProposedAdditionalServiceAmount` defaults to `false`.
|
|
159
169
|
- `searchAllRentalsAtOnce` defaults to `false`.
|
|
170
|
+
- `rateBudget` defaults to `{ interval: "1 second", maxQueueSize: 5 }`.
|
|
160
171
|
- `translationOverrides` is omitted unless provided.
|
|
161
172
|
|
|
162
173
|
### v9 Property Highlight Sources
|
|
@@ -449,7 +449,7 @@ longer used; see `versions/2.13.0/MIGRATION.md`.
|
|
|
449
449
|
|
|
450
450
|
## Configuration
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
By default, quote requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). `v9` supports insurance option refresh and insurance actions; `v10` currently returns a no-insurance placeholder and insurance actions resolve as not required.
|
|
453
453
|
|
|
454
454
|
`shouldAddProposedAdditionalServiceAmount` defaults to `false`. When `true`, proposed optional service quantities greater than zero are automatically selected on quote creation. `proposedQuantity` is returned whenever the backend provides a line amount (including `0`), regardless of this setting.
|
|
455
455
|
|
|
@@ -501,7 +501,7 @@ for await (const page of sdk.live.search.searchPages({ locale: "de-DE", query })
|
|
|
501
501
|
`if (sdk.backend === "v9")`.
|
|
502
502
|
- The input is the `search` input without `cursor` and `limit`; the SDK pages itself.
|
|
503
503
|
- Every page is one `search` call and counts as one request for the rate limit, so
|
|
504
|
-
the SDK starts at most one page per second.
|
|
504
|
+
the SDK starts at most one page per second by default (`rateBudget`, see `creation.md`).
|
|
505
505
|
- A rental appears on one page only, even when a booking moves it between two pages.
|
|
506
506
|
- Each page carries its own `pageInfo`; `pageInfo.totalCount` is the total over all
|
|
507
507
|
pages.
|
|
@@ -922,7 +922,7 @@ Use flat `WebsiteSDKConfig` files and optional `WebsiteSDKOptions`.
|
|
|
922
922
|
|
|
923
923
|
For v10, config requires `searchEndpoint` (the full REST search URL) as of 2.5.0. See `creation.md` for `searchEndpoint` and the `customAttributes` option.
|
|
924
924
|
|
|
925
|
-
Custom filter definitions can extend accepted search query keys.
|
|
925
|
+
Custom filter definitions can extend accepted search query keys. By default, search requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). A `searchAllRentalsAtOnce` search and a `mapSearch` each count as one request, including every backend request they make.
|
|
926
926
|
|
|
927
927
|
## CLI Usage
|
|
928
928
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog: 2.34.0
|
|
2
|
+
|
|
3
|
+
A server that serves many visitors through one SDK can widen the SDK's PMS request budget.
|
|
4
|
+
Websites keep the default and change nothing.
|
|
5
|
+
|
|
6
|
+
## Added
|
|
7
|
+
|
|
8
|
+
- The `rateBudget` option (`{ interval, maxQueueSize }`): how often the SDK may start a PMS
|
|
9
|
+
request of one kind, and how many of that kind may be running or waiting at once. It applies on v9 and v10 alike, to search, quote,
|
|
10
|
+
booking and contact, and on v10 also to availability and feedback. The default is unchanged:
|
|
11
|
+
one start a second, five at once. AI Studio's website chat, which shares one SDK per website
|
|
12
|
+
among all its visitors, widens it.
|
|
13
|
+
- An invalid `rateBudget` (a queue below 1, an interval that is not a positive duration) fails SDK
|
|
14
|
+
creation with an error that names it.
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- Nothing for existing code. Without `rateBudget`, every limit is what it was.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-
|
|
1
|
+
import { Qt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-C1McSXf1.mjs";
|
|
2
2
|
import { _ as parseVofficeFacilityData, b as parseVofficeUnitData, c as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, d as VofficeUnitDataFieldSchemas, f as VofficeUnitDataPropertyCategoryLabelKeys, i as hubFiltersQuery, l as rentalsAllFeedbacksQuery, m as VofficeUnitDataPropertyMetadata, o as rentalFacilitiesForObjectGroupRelationQuery, p as VofficeUnitDataPropertyCategoryValues, s as rentalIdsQuery, u as rentalsAllWithoutFeedbacksQuery, v as parseVofficeFeedbackData } from "./operations-CUWcmNGK.mjs";
|
|
3
3
|
import { a as toFacilityImages, c as toLocalizedString, i as toLocation, o as toImages, r as renderVofficePropertyAttribute, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-Dbnm6Y4_.mjs";
|
|
4
4
|
import { CoreSDKError, makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } from "@v-office/sdk-core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeV9CustomAttributeFilterCapabilities, c as parseQueryParameters, d as toVoucherCode, l as toQueryString, o as toBasicQueryInputs, s as collectQueryParameters, u as applyVofficeFilterDerivedBasicQueryInputs } from "./client-
|
|
1
|
+
import { a as makeV9CustomAttributeFilterCapabilities, c as parseQueryParameters, d as toVoucherCode, l as toQueryString, o as toBasicQueryInputs, s as collectQueryParameters, u as applyVofficeFilterDerivedBasicQueryInputs } from "./client-C1McSXf1.mjs";
|
|
2
2
|
import { b as parseVofficeUnitData, n as mapSearchQuery, r as searchQuery } from "./operations-CUWcmNGK.mjs";
|
|
3
3
|
import { i as toLocation, n as toV9RentalHighlightKey, o as toImages, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-Dbnm6Y4_.mjs";
|
|
4
4
|
import { CoreSDKError, STABLE_SEARCH_INPUTS, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, parseChildrenAges, parseOccupancyCount, resolveExpandedCompositions, toFormattedSearchPrice, toIsoDateFromPeriodQueryDate, toStableSearchInputBackendQueryKeys, toStableSearchInputParameterValues, toStableSearchInputQueryKeys, toUnusedFilterKeys } from "@v-office/sdk-core";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.34.0/CHANGELOG.md`: release notes for 2.34.0
|
|
7
8
|
- `versions/2.33.0/CHANGELOG.md`: release notes for 2.33.0
|
|
8
9
|
- `versions/2.32.0/CHANGELOG.md`: release notes for 2.32.0
|
|
9
10
|
- `versions/2.31.1/CHANGELOG.md`: release notes for 2.31.1
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/2.34.0/MIGRATION.md`: Migration: 2.33.0 to 2.34.0
|
|
7
8
|
- `versions/2.33.0/MIGRATION.md`: Migration: 2.32.0 to 2.33.0
|
|
8
9
|
- `versions/2.32.0/MIGRATION.md`: Migration: 2.31.1 to 2.32.0
|
|
9
10
|
- `versions/2.31.1/MIGRATION.md`: Migration: 2.31.0 to 2.31.1
|
|
@@ -195,7 +195,7 @@ Use flat `WebsiteSDKConfig` files.
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
Availability uses localized tooltips from the translation service. `v10` availability queries
|
|
198
|
+
Availability uses localized tooltips from the translation service. By default, `v10` availability queries start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). They are cached per rental for 30 seconds.
|
|
199
199
|
|
|
200
200
|
## CLI Usage
|
|
201
201
|
|
package/instructions/booking.md
CHANGED
|
@@ -221,7 +221,7 @@ A successful return means the provider sent the browser back, not that the payme
|
|
|
221
221
|
|
|
222
222
|
## Configuration
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
By default, booking requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). `v9` books through the v0 `book` action and initializes Stripe only for currently payable choices when the property has Stripe enabled. `v10` books through GraphQL, preserves all remaining payment steps for display, and initializes Adyen for the next payable online step and the full-outstanding alternative.
|
|
225
225
|
|
|
226
226
|
## CLI Usage
|
|
227
227
|
|
package/instructions/contact.md
CHANGED
|
@@ -86,7 +86,7 @@ Contact input is validated before submitting to either backend. Validation failu
|
|
|
86
86
|
|
|
87
87
|
## Configuration
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
By default, contact requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`).
|
|
90
90
|
|
|
91
91
|
## CLI Usage
|
|
92
92
|
|
package/instructions/creation.md
CHANGED
|
@@ -123,6 +123,7 @@ type WebsiteSDKOptions = {
|
|
|
123
123
|
rentalScope?: RentalScope;
|
|
124
124
|
shouldAddProposedAdditionalServiceAmount?: boolean;
|
|
125
125
|
searchAllRentalsAtOnce?: boolean;
|
|
126
|
+
rateBudget?: { interval?: Duration.Input; maxQueueSize?: number };
|
|
126
127
|
};
|
|
127
128
|
```
|
|
128
129
|
|
|
@@ -130,6 +131,15 @@ type WebsiteSDKOptions = {
|
|
|
130
131
|
guest's city, and which incomplete v9 feedbacks become review items. v10 does not use it, but an invalid value fails SDK creation on
|
|
131
132
|
both backends. See "Legacy v9 Reviews" in `rentals.md`.
|
|
132
133
|
|
|
134
|
+
`rateBudget` sets how often the SDK may start a PMS request of one kind (search, quote,
|
|
135
|
+
booking, contact, and on v10 availability and feedback) and how many of that kind may be
|
|
136
|
+
running or waiting at once (`maxQueueSize`, the running one included), on v9 and v10 alike. The
|
|
137
|
+
next request past that fails right away. The default, one start a second and five at once, is
|
|
138
|
+
what one visitor's browser needs: **a website keeps it and sets nothing.** Only a server that
|
|
139
|
+
serves many visitors through one SDK widens it, for example
|
|
140
|
+
`{ interval: "250 millis", maxQueueSize: 25 }`. `maxQueueSize` must be at least 1 and `interval`
|
|
141
|
+
a positive duration, or SDK creation fails.
|
|
142
|
+
|
|
133
143
|
`searchAllRentalsAtOnce` selects how a site searches, on v9 and v10 alike: every
|
|
134
144
|
result with prices in one call (portfolios of up to 100 rentals), or paged results
|
|
135
145
|
plus `mapSearch`. See `search.md`.
|
|
@@ -157,6 +167,7 @@ Unset options are normalized by the SDK:
|
|
|
157
167
|
- `rentalScope` defaults to `{}`.
|
|
158
168
|
- `shouldAddProposedAdditionalServiceAmount` defaults to `false`.
|
|
159
169
|
- `searchAllRentalsAtOnce` defaults to `false`.
|
|
170
|
+
- `rateBudget` defaults to `{ interval: "1 second", maxQueueSize: 5 }`.
|
|
160
171
|
- `translationOverrides` is omitted unless provided.
|
|
161
172
|
|
|
162
173
|
### v9 Property Highlight Sources
|
package/instructions/quote.md
CHANGED
|
@@ -449,7 +449,7 @@ longer used; see `versions/2.13.0/MIGRATION.md`.
|
|
|
449
449
|
|
|
450
450
|
## Configuration
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
By default, quote requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). `v9` supports insurance option refresh and insurance actions; `v10` currently returns a no-insurance placeholder and insurance actions resolve as not required.
|
|
453
453
|
|
|
454
454
|
`shouldAddProposedAdditionalServiceAmount` defaults to `false`. When `true`, proposed optional service quantities greater than zero are automatically selected on quote creation. `proposedQuantity` is returned whenever the backend provides a line amount (including `0`), regardless of this setting.
|
|
455
455
|
|
package/instructions/search.md
CHANGED
|
@@ -501,7 +501,7 @@ for await (const page of sdk.live.search.searchPages({ locale: "de-DE", query })
|
|
|
501
501
|
`if (sdk.backend === "v9")`.
|
|
502
502
|
- The input is the `search` input without `cursor` and `limit`; the SDK pages itself.
|
|
503
503
|
- Every page is one `search` call and counts as one request for the rate limit, so
|
|
504
|
-
the SDK starts at most one page per second.
|
|
504
|
+
the SDK starts at most one page per second by default (`rateBudget`, see `creation.md`).
|
|
505
505
|
- A rental appears on one page only, even when a booking moves it between two pages.
|
|
506
506
|
- Each page carries its own `pageInfo`; `pageInfo.totalCount` is the total over all
|
|
507
507
|
pages.
|
|
@@ -922,7 +922,7 @@ Use flat `WebsiteSDKConfig` files and optional `WebsiteSDKOptions`.
|
|
|
922
922
|
|
|
923
923
|
For v10, config requires `searchEndpoint` (the full REST search URL) as of 2.5.0. See `creation.md` for `searchEndpoint` and the `customAttributes` option.
|
|
924
924
|
|
|
925
|
-
Custom filter definitions can extend accepted search query keys.
|
|
925
|
+
Custom filter definitions can extend accepted search query keys. By default, search requests start at most once a second, with at most five running or waiting at once; `rateBudget` changes both (see `creation.md`). A `searchAllRentalsAtOnce` search and a `mapSearch` each count as one request, including every backend request they make.
|
|
926
926
|
|
|
927
927
|
## CLI Usage
|
|
928
928
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog: 2.34.0
|
|
2
|
+
|
|
3
|
+
A server that serves many visitors through one SDK can widen the SDK's PMS request budget.
|
|
4
|
+
Websites keep the default and change nothing.
|
|
5
|
+
|
|
6
|
+
## Added
|
|
7
|
+
|
|
8
|
+
- The `rateBudget` option (`{ interval, maxQueueSize }`): how often the SDK may start a PMS
|
|
9
|
+
request of one kind, and how many of that kind may be running or waiting at once. It applies on v9 and v10 alike, to search, quote,
|
|
10
|
+
booking and contact, and on v10 also to availability and feedback. The default is unchanged:
|
|
11
|
+
one start a second, five at once. AI Studio's website chat, which shares one SDK per website
|
|
12
|
+
among all its visitors, widens it.
|
|
13
|
+
- An invalid `rateBudget` (a queue below 1, an interval that is not a positive duration) fails SDK
|
|
14
|
+
creation with an error that names it.
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- Nothing for existing code. Without `rateBudget`, every limit is what it was.
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.34.0",
|
|
4
4
|
"description": "Website-facing SDK facade backed by @v-office/sdk-core",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/vofficeGmbh/ai-studio.git",
|
|
9
|
+
"directory": "sdks/website"
|
|
10
|
+
},
|
|
6
11
|
"bin": {
|
|
7
12
|
"website-sdk": "./dist/cli.mjs"
|
|
8
13
|
},
|
|
@@ -43,7 +48,7 @@
|
|
|
43
48
|
},
|
|
44
49
|
"dependencies": {
|
|
45
50
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
46
|
-
"@v-office/sdk-core": "1.
|
|
51
|
+
"@v-office/sdk-core": "1.26.0",
|
|
47
52
|
"effect": "4.0.0-rc.115",
|
|
48
53
|
"graphql": "17.0.2",
|
|
49
54
|
"yaml": "^2.9.0"
|