@v-office/website-sdk 2.24.1 → 2.25.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,7 @@
1
1
  #!/usr/bin/env node
2
- import { Ut as defineV9PropertyHighlightSourcesFromUnknown, Vt as defineWebsiteSDKOptions, t as createWebsiteSDK } from "./client-DC4LG3CP.mjs";
2
+ import { Ht as defineWebsiteSDKOptions, Wt as defineV9PropertyHighlightSourcesFromUnknown, c as makeV9GraphQLClient, d as makeV0OpenApiClientFetchLive, l as V0OpenApiClient, t as createWebsiteSDK } from "./client-0Lgv-Gb_.mjs";
3
+ import { c as parseVofficeRatingData } from "./v9-data-C3SWtDGs.mjs";
4
+ import { s as rentalsAllWithoutFeedbacksQuery } from "./operations-DwURbo0b.mjs";
3
5
  import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
4
6
  import { ByteSize, Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
5
7
  import { Command, Flag } from "effect/unstable/cli";
@@ -16,7 +18,7 @@ var CLICheckFailed = class extends Error {
16
18
  const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
17
19
  //#endregion
18
20
  //#region package.json
19
- var version = "2.24.1";
21
+ var version = "2.25.0";
20
22
  //#endregion
21
23
  //#region src/cli/output.ts
22
24
  const toJson = (value) => Effect.try({
@@ -276,6 +278,90 @@ const liveCommands = [
276
278
  Command.make("contact").pipe(Command.withDescription("Run live contact operations."), Command.withSubcommands([contactSubmit]))
277
279
  ];
278
280
  //#endregion
281
+ //#region src/legacy-v9/review-criteria-discovery.ts
282
+ const DEFAULT_SAMPLE_SIZE = 5;
283
+ const criterionKeyPattern = /^fb_[1-9]\d*$/;
284
+ const findMostReviewedRentalIds = (config) => makeV9GraphQLClient(config).execute(rentalsAllWithoutFeedbacksQuery, {
285
+ language: "de",
286
+ rentalRatingDataAttributes: ["fb_count"]
287
+ }).pipe(Effect.map((data) => data.all.map((rental) => ({
288
+ id: rental.voffice_id,
289
+ count: parseVofficeRatingData(rental.voffice_rating?.data).known.fb_count ?? 0
290
+ })).filter((rental) => rental.count > 0).sort((left, right) => right.count - left.count).map((rental) => rental.id)));
291
+ const isUnknownUnit = (error) => error.status === 503 && typeof error.raw === "object" && error.raw !== null && error.raw.reason === "could not find unit";
292
+ const loadUnitCriterionValues = (unitId) => Effect.gen(function* () {
293
+ const result = yield* (yield* V0OpenApiClient).execute("proxyVofficeAction", { query: {
294
+ actionName: "getUnit",
295
+ data: JSON.stringify({ id: unitId })
296
+ } }).pipe(Effect.catch((error) => isUnknownUnit(error) ? Effect.succeed(void 0) : Effect.fail(error)));
297
+ if (result === void 0) return void 0;
298
+ const response = result.raw;
299
+ if (response.ok === false) return void 0;
300
+ return Object.entries(response.data ?? {}).filter(([key, value]) => criterionKeyPattern.test(key) && (typeof value === "number" || typeof value === "string" && value.trim() !== ""));
301
+ });
302
+ const discoverV9ReviewCriteria = ({ config, rentalIds }) => Effect.runPromise(Effect.gen(function* () {
303
+ const explicit = rentalIds !== void 0 && rentalIds.length > 0;
304
+ const candidates = explicit ? rentalIds : yield* findMostReviewedRentalIds(config);
305
+ const checkedRentalIds = [];
306
+ const skippedRentalIds = [];
307
+ const criteria = /* @__PURE__ */ new Map();
308
+ for (const unitId of candidates) {
309
+ if (!explicit && checkedRentalIds.length === DEFAULT_SAMPLE_SIZE) break;
310
+ const values = yield* loadUnitCriterionValues(unitId);
311
+ if (values === void 0) {
312
+ skippedRentalIds.push(unitId);
313
+ continue;
314
+ }
315
+ checkedRentalIds.push(unitId);
316
+ for (const [key, value] of values) {
317
+ const criterion = criteria.get(key) ?? {
318
+ type: typeof value === "number" ? "stars" : "text",
319
+ rentalIds: []
320
+ };
321
+ criterion.rentalIds.push(unitId.toString());
322
+ criteria.set(key, criterion);
323
+ }
324
+ }
325
+ return {
326
+ checkedRentalIds: checkedRentalIds.map(String),
327
+ skippedRentalIds: skippedRentalIds.map(String),
328
+ criteria: [...criteria.entries()].map(([v9, criterion]) => ({
329
+ v9,
330
+ ...criterion
331
+ }))
332
+ };
333
+ }).pipe(Effect.provide(makeV0OpenApiClientFetchLive({
334
+ apiKey: config.apiKey,
335
+ ...config.v0ApiBaseUrl === void 0 ? {} : { baseUrl: config.v0ApiBaseUrl }
336
+ }))));
337
+ //#endregion
338
+ //#region src/cli/commands/review-criteria.ts
339
+ const parseRentalIds = (value) => {
340
+ const ids = value.split(",").map((id) => Number(id.trim()));
341
+ return ids.every((id) => Number.isSafeInteger(id) && id > 0) ? Effect.succeed(ids) : Effect.fail(new CLICheckFailed("Expected --rental-ids to list vOffice unit IDs."));
342
+ };
343
+ const reviewCriteriaCommand = Command.make("review-criteria", { rentalIds: Flag.String("rental-ids").pipe(Flag.optional, Flag.withDescription("Comma-separated vOffice unit IDs to check. Defaults to the five units with the most feedbacks.")) }, ({ rentalIds }) => Effect.gen(function* () {
344
+ const root = yield* websiteSdkCommand;
345
+ if (root.backend !== "v9") return yield* Effect.fail(new CLICheckFailed("review-criteria is only available for --backend v9."));
346
+ const { config } = yield* loadCLIConfig(root);
347
+ if (config.backend !== "v9") return yield* Effect.fail(new CLICheckFailed("review-criteria needs a v9 config."));
348
+ const ids = Option.isSome(rentalIds) ? yield* parseRentalIds(rentalIds.value) : void 0;
349
+ const result = yield* Effect.tryPromise({
350
+ try: () => discoverV9ReviewCriteria({
351
+ config,
352
+ ...ids === void 0 ? {} : { rentalIds: ids }
353
+ }),
354
+ catch: (cause) => toCLIError("Review criteria discovery failed", cause)
355
+ });
356
+ yield* printOutput(root, result);
357
+ })).pipe(Command.withDescription("List the v9 fb_* review criteria vOffice returns for units, for the v9Reviews option."), Command.withExamples([{
358
+ command: "website-sdk --backend v9 review-criteria",
359
+ description: "List the criteria of the five units with the most feedbacks."
360
+ }, {
361
+ command: "website-sdk --backend v9 review-criteria --rental-ids 212350,212351",
362
+ description: "List the criteria of specific units."
363
+ }]));
364
+ //#endregion
279
365
  //#region src/cli/commands/static.ts
280
366
  const parseSearchSort = (input) => parseJson(input, "--sort").pipe(Effect.flatMap((value) => Schema.decodeUnknownEffect(SearchSearchSortSchema, { onExcessProperty: "error" })(value).pipe(Effect.mapError((cause) => toCLIError("Invalid --sort value", cause)))));
281
367
  const staticCommands = [
@@ -332,6 +418,7 @@ const staticCommands = [
332
418
  const cliCommand = websiteSdkCommand.pipe(Command.withSubcommands([
333
419
  configCommand,
334
420
  ...staticCommands,
421
+ reviewCriteriaCommand,
335
422
  availabilityCommand,
336
423
  ...liveCommands
337
424
  ]));
@@ -1,4 +1,4 @@
1
- import { a as customDataAttribute } from "./v9-data-BnYxa2Ek.mjs";
1
+ import { a as customDataAttribute } from "./v9-data-C3SWtDGs.mjs";
2
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";
@@ -176,16 +176,16 @@ const EMPTY_V9_PROPERTY_HIGHLIGHT_SOURCE_REGISTRY = {
176
176
  keys: {}
177
177
  };
178
178
  const stableKeyPattern = /^[A-Za-z0-9_-]+$/;
179
- const dataAttributePattern = /^p_[1-9]\d*$/;
179
+ const dataAttributePattern$1 = /^p_[1-9]\d*$/;
180
180
  const reservedKeys = new Set(V9_FACILITY_ATTRIBUTE_KEYS);
181
- const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
181
+ const isRecord$1 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
182
182
  const invalidSources = (issues) => new CoreSDKError({
183
183
  source: "v9",
184
184
  operation: "v9.property-highlight-sources",
185
185
  message: `Invalid v9 property highlight sources:\n${issues.map((issue) => `- ${issue}`).join("\n")}`
186
186
  });
187
187
  const parseV9PropertyHighlightSources = (input) => {
188
- if (!isRecord(input)) throw invalidSources(["expected an object keyed by stable highlight key"]);
188
+ if (!isRecord$1(input)) throw invalidSources(["expected an object keyed by stable highlight key"]);
189
189
  const issues = [];
190
190
  const sources = [];
191
191
  const sourceByBinding = /* @__PURE__ */ new Map();
@@ -198,14 +198,14 @@ const parseV9PropertyHighlightSources = (input) => {
198
198
  issues.push(`${key}: key is reserved for a built-in v9 facility highlight`);
199
199
  continue;
200
200
  }
201
- if (!isRecord(source)) {
201
+ if (!isRecord$1(source)) {
202
202
  issues.push(`${key}: expected an object`);
203
203
  continue;
204
204
  }
205
205
  const excessKeys = Object.keys(source).filter((sourceKey) => sourceKey !== "v9" && sourceKey !== "type");
206
206
  if (excessKeys.length > 0) issues.push(`${key}: unsupported field(s) ${excessKeys.join(", ")}`);
207
207
  const v9 = source.v9;
208
- if (typeof v9 !== "string" || !dataAttributePattern.test(v9)) {
208
+ if (typeof v9 !== "string" || !dataAttributePattern$1.test(v9)) {
209
209
  issues.push(`${key}.v9: expected a positive-integer p_* data attribute`);
210
210
  continue;
211
211
  }
@@ -245,6 +245,64 @@ const selectV9PropertyHighlightSources = ({ highlightPrioritization, registry })
245
245
  return selected;
246
246
  };
247
247
  //#endregion
248
+ //#region src/legacy-v9/review-options.ts
249
+ const LOCALES = ["de-DE", "en-US"];
250
+ const BOOLEAN_OPTION_KEYS = [
251
+ "showAuthorCity",
252
+ "includeItemsWithoutText",
253
+ "includeItemsWithoutRating"
254
+ ];
255
+ const OPTION_KEYS = /* @__PURE__ */ new Set(["criteria", ...BOOLEAN_OPTION_KEYS]);
256
+ const CRITERION_KEYS = /* @__PURE__ */ new Set([
257
+ "v9",
258
+ "type",
259
+ "label"
260
+ ]);
261
+ const dataAttributePattern = /^fb_[1-9]\d*$/;
262
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
263
+ const criterionIssues = (criterion, index, seen) => {
264
+ const path = `criteria[${index}]`;
265
+ if (!isRecord(criterion)) return [`${path}: expected an object`];
266
+ const issues = Object.keys(criterion).filter((key) => !CRITERION_KEYS.has(key)).map((key) => `${path}: unsupported field ${key}`);
267
+ const v9 = criterion.v9;
268
+ if (typeof v9 !== "string" || !dataAttributePattern.test(v9)) issues.push(`${path}.v9: expected a positive-integer fb_* data attribute`);
269
+ else if (seen.has(v9)) issues.push(`${path}.v9: ${v9} is configured more than once`);
270
+ else seen.add(v9);
271
+ if (criterion.type !== "stars" && criterion.type !== "text") issues.push(`${path}.type: expected "stars" or "text"`);
272
+ const label = criterion.label;
273
+ if (!isRecord(label)) issues.push(`${path}.label: expected a label for ${LOCALES.join(", ")}`);
274
+ else {
275
+ const missing = LOCALES.filter((locale) => typeof label[locale] !== "string" || label[locale].trim() === "");
276
+ if (missing.length > 0) issues.push(`${path}.label: missing a label for ${missing.join(", ")}`);
277
+ }
278
+ return issues;
279
+ };
280
+ const normalizeV9ReviewsOptions = (input = {}) => {
281
+ const issues = [];
282
+ if (!isRecord(input)) issues.push("expected an object");
283
+ else {
284
+ for (const key of Object.keys(input)) if (!OPTION_KEYS.has(key)) issues.push(`unsupported field ${key}`);
285
+ for (const key of BOOLEAN_OPTION_KEYS) if (input[key] !== void 0 && typeof input[key] !== "boolean") issues.push(`${key}: expected a boolean`);
286
+ if (input.criteria !== void 0 && !Array.isArray(input.criteria)) issues.push("criteria: expected an array");
287
+ else {
288
+ const seen = /* @__PURE__ */ new Set();
289
+ (input.criteria ?? []).forEach((criterion, index) => issues.push(...criterionIssues(criterion, index, seen)));
290
+ }
291
+ }
292
+ if (issues.length > 0) throw new CoreSDKError({
293
+ source: "v9",
294
+ operation: "v9.reviews",
295
+ message: `Invalid v9Reviews option:\n${issues.map((issue) => `- ${issue}`).join("\n")}`
296
+ });
297
+ const options = input;
298
+ return {
299
+ criteria: options.criteria ?? [],
300
+ showAuthorCity: options.showAuthorCity ?? false,
301
+ includeItemsWithoutText: options.includeItemsWithoutText ?? false,
302
+ includeItemsWithoutRating: options.includeItemsWithoutRating ?? false
303
+ };
304
+ };
305
+ //#endregion
248
306
  //#region src/config.ts
249
307
  const normalizeWebsiteSDKOptions = (options = {}) => {
250
308
  assertNoReservedQueryKeys(options);
@@ -254,6 +312,7 @@ const normalizeWebsiteSDKOptions = (options = {}) => {
254
312
  ...options.translationOverrides === void 0 ? {} : { translationOverrides: options.translationOverrides },
255
313
  customAttributes: options.customAttributes ?? EMPTY_CUSTOM_ATTRIBUTE_REGISTRY,
256
314
  v9PropertyHighlightSources: options.v9PropertyHighlightSources ?? EMPTY_V9_PROPERTY_HIGHLIGHT_SOURCE_REGISTRY,
315
+ v9Reviews: normalizeV9ReviewsOptions(options.v9Reviews),
257
316
  customAttributeFilterDefinitions: options.customAttributeFilterDefinitions ?? [],
258
317
  rentalHighlightPrioritization: options.rentalHighlightPrioritization ?? DEFAULT_RENTAL_HIGHLIGHT_PRIORITIZATION,
259
318
  rentalPropertyHighlightPrioritization: options.rentalPropertyHighlightPrioritization ?? DEFAULT_RENTAL_PROPERTY_HIGHLIGHT_PRIORITIZATION,
@@ -273,6 +332,7 @@ const toV9Options = (options) => {
273
332
  ...options.translationOverrides === void 0 ? {} : { translationOverrides: options.translationOverrides },
274
333
  customAttributes: options.customAttributes,
275
334
  v9PropertyHighlightSources: options.v9PropertyHighlightSources,
335
+ v9Reviews: options.v9Reviews,
276
336
  customAttributeFilterDefinitions: options.customAttributeFilterDefinitions,
277
337
  rentalHighlightPrioritization: options.rentalHighlightPrioritization,
278
338
  rentalPropertyHighlightPrioritization: options.rentalPropertyHighlightPrioritization,
@@ -1550,7 +1610,9 @@ var core_default$1 = {
1550
1610
  "Property.propertyType.option.FARM": "Bauernhof",
1551
1611
  "Property.propertyType.option.HOLIDAY_HOME_COMPLEX": "Ferienpark",
1552
1612
  "Property.propertyType.option.HOSTEL": "Hostel",
1553
- "Property.propertyType.option.HOTEL": "Hotel"
1613
+ "Property.propertyType.option.HOTEL": "Hotel",
1614
+ "reviews.item.guest": "Gast",
1615
+ "reviews.item.authorWithCity": "{author} aus {city}"
1554
1616
  };
1555
1617
  //#endregion
1556
1618
  //#region translations/v9/de-DE/filter.json
@@ -2289,7 +2351,9 @@ var core_default = {
2289
2351
  "Property.propertyType.option.FARM": "Farm",
2290
2352
  "Property.propertyType.option.HOLIDAY_HOME_COMPLEX": "Holiday Home Complex",
2291
2353
  "Property.propertyType.option.HOSTEL": "Hostel",
2292
- "Property.propertyType.option.HOTEL": "Hotel"
2354
+ "Property.propertyType.option.HOTEL": "Hotel",
2355
+ "reviews.item.guest": "Guest",
2356
+ "reviews.item.authorWithCity": "{author} from {city}"
2293
2357
  };
2294
2358
  //#endregion
2295
2359
  //#region translations/v9/en-US/filter.json
@@ -5724,7 +5788,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
5724
5788
  return page;
5725
5789
  });
5726
5790
  const loadV9SearchRuntime = Effect.tryPromise({
5727
- try: () => import("./search-CKL-8T8q.mjs"),
5791
+ try: () => import("./search-BLTTQAsG.mjs"),
5728
5792
  catch: (cause) => new CoreSDKError({
5729
5793
  source: "v10",
5730
5794
  operation: "v9.search.runtime",
@@ -6256,12 +6320,7 @@ const DEFAULT_RENTAL_FEEDBACK_DATA_ATTRIBUTES = [
6256
6320
  "lang",
6257
6321
  "highlighted",
6258
6322
  "forename",
6259
- "surname",
6260
- "city",
6261
6323
  "text",
6262
- "fb_1429",
6263
- "fb_4905",
6264
- "fb_4906",
6265
6324
  "avgRating"
6266
6325
  ];
6267
6326
  const orderRentalsById = ({ rentalIds, rentals }) => {
@@ -6277,7 +6336,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
6277
6336
  });
6278
6337
  };
6279
6338
  const loadV9RentalsRuntime = Effect.tryPromise({
6280
- try: () => import("./rentals-eqFhtCdT.mjs"),
6339
+ try: () => import("./rentals-Dn0-kGWD.mjs"),
6281
6340
  catch: (cause) => new CoreSDKError({
6282
6341
  source: "v10",
6283
6342
  operation: "v9.rentals.runtime",
@@ -6300,6 +6359,11 @@ const makeV9RentalsApi = ({ config, options }) => {
6300
6359
  highlightPrioritization: options.rentalPropertyHighlightPrioritization,
6301
6360
  registry: options.v9PropertyHighlightSources
6302
6361
  }).map((source) => customDataAttribute(source.v9))];
6362
+ const rentalFeedbackDataAttributes = [
6363
+ ...DEFAULT_RENTAL_FEEDBACK_DATA_ATTRIBUTES,
6364
+ ...options.v9Reviews.showAuthorCity ? ["city"] : [],
6365
+ ...options.v9Reviews.criteria.map((criterion) => customDataAttribute(criterion.v9))
6366
+ ];
6303
6367
  const relationAttributeId = config.facilityObjectGroupRelationAttributeId;
6304
6368
  const rentalIds = (yield* graphql.execute(rentalIdsQuery, {})).all.map((rental) => rental.voffice_id);
6305
6369
  if (rentalIds.length === 0) return [];
@@ -6360,7 +6424,7 @@ const makeV9RentalsApi = ({ config, options }) => {
6360
6424
  const feedbacksData = yield* graphql.execute(rentalsAllFeedbacksQuery, {
6361
6425
  language,
6362
6426
  voffice_ids: batch.map((rental) => rental.voffice_id),
6363
- rentalFeedbackDataAttributes: [...DEFAULT_RENTAL_FEEDBACK_DATA_ATTRIBUTES]
6427
+ rentalFeedbackDataAttributes
6364
6428
  });
6365
6429
  feedbackRentals.push(...feedbacksData.all);
6366
6430
  }
@@ -6377,7 +6441,8 @@ const makeV9RentalsApi = ({ config, options }) => {
6377
6441
  rentalHighlightPrioritization: [...options.rentalHighlightPrioritization],
6378
6442
  rentalPropertyHighlightPrioritization: [...options.rentalPropertyHighlightPrioritization],
6379
6443
  customAttributes: options.customAttributes,
6380
- v9PropertyHighlightSources: options.v9PropertyHighlightSources
6444
+ v9PropertyHighlightSources: options.v9PropertyHighlightSources,
6445
+ reviews: options.v9Reviews
6381
6446
  })));
6382
6447
  })) };
6383
6448
  };
@@ -6494,4 +6559,4 @@ function createWebsiteSDK({ config, options }) {
6494
6559
  return sdk;
6495
6560
  }
6496
6561
  //#endregion
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 };
6562
+ export { SearchPropertiesResponseSchema as $, ErgoBankSchema as A, getStartDateSelectedAvailabilityEffect as At, OnOfficeUnitCollectionResponseSchema as B, submitPaymentOption as Bt, DocumentResourceResponseSchema as C, bookInsuranceEffect as Ct, DocumentSummarySchema as D, getFiltersEffect as Dt, DocumentStatusUpdateRequestSchema as E, getBankTransferDetailsEffect as Et, ErgoPlanSearchRequestSchema as F, searchEffect as Ft, QuotePricesPayloadSchema as G, V9_FACILITY_ATTRIBUTE_KEYS as Gt, PaymentScheduleItemSchema as H, defineWebsiteSDKOptions as Ht, ErgoPolicyNumberRequestSchema as I, selectCancellationPolicyEffect as It, QuoteServiceSchema as J, QuotePricesResponseSchema$1 as K, ErgoReadPreContractRequestSchema as L, selectInsuranceEffect as Lt, ErgoCommonFieldsSchema as M, mapSearchEffect as Mt, ErgoCreatePreContractRequestSchema as N, quoteEffect as Nt, DocumentTypeSchema as O, getInitialAvailabilityEffect as Ot, ErgoPersonSchema as P, removeAdditionalServiceEffect as Pt, RoomImageSchema as Q, ErgoTripAndCustomerRequestSchema as R, selectInsurancePaymentEffect as Rt, DocumentCollectionResponseSchema as S, bookEffect as St, DocumentStatusSchema as T, createInsurancePreContractEffect as Tt, PaymentScheduleSchema$1 as U, defineV9PropertyHighlightSources as Ut, OnOfficeUnitSchema as V, submitPaymentOptionEffect as Vt, QuoteLineSchema$1 as W, defineV9PropertyHighlightSourcesFromUnknown as Wt, RawVofficeObjectSchema as X, RawObjectResponseSchema as Y, RegionListResponseSchema as Z, ApiEnvelopeBaseSchema as _, V1_BASE_URL as _t, parseQueryParameters as a, SetupResponseSchema as at, CurrentMemberResponseSchema as b, decodeV1OperationResponse as bt, makeV9GraphQLClient as c, TileTagSchema as ct, makeV0OpenApiClientFetchLive as d, UnitIdsResponseSchema as dt, ServiceBeonDataSchema as et, makeV0OpenApiClientLive as f, UnitListItemSchema as ft, makeV1OpenApiClientLive as g, UnitServicePriceSchema as gt, makeV1OpenApiClientFetchLive as h, UnitResponseSchema as ht, collectQueryParameters as i, SetupDataSchema as it, ErgoBookRequestSchema as j, getTermsAndPrivacyPolicyEffect as jt, ErgoAddressSchema as k, getRentalsEffect as kt, V0OpenApiClient as l, TravelInsuranceBookingSchema as lt, V1OpenApiClientError as m, UnitOfferSchema as mt, makeV9CustomAttributeFilterCapabilities as n, ServiceLimitSchema as nt, toQueryString as o, TileCollectionResponseSchema as ot, V1OpenApiClient as p, UnitListResponseSchema as pt, QuoteSchema as q, toBasicQueryInputs as r, ServiceListResponseSchema as rt, applyVofficeFilterDerivedBasicQueryInputs as s, TileSchema as st, createWebsiteSDK as t, ServiceImageSchema as tt, V0OpenApiClientError as u, TravelInsuranceBookingStoreRequestSchema as ut, CalendarDaySchema as v, V1_OPERATIONS as vt, DocumentResourceSchema as w, clearAdditionalServicesEffect as wt, CustomerUnitSummarySchema as x, addAdditionalServiceEffect as xt, CalendarResponseSchema$1 as y, VideoResponseSchema as yt, FacilityListResponseSchema as z, submitContactEffect 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, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchAllRentalsAtOnceInput, SearchAllRentalsAtOnceInput as SearchAllRentalsAtOnceInput$1, SearchMapSearchInput, SearchMapSearchInput as SearchMapSearchInput$1, SearchMapSearchInputSchema, SearchMapSearchOutput, SearchMapSearchOutput as SearchMapSearchOutput$1, SearchMapSearchOutputItem, SearchMapSearchOutputSchema, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
1
+ import { AdditionalServiceLimitExceeded, AvailabilityGetInitialAvailabilityInput, AvailabilityGetInitialAvailabilityInput as AvailabilityGetInitialAvailabilityInput$1, AvailabilityGetInitialAvailabilityOutput, AvailabilityGetInitialAvailabilityOutput as AvailabilityGetInitialAvailabilityOutput$1, AvailabilityGetStartDateSelectedAvailabilityInput, AvailabilityGetStartDateSelectedAvailabilityInput as AvailabilityGetStartDateSelectedAvailabilityInput$1, AvailabilityGetStartDateSelectedAvailabilityOutput, AvailabilityGetStartDateSelectedAvailabilityOutput as AvailabilityGetStartDateSelectedAvailabilityOutput$1, AvailabilityService, BackendKind, BookingBankTransferDetails, BookingBankTransferDetails as BookingBankTransferDetails$1, BookingBookInput, BookingBookInput as BookingBookInput$1, BookingBookOutput, BookingBookOutput as BookingBookOutput$1, BookingPayment, BookingPaymentAlternative, BookingPaymentOption, BookingPaymentScheduleItem, BookingPaymentScheduleKind, BookingPaymentScheduleLine, BookingService, ContactService, ContactSubmitInput, ContactSubmitInput as ContactSubmitInput$1, ContactSubmitOutput, ContactSubmitOutput as ContactSubmitOutput$1, ContactSubmitValidationIssue, ContactSubmitValidationIssueCode, CoreSDKError, CoreSDKError as CMSError, CoreSDKError as CoreSDKError$1, CustomAttributeCatalog, CustomAttributeCatalogDefinitionInput, CustomAttributeCatalogInput, CustomAttributeCatalogSchema, CustomAttributeCategoryKey, CustomAttributeFilterCategoryKey, CustomAttributeFilterDefinition, CustomAttributeFilterDefinition as CustomAttributeFilterDefinition$1, CustomAttributeFilterExpression, CustomAttributeFilterLabel, CustomAttributeFilterNumericBounds, CustomAttributeFilterOption, CustomAttributeOverridesInput, CustomAttributeRegistry, CustomAttributeRegistrySnapshot, CustomAttributeRegistrySnapshot as CustomAttributeRegistrySnapshot$1, CustomAttributeSelection, DocumentsGetTermsAndPrivacyPolicyInput, DocumentsGetTermsAndPrivacyPolicyInput as DocumentsGetTermsAndPrivacyPolicyInput$1, DocumentsGetTermsAndPrivacyPolicyOutput, DocumentsGetTermsAndPrivacyPolicyOutput as DocumentsGetTermsAndPrivacyPolicyOutput$1, DocumentsService, FilterGetFiltersInput, FilterGetFiltersInput as FilterGetFiltersInput$1, FilterGetFiltersOutput, FilterGetFiltersOutput as FilterGetFiltersOutput$1, FilterService, GuestQuote, GuestQuoteInput, GuestQuoteInsurance, GuestQuoteResult, GuestQuoteSchema, GuestQuoteSelectionResult, GuestQuoteVoucher, InsuranceBookingOutput, InsuranceCustomerInformationInput, InsurancePaymentInformationInput, InsurancePaymentOptionOutput, InsurancePreContractOutput, InvalidAdditionalServiceQuantity, Locale, Locale as Locale$1, LocaleSchema, QuoteAddAdditionalServiceInput, QuoteAddAdditionalServiceOutput, QuoteBookInsuranceInput, QuoteBookInsuranceOutput, QuoteClearAdditionalServicesInput, QuoteClearAdditionalServicesOutput, QuoteCreateInsurancePreContractInput, QuoteCreateInsurancePreContractOutput, QuoteQuoteInput, QuoteQuoteInput as QuoteQuoteInput$1, QuoteQuoteOutput, QuoteQuoteOutput as QuoteQuoteOutput$1, QuoteRemoveAdditionalServiceInput, QuoteRemoveAdditionalServiceOutput, QuoteSelectCancellationPolicyInput, QuoteSelectCancellationPolicyOutput, QuoteSelectInsuranceInput, QuoteSelectInsuranceOutput, QuoteSelectInsurancePaymentInput, QuoteSelectInsurancePaymentOutput, QuoteService as QuoteService$1, RentalGetRentalsInput, RentalGetRentalsInput as RentalGetRentalsInput$1, RentalGetRentalsOutput, RentalGetRentalsOutput as RentalGetRentalsOutput$1, RentalHighlightPrioritizationKey, RentalHighlightPrioritizationKey as RentalHighlightPrioritizationKey$1, RentalPropertyHighlightPrioritizationKey, RentalPropertyHighlightPrioritizationKey as RentalPropertyHighlightPrioritizationKey$1, RentalScope, RentalService, ResolvedCustomAttribute, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchAllRentalsAtOnceInput, SearchAllRentalsAtOnceInput as SearchAllRentalsAtOnceInput$1, SearchMapSearchInput, SearchMapSearchInput as SearchMapSearchInput$1, SearchMapSearchInputSchema, SearchMapSearchOutput, SearchMapSearchOutput as SearchMapSearchOutput$1, SearchMapSearchOutputItem, SearchMapSearchOutputSchema, SearchSearchAlternative, SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, SearchSearchFieldSort, SearchSearchFieldSort as SearchSearchFieldSort$1, SearchSearchFieldSortSchema, SearchSearchInput, SearchSearchInput as SearchSearchInput$1, SearchSearchInputSchema, SearchSearchOutput, SearchSearchOutput as SearchSearchOutput$1, SearchSearchOutputItem, SearchSearchOutputSchema, SearchSearchPriceSort, SearchSearchPriceSortSchema, SearchSearchRandomSort, SearchSearchRandomSortSchema, SearchSearchRatingSort, SearchSearchRatingSortSchema, SearchSearchSort, SearchSearchSort as SearchSearchSort$1, SearchSearchSortSchema, SearchService, SearchSortDirection, SearchSortDirectionSchema, SelectableInsuranceOptionOutput, SelectedInsuranceInformationInput, SubmittableBookingPaymentOption, SubmittableBookingPaymentOption as SubmittableBookingPaymentOption$1, TranslationOverrides, TranslationOverrides as TranslationOverrides$1, UnknownAdditionalService, V10CoreConfig, V9OnlyCustomAttributeInput, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
3
  import { HttpClient } from "effect/unstable/http";
4
4
  //#region src/legacy-v9/property-highlight-sources.d.ts
@@ -18,6 +18,20 @@ type V9PropertyHighlightSourceRegistry<Key extends string = string> = {
18
18
  export declare const defineV9PropertyHighlightSources: <const Sources extends V9PropertyHighlightSourcesInput>(sources: Sources) => V9PropertyHighlightSourceRegistry<keyof Sources & string>;
19
19
  export declare const defineV9PropertyHighlightSourcesFromUnknown: (input: unknown) => V9PropertyHighlightSourceRegistry;
20
20
  //#endregion
21
+ //#region src/legacy-v9/review-options.d.ts
22
+ type V9ReviewCriterionDataAttribute = `fb_${number}`;
23
+ type V9ReviewCriterion = {
24
+ readonly v9: V9ReviewCriterionDataAttribute;
25
+ readonly type: "stars" | "text";
26
+ readonly label: Readonly<Record<Locale$1, string>>;
27
+ };
28
+ type V9ReviewsOptions = {
29
+ readonly criteria?: readonly V9ReviewCriterion[];
30
+ readonly showAuthorCity?: boolean;
31
+ readonly includeItemsWithoutText?: boolean;
32
+ readonly includeItemsWithoutRating?: boolean;
33
+ };
34
+ //#endregion
21
35
  //#region src/legacy-v9/config.d.ts
22
36
  type WebsiteV9Config = {
23
37
  readonly backend: "v9";
@@ -42,6 +56,7 @@ type WebsiteSDKOptions = {
42
56
  readonly customAttributes?: CustomAttributeRegistrySnapshot$1;
43
57
  /** Validated v9 p_* line-list sources returned by `defineV9PropertyHighlightSources`. */
44
58
  readonly v9PropertyHighlightSources?: V9PropertyHighlightSourceRegistry;
59
+ readonly v9Reviews?: V9ReviewsOptions;
45
60
  readonly customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition$1[];
46
61
  /**
47
62
  * Selects and orders rental highlights. This is an ordered allowlist, not a sort
@@ -7529,9 +7544,6 @@ declare const VofficeFeedbackDataFieldSchemas: {
7529
7544
  readonly surname: Schema.NullOr<Schema.String>;
7530
7545
  readonly city: Schema.NullOr<Schema.String>;
7531
7546
  readonly text: Schema.NullOr<Schema.String>;
7532
- readonly fb_1429: Schema.Number;
7533
- readonly fb_4905: Schema.Number;
7534
- readonly fb_4906: Schema.Number;
7535
7547
  readonly avgRating: Schema.Number;
7536
7548
  };
7537
7549
  type KnownVofficeFeedbackData = KnownJsonData<typeof VofficeFeedbackDataFieldSchemas>;
@@ -7600,4 +7612,4 @@ export type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
7600
7612
  export type RentalSearchInput = SearchSearchInput$1;
7601
7613
  export type RentalSearchOutput = SearchSearchOutput$1;
7602
7614
  //#endregion
7603
- export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9SearchAllRentalsAtOnceInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
7615
+ export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9ReviewCriterion, type V9ReviewCriterionDataAttribute, type V9ReviewsOptions, type V9SearchAllRentalsAtOnceInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as getTermsAndPrivacyPolicyEffect, B as OnOfficeUnitSchema, Bt as submitPaymentOptionEffect, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getInitialAvailabilityEffect, E as DocumentSummarySchema, Et as getFiltersEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectCancellationPolicyEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, Ht as defineV9PropertyHighlightSources, I as ErgoReadPreContractRequestSchema, It as selectInsuranceEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as selectInsurancePaymentEffect, M as ErgoCreatePreContractRequestSchema, Mt as quoteEffect, N as ErgoPersonSchema, Nt as removeAdditionalServiceEffect, O as ErgoAddressSchema, Ot as getRentalsEffect, P as ErgoPlanSearchRequestSchema, Pt as searchEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitContactEffect, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getBankTransferDetailsEffect, U as QuoteLineSchema, Ut as defineV9PropertyHighlightSourcesFromUnknown, V as PaymentScheduleItemSchema, Vt as defineWebsiteSDKOptions, W as QuotePricesPayloadSchema, X as RegionListResponseSchema, Y as RawVofficeObjectSchema, Z as RoomImageSchema, _ as CalendarDaySchema, _t as V1_OPERATIONS, at as TileCollectionResponseSchema, b as CustomerUnitSummarySchema, bt as addAdditionalServiceEffect, c as V0OpenApiClient, ct as TravelInsuranceBookingSchema, d as makeV0OpenApiClientLive, dt as UnitListItemSchema, et as ServiceImageSchema, f as V1OpenApiClient, ft as UnitListResponseSchema, g as ApiEnvelopeBaseSchema, gt as V1_BASE_URL, h as makeV1OpenApiClientLive, ht as UnitServicePriceSchema, it as SetupResponseSchema, j as ErgoCommonFieldsSchema, jt as mapSearchEffect, k as ErgoBankSchema, kt as getStartDateSelectedAvailabilityEffect, l as V0OpenApiClientError, lt as TravelInsuranceBookingStoreRequestSchema, m as makeV1OpenApiClientFetchLive, mt as UnitResponseSchema, nt as ServiceListResponseSchema, ot as TileSchema, p as V1OpenApiClientError, pt as UnitOfferSchema, q as QuoteServiceSchema, rt as SetupDataSchema, st as TileTagSchema, t as createWebsiteSDK, tt as ServiceLimitSchema, u as makeV0OpenApiClientFetchLive, ut as UnitIdsResponseSchema, v as CalendarResponseSchema, vt as VideoResponseSchema, w as DocumentStatusSchema, wt as createInsurancePreContractEffect, x as DocumentCollectionResponseSchema, xt as bookEffect, y as CurrentMemberResponseSchema, yt as decodeV1OperationResponse, z as OnOfficeUnitCollectionResponseSchema, zt as submitPaymentOption } from "./client-DC4LG3CP.mjs";
1
+ import { $ as SearchPropertiesResponseSchema, A as ErgoBankSchema, At as getStartDateSelectedAvailabilityEffect, B as OnOfficeUnitCollectionResponseSchema, Bt as submitPaymentOption, C as DocumentResourceResponseSchema, Ct as bookInsuranceEffect, D as DocumentSummarySchema, Dt as getFiltersEffect, E as DocumentStatusUpdateRequestSchema, Et as getBankTransferDetailsEffect, F as ErgoPlanSearchRequestSchema, Ft as searchEffect, G as QuotePricesPayloadSchema, H as PaymentScheduleItemSchema, Ht as defineWebsiteSDKOptions, I as ErgoPolicyNumberRequestSchema, It as selectCancellationPolicyEffect, J as QuoteServiceSchema, K as QuotePricesResponseSchema, L as ErgoReadPreContractRequestSchema, Lt as selectInsuranceEffect, M as ErgoCommonFieldsSchema, Mt as mapSearchEffect, N as ErgoCreatePreContractRequestSchema, Nt as quoteEffect, O as DocumentTypeSchema, Ot as getInitialAvailabilityEffect, P as ErgoPersonSchema, Pt as removeAdditionalServiceEffect, Q as RoomImageSchema, R as ErgoTripAndCustomerRequestSchema, Rt as selectInsurancePaymentEffect, S as DocumentCollectionResponseSchema, St as bookEffect, T as DocumentStatusSchema, Tt as createInsurancePreContractEffect, U as PaymentScheduleSchema, Ut as defineV9PropertyHighlightSources, V as OnOfficeUnitSchema, Vt as submitPaymentOptionEffect, W as QuoteLineSchema, Wt as defineV9PropertyHighlightSourcesFromUnknown, X as RawVofficeObjectSchema, Y as RawObjectResponseSchema, Z as RegionListResponseSchema, _ as ApiEnvelopeBaseSchema, _t as V1_BASE_URL, at as SetupResponseSchema, b as CurrentMemberResponseSchema, bt as decodeV1OperationResponse, ct as TileTagSchema, d as makeV0OpenApiClientFetchLive, dt as UnitIdsResponseSchema, et as ServiceBeonDataSchema, f as makeV0OpenApiClientLive, ft as UnitListItemSchema, g as makeV1OpenApiClientLive, gt as UnitServicePriceSchema, h as makeV1OpenApiClientFetchLive, ht as UnitResponseSchema, it as SetupDataSchema, j as ErgoBookRequestSchema, jt as getTermsAndPrivacyPolicyEffect, k as ErgoAddressSchema, kt as getRentalsEffect, l as V0OpenApiClient, lt as TravelInsuranceBookingSchema, m as V1OpenApiClientError, mt as UnitOfferSchema, nt as ServiceLimitSchema, ot as TileCollectionResponseSchema, p as V1OpenApiClient, pt as UnitListResponseSchema, q as QuoteSchema, rt as ServiceListResponseSchema, st as TileSchema, t as createWebsiteSDK, tt as ServiceImageSchema, u as V0OpenApiClientError, ut as TravelInsuranceBookingStoreRequestSchema, v as CalendarDaySchema, vt as V1_OPERATIONS, w as DocumentResourceSchema, wt as clearAdditionalServicesEffect, x as CustomerUnitSummarySchema, xt as addAdditionalServiceEffect, y as CalendarResponseSchema, yt as VideoResponseSchema, z as FacilityListResponseSchema, zt as submitContactEffect } from "./client-0Lgv-Gb_.mjs";
2
2
  import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
3
3
  //#region codegen/v9/heuristic-generation/public-api.ts
4
4
  const customDataAttribute = (name) => name;
@@ -4,6 +4,7 @@
4
4
 
5
5
  Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
6
6
 
7
+ - `versions/2.25.0/CHANGELOG.md`: release notes for 2.25.0
7
8
  - `versions/2.24.1/CHANGELOG.md`: release notes for 2.24.1
8
9
  - `versions/2.24.0/CHANGELOG.md`: release notes for 2.24.0
9
10
  - `versions/2.23.0/CHANGELOG.md`: release notes for 2.23.0
@@ -4,6 +4,7 @@
4
4
 
5
5
  Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
6
6
 
7
+ - `versions/2.25.0/MIGRATION.md`: Migration: 2.24.1 to 2.25.0
7
8
  - `versions/2.24.1/MIGRATION.md`: Migration: 2.24.0 to 2.24.1
8
9
  - `versions/2.24.0/MIGRATION.md`: Migration: 2.23.0 to 2.24.0
9
10
  - `versions/2.23.0/MIGRATION.md`: Migration: 2.22.0 to 2.23.0
@@ -105,6 +105,7 @@ type WebsiteSDKOptions = {
105
105
  translationOverrides?: TranslationOverrides;
106
106
  customAttributes?: CustomAttributeRegistrySnapshot;
107
107
  v9PropertyHighlightSources?: V9PropertyHighlightSourceRegistry;
108
+ v9Reviews?: V9ReviewsOptions;
108
109
  customAttributeFilterDefinitions?: readonly CustomAttributeFilterDefinition[];
109
110
  rentalHighlightPrioritization?: readonly RentalHighlightPrioritizationKey[];
110
111
  rentalPropertyHighlightPrioritization?: readonly RentalPropertyHighlightPrioritizationKey[];
@@ -114,6 +115,10 @@ type WebsiteSDKOptions = {
114
115
  };
115
116
  ```
116
117
 
118
+ `v9Reviews` configures v9 review criteria, whether a v9 review's author shows the
119
+ guest's city, and which incomplete v9 feedbacks become review items. v10 does not use it, but an invalid value fails SDK creation on
120
+ both backends. See "Legacy v9 Reviews" in `rentals.md`.
121
+
117
122
  `searchAllRentalsAtOnce` selects how a site searches, on v9 and v10 alike: every
118
123
  result with prices in one call (portfolios of up to 100 rentals), or paged results
119
124
  plus `mapSearch`. See `search.md`.
@@ -344,6 +344,81 @@ For v10, public answers with the same form-response ID are combined into one rev
344
344
 
345
345
  `createdAt` is the form response's creation timestamp, not a travel date. A text-only rental can have `reviews.items` without `reviews.summary`, so check the summary independently. The localized `summary.count` describes form responses with valid ratings and does not necessarily equal `items.length`.
346
346
 
347
+ ### Legacy v9 Reviews
348
+
349
+ v9 feedbacks carry an overall `avgRating`, a free `text`, and one field per
350
+ review criterion, `fb_<id>`. The criteria are tenant specific: every agency
351
+ defines its own in vOffice, so their IDs, number and labels differ per site, and
352
+ vOffice provides no labels. Configure them per site with `v9Reviews`:
353
+
354
+ ```ts
355
+ const options = {
356
+ v9Reviews: {
357
+ criteria: [
358
+ { v9: "fb_8748", type: "stars", label: { "de-DE": "Sauberkeit", "en-US": "Cleanliness" } },
359
+ { v9: "fb_8749", type: "stars", label: { "de-DE": "Lage", "en-US": "Location" } },
360
+ { v9: "fb_9415", type: "text", label: { "de-DE": "Anmerkung", "en-US": "Note" } },
361
+ ],
362
+ showAuthorCity: false,
363
+ includeItemsWithoutText: false,
364
+ includeItemsWithoutRating: false,
365
+ },
366
+ };
367
+ ```
368
+
369
+ - A `stars` criterion becomes an entry of `reviews.summary.categories`, in the
370
+ configured order, with the `label` of the requested locale and the mean of its
371
+ ratings from 1 to 5 (`0` means not rated and does not count). A criterion that
372
+ no included feedback of a rental rated is left out, so a rental shows only the
373
+ criteria it has.
374
+ - A `text` criterion is appended to the review item's `text`: the feedback text
375
+ first, then each answered text criterion as its label and the answer on the
376
+ next line, separated by blank lines.
377
+ - Without `criteria`, `summary.categories` stays empty.
378
+
379
+ Every criterion needs a non-empty label for `de-DE` and `en-US`, a positive
380
+ `fb_<id>`, and a `type` of `stars` or `text`. Invalid options fail SDK creation
381
+ with every issue listed.
382
+
383
+ Review criteria are optional. Without them the site keeps the overall rating,
384
+ the review count and the review items. When you work on reviews for a v9 site,
385
+ offer the criteria to the site owner as an option. Do not ask for them as a
386
+ required step, and do not block other work on the answer. If the owner wants
387
+ them, ask which criteria to show and what they are called. To find the IDs, run
388
+ the CLI against the site's v9 config:
389
+
390
+ ```sh
391
+ website-sdk --backend v9 review-criteria
392
+ website-sdk --backend v9 review-criteria --rental-ids 212350,212351
393
+ ```
394
+
395
+ It reads the `fb_<id>` fields vOffice returns for the five units with the most
396
+ feedbacks, or for the listed units, and prints each ID with its type and the
397
+ units that have it. vOffice returns averages there only for `stars` criteria, so
398
+ a `text` criterion usually does not appear and its ID must come from the site
399
+ owner. Units vOffice cannot load are listed under `skippedRentalIds`.
400
+
401
+ A v9 review item's `author` is the guest's forename only. The SDK does not
402
+ request the surname. Without a forename the author is `reviews.item.guest`
403
+ ("Gast", "Guest"). With `showAuthorCity: true` the guest's city follows, through
404
+ `reviews.item.authorWithCity` ("Anna aus Hamburg", "Guest from Hamburg"); a
405
+ feedback without a city keeps the name alone. Both keys can be changed with
406
+ `translationOverrides`.
407
+
408
+ By default a v9 feedback becomes a review item only when it has an `avgRating`
409
+ of at least 1 and text. The two switches include feedbacks that miss one of
410
+ these:
411
+
412
+ | Switch | When `true` |
413
+ | --------------------------- | ------------------------------------------------------------------------ |
414
+ | `includeItemsWithoutText` | a rated feedback without text becomes an item with `rating` only |
415
+ | `includeItemsWithoutRating` | a feedback with text but no `avgRating` becomes an item with `text` only |
416
+
417
+ A feedback with neither rating nor text is never an item. `summary.rating` and
418
+ `summary.count` cover the included items with a rating, and `summary.categories`
419
+ covers the included items. When no included item has a rating, `reviews` has
420
+ `items` and no `summary`. A text answer to a `text` criterion counts as text.
421
+
347
422
  ## Configuration
348
423
 
349
424
  `v9` config:
@@ -0,0 +1,41 @@
1
+ # Changelog: 2.25.0
2
+
3
+ A v9 site can show ratings per review criterion on the rental page (cleanliness, location, …),
4
+ and decide which incomplete v9 feedbacks become review items. Every v9 agency defines its own
5
+ criteria, so their IDs and names differ per site: the site configures them. v9 reviews no
6
+ longer show the guest's surname.
7
+
8
+ ## Added
9
+
10
+ - `v9Reviews` option for v9 sites. `criteria` lists the agency's `fb_<id>` criteria in display
11
+ order, each with `type` (`"stars"` or `"text"`) and a label for `de-DE` and `en-US`.
12
+ - A `stars` criterion becomes an entry of `reviews.summary.categories` (`{ label, rating }`):
13
+ the mean of its ratings from 1 to 5 across the rental's included feedbacks. `0` means not
14
+ rated. A criterion no feedback of a rental rated is left out.
15
+ - A `text` criterion is appended to the review item's `text`, as its label and the answer on
16
+ the next line.
17
+ - `showAuthorCity` in `v9Reviews`, `false` by default. When `true`, a v9 review's author reads
18
+ "Anna aus Hamburg" / "Anna from Hamburg" (`reviews.item.authorWithCity`).
19
+ - `includeItemsWithoutText` and `includeItemsWithoutRating` in `v9Reviews`, both `false` by
20
+ default. When `true`, a v9 feedback that has no text or no average rating still becomes a
21
+ review item. `summary.rating` and `summary.count` cover the included items that have a
22
+ rating; when none has one, `reviews` has `items` and no `summary`.
23
+ - `website-sdk --backend v9 review-criteria [--rental-ids <ids>]` lists the `fb_<id>` criteria
24
+ vOffice returns for the five units with the most feedbacks, or for the listed units.
25
+ - Types `V9ReviewsOptions`, `V9ReviewCriterion` and `V9ReviewCriterionDataAttribute`.
26
+
27
+ ## Changed
28
+
29
+ - A v9 review's `author` is the guest's forename only ("Anna, verreist im Mai 2025" instead of
30
+ "Anna Beispiel, verreist im Mai 2025"). The SDK no longer requests the surname. A feedback
31
+ without a forename shows `reviews.item.guest` ("Gast", "Guest"); a missing name no longer
32
+ drops a feedback.
33
+ - v9 rentals request only the review criteria a site configures. Earlier versions requested
34
+ three fixed `fb_*` fields that exist for one vOffice account only, and did not use them.
35
+ - `KnownVofficeFeedbackData` no longer lists `fb_1429`, `fb_4905` and `fb_4906`. They are
36
+ account specific like every other `fb_*` field.
37
+ - Invalid `v9Reviews` options fail SDK creation with every issue listed.
38
+
39
+ Without `v9Reviews`, v9 review output is the same as in 2.24.1 apart from the author. v10 does
40
+ not use the option and keeps the full name, but an invalid value fails SDK creation there too. v10 already returns `summary.categories`
41
+ from its feedback forms.