@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.
Files changed (32) hide show
  1. package/README.md +3 -2
  2. package/dist/cli.mjs +2 -2
  3. package/dist/{client-Ma0daa2H.mjs → client-C0pqpk-N.mjs} +725 -267
  4. package/dist/index.d.mts +11 -0
  5. package/dist/index.mjs +1 -1
  6. package/dist/instructions/CHANGELOG.md +2 -0
  7. package/dist/instructions/MIGRATION.md +2 -0
  8. package/dist/instructions/README.md +8 -2
  9. package/dist/instructions/rentals.md +82 -1
  10. package/dist/instructions/versions/2.14.0/CHANGELOG.md +72 -0
  11. package/dist/instructions/versions/2.14.0/MIGRATION.md +148 -0
  12. package/dist/instructions/versions/2.15.0/CHANGELOG.md +66 -0
  13. package/dist/instructions/versions/2.15.0/MIGRATION.md +148 -0
  14. package/dist/{rentals-BG1diZoo.mjs → rentals--cnnFS4I.mjs} +10 -12
  15. package/dist/{search-Byi6XboR.mjs → search-X9spQmG5.mjs} +2 -2
  16. package/dist/{to-rental-highlights-BVikT4Iz.mjs → to-rental-highlights-BAsEuxoy.mjs} +1397 -8
  17. package/dist/translations/v9/de-DE/filter.json +4 -4
  18. package/dist/translations/v9/de-DE/rental-attribute-options.json +174 -0
  19. package/dist/translations/v9/de-DE/rental-attributes.json +95 -45
  20. package/dist/translations/v9/en-US/core.json +1 -1
  21. package/dist/translations/v9/en-US/filter.json +2 -2
  22. package/dist/translations/v9/en-US/rental-attribute-options.json +174 -0
  23. package/dist/translations/v9/en-US/rental-attributes.json +262 -212
  24. package/instructions/CHANGELOG.md +2 -0
  25. package/instructions/MIGRATION.md +2 -0
  26. package/instructions/README.md +8 -2
  27. package/instructions/rentals.md +82 -1
  28. package/instructions/versions/2.14.0/CHANGELOG.md +72 -0
  29. package/instructions/versions/2.14.0/MIGRATION.md +148 -0
  30. package/instructions/versions/2.15.0/CHANGELOG.md +66 -0
  31. package/instructions/versions/2.15.0/MIGRATION.md +148 -0
  32. package/package.json +6 -4
@@ -1,5 +1,5 @@
1
- import { c as VofficeUnitDataFieldSchemas, d as VofficeUnitDataPropertyMetadata, f as parseVofficeFacilityData, i as toLocalizedString, l as VofficeUnitDataPropertyCategoryLabelKeys, m as parseVofficeUnitData, n as toImages, o as rentalsAllFeedbacksQuery, p as parseVofficeFeedbackData, r as toAddress, s as rentalsAllWithoutFeedbacksQuery, t as toRentalHighlights, u as VofficeUnitDataPropertyCategoryValues } from "./to-rental-highlights-BVikT4Iz.mjs";
2
- import { makeTranslate, renderLabeledAttributeValue, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } from "@v-office/sdk-core";
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
- if (!canRenderLabeledAttributeValue$1(value)) continue;
94
- const label = yield* translate(metadata.labelKey, key);
95
- const attribute = renderLabeledAttributeValue({
94
+ const attribute = yield* renderVofficePropertyAttribute({
96
95
  key,
97
- label,
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
- if (!canRenderLabeledAttributeValue(value)) continue;
158
- const label = yield* translate(metadata.labelKey, key);
159
- const item = renderLabeledAttributeValue({
156
+ const item = yield* renderVofficePropertyAttribute({
160
157
  key,
161
- label,
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-Ma0daa2H.mjs";
2
- import { a as searchQuery, c as VofficeUnitDataFieldSchemas, m as parseVofficeUnitData, n as toImages, r as toAddress, t as toRentalHighlights } from "./to-rental-highlights-BVikT4Iz.mjs";
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