@v-office/website-sdk 2.13.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/cli.mjs +2 -2
- package/dist/{client-Ma0daa2H.mjs → client-C0pqpk-N.mjs} +725 -267
- package/dist/index.d.mts +11 -0
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/README.md +8 -2
- package/dist/instructions/rentals.md +82 -1
- package/dist/instructions/versions/2.14.0/CHANGELOG.md +72 -0
- package/dist/instructions/versions/2.14.0/MIGRATION.md +148 -0
- package/dist/instructions/versions/2.15.0/CHANGELOG.md +66 -0
- package/dist/instructions/versions/2.15.0/MIGRATION.md +148 -0
- package/dist/{rentals-BG1diZoo.mjs → rentals--cnnFS4I.mjs} +10 -12
- package/dist/{search-Byi6XboR.mjs → search-X9spQmG5.mjs} +2 -2
- package/dist/{to-rental-highlights-BVikT4Iz.mjs → to-rental-highlights-BAsEuxoy.mjs} +1397 -8
- package/dist/translations/v9/de-DE/filter.json +4 -4
- package/dist/translations/v9/de-DE/rental-attribute-options.json +174 -0
- package/dist/translations/v9/de-DE/rental-attributes.json +95 -45
- package/dist/translations/v9/en-US/core.json +1 -1
- package/dist/translations/v9/en-US/filter.json +2 -2
- package/dist/translations/v9/en-US/rental-attribute-options.json +174 -0
- package/dist/translations/v9/en-US/rental-attributes.json +262 -212
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/README.md +8 -2
- package/instructions/rentals.md +82 -1
- package/instructions/versions/2.14.0/CHANGELOG.md +72 -0
- package/instructions/versions/2.14.0/MIGRATION.md +148 -0
- package/instructions/versions/2.15.0/CHANGELOG.md +66 -0
- package/instructions/versions/2.15.0/MIGRATION.md +148 -0
- package/package.json +6 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { makeTranslate,
|
|
1
|
+
import { a as toAddress, c as rentalsAllFeedbacksQuery, d as VofficeUnitDataPropertyCategoryLabelKeys, f as VofficeUnitDataPropertyCategoryValues, g as parseVofficeUnitData, h as parseVofficeFeedbackData, i as toImages, l as rentalsAllWithoutFeedbacksQuery, m as parseVofficeFacilityData, n as renderVofficePropertyAttribute, o as toLocalizedString, p as VofficeUnitDataPropertyMetadata, r as toFacilityImages, t as toRentalHighlights, u as VofficeUnitDataFieldSchemas } from "./to-rental-highlights-BAsEuxoy.mjs";
|
|
2
|
+
import { makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } from "@v-office/sdk-core";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
//#region src/legacy-v9/parser/rentals/to-description.ts
|
|
5
5
|
const toDescription = (data, locale) => {
|
|
@@ -38,11 +38,13 @@ const toProperty = (facility, locale) => {
|
|
|
38
38
|
const data = parseVofficeFacilityData(facility.data);
|
|
39
39
|
const name = toLocalizedString(data.known.name, locale);
|
|
40
40
|
const description = toLocalizedString(data.known.description, locale);
|
|
41
|
+
const images = toFacilityImages(data.known.images ?? [], locale);
|
|
41
42
|
const property = {
|
|
42
43
|
id: facility.id,
|
|
43
44
|
nameOrLabel: name ?? facility.name
|
|
44
45
|
};
|
|
45
46
|
if (description != null) property.description = { description };
|
|
47
|
+
if (images.length > 0) property.images = images;
|
|
46
48
|
return property;
|
|
47
49
|
};
|
|
48
50
|
//#endregion
|
|
@@ -59,7 +61,6 @@ const PROPERTY_METADATA_ENTRIES = Object.entries(VofficeUnitDataPropertyMetadata
|
|
|
59
61
|
})).filter(({ metadata }) => metadata.category.key !== "LOCATION").sort((left, right) => {
|
|
60
62
|
return (CATEGORY_ORDER.get(left.metadata.category.key) ?? Number.MAX_SAFE_INTEGER) - (CATEGORY_ORDER.get(right.metadata.category.key) ?? Number.MAX_SAFE_INTEGER) || left.index - right.index;
|
|
61
63
|
});
|
|
62
|
-
const canRenderLabeledAttributeValue$1 = (value) => value !== false && value !== 0 && value !== "false" && value !== "0" && value != null && value !== "";
|
|
63
64
|
const toRentalAttributes = ({ locale, translations, attributes, customAttributes }) => Effect.gen(function* () {
|
|
64
65
|
const result = [];
|
|
65
66
|
const categoriesByKey = /* @__PURE__ */ new Map();
|
|
@@ -90,12 +91,11 @@ const toRentalAttributes = ({ locale, translations, attributes, customAttributes
|
|
|
90
91
|
});
|
|
91
92
|
for (const { key, metadata } of PROPERTY_METADATA_ENTRIES) {
|
|
92
93
|
const value = knownAttributes[key];
|
|
93
|
-
|
|
94
|
-
const label = yield* translate(metadata.labelKey, key);
|
|
95
|
-
const attribute = renderLabeledAttributeValue({
|
|
94
|
+
const attribute = yield* renderVofficePropertyAttribute({
|
|
96
95
|
key,
|
|
97
|
-
|
|
96
|
+
metadata,
|
|
98
97
|
locale,
|
|
98
|
+
translate,
|
|
99
99
|
value
|
|
100
100
|
});
|
|
101
101
|
if (attribute == null) continue;
|
|
@@ -147,19 +147,17 @@ const LOCATION_METADATA_ENTRIES = Object.entries(VofficeUnitDataPropertyMetadata
|
|
|
147
147
|
metadata,
|
|
148
148
|
index
|
|
149
149
|
})).filter(({ metadata }) => metadata.category.key === "LOCATION").sort((left, right) => left.index - right.index);
|
|
150
|
-
const canRenderLabeledAttributeValue = (value) => value !== false && value !== 0 && value !== "false" && value !== "0" && value != null && value !== "";
|
|
151
150
|
const toRentalVicinity = ({ locale, translations, attributes }) => Effect.gen(function* () {
|
|
152
151
|
const items = [];
|
|
153
152
|
const knownAttributes = attributes.known;
|
|
154
153
|
const translate = makeTranslate(translations, locale);
|
|
155
154
|
for (const { key, metadata } of LOCATION_METADATA_ENTRIES) {
|
|
156
155
|
const value = knownAttributes[key];
|
|
157
|
-
|
|
158
|
-
const label = yield* translate(metadata.labelKey, key);
|
|
159
|
-
const item = renderLabeledAttributeValue({
|
|
156
|
+
const item = yield* renderVofficePropertyAttribute({
|
|
160
157
|
key,
|
|
161
|
-
|
|
158
|
+
metadata,
|
|
162
159
|
locale,
|
|
160
|
+
translate,
|
|
163
161
|
value
|
|
164
162
|
});
|
|
165
163
|
if (item != null) items.push(item);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-
|
|
2
|
-
import { a as
|
|
1
|
+
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-C0pqpk-N.mjs";
|
|
2
|
+
import { a as toAddress, g as parseVofficeUnitData, i as toImages, s as searchQuery, t as toRentalHighlights, u as VofficeUnitDataFieldSchemas } from "./to-rental-highlights-BAsEuxoy.mjs";
|
|
3
3
|
import { CoreSDKError, STABLE_SEARCH_INPUTS, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, parseChildrenAges, parseOccupancyCount, resolveExpandedCompositions, toFormattedSearchPrice, toIsoDateFromPeriodQueryDate, toStableSearchInputBackendQueryKeys, toStableSearchInputParameterValues, toStableSearchInputQueryKeys, toUnusedFilterKeys } from "@v-office/sdk-core";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
//#region src/legacy-v9/parser/search/input/search-input-error.ts
|