@v-office/website-sdk 2.22.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Bt as defineWebsiteSDKOptions, Ht as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK } from "./client-BtZ30vTP.mjs";
2
+ import { Ut as defineV9PropertyHighlightSourcesFromUnknown, Vt as defineWebsiteSDKOptions, t as createWebsiteSDK } from "./client-DC4LG3CP.mjs";
3
3
  import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
4
4
  import { ByteSize, Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
5
5
  import { Command, Flag } from "effect/unstable/cli";
@@ -16,7 +16,7 @@ var CLICheckFailed = class extends Error {
16
16
  const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
17
17
  //#endregion
18
18
  //#region package.json
19
- var version = "2.22.0";
19
+ var version = "2.24.0";
20
20
  //#endregion
21
21
  //#region src/cli/output.ts
22
22
  const toJson = (value) => Effect.try({
@@ -1,5 +1,5 @@
1
1
  import { a as customDataAttribute } from "./v9-data-BnYxa2Ek.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, SearchService, TranslationService, addGuestQuoteAdditionalServiceSelection, asArray, asRecord, assertNoNestedCustomAttributeFilterCompositions, assertNoReservedQueryKeys, assertUniqueCustomFilterQueryKeys, assertUniqueFilterQueryKeys, clearGuestQuoteAdditionalServiceSelections, collectQueryParameters, createCoreRuntime, expandCustomAttributeFilterCompositions, firstNumber, firstString, formatCurrency, formatLocalDate, getBookingBookGuestToken, getGuestQuoteBackendContext, getGuestQuoteInput, isDisplayableCustomAttribute, localeToLanguage, makeMinIntervalLimiter, makeTranslationLive, parseQueryParameters, refreshGuestQuoteInsurancePassthrough, removeGuestQuoteAdditionalServiceSelection, selectGuestQuoteCancellationPolicySelection, toCustomAttributeFilterLabel, toCustomAttributeFilterOutputItem, toCustomAttributeList, toInitialAvailabilityCalendarDays, 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, expandCustomAttributeFilterCompositions, firstNumber, firstString, formatCurrency, formatLocalDate, getBookingBookGuestToken, getGuestQuoteBackendContext, getGuestQuoteInput, isDisplayableCustomAttribute, localeToLanguage, makeMinIntervalLimiter, makeTranslationLive, parseQueryParameters, refreshGuestQuoteInsurancePassthrough, removeGuestQuoteAdditionalServiceSelection, selectGuestQuoteCancellationPolicySelection, toCustomAttributeFilterLabel, toCustomAttributeFilterOutputItem, toCustomAttributeList, toInitialAvailabilityCalendarDays, toQueryString, toResolvedCustomAttributeCategoryTranslationKey, toStartDateSelectedCalendarDays, validateContactSubmitInput, withGuestQuoteInsurance, withGuestQuoteInsuranceRefresh } from "@v-office/sdk-core";
3
3
  import { Context, Data, DateTime, Effect, Layer, Schema, SchemaGetter } from "effect";
4
4
  import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http";
5
5
  import { Kind, print, visit } from "graphql";
@@ -258,7 +258,8 @@ const normalizeWebsiteSDKOptions = (options = {}) => {
258
258
  rentalHighlightPrioritization: options.rentalHighlightPrioritization ?? DEFAULT_RENTAL_HIGHLIGHT_PRIORITIZATION,
259
259
  rentalPropertyHighlightPrioritization: options.rentalPropertyHighlightPrioritization ?? DEFAULT_RENTAL_PROPERTY_HIGHLIGHT_PRIORITIZATION,
260
260
  rentalScope: options.rentalScope ?? {},
261
- shouldAddProposedAdditionalServiceAmount: options.shouldAddProposedAdditionalServiceAmount ?? false
261
+ shouldAddProposedAdditionalServiceAmount: options.shouldAddProposedAdditionalServiceAmount ?? false,
262
+ searchAllRentalsAtOnce: options.searchAllRentalsAtOnce ?? false
262
263
  };
263
264
  };
264
265
  const toV9Options = (options) => {
@@ -276,11 +277,29 @@ const toV9Options = (options) => {
276
277
  rentalHighlightPrioritization: options.rentalHighlightPrioritization,
277
278
  rentalPropertyHighlightPrioritization: options.rentalPropertyHighlightPrioritization,
278
279
  rentalScope: options.rentalScope,
279
- shouldAddProposedAdditionalServiceAmount: options.shouldAddProposedAdditionalServiceAmount
280
+ shouldAddProposedAdditionalServiceAmount: options.shouldAddProposedAdditionalServiceAmount,
281
+ searchAllRentalsAtOnce: options.searchAllRentalsAtOnce
280
282
  };
281
283
  };
282
284
  const defineWebsiteSDKOptions = (options) => options;
283
285
  //#endregion
286
+ //#region src/constructed-backends.ts
287
+ /**
288
+ * Which backends this process has constructed a website SDK with, recorded by `createWebsiteSDK`
289
+ * once the config was accepted. `@v-office/site-manifest` reads the same key when a build ends and
290
+ * writes the backends into the site manifest, so the platform knows a site's PMS generation from
291
+ * what the SDK was actually told, whatever the site's own configuration code looks like.
292
+ *
293
+ * A registered symbol on `globalThis`, not module state: a build loads the SDK more than once
294
+ * (the content loaders and the prerendered pages run separately bundled copies), and every copy
295
+ * must land in the one record. No imports, so it is as safe in a browser bundle as in Node.
296
+ */
297
+ const CONSTRUCTED_BACKENDS_KEY = Symbol.for("@v-office/website-sdk/backends");
298
+ const recordConstructedBackend = (backend) => {
299
+ const record = globalThis;
300
+ (record[CONSTRUCTED_BACKENDS_KEY] ??= /* @__PURE__ */ new Set()).add(backend);
301
+ };
302
+ //#endregion
284
303
  //#region src/payment/browser.ts
285
304
  const getBrowser = () => Effect.gen(function* () {
286
305
  const globals = globalThis;
@@ -463,6 +482,15 @@ const getBankTransferDetailsEffect = () => Effect.gen(function* () {
463
482
  const searchEffect = (input) => Effect.gen(function* () {
464
483
  return yield* (yield* SearchService).search(input);
465
484
  });
485
+ const mapSearchEffect = (input) => Effect.gen(function* () {
486
+ const service = yield* SearchService;
487
+ if (service.mapSearch === void 0) return yield* Effect.fail(new CoreSDKError({
488
+ source: "v10",
489
+ operation: "search.mapSearch",
490
+ message: "SearchService.mapSearch is not provided by the core runtime."
491
+ }));
492
+ return yield* service.mapSearch(input);
493
+ });
466
494
  const getInitialAvailabilityEffect = (input) => Effect.gen(function* () {
467
495
  return yield* (yield* AvailabilityService).getInitialAvailability(input);
468
496
  });
@@ -5671,6 +5699,15 @@ const applyV9RentalScopeToSearchQueryInput = (input, scope) => {
5671
5699
  //#region src/legacy-v9/live/search.ts
5672
5700
  const DEFAULT_SEARCH_LIMIT = 20;
5673
5701
  const V9_SEARCH_CURSOR_PREFIX = "page:";
5702
+ /**
5703
+ * The hub prices the rentals of one request one after another, but separate
5704
+ * requests in parallel: 70 rentals take ~4.8 s as one request and ~2.2 s as
5705
+ * seven parallel requests of ten.
5706
+ */
5707
+ const ALL_RENTALS_PAGE_SIZE = 10;
5708
+ const ALL_RENTALS_CONCURRENCY = 8;
5709
+ /** A map search prices nothing; the hub answers 1000 matches in one request. */
5710
+ const MAP_SEARCH_PAGE_SIZE = 1e3;
5674
5711
  const toV9SearchCursor = (page) => `${V9_SEARCH_CURSOR_PREFIX}${page}`;
5675
5712
  const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
5676
5713
  if (!cursor.startsWith(V9_SEARCH_CURSOR_PREFIX)) return yield* Effect.fail(new CoreSDKError({
@@ -5687,7 +5724,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
5687
5724
  return page;
5688
5725
  });
5689
5726
  const loadV9SearchRuntime = Effect.tryPromise({
5690
- try: () => import("./search-CZ1TRGAB.mjs"),
5727
+ try: () => import("./search-CKL-8T8q.mjs"),
5691
5728
  catch: (cause) => new CoreSDKError({
5692
5729
  source: "v10",
5693
5730
  operation: "v9.search.runtime",
@@ -5695,6 +5732,25 @@ const loadV9SearchRuntime = Effect.tryPromise({
5695
5732
  cause
5696
5733
  })
5697
5734
  });
5735
+ const failSearch = ({ operation, message }) => Effect.runPromise(Effect.fail(new CoreSDKError({
5736
+ source: "v10",
5737
+ operation,
5738
+ message
5739
+ })));
5740
+ const tooManyRentals = (totalCount) => new CoreSDKError({
5741
+ source: "v10",
5742
+ operation: "search.allRentalsAtOnce",
5743
+ message: `The search matches ${totalCount} rentals; searchAllRentalsAtOnce supports at most ${SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS}. Use paged search and mapSearch instead.`
5744
+ });
5745
+ const uniqueById = (entries, toId) => {
5746
+ const seen = /* @__PURE__ */ new Set();
5747
+ return entries.filter((entry) => {
5748
+ const id = toId(entry);
5749
+ if (seen.has(id)) return false;
5750
+ seen.add(id);
5751
+ return true;
5752
+ });
5753
+ };
5698
5754
  const makeV9SearchApi = ({ config, options }) => {
5699
5755
  const graphql = makeV9GraphQLClient(config);
5700
5756
  const translations = makeV9TranslationService(options.translationOverrides);
@@ -5708,33 +5764,33 @@ const makeV9SearchApi = ({ config, options }) => {
5708
5764
  message: `v9 search rate limit queue is full (${maxQueueSize} total request(s)).`
5709
5765
  })
5710
5766
  }));
5711
- return { search: (input) => Effect.runPromise(limitSearch(Effect.gen(function* () {
5712
- const { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toQueryInput, toSearchOutputItem, toSearchPeriods } = yield* loadV9SearchRuntime;
5713
- const dataAttributes = [
5714
- ...defaultSearchDataAttributes,
5715
- ...config.rentalDataAttributes ?? [],
5716
- ...customAttributeDataAttributes
5717
- ];
5718
- const { queryInput, appliedFilters, unusedFilterKeys } = yield* toQueryInput({
5767
+ const toScopedQuery = (input) => Effect.gen(function* () {
5768
+ const runtime = yield* loadV9SearchRuntime;
5769
+ const { queryInput, appliedFilters, unusedFilterKeys } = yield* runtime.toQueryInput({
5719
5770
  locale: input.locale,
5720
5771
  translations,
5721
5772
  customAttributeFilterDefinitions: options.customAttributeFilterDefinitions,
5722
5773
  query: input.query,
5723
5774
  sort: input.sort
5724
5775
  });
5725
- const scopedQueryInput = applyV9RentalScopeToSearchQueryInput(queryInput, options.rentalScope);
5726
- if (scopedQueryInput === void 0) return {
5727
- items: [],
5776
+ return {
5777
+ runtime,
5728
5778
  appliedFilters,
5729
5779
  unusedFilterKeys,
5730
- pageInfo: { hasNextPage: false }
5780
+ scopedQueryInput: applyV9RentalScopeToSearchQueryInput(queryInput, options.rentalScope)
5731
5781
  };
5732
- const page = input.cursor === void 0 ? 1 : yield* parseV9SearchCursor(input.cursor);
5782
+ });
5783
+ const searchPage = ({ input, runtime, scopedQueryInput, page, first }) => Effect.gen(function* () {
5784
+ const { resolveExactMatch, searchQuery, toSearchDataAttributes, toSearchOutputItem } = runtime;
5733
5785
  const data = yield* graphql.execute(searchQuery, {
5734
- first: input.limit ?? DEFAULT_SEARCH_LIMIT,
5786
+ first,
5735
5787
  page,
5736
5788
  language: localeToLanguage(input.locale),
5737
- dataAttributes,
5789
+ dataAttributes: [
5790
+ ...toSearchDataAttributes(options.rentalHighlightPrioritization),
5791
+ ...config.rentalDataAttributes ?? [],
5792
+ ...customAttributeDataAttributes
5793
+ ],
5738
5794
  ...scopedQueryInput
5739
5795
  });
5740
5796
  const entries = yield* Effect.all(data.search.data.map((rental) => Effect.gen(function* () {
@@ -5749,7 +5805,7 @@ const makeV9SearchApi = ({ config, options }) => {
5749
5805
  translations
5750
5806
  });
5751
5807
  if (isExactMatch) {
5752
- const matchingPeriods = yield* toSearchPeriods({
5808
+ const matchingPeriods = yield* runtime.toSearchPeriods({
5753
5809
  locale: input.locale,
5754
5810
  periods
5755
5811
  });
@@ -5765,7 +5821,7 @@ const makeV9SearchApi = ({ config, options }) => {
5765
5821
  type: "item",
5766
5822
  item
5767
5823
  };
5768
- const alternativePeriods = yield* toSearchPeriods({
5824
+ const alternativePeriods = yield* runtime.toSearchPeriods({
5769
5825
  locale: input.locale,
5770
5826
  periods
5771
5827
  });
@@ -5781,19 +5837,146 @@ const makeV9SearchApi = ({ config, options }) => {
5781
5837
  }
5782
5838
  };
5783
5839
  })));
5784
- const items = entries.flatMap((entry) => entry.type === "item" ? [entry.item] : []);
5785
- const alternatives = entries.flatMap((entry) => entry.type === "alternative" ? [entry.alternative] : []);
5840
+ return {
5841
+ items: entries.flatMap((entry) => entry.type === "item" ? [entry.item] : []),
5842
+ alternatives: entries.flatMap((entry) => entry.type === "alternative" ? [entry.alternative] : []),
5843
+ paginatorInfo: data.search.paginatorInfo
5844
+ };
5845
+ });
5846
+ const searchOnePage = (input) => Effect.runPromise(limitSearch(Effect.gen(function* () {
5847
+ const { runtime, appliedFilters, unusedFilterKeys, scopedQueryInput } = yield* toScopedQuery(input);
5848
+ if (scopedQueryInput === void 0) return {
5849
+ items: [],
5850
+ appliedFilters,
5851
+ unusedFilterKeys,
5852
+ pageInfo: {
5853
+ hasNextPage: false,
5854
+ totalCount: 0
5855
+ }
5856
+ };
5857
+ const page = input.cursor === void 0 ? 1 : yield* parseV9SearchCursor(input.cursor);
5858
+ const { items, alternatives, paginatorInfo } = yield* searchPage({
5859
+ input,
5860
+ runtime,
5861
+ scopedQueryInput,
5862
+ page,
5863
+ first: input.limit ?? DEFAULT_SEARCH_LIMIT
5864
+ });
5786
5865
  return {
5787
5866
  items,
5788
5867
  ...alternatives.length > 0 ? { alternatives } : {},
5789
5868
  appliedFilters,
5790
5869
  unusedFilterKeys,
5791
5870
  pageInfo: {
5792
- hasNextPage: data.search.paginatorInfo.hasMorePages,
5793
- ...data.search.paginatorInfo.hasMorePages ? { nextCursor: toV9SearchCursor(data.search.paginatorInfo.currentPage + 1) } : {}
5871
+ hasNextPage: paginatorInfo.hasMorePages,
5872
+ ...paginatorInfo.hasMorePages ? { nextCursor: toV9SearchCursor(paginatorInfo.currentPage + 1) } : {},
5873
+ totalCount: paginatorInfo.total
5794
5874
  }
5795
5875
  };
5796
- }))) };
5876
+ })));
5877
+ const searchAllRentals = (input) => input.cursor !== void 0 || input.limit !== void 0 ? failSearch({
5878
+ operation: "search.allRentalsAtOnce",
5879
+ message: "searchAllRentalsAtOnce returns every result in one call; cursor and limit are not accepted."
5880
+ }) : Effect.runPromise(limitSearch(Effect.gen(function* () {
5881
+ const { runtime, appliedFilters, unusedFilterKeys, scopedQueryInput } = yield* toScopedQuery(input);
5882
+ if (scopedQueryInput === void 0) return {
5883
+ items: [],
5884
+ appliedFilters,
5885
+ unusedFilterKeys,
5886
+ pageInfo: {
5887
+ hasNextPage: false,
5888
+ totalCount: 0
5889
+ }
5890
+ };
5891
+ const totalCount = (yield* graphql.execute(runtime.mapSearchQuery, {
5892
+ first: 1,
5893
+ page: 1,
5894
+ language: localeToLanguage(input.locale),
5895
+ ...scopedQueryInput
5896
+ })).search.paginatorInfo.total;
5897
+ if (totalCount > SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS) return yield* Effect.fail(tooManyRentals(totalCount));
5898
+ const pages = yield* Effect.all(Array.from({ length: Math.ceil(totalCount / ALL_RENTALS_PAGE_SIZE) }, (_, index) => searchPage({
5899
+ input,
5900
+ runtime,
5901
+ scopedQueryInput,
5902
+ page: index + 1,
5903
+ first: ALL_RENTALS_PAGE_SIZE
5904
+ })), { concurrency: ALL_RENTALS_CONCURRENCY });
5905
+ const items = uniqueById(pages.flatMap((page) => page.items), (item) => item.id);
5906
+ const itemIds = new Set(items.map((item) => item.id));
5907
+ const alternatives = uniqueById(pages.flatMap((page) => page.alternatives), (alternative) => alternative.item.id).filter((alternative) => !itemIds.has(alternative.item.id));
5908
+ const toOutput = (result) => ({
5909
+ items: result.items,
5910
+ ...result.alternatives.length > 0 ? { alternatives: result.alternatives } : {},
5911
+ appliedFilters,
5912
+ unusedFilterKeys,
5913
+ pageInfo: {
5914
+ hasNextPage: false,
5915
+ totalCount: result.totalCount
5916
+ }
5917
+ });
5918
+ if (pages.every((page) => page.paginatorInfo.total === totalCount) && items.length + alternatives.length === totalCount) return toOutput({
5919
+ items,
5920
+ alternatives,
5921
+ totalCount
5922
+ });
5923
+ const snapshot = yield* searchPage({
5924
+ input,
5925
+ runtime,
5926
+ scopedQueryInput,
5927
+ page: 1,
5928
+ first: SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS
5929
+ });
5930
+ if (snapshot.paginatorInfo.total > SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS) return yield* Effect.fail(tooManyRentals(snapshot.paginatorInfo.total));
5931
+ return toOutput({
5932
+ items: snapshot.items,
5933
+ alternatives: snapshot.alternatives,
5934
+ totalCount: snapshot.paginatorInfo.total
5935
+ });
5936
+ })));
5937
+ const mapSearch = (input) => options.searchAllRentalsAtOnce ? failSearch({
5938
+ operation: "search.mapSearch",
5939
+ message: "mapSearch is not available with searchAllRentalsAtOnce; search already returns every result."
5940
+ }) : Effect.runPromise(limitSearch(Effect.gen(function* () {
5941
+ const { runtime, appliedFilters, unusedFilterKeys, scopedQueryInput } = yield* toScopedQuery(input);
5942
+ if (scopedQueryInput === void 0) return {
5943
+ items: [],
5944
+ totalCount: 0,
5945
+ appliedFilters,
5946
+ unusedFilterKeys
5947
+ };
5948
+ const rentals = [];
5949
+ let totalCount = 0;
5950
+ for (let page = 1;; page++) {
5951
+ const data = yield* graphql.execute(runtime.mapSearchQuery, {
5952
+ first: MAP_SEARCH_PAGE_SIZE,
5953
+ page,
5954
+ language: localeToLanguage(input.locale),
5955
+ dataAttributes: [...runtime.mapSearchDataAttributes],
5956
+ ...scopedQueryInput
5957
+ });
5958
+ rentals.push(...data.search.data);
5959
+ totalCount = data.search.paginatorInfo.total;
5960
+ if (!data.search.paginatorInfo.hasMorePages) break;
5961
+ }
5962
+ return {
5963
+ items: rentals.map((rental) => {
5964
+ const location = runtime.toLocation(runtime.parseVofficeUnitData(rental.data).known.loc);
5965
+ const id = rental.voffice_id.toString();
5966
+ return location === void 0 ? { id } : {
5967
+ id,
5968
+ location
5969
+ };
5970
+ }),
5971
+ totalCount,
5972
+ appliedFilters,
5973
+ unusedFilterKeys
5974
+ };
5975
+ })));
5976
+ return {
5977
+ search: (input) => options.searchAllRentalsAtOnce ? searchAllRentals(input) : searchOnePage(input),
5978
+ mapSearch
5979
+ };
5797
5980
  };
5798
5981
  //#endregion
5799
5982
  //#region src/legacy-v9/parser/filter/to-options.ts
@@ -6094,7 +6277,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
6094
6277
  });
6095
6278
  };
6096
6279
  const loadV9RentalsRuntime = Effect.tryPromise({
6097
- try: () => import("./rentals-DfNu7s7w.mjs"),
6280
+ try: () => import("./rentals-eqFhtCdT.mjs"),
6098
6281
  catch: (cause) => new CoreSDKError({
6099
6282
  source: "v10",
6100
6283
  operation: "v9.rentals.runtime",
@@ -6231,6 +6414,7 @@ function createWebsiteSDK({ config, options }) {
6231
6414
  config,
6232
6415
  options: v9Options
6233
6416
  });
6417
+ recordConstructedBackend("v9");
6234
6418
  return {
6235
6419
  backend: "v9",
6236
6420
  static: {
@@ -6239,7 +6423,10 @@ function createWebsiteSDK({ config, options }) {
6239
6423
  },
6240
6424
  live: {
6241
6425
  contact: { submit: contact.submit },
6242
- search: { search: search.search },
6426
+ search: {
6427
+ search: search.search,
6428
+ mapSearch: search.mapSearch
6429
+ },
6243
6430
  availability: {
6244
6431
  getInitialAvailability: availability.getInitialAvailability,
6245
6432
  getStartDateSelectedAvailability: availability.getStartDateSelectedAvailability
@@ -6267,7 +6454,7 @@ function createWebsiteSDK({ config, options }) {
6267
6454
  config,
6268
6455
  options: normalizedOptions
6269
6456
  });
6270
- return {
6457
+ const sdk = {
6271
6458
  backend: "v10",
6272
6459
  static: {
6273
6460
  rentals: { getRentals: (input) => runtime.runPromise(getRentalsEffect(input)) },
@@ -6277,7 +6464,10 @@ function createWebsiteSDK({ config, options }) {
6277
6464
  },
6278
6465
  live: {
6279
6466
  contact: { submit: (input) => runtime.runPromise(submitContactEffect(input)) },
6280
- search: { search: (input) => runtime.runPromise(searchEffect(input)) },
6467
+ search: {
6468
+ search: (input) => runtime.runPromise(searchEffect(input)),
6469
+ mapSearch: (input) => runtime.runPromise(mapSearchEffect(input))
6470
+ },
6281
6471
  availability: {
6282
6472
  getInitialAvailability: (input) => runtime.runPromise(getInitialAvailabilityEffect(input)),
6283
6473
  getStartDateSelectedAvailability: (input) => runtime.runPromise(getStartDateSelectedAvailabilityEffect(input))
@@ -6300,6 +6490,8 @@ function createWebsiteSDK({ config, options }) {
6300
6490
  },
6301
6491
  dispose: () => runtime.dispose()
6302
6492
  };
6493
+ recordConstructedBackend("v10");
6494
+ return sdk;
6303
6495
  }
6304
6496
  //#endregion
6305
- export { ServiceBeonDataSchema as $, ErgoBookRequestSchema as A, getTermsAndPrivacyPolicyEffect as At, OnOfficeUnitSchema as B, defineWebsiteSDKOptions as Bt, DocumentResourceSchema as C, clearAdditionalServicesEffect as Ct, DocumentTypeSchema as D, getInitialAvailabilityEffect as Dt, DocumentSummarySchema as E, getFiltersEffect as Et, ErgoPolicyNumberRequestSchema as F, selectInsuranceEffect as Ft, QuotePricesResponseSchema$1 as G, PaymentScheduleSchema$1 as H, defineV9PropertyHighlightSourcesFromUnknown as Ht, ErgoReadPreContractRequestSchema as I, selectInsurancePaymentEffect as It, RawObjectResponseSchema as J, QuoteSchema as K, ErgoTripAndCustomerRequestSchema as L, submitContactEffect as Lt, ErgoCreatePreContractRequestSchema as M, removeAdditionalServiceEffect as Mt, ErgoPersonSchema as N, searchEffect as Nt, ErgoAddressSchema as O, getRentalsEffect as Ot, ErgoPlanSearchRequestSchema as P, selectCancellationPolicyEffect as Pt, SearchPropertiesResponseSchema as Q, FacilityListResponseSchema as R, submitPaymentOption as Rt, DocumentResourceResponseSchema as S, bookInsuranceEffect as St, DocumentStatusUpdateRequestSchema as T, getBankTransferDetailsEffect as Tt, QuoteLineSchema$1 as U, V9_FACILITY_ATTRIBUTE_KEYS as Ut, PaymentScheduleItemSchema as V, defineV9PropertyHighlightSources as Vt, QuotePricesPayloadSchema as W, RegionListResponseSchema as X, RawVofficeObjectSchema as Y, RoomImageSchema as Z, CalendarDaySchema as _, V1_OPERATIONS as _t, parseQueryParameters as a, TileCollectionResponseSchema as at, CustomerUnitSummarySchema as b, addAdditionalServiceEffect as bt, V0OpenApiClient as c, TravelInsuranceBookingSchema as ct, makeV0OpenApiClientLive as d, UnitListItemSchema as dt, ServiceImageSchema as et, V1OpenApiClient as f, UnitListResponseSchema as ft, ApiEnvelopeBaseSchema as g, V1_BASE_URL as gt, makeV1OpenApiClientLive as h, UnitServicePriceSchema as ht, collectQueryParameters as i, SetupResponseSchema as it, ErgoCommonFieldsSchema as j, quoteEffect as jt, ErgoBankSchema as k, getStartDateSelectedAvailabilityEffect as kt, V0OpenApiClientError as l, TravelInsuranceBookingStoreRequestSchema as lt, makeV1OpenApiClientFetchLive as m, UnitResponseSchema as mt, makeV9CustomAttributeFilterCapabilities as n, ServiceListResponseSchema as nt, toQueryString as o, TileSchema as ot, V1OpenApiClientError as p, UnitOfferSchema as pt, QuoteServiceSchema as q, toBasicQueryInputs as r, SetupDataSchema as rt, applyVofficeFilterDerivedBasicQueryInputs as s, TileTagSchema as st, createWebsiteSDK as t, ServiceLimitSchema as tt, makeV0OpenApiClientFetchLive as u, UnitIdsResponseSchema as ut, CalendarResponseSchema$1 as v, VideoResponseSchema as vt, DocumentStatusSchema as w, createInsurancePreContractEffect as wt, DocumentCollectionResponseSchema as x, bookEffect as xt, CurrentMemberResponseSchema as y, decodeV1OperationResponse as yt, OnOfficeUnitCollectionResponseSchema as z, submitPaymentOptionEffect as zt };
6497
+ export { ServiceBeonDataSchema as $, ErgoBookRequestSchema as A, getTermsAndPrivacyPolicyEffect as At, OnOfficeUnitSchema as B, submitPaymentOptionEffect as Bt, DocumentResourceSchema as C, clearAdditionalServicesEffect as Ct, DocumentTypeSchema as D, getInitialAvailabilityEffect as Dt, DocumentSummarySchema as E, getFiltersEffect as Et, ErgoPolicyNumberRequestSchema as F, selectCancellationPolicyEffect as Ft, QuotePricesResponseSchema$1 as G, PaymentScheduleSchema$1 as H, defineV9PropertyHighlightSources as Ht, ErgoReadPreContractRequestSchema as I, selectInsuranceEffect as It, RawObjectResponseSchema as J, QuoteSchema as K, ErgoTripAndCustomerRequestSchema as L, selectInsurancePaymentEffect as Lt, ErgoCreatePreContractRequestSchema as M, quoteEffect as Mt, ErgoPersonSchema as N, removeAdditionalServiceEffect as Nt, ErgoAddressSchema as O, getRentalsEffect as Ot, ErgoPlanSearchRequestSchema as P, searchEffect as Pt, SearchPropertiesResponseSchema as Q, FacilityListResponseSchema as R, submitContactEffect as Rt, DocumentResourceResponseSchema as S, bookInsuranceEffect as St, DocumentStatusUpdateRequestSchema as T, getBankTransferDetailsEffect as Tt, QuoteLineSchema$1 as U, defineV9PropertyHighlightSourcesFromUnknown as Ut, PaymentScheduleItemSchema as V, defineWebsiteSDKOptions as Vt, QuotePricesPayloadSchema as W, V9_FACILITY_ATTRIBUTE_KEYS as Wt, RegionListResponseSchema as X, RawVofficeObjectSchema as Y, RoomImageSchema as Z, CalendarDaySchema as _, V1_OPERATIONS as _t, parseQueryParameters as a, TileCollectionResponseSchema as at, CustomerUnitSummarySchema as b, addAdditionalServiceEffect as bt, V0OpenApiClient as c, TravelInsuranceBookingSchema as ct, makeV0OpenApiClientLive as d, UnitListItemSchema as dt, ServiceImageSchema as et, V1OpenApiClient as f, UnitListResponseSchema as ft, ApiEnvelopeBaseSchema as g, V1_BASE_URL as gt, makeV1OpenApiClientLive as h, UnitServicePriceSchema as ht, collectQueryParameters as i, SetupResponseSchema as it, ErgoCommonFieldsSchema as j, mapSearchEffect as jt, ErgoBankSchema as k, getStartDateSelectedAvailabilityEffect as kt, V0OpenApiClientError as l, TravelInsuranceBookingStoreRequestSchema as lt, makeV1OpenApiClientFetchLive as m, UnitResponseSchema as mt, makeV9CustomAttributeFilterCapabilities as n, ServiceListResponseSchema as nt, toQueryString as o, TileSchema as ot, V1OpenApiClientError as p, UnitOfferSchema as pt, QuoteServiceSchema as q, toBasicQueryInputs as r, SetupDataSchema as rt, applyVofficeFilterDerivedBasicQueryInputs as s, TileTagSchema as st, createWebsiteSDK as t, ServiceLimitSchema as tt, makeV0OpenApiClientFetchLive as u, UnitIdsResponseSchema as ut, CalendarResponseSchema$1 as v, VideoResponseSchema as vt, DocumentStatusSchema as w, createInsurancePreContractEffect as wt, DocumentCollectionResponseSchema as x, bookEffect as xt, CurrentMemberResponseSchema as y, decodeV1OperationResponse as yt, OnOfficeUnitCollectionResponseSchema as z, submitPaymentOption as zt };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, LocaleSchema, QuoteAddAdditionalServiceInput, QuoteAddAdditionalServiceOutput, QuoteBookInsuranceInput, QuoteBookInsuranceOutput, QuoteClearAdditionalServicesInput, QuoteClearAdditionalServicesOutput, QuoteCreateInsurancePreContractInput, QuoteCreateInsurancePreContractOutput, QuoteQuoteInput, QuoteQuoteInput as QuoteQuoteInput$1, QuoteQuoteOutput, QuoteQuoteOutput as QuoteQuoteOutput$1, QuoteRemoveAdditionalServiceInput, QuoteRemoveAdditionalServiceOutput, QuoteSelectCancellationPolicyInput, QuoteSelectCancellationPolicyOutput, QuoteSelectInsuranceInput, QuoteSelectInsuranceOutput, QuoteSelectInsurancePaymentInput, QuoteSelectInsurancePaymentOutput, QuoteService as QuoteService$1, RentalGetRentalsInput, RentalGetRentalsInput as RentalGetRentalsInput$1, RentalGetRentalsOutput, RentalGetRentalsOutput as RentalGetRentalsOutput$1, RentalHighlightPrioritizationKey, RentalHighlightPrioritizationKey as RentalHighlightPrioritizationKey$1, RentalPropertyHighlightPrioritizationKey, RentalPropertyHighlightPrioritizationKey as RentalPropertyHighlightPrioritizationKey$1, RentalScope, RentalService, ResolvedCustomAttribute, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
1
+ import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, LocaleSchema, QuoteAddAdditionalServiceInput, QuoteAddAdditionalServiceOutput, QuoteBookInsuranceInput, QuoteBookInsuranceOutput, QuoteClearAdditionalServicesInput, QuoteClearAdditionalServicesOutput, QuoteCreateInsurancePreContractInput, QuoteCreateInsurancePreContractOutput, QuoteQuoteInput, QuoteQuoteInput as QuoteQuoteInput$1, QuoteQuoteOutput, QuoteQuoteOutput as QuoteQuoteOutput$1, QuoteRemoveAdditionalServiceInput, QuoteRemoveAdditionalServiceOutput, QuoteSelectCancellationPolicyInput, QuoteSelectCancellationPolicyOutput, QuoteSelectInsuranceInput, QuoteSelectInsuranceOutput, QuoteSelectInsurancePaymentInput, QuoteSelectInsurancePaymentOutput, QuoteService as QuoteService$1, RentalGetRentalsInput, RentalGetRentalsInput as RentalGetRentalsInput$1, RentalGetRentalsOutput, RentalGetRentalsOutput as RentalGetRentalsOutput$1, RentalHighlightPrioritizationKey, RentalHighlightPrioritizationKey as RentalHighlightPrioritizationKey$1, RentalPropertyHighlightPrioritizationKey, RentalPropertyHighlightPrioritizationKey as RentalPropertyHighlightPrioritizationKey$1, RentalScope, RentalService, ResolvedCustomAttribute, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchAllRentalsAtOnceInput, SearchAllRentalsAtOnceInput as SearchAllRentalsAtOnceInput$1, SearchMapSearchInput, SearchMapSearchInput as SearchMapSearchInput$1, SearchMapSearchInputSchema, SearchMapSearchOutput, SearchMapSearchOutput as SearchMapSearchOutput$1, SearchMapSearchOutputItem, SearchMapSearchOutputSchema, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
3
  import { HttpClient } from "effect/unstable/http";
4
4
  //#region src/legacy-v9/property-highlight-sources.d.ts
@@ -66,6 +66,12 @@ type WebsiteSDKOptions = {
66
66
  readonly rentalPropertyHighlightPrioritization?: readonly RentalPropertyHighlightPrioritizationKey$1[];
67
67
  readonly rentalScope?: RentalScope;
68
68
  readonly shouldAddProposedAdditionalServiceAmount?: boolean;
69
+ /**
70
+ * For portfolios of up to `SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS` rentals:
71
+ * `live.search.search` returns every result with its price in one call and takes
72
+ * no `cursor` or `limit`. `live.search.mapSearch` is not available. Default `false`.
73
+ */
74
+ readonly searchAllRentalsAtOnce?: boolean;
69
75
  };
70
76
  export declare const defineWebsiteSDKOptions: <Options extends WebsiteSDKOptions>(options: Options) => Options;
71
77
  //#endregion
@@ -76,6 +82,11 @@ type V9SearchSearchInput = Omit<SearchSearchInput$1, "rentalIdsIn" | "voucher" |
76
82
  readonly voucher?: never;
77
83
  readonly sort?: V9SearchSearchSort;
78
84
  };
85
+ /** `search` input with `searchAllRentalsAtOnce: true`: one call returns every result, so there are no pages. */
86
+ type V9SearchAllRentalsAtOnceInput = Omit<V9SearchSearchInput, "cursor" | "limit"> & {
87
+ readonly cursor?: never;
88
+ readonly limit?: never;
89
+ };
79
90
  //#endregion
80
91
  //#region src/legacy-v9/search-output.d.ts
81
92
  type V9SearchSearchOutputItem = SearchSearchOutputItem & {
@@ -114,6 +125,12 @@ type WebsiteSDKSharedLive = {
114
125
  };
115
126
  readonly search: {
116
127
  readonly search: (input: SearchSearchInput$1) => Promise<SearchSearchOutput$1>;
128
+ /**
129
+ * Every rental the search matches, with its location and without prices, so it
130
+ * stays fast for any number of matches. Rejects when the SDK was created with
131
+ * `searchAllRentalsAtOnce: true`.
132
+ */
133
+ readonly mapSearch: (input: SearchMapSearchInput$1) => Promise<SearchMapSearchOutput$1>;
117
134
  };
118
135
  readonly availability: {
119
136
  readonly getInitialAvailability: (input: AvailabilityGetInitialAvailabilityInput$1) => Promise<AvailabilityGetInitialAvailabilityOutput$1>;
@@ -136,9 +153,24 @@ type WebsiteSDKSharedLive = {
136
153
  };
137
154
  };
138
155
  type WebsiteSDKV10Live = WebsiteSDKSharedLive;
156
+ /** `live` of a v10 SDK created with `searchAllRentalsAtOnce: true`. */
157
+ type WebsiteSDKV10AllRentalsAtOnceLive = Omit<WebsiteSDKSharedLive, "search"> & {
158
+ readonly search: {
159
+ /** Every result with its price in one call; at most `SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS`. */
160
+ readonly search: (input: SearchAllRentalsAtOnceInput$1) => Promise<SearchSearchOutput$1>;
161
+ };
162
+ };
139
163
  type WebsiteSDKV9Live = Omit<WebsiteSDKSharedLive, "search"> & {
140
164
  readonly search: {
141
165
  readonly search: (input: V9SearchSearchInput) => Promise<V9SearchSearchOutput>;
166
+ readonly mapSearch: WebsiteSDKSharedLive["search"]["mapSearch"];
167
+ };
168
+ };
169
+ /** `live` of a v9 SDK created with `searchAllRentalsAtOnce: true`. */
170
+ type WebsiteSDKV9AllRentalsAtOnceLive = Omit<WebsiteSDKSharedLive, "search"> & {
171
+ readonly search: {
172
+ /** Every result with its price in one call; at most `SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS`. */
173
+ readonly search: (input: V9SearchAllRentalsAtOnceInput) => Promise<V9SearchSearchOutput>;
142
174
  };
143
175
  };
144
176
  type WebsiteSDKBase<Static extends WebsiteSDKSharedStatic, Live> = {
@@ -149,18 +181,43 @@ type WebsiteSDKBase<Static extends WebsiteSDKSharedStatic, Live> = {
149
181
  type WebsiteSDKV9 = WebsiteSDKBase<WebsiteSDKSharedStatic, WebsiteSDKV9Live> & {
150
182
  readonly backend: "v9";
151
183
  };
184
+ type WebsiteSDKV9AllRentalsAtOnce = WebsiteSDKBase<WebsiteSDKSharedStatic, WebsiteSDKV9AllRentalsAtOnceLive> & {
185
+ readonly backend: "v9";
186
+ };
152
187
  type WebsiteSDKV10 = WebsiteSDKBase<WebsiteSDKV10Static, WebsiteSDKV10Live> & {
153
188
  readonly backend: "v10";
154
189
  };
190
+ type WebsiteSDKV10AllRentalsAtOnce = WebsiteSDKBase<WebsiteSDKV10Static, WebsiteSDKV10AllRentalsAtOnceLive> & {
191
+ readonly backend: "v10";
192
+ };
155
193
  type WebsiteSDK = WebsiteSDKV9 | WebsiteSDKV10;
194
+ type WebsiteSDKAllRentalsAtOnce = WebsiteSDKV9AllRentalsAtOnce | WebsiteSDKV10AllRentalsAtOnce;
195
+ export declare function createWebsiteSDK({ config, options }: {
196
+ readonly config: WebsiteV9Config;
197
+ readonly options: WebsiteSDKOptions & {
198
+ readonly searchAllRentalsAtOnce: true;
199
+ };
200
+ }): WebsiteSDKV9AllRentalsAtOnce;
156
201
  export declare function createWebsiteSDK({ config, options }: {
157
202
  readonly config: WebsiteV9Config;
158
203
  readonly options?: WebsiteSDKOptions;
159
204
  }): WebsiteSDKV9;
205
+ export declare function createWebsiteSDK({ config, options }: {
206
+ readonly config: WebsiteV10Config;
207
+ readonly options: WebsiteSDKOptions & {
208
+ readonly searchAllRentalsAtOnce: true;
209
+ };
210
+ }): WebsiteSDKV10AllRentalsAtOnce;
160
211
  export declare function createWebsiteSDK({ config, options }: {
161
212
  readonly config: WebsiteV10Config;
162
213
  readonly options?: WebsiteSDKOptions;
163
214
  }): WebsiteSDKV10;
215
+ export declare function createWebsiteSDK({ config, options }: {
216
+ readonly config: WebsiteSDKConfig;
217
+ readonly options: WebsiteSDKOptions & {
218
+ readonly searchAllRentalsAtOnce: true;
219
+ };
220
+ }): WebsiteSDKAllRentalsAtOnce;
164
221
  export declare function createWebsiteSDK({ config, options }: {
165
222
  readonly config: WebsiteSDKConfig;
166
223
  readonly options?: WebsiteSDKOptions;
@@ -513,8 +570,25 @@ export declare const searchEffect: (input: SearchSearchInput$1) => Effect.Effect
513
570
  readonly pageInfo: {
514
571
  readonly hasNextPage: boolean;
515
572
  readonly nextCursor?: string;
573
+ readonly totalCount: number;
516
574
  };
517
575
  }, CoreSDKError$1, SearchService>;
576
+ export declare const mapSearchEffect: (input: SearchMapSearchInput$1) => Effect.Effect<{
577
+ readonly items: readonly {
578
+ readonly id: string;
579
+ readonly location?: {
580
+ readonly latitude: number;
581
+ readonly longitude: number;
582
+ };
583
+ }[];
584
+ readonly totalCount: number;
585
+ readonly appliedFilters: readonly {
586
+ readonly key: string;
587
+ readonly label: string;
588
+ readonly value?: string;
589
+ }[];
590
+ readonly unusedFilterKeys: readonly string[];
591
+ }, CoreSDKError$1, SearchService>;
518
592
  export declare const getInitialAvailabilityEffect: (input: AvailabilityGetInitialAvailabilityInput$1) => Effect.Effect<{
519
593
  readonly calendarDays: {
520
594
  readonly [x: string]: {
@@ -3215,10 +3289,10 @@ interface components {
3215
3289
  onsiteOptional?: components["schemas"]["QuoteLine"][];
3216
3290
  usage?: components["schemas"]["QuoteLine"][];
3217
3291
  errors?: {
3218
- [key: string]: string;
3219
- } | {
3220
3292
  [key: string]: unknown;
3221
- }[];
3293
+ }[] | {
3294
+ [key: string]: string;
3295
+ };
3222
3296
  warnings?: {
3223
3297
  [key: string]: unknown;
3224
3298
  }[];
@@ -7526,4 +7600,4 @@ export type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
7526
7600
  export type RentalSearchInput = SearchSearchInput$1;
7527
7601
  export type RentalSearchOutput = SearchSearchOutput$1;
7528
7602
  //#endregion
7529
- 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, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
7603
+ export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9SearchAllRentalsAtOnceInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };