@v-office/website-sdk 2.33.0 → 2.35.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 +20 -9
- package/dist/cli.mjs +3 -3
- package/dist/{client-BSyJzzk0.mjs → client-BC5ukCcN.mjs} +143 -17
- package/dist/index.d.mts +18 -2
- 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 -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 +14 -3
- package/dist/instructions/custom-attributes.md +11 -8
- package/dist/instructions/quote.md +1 -1
- package/dist/instructions/regions.md +123 -0
- package/dist/instructions/search.md +5 -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/instructions/versions/2.35.0/CHANGELOG.md +28 -0
- package/dist/instructions/versions/2.35.0/MIGRATION.md +39 -0
- package/dist/{operations-CUWcmNGK.mjs → operations-C1VMQYN2.mjs} +62 -1
- package/dist/{rentals-Be1Zs2DQ.mjs → rentals-tKaYW-Zz.mjs} +3 -3
- package/dist/{search-Dv5e8hNc.mjs → search-DibGd1I6.mjs} +3 -3
- package/dist/{to-rental-highlights-Dbnm6Y4_.mjs → to-rental-highlights-BdxQPpBU.mjs} +1 -1
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/README.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 +14 -3
- package/instructions/custom-attributes.md +11 -8
- package/instructions/quote.md +1 -1
- package/instructions/regions.md +123 -0
- package/instructions/search.md +5 -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/instructions/versions/2.35.0/CHANGELOG.md +28 -0
- package/instructions/versions/2.35.0/MIGRATION.md +39 -0
- package/instructions/versions/2.35.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
|
|
@@ -171,11 +182,11 @@ import { defineCustomAttributes } from "@v-office/website-sdk";
|
|
|
171
182
|
const customAttributes = defineCustomAttributes({
|
|
172
183
|
catalog,
|
|
173
184
|
select: {
|
|
174
|
-
|
|
175
|
-
label: { "de-DE": "
|
|
185
|
+
beach: {
|
|
186
|
+
label: { "de-DE": "Strand", "en-US": "Beach" },
|
|
176
187
|
filter: true,
|
|
177
188
|
optionLabels: {
|
|
178
|
-
|
|
189
|
+
sand: { "de-DE": "Sandstrand", "en-US": "Sandy beach" },
|
|
179
190
|
},
|
|
180
191
|
},
|
|
181
192
|
},
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import { a as hubRentalDataQuery,
|
|
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-BC5ukCcN.mjs";
|
|
3
|
+
import { a as hubRentalDataQuery, d as rentalsAllWithoutFeedbacksQuery, g as VofficeUnitDataPropertyMetadata, i as hubFiltersQuery, v as parseJsonData, x as parseVofficeRatingData } from "./operations-C1VMQYN2.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";
|
|
6
6
|
import { Command, Flag } from "effect/unstable/cli";
|
|
@@ -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.35.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/cli/output.ts
|
|
23
23
|
const toJson = (value) => Effect.try({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
1
|
+
import { S as parseVofficeUnitData, _ as customDataAttribute, c as rentalRegionsQuery, f as RegionSchema$1, t as voucherValidityQuery, v as parseJsonData } from "./operations-C1VMQYN2.mjs";
|
|
2
|
+
import { AvailabilityService, BookingBookOutput, BookingService, ContactService, CoreSDKError, DEFAULT_RENTAL_HIGHLIGHT_PRIORITIZATION, DEFAULT_RENTAL_PROPERTY_HIGHLIGHT_PRIORITIZATION, DocumentsService, EMPTY_CUSTOM_ATTRIBUTE_REGISTRY, FilterService, QuoteService, RegionsService, RentalService, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchService, TranslationService, addGuestQuoteAdditionalServiceSelection, asArray, asRecord, assertNoNestedCustomAttributeFilterCompositions, assertNoReservedQueryKeys, assertUniqueCustomFilterQueryKeys, assertUniqueFilterQueryKeys, buildWebsiteRegions, 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";
|
|
@@ -262,7 +262,7 @@ const selectV9PropertyHighlightSources = ({ highlightPrioritization, registry })
|
|
|
262
262
|
};
|
|
263
263
|
//#endregion
|
|
264
264
|
//#region src/legacy-v9/review-options.ts
|
|
265
|
-
const LOCALES = ["de-DE", "en-US"];
|
|
265
|
+
const LOCALES$1 = ["de-DE", "en-US"];
|
|
266
266
|
const BOOLEAN_OPTION_KEYS = [
|
|
267
267
|
"showAuthorCity",
|
|
268
268
|
"includeItemsWithoutText",
|
|
@@ -286,9 +286,9 @@ const criterionIssues = (criterion, index, seen) => {
|
|
|
286
286
|
else seen.add(v9);
|
|
287
287
|
if (criterion.type !== "stars" && criterion.type !== "text") issues.push(`${path}.type: expected "stars" or "text"`);
|
|
288
288
|
const label = criterion.label;
|
|
289
|
-
if (!isRecord(label)) issues.push(`${path}.label: expected a label for ${LOCALES.join(", ")}`);
|
|
289
|
+
if (!isRecord(label)) issues.push(`${path}.label: expected a label for ${LOCALES$1.join(", ")}`);
|
|
290
290
|
else {
|
|
291
|
-
const missing = LOCALES.filter((locale) => typeof label[locale] !== "string" || label[locale].trim() === "");
|
|
291
|
+
const missing = LOCALES$1.filter((locale) => typeof label[locale] !== "string" || label[locale].trim() === "");
|
|
292
292
|
if (missing.length > 0) issues.push(`${path}.label: missing a label for ${missing.join(", ")}`);
|
|
293
293
|
}
|
|
294
294
|
return issues;
|
|
@@ -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,
|
|
@@ -621,6 +627,9 @@ const getFiltersEffect = (input) => Effect.gen(function* () {
|
|
|
621
627
|
const getTermsAndPrivacyPolicyEffect = (input) => Effect.gen(function* () {
|
|
622
628
|
return yield* (yield* DocumentsService).getTermsAndPrivacyPolicy(input);
|
|
623
629
|
});
|
|
630
|
+
const getRegionsEffect = (input) => Effect.gen(function* () {
|
|
631
|
+
return yield* (yield* RegionsService).getRegions(input);
|
|
632
|
+
});
|
|
624
633
|
const getBankTransferDetailsEffect = () => Effect.gen(function* () {
|
|
625
634
|
const service = yield* BookingService;
|
|
626
635
|
if (service.getBankTransferDetails === void 0) return yield* Effect.fail(new CoreSDKError({
|
|
@@ -5218,8 +5227,7 @@ const makeV9BookingApi = ({ config, options }) => {
|
|
|
5218
5227
|
...config.v0ApiBaseUrl === void 0 ? {} : { baseUrl: config.v0ApiBaseUrl }
|
|
5219
5228
|
});
|
|
5220
5229
|
const limitBooking = Effect.runSync(makeMinIntervalLimiter({
|
|
5221
|
-
|
|
5222
|
-
maxQueueSize: 5,
|
|
5230
|
+
...options.rateBudget,
|
|
5223
5231
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
5224
5232
|
source: "v9",
|
|
5225
5233
|
operation: "v9.booking",
|
|
@@ -5311,8 +5319,7 @@ const makeV9ContactApi = ({ config, options }) => {
|
|
|
5311
5319
|
...config.v0ApiBaseUrl === void 0 ? {} : { baseUrl: config.v0ApiBaseUrl }
|
|
5312
5320
|
});
|
|
5313
5321
|
const limitContact = Effect.runSync(makeMinIntervalLimiter({
|
|
5314
|
-
|
|
5315
|
-
maxQueueSize: 5,
|
|
5322
|
+
...options.rateBudget,
|
|
5316
5323
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
5317
5324
|
source: "v9",
|
|
5318
5325
|
operation: "v9.contact",
|
|
@@ -5766,8 +5773,7 @@ const quote = (client, v0Client, translations, limitQuote, input, shouldAddPropo
|
|
|
5766
5773
|
const makeV9QuoteApi = ({ config, options }) => {
|
|
5767
5774
|
const translations = makeV9TranslationService(options.translationOverrides);
|
|
5768
5775
|
const limitQuote = Effect.runSync(makeMinIntervalLimiter({
|
|
5769
|
-
|
|
5770
|
-
maxQueueSize: 5,
|
|
5776
|
+
...options.rateBudget,
|
|
5771
5777
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
5772
5778
|
source: "v9",
|
|
5773
5779
|
operation: "v9.quote",
|
|
@@ -6089,7 +6095,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
6089
6095
|
return page;
|
|
6090
6096
|
});
|
|
6091
6097
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
6092
|
-
try: () => import("./search-
|
|
6098
|
+
try: () => import("./search-DibGd1I6.mjs"),
|
|
6093
6099
|
catch: (cause) => new CoreSDKError({
|
|
6094
6100
|
source: "v9",
|
|
6095
6101
|
operation: "v9.search.runtime",
|
|
@@ -6135,8 +6141,7 @@ const makeV9SearchApi = ({ config, options }) => {
|
|
|
6135
6141
|
const propertyKind = toV9RentalScopePropertyKind(config);
|
|
6136
6142
|
const customAttributeDataAttributes = toCustomAttributeRentalDataAttributes(options.customAttributes);
|
|
6137
6143
|
const limitSearch = Effect.runSync(makeMinIntervalLimiter({
|
|
6138
|
-
|
|
6139
|
-
maxQueueSize: 5,
|
|
6144
|
+
...options.rateBudget,
|
|
6140
6145
|
onQueueFull: (maxQueueSize) => new CoreSDKError({
|
|
6141
6146
|
source: "v9",
|
|
6142
6147
|
operation: "v9.search",
|
|
@@ -6764,6 +6769,121 @@ const makeV9FilterApi = ({ options }) => {
|
|
|
6764
6769
|
})) };
|
|
6765
6770
|
};
|
|
6766
6771
|
//#endregion
|
|
6772
|
+
//#region src/legacy-v9/static/regions.ts
|
|
6773
|
+
const LOCALES = ["de-DE", "en-US"];
|
|
6774
|
+
/** The name in the locale, else the other language. */
|
|
6775
|
+
const toName = (region) => {
|
|
6776
|
+
const names = region.name ?? {};
|
|
6777
|
+
const de = names.de?.trim() || names.en?.trim();
|
|
6778
|
+
const en = names.en?.trim() || de;
|
|
6779
|
+
return de && en ? {
|
|
6780
|
+
"de-DE": de,
|
|
6781
|
+
"en-US": en
|
|
6782
|
+
} : void 0;
|
|
6783
|
+
};
|
|
6784
|
+
const toDescription = (region) => {
|
|
6785
|
+
const texts = region.description ?? region.descriptions ?? {};
|
|
6786
|
+
const description = {};
|
|
6787
|
+
for (const locale of LOCALES) {
|
|
6788
|
+
const text = texts[localeToLanguage(locale)]?.trim();
|
|
6789
|
+
if (text) description[locale] = text;
|
|
6790
|
+
}
|
|
6791
|
+
return description;
|
|
6792
|
+
};
|
|
6793
|
+
const toSlug = (name) => name.toLowerCase().replace(/ä/g, "ae").replace(/ö/g, "oe").replace(/ü/g, "ue").replace(/ß/g, "ss").normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "region";
|
|
6794
|
+
/** Slugs unique among `names`' siblings: a repeat gets "-2", "-3" … in order. */
|
|
6795
|
+
const uniqueSlugs = (names) => {
|
|
6796
|
+
const taken = /* @__PURE__ */ new Set();
|
|
6797
|
+
return names.map((name) => {
|
|
6798
|
+
const base = toSlug(name);
|
|
6799
|
+
let slug = base;
|
|
6800
|
+
for (let n = 2; taken.has(slug); n++) slug = `${base}-${n}`;
|
|
6801
|
+
taken.add(slug);
|
|
6802
|
+
return slug;
|
|
6803
|
+
});
|
|
6804
|
+
};
|
|
6805
|
+
/** Maps the vOffice regions and the rentals' regions; throws on a region without a name. */
|
|
6806
|
+
const toV9WebsiteRegions = ({ regions, rentalRegions }) => {
|
|
6807
|
+
const ids = new Set(regions.map((region) => region._id));
|
|
6808
|
+
const parentOf = (region) => region.parent !== void 0 && ids.has(region.parent) ? region.parent : null;
|
|
6809
|
+
const named = regions.map((region) => {
|
|
6810
|
+
const name = toName(region);
|
|
6811
|
+
if (name === void 0) throw new Error(`vOffice region ${region._id} has no name.`);
|
|
6812
|
+
return {
|
|
6813
|
+
region,
|
|
6814
|
+
name
|
|
6815
|
+
};
|
|
6816
|
+
});
|
|
6817
|
+
const ownRentalIds = /* @__PURE__ */ new Map();
|
|
6818
|
+
for (const { rentalId, regionId } of rentalRegions) if (ids.has(regionId)) ownRentalIds.set(regionId, [...ownRentalIds.get(regionId) ?? [], rentalId]);
|
|
6819
|
+
const childrenOf = (parent) => named.filter(({ region }) => parentOf(region) === parent).sort((left, right) => left.name["de-DE"].localeCompare(right.name["de-DE"], "de") || left.region._id - right.region._id);
|
|
6820
|
+
const hasRentals = (id) => (ownRentalIds.get(id)?.length ?? 0) > 0 || childrenOf(id).some(({ region }) => hasRentals(region._id));
|
|
6821
|
+
const visit = (parent) => {
|
|
6822
|
+
const siblings = childrenOf(parent);
|
|
6823
|
+
const de = uniqueSlugs(siblings.map(({ name }) => name["de-DE"]));
|
|
6824
|
+
const en = uniqueSlugs(siblings.map(({ name }) => name["en-US"]));
|
|
6825
|
+
return siblings.flatMap(({ region, name }, index) => {
|
|
6826
|
+
if (!hasRentals(region._id)) return [];
|
|
6827
|
+
return [{
|
|
6828
|
+
id: String(region._id),
|
|
6829
|
+
parentId: parent === null ? null : String(parent),
|
|
6830
|
+
name,
|
|
6831
|
+
slug: {
|
|
6832
|
+
"de-DE": de[index] ?? "",
|
|
6833
|
+
"en-US": en[index] ?? ""
|
|
6834
|
+
},
|
|
6835
|
+
description: toDescription(region),
|
|
6836
|
+
ownRentalIds: ownRentalIds.get(region._id) ?? []
|
|
6837
|
+
}, ...visit(region._id)];
|
|
6838
|
+
});
|
|
6839
|
+
};
|
|
6840
|
+
const inputs = visit(null);
|
|
6841
|
+
const reached = new Set(inputs.map(({ id }) => id));
|
|
6842
|
+
const unreachedRentalRegion = [...ownRentalIds.keys()].find((id) => !reached.has(String(id)));
|
|
6843
|
+
if (unreachedRentalRegion !== void 0) throw new Error(`vOffice region ${unreachedRentalRegion} with rentals is not reachable from a root.`);
|
|
6844
|
+
return buildWebsiteRegions({
|
|
6845
|
+
isWebsiteOverride: false,
|
|
6846
|
+
regions: inputs
|
|
6847
|
+
});
|
|
6848
|
+
};
|
|
6849
|
+
const makeV9RegionsApi = ({ config }) => {
|
|
6850
|
+
const graphql = makeV9GraphQLClient(config);
|
|
6851
|
+
const openApiClientLive = makeV0OpenApiClientFetchLive({
|
|
6852
|
+
apiKey: config.apiKey,
|
|
6853
|
+
...config.v0ApiBaseUrl === void 0 ? {} : { baseUrl: config.v0ApiBaseUrl }
|
|
6854
|
+
});
|
|
6855
|
+
const loadRegions = Effect.gen(function* () {
|
|
6856
|
+
const result = yield* (yield* V0OpenApiClient).execute("proxyVofficeAction", { query: {
|
|
6857
|
+
actionName: "getRegions",
|
|
6858
|
+
description: true
|
|
6859
|
+
} });
|
|
6860
|
+
const response = yield* Schema.decodeUnknownEffect(RegionsResponseSchema)(result.raw);
|
|
6861
|
+
if (response.ok === false || response.regions === void 0) return yield* Effect.fail(new CoreSDKError({
|
|
6862
|
+
source: "v9",
|
|
6863
|
+
operation: "v9.regions.getRegions",
|
|
6864
|
+
message: "vOffice rejected getRegions.",
|
|
6865
|
+
cause: result.raw
|
|
6866
|
+
}));
|
|
6867
|
+
return response.regions.filter((region) => typeof region._id === "number");
|
|
6868
|
+
}).pipe(Effect.provide(openApiClientLive));
|
|
6869
|
+
const loadRentalRegions = graphql.execute(rentalRegionsQuery, {}).pipe(Effect.map((data) => data.all.flatMap((rental) => {
|
|
6870
|
+
const region = parseJsonData({ region: RegionSchema$1 }, rental.data).known.region;
|
|
6871
|
+
return region === void 0 ? [] : [{
|
|
6872
|
+
rentalId: String(rental.voffice_id),
|
|
6873
|
+
regionId: region.id
|
|
6874
|
+
}];
|
|
6875
|
+
})));
|
|
6876
|
+
return { getRegions: () => Effect.runPromise(Effect.all([loadRegions, loadRentalRegions], { concurrency: 2 }).pipe(Effect.flatMap(([regions, rentalRegions]) => Effect.try(() => toV9WebsiteRegions({
|
|
6877
|
+
regions,
|
|
6878
|
+
rentalRegions
|
|
6879
|
+
}))), Effect.mapError((cause) => new CoreSDKError({
|
|
6880
|
+
source: "v9",
|
|
6881
|
+
operation: "v9.regions.getRegions",
|
|
6882
|
+
message: "Failed to load the v9 region tree.",
|
|
6883
|
+
cause
|
|
6884
|
+
})))) };
|
|
6885
|
+
};
|
|
6886
|
+
//#endregion
|
|
6767
6887
|
//#region src/legacy-v9/hub-filter-requirements.ts
|
|
6768
6888
|
const toV9SdkOwnedHubFilterKeys = ({ config, rentalScope }) => {
|
|
6769
6889
|
const scopeKey = toV9RentalScopeHubFilterKey({
|
|
@@ -6838,7 +6958,7 @@ const orderRentalsById = ({ rentalIds, rentals, missing }) => {
|
|
|
6838
6958
|
});
|
|
6839
6959
|
};
|
|
6840
6960
|
const loadV9RentalsRuntime = Effect.tryPromise({
|
|
6841
|
-
try: () => import("./rentals-
|
|
6961
|
+
try: () => import("./rentals-tKaYW-Zz.mjs"),
|
|
6842
6962
|
catch: (cause) => new CoreSDKError({
|
|
6843
6963
|
source: "v9",
|
|
6844
6964
|
operation: "v9.rentals.runtime",
|
|
@@ -7069,6 +7189,7 @@ function createWebsiteSDK({ config, options }) {
|
|
|
7069
7189
|
config,
|
|
7070
7190
|
options: v9Options
|
|
7071
7191
|
});
|
|
7192
|
+
const regions = makeV9RegionsApi({ config });
|
|
7072
7193
|
const videos = makeV9VideosApi({ config });
|
|
7073
7194
|
recordConstructedBackend("v9");
|
|
7074
7195
|
recordConstructedSdk(config, options);
|
|
@@ -7077,6 +7198,7 @@ function createWebsiteSDK({ config, options }) {
|
|
|
7077
7198
|
static: {
|
|
7078
7199
|
rentals: { getRentals: rentals.getRentals },
|
|
7079
7200
|
filter: { getFilters: filter.getFilters },
|
|
7201
|
+
regions: { getRegions: () => regions.getRegions() },
|
|
7080
7202
|
videos: { getVideos: videos.getVideos }
|
|
7081
7203
|
},
|
|
7082
7204
|
live: {
|
|
@@ -7113,7 +7235,10 @@ function createWebsiteSDK({ config, options }) {
|
|
|
7113
7235
|
}
|
|
7114
7236
|
const runtime = createCoreRuntime({
|
|
7115
7237
|
config,
|
|
7116
|
-
options:
|
|
7238
|
+
options: {
|
|
7239
|
+
...normalizedOptions,
|
|
7240
|
+
v10RateBudget: normalizedOptions.rateBudget
|
|
7241
|
+
}
|
|
7117
7242
|
});
|
|
7118
7243
|
const sdk = {
|
|
7119
7244
|
backend: "v10",
|
|
@@ -7121,7 +7246,8 @@ function createWebsiteSDK({ config, options }) {
|
|
|
7121
7246
|
rentals: { getRentals: (input) => runtime.runPromise(getRentalsEffect(input)) },
|
|
7122
7247
|
filter: { getFilters: (input) => runtime.runPromise(getFiltersEffect(input)) },
|
|
7123
7248
|
documents: { getTermsAndPrivacyPolicy: (input) => runtime.runPromise(getTermsAndPrivacyPolicyEffect(input)) },
|
|
7124
|
-
payment: { getBankTransferDetails: () => runtime.runPromise(getBankTransferDetailsEffect()) }
|
|
7249
|
+
payment: { getBankTransferDetails: () => runtime.runPromise(getBankTransferDetailsEffect()) },
|
|
7250
|
+
regions: { getRegions: (input) => runtime.runPromise(getRegionsEffect(input)) }
|
|
7125
7251
|
},
|
|
7126
7252
|
live: {
|
|
7127
7253
|
contact: { submit: (input) => runtime.runPromise(submitContactEffect(input)) },
|
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, RegionsGetRegionsInput, RegionsGetRegionsInput as RegionsGetRegionsInput$1, RegionsService, 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, WebsiteRegion, WebsiteRegions, WebsiteRegions as WebsiteRegions$1, 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;
|
|
@@ -172,6 +180,14 @@ type WebsiteSDKSharedStatic = {
|
|
|
172
180
|
readonly filter: {
|
|
173
181
|
readonly getFilters: (input: FilterGetFiltersInput$1) => Promise<FilterGetFiltersOutput$1>;
|
|
174
182
|
};
|
|
183
|
+
readonly regions: {
|
|
184
|
+
/**
|
|
185
|
+
* The website's region tree. v10: the websites service's tree, the website's own or else
|
|
186
|
+
* the workspace's default. v9: vOffice's region hierarchy, which ignores
|
|
187
|
+
* `aiStudioWebsiteId`. Read it once per build: neither backend caches it.
|
|
188
|
+
*/
|
|
189
|
+
readonly getRegions: (input: RegionsGetRegionsInput$1) => Promise<WebsiteRegions$1>;
|
|
190
|
+
};
|
|
175
191
|
};
|
|
176
192
|
type WebsiteSDKV10Static = WebsiteSDKSharedStatic & {
|
|
177
193
|
readonly documents: {
|
|
@@ -7778,4 +7794,4 @@ export type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
|
|
|
7778
7794
|
export type RentalSearchInput = SearchSearchInput$1;
|
|
7779
7795
|
export type RentalSearchOutput = SearchSearchOutput$1;
|
|
7780
7796
|
//#endregion
|
|
7781
|
-
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 V9EndDateOption, type V9InitialAvailabilityOutput, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9RentalsGetRentalsByIdsInput, type V9ReviewCriterion, type V9ReviewCriterionDataAttribute, type V9ReviewsOptions, type V9SearchAllRentalsAtOnceInput, type V9SearchPagesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type V9StartDateSelectedAvailabilityOutput, type V9Video, type V9VideosGetVideosInput, type V9VoucherValidateInput, type V9VoucherValidateOutput, type V9VoucherValidityReason, 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, type WebsiteSDKV9Static, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
|
|
7797
|
+
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 RegionsGetRegionsInput, 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 V9EndDateOption, type V9InitialAvailabilityOutput, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9RentalsGetRentalsByIdsInput, type V9ReviewCriterion, type V9ReviewCriterionDataAttribute, type V9ReviewsOptions, type V9SearchAllRentalsAtOnceInput, type V9SearchPagesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type V9StartDateSelectedAvailabilityOutput, type V9Video, type V9VideosGetVideosInput, type V9VoucherValidateInput, type V9VoucherValidateOutput, type V9VoucherValidityReason, 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 WebsiteRegion, type WebsiteRegions, 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, type WebsiteSDKV9Static, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
|
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-BC5ukCcN.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.35.0/CHANGELOG.md`: release notes for 2.35.0
|
|
8
|
+
- `versions/2.34.0/CHANGELOG.md`: release notes for 2.34.0
|
|
7
9
|
- `versions/2.33.0/CHANGELOG.md`: release notes for 2.33.0
|
|
8
10
|
- `versions/2.32.0/CHANGELOG.md`: release notes for 2.32.0
|
|
9
11
|
- `versions/2.31.1/CHANGELOG.md`: release notes for 2.31.1
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/2.35.0/MIGRATION.md`: Migration: 2.34.0 to 2.35.0
|
|
8
|
+
- `versions/2.34.0/MIGRATION.md`: Migration: 2.33.0 to 2.34.0
|
|
7
9
|
- `versions/2.33.0/MIGRATION.md`: Migration: 2.32.0 to 2.33.0
|
|
8
10
|
- `versions/2.32.0/MIGRATION.md`: Migration: 2.31.1 to 2.32.0
|
|
9
11
|
- `versions/2.31.1/MIGRATION.md`: Migration: 2.31.0 to 2.31.1
|
|
@@ -11,6 +11,7 @@ Use this directory as the consumer-facing reference for the package:
|
|
|
11
11
|
- `filter.md`: `sdk.static.filter.getFilters`.
|
|
12
12
|
- `videos.md`: v9 only. `sdk.static.videos.getVideos`, placements, and HLS playback.
|
|
13
13
|
- `custom-attributes.md`: custom attribute catalog, configuration, per-backend behaviour, and the v9-to-v10 move.
|
|
14
|
+
- `regions.md`: `sdk.static.regions.getRegions`, the website's region tree, region pages, and the search's region field.
|
|
14
15
|
- `search.md`: `sdk.live.search.search`, vouchers, and, on v9, `sdk.live.search.searchPages`, Hub filters, and `sdk.live.voucher.validate`.
|
|
15
16
|
- `availability.md`: date-picker availability flows.
|
|
16
17
|
- `quote.md`: quote booking-card modifiers, additional services, cancellation policy, and insurance flows.
|
|
@@ -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
|
|
@@ -233,11 +244,11 @@ Custom attributes are configured through `customAttributes`, built by
|
|
|
233
244
|
const customAttributes = defineCustomAttributes({
|
|
234
245
|
catalog,
|
|
235
246
|
select: {
|
|
236
|
-
|
|
237
|
-
label: { "de-DE": "
|
|
247
|
+
beach: {
|
|
248
|
+
label: { "de-DE": "Strand", "en-US": "Beach" },
|
|
238
249
|
filter: true,
|
|
239
250
|
optionLabels: {
|
|
240
|
-
|
|
251
|
+
sand: { "de-DE": "Sandstrand", "en-US": "Sandy beach" },
|
|
241
252
|
},
|
|
242
253
|
},
|
|
243
254
|
},
|