@v-office/website-sdk 2.24.0 → 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 +89 -2
- package/dist/{client-DC4LG3CP.mjs → client-0Lgv-Gb_.mjs} +83 -18
- package/dist/index.d.mts +17 -5
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/creation.md +5 -0
- package/dist/instructions/rentals.md +75 -0
- package/dist/instructions/search.md +1 -2
- package/dist/instructions/versions/2.24.1/CHANGELOG.md +17 -0
- package/dist/instructions/versions/2.24.1/MIGRATION.md +9 -0
- package/dist/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/dist/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/dist/{to-rental-highlights-C1NF2uuE.mjs → operations-DwURbo0b.mjs} +1 -626
- package/dist/{rentals-eqFhtCdT.mjs → rentals-Dn0-kGWD.mjs} +96 -33
- package/dist/{search-CKL-8T8q.mjs → search-BLTTQAsG.mjs} +4 -3
- package/dist/to-rental-highlights-BL5m3Uen.mjs +626 -0
- package/dist/translations/v9/de-DE/core.json +3 -1
- package/dist/translations/v9/en-US/core.json +3 -1
- package/dist/{v9-data-BnYxa2Ek.mjs → v9-data-C3SWtDGs.mjs} +7 -5
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/creation.md +5 -0
- package/instructions/rentals.md +75 -0
- package/instructions/search.md +1 -2
- package/instructions/versions/2.24.1/CHANGELOG.md +17 -0
- package/instructions/versions/2.24.1/MIGRATION.md +9 -0
- package/instructions/versions/2.24.1/release.json +3 -0
- package/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/instructions/versions/2.25.0/release.json +3 -0
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
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.
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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 {
|
|
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
|
|
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,8 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.25.0/CHANGELOG.md`: release notes for 2.25.0
|
|
8
|
+
- `versions/2.24.1/CHANGELOG.md`: release notes for 2.24.1
|
|
7
9
|
- `versions/2.24.0/CHANGELOG.md`: release notes for 2.24.0
|
|
8
10
|
- `versions/2.23.0/CHANGELOG.md`: release notes for 2.23.0
|
|
9
11
|
- `versions/2.22.0/CHANGELOG.md`: release notes for 2.22.0
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-sdk`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/2.25.0/MIGRATION.md`: Migration: 2.24.1 to 2.25.0
|
|
8
|
+
- `versions/2.24.1/MIGRATION.md`: Migration: 2.24.0 to 2.24.1
|
|
7
9
|
- `versions/2.24.0/MIGRATION.md`: Migration: 2.23.0 to 2.24.0
|
|
8
10
|
- `versions/2.23.0/MIGRATION.md`: Migration: 2.22.0 to 2.23.0
|
|
9
11
|
- `versions/2.22.0/MIGRATION.md`: Migration: 2.21.0 to 2.22.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:
|
|
@@ -240,8 +240,7 @@ Backend behavior:
|
|
|
240
240
|
- `price`: v9 maps to `price_asc` or `price_desc`. v10 orders priced alternatives by total and direction. v10 price sorting requires a fixed-period or flexible-date query with occupancy; the SDK rejects incomplete requests before transport.
|
|
241
241
|
- `random`: v9 requests the backend's random ordering. v10 currently keeps the default backend ordering.
|
|
242
242
|
- `rating`: v9 requests the backend's rating ordering. v10 currently keeps the default backend ordering until rating ordering is implemented.
|
|
243
|
-
-
|
|
244
|
-
- v10 price ordering follows the backend's boost-first, total-second behavior, so different boost groups are not globally ordered only by price.
|
|
243
|
+
- The SDK does not reorder results: they arrive in the order the backend returns them. v9's random ordering may be the same on every request.
|
|
245
244
|
|
|
246
245
|
v10 additionally supports a stable subset of rental-summary field ordering:
|
|
247
246
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog: 2.24.1
|
|
2
|
+
|
|
3
|
+
The search instructions said that v9 may put "promoted" results first and that v10 sorts by
|
|
4
|
+
price within "boost" groups. Neither is something the SDK does or exposes, and a site cannot
|
|
5
|
+
read or reproduce it. This release corrects the instructions and ships `@v-office/sdk-core`
|
|
6
|
+
1.24.1.
|
|
7
|
+
|
|
8
|
+
## Changed
|
|
9
|
+
|
|
10
|
+
- `instructions/search.md` says that the SDK does not reorder search results: they arrive in
|
|
11
|
+
the order the backend returns them. Do not build a page's order on backend boosts or
|
|
12
|
+
promotions.
|
|
13
|
+
|
|
14
|
+
## Fixed
|
|
15
|
+
|
|
16
|
+
- A v10 search whose alternatives have no `boost` field no longer fails (`@v-office/sdk-core`
|
|
17
|
+
1.24.1).
|