@v-office/website-sdk 2.37.0 → 2.38.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 +3 -3
- package/dist/{client-D53W9Uas.mjs → client-CE4V_ybW.mjs} +175 -77
- package/dist/index.d.mts +46 -2
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/quote.md +7 -0
- package/dist/instructions/rentals.md +65 -4
- package/dist/instructions/search.md +2 -1
- package/dist/instructions/versions/2.37.1/CHANGELOG.md +11 -0
- package/dist/instructions/versions/2.37.1/MIGRATION.md +10 -0
- package/dist/instructions/versions/2.38.0/CHANGELOG.md +123 -0
- package/dist/instructions/versions/2.38.0/MIGRATION.md +37 -0
- package/dist/{operations-C1VMQYN2.mjs → operations-DMqLD3e2.mjs} +333 -1
- package/dist/{rentals-BxkYXAVn.mjs → rentals-BsHvdwQt.mjs} +10 -14
- package/dist/{search-pFLiI6QI.mjs → search-DqdRIJwF.mjs} +8 -4
- package/dist/{to-rental-highlights-BdxQPpBU.mjs → to-rental-highlights-BE6TdXYa.mjs} +23 -5
- package/dist/translations/shared/de-DE/insurance.json +1 -0
- package/dist/translations/shared/de-DE/reviews.json +5 -4
- package/dist/translations/shared/en-US/insurance.json +1 -0
- package/dist/translations/shared/en-US/reviews.json +5 -4
- package/dist/translations/v10/de-DE/core.json +17 -4
- package/dist/translations/v10/en-US/core.json +53 -40
- package/dist/translations/v9/de-DE/core.json +0 -6
- package/dist/translations/v9/de-DE/filter.json +4 -0
- package/dist/translations/v9/de-DE/rental-attributes.json +2 -2
- package/dist/translations/v9/en-US/core.json +0 -6
- package/dist/translations/v9/en-US/filter.json +4 -0
- package/dist/translations/v9/en-US/rental-attributes.json +2 -2
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/quote.md +7 -0
- package/instructions/rentals.md +65 -4
- package/instructions/search.md +2 -1
- package/instructions/versions/2.37.1/CHANGELOG.md +11 -0
- package/instructions/versions/2.37.1/MIGRATION.md +10 -0
- package/instructions/versions/2.37.1/release.json +3 -0
- package/instructions/versions/2.38.0/CHANGELOG.md +123 -0
- package/instructions/versions/2.38.0/MIGRATION.md +37 -0
- package/instructions/versions/2.38.0/release.json +3 -0
- package/package.json +3 -3
|
@@ -6799,6 +6799,311 @@ const documents = {
|
|
|
6799
6799
|
}
|
|
6800
6800
|
}]
|
|
6801
6801
|
},
|
|
6802
|
+
"\n query CoreSDK_RentalTexts(\n $language: String\n $voffice_ids: [Int!]\n $textAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n voffice_id\n data(attributes: $textAttributes)\n voffice_facility {\n id\n data(attributes: $textAttributes)\n }\n }\n }\n": {
|
|
6803
|
+
kind: "Document",
|
|
6804
|
+
definitions: [{
|
|
6805
|
+
kind: "OperationDefinition",
|
|
6806
|
+
operation: "query",
|
|
6807
|
+
name: {
|
|
6808
|
+
kind: "Name",
|
|
6809
|
+
value: "CoreSDK_RentalTexts"
|
|
6810
|
+
},
|
|
6811
|
+
variableDefinitions: [
|
|
6812
|
+
{
|
|
6813
|
+
kind: "VariableDefinition",
|
|
6814
|
+
variable: {
|
|
6815
|
+
kind: "Variable",
|
|
6816
|
+
name: {
|
|
6817
|
+
kind: "Name",
|
|
6818
|
+
value: "language"
|
|
6819
|
+
}
|
|
6820
|
+
},
|
|
6821
|
+
type: {
|
|
6822
|
+
kind: "NamedType",
|
|
6823
|
+
name: {
|
|
6824
|
+
kind: "Name",
|
|
6825
|
+
value: "String"
|
|
6826
|
+
}
|
|
6827
|
+
}
|
|
6828
|
+
},
|
|
6829
|
+
{
|
|
6830
|
+
kind: "VariableDefinition",
|
|
6831
|
+
variable: {
|
|
6832
|
+
kind: "Variable",
|
|
6833
|
+
name: {
|
|
6834
|
+
kind: "Name",
|
|
6835
|
+
value: "voffice_ids"
|
|
6836
|
+
}
|
|
6837
|
+
},
|
|
6838
|
+
type: {
|
|
6839
|
+
kind: "ListType",
|
|
6840
|
+
type: {
|
|
6841
|
+
kind: "NonNullType",
|
|
6842
|
+
type: {
|
|
6843
|
+
kind: "NamedType",
|
|
6844
|
+
name: {
|
|
6845
|
+
kind: "Name",
|
|
6846
|
+
value: "Int"
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6849
|
+
}
|
|
6850
|
+
}
|
|
6851
|
+
},
|
|
6852
|
+
{
|
|
6853
|
+
kind: "VariableDefinition",
|
|
6854
|
+
variable: {
|
|
6855
|
+
kind: "Variable",
|
|
6856
|
+
name: {
|
|
6857
|
+
kind: "Name",
|
|
6858
|
+
value: "textAttributes"
|
|
6859
|
+
}
|
|
6860
|
+
},
|
|
6861
|
+
type: {
|
|
6862
|
+
kind: "NonNullType",
|
|
6863
|
+
type: {
|
|
6864
|
+
kind: "ListType",
|
|
6865
|
+
type: {
|
|
6866
|
+
kind: "NonNullType",
|
|
6867
|
+
type: {
|
|
6868
|
+
kind: "NamedType",
|
|
6869
|
+
name: {
|
|
6870
|
+
kind: "Name",
|
|
6871
|
+
value: "String"
|
|
6872
|
+
}
|
|
6873
|
+
}
|
|
6874
|
+
}
|
|
6875
|
+
}
|
|
6876
|
+
},
|
|
6877
|
+
defaultValue: {
|
|
6878
|
+
kind: "ListValue",
|
|
6879
|
+
values: []
|
|
6880
|
+
}
|
|
6881
|
+
}
|
|
6882
|
+
],
|
|
6883
|
+
selectionSet: {
|
|
6884
|
+
kind: "SelectionSet",
|
|
6885
|
+
selections: [{
|
|
6886
|
+
kind: "Field",
|
|
6887
|
+
name: {
|
|
6888
|
+
kind: "Name",
|
|
6889
|
+
value: "all"
|
|
6890
|
+
},
|
|
6891
|
+
arguments: [{
|
|
6892
|
+
kind: "Argument",
|
|
6893
|
+
name: {
|
|
6894
|
+
kind: "Name",
|
|
6895
|
+
value: "language"
|
|
6896
|
+
},
|
|
6897
|
+
value: {
|
|
6898
|
+
kind: "Variable",
|
|
6899
|
+
name: {
|
|
6900
|
+
kind: "Name",
|
|
6901
|
+
value: "language"
|
|
6902
|
+
}
|
|
6903
|
+
}
|
|
6904
|
+
}, {
|
|
6905
|
+
kind: "Argument",
|
|
6906
|
+
name: {
|
|
6907
|
+
kind: "Name",
|
|
6908
|
+
value: "voffice_ids"
|
|
6909
|
+
},
|
|
6910
|
+
value: {
|
|
6911
|
+
kind: "Variable",
|
|
6912
|
+
name: {
|
|
6913
|
+
kind: "Name",
|
|
6914
|
+
value: "voffice_ids"
|
|
6915
|
+
}
|
|
6916
|
+
}
|
|
6917
|
+
}],
|
|
6918
|
+
selectionSet: {
|
|
6919
|
+
kind: "SelectionSet",
|
|
6920
|
+
selections: [
|
|
6921
|
+
{
|
|
6922
|
+
kind: "Field",
|
|
6923
|
+
name: {
|
|
6924
|
+
kind: "Name",
|
|
6925
|
+
value: "voffice_id"
|
|
6926
|
+
}
|
|
6927
|
+
},
|
|
6928
|
+
{
|
|
6929
|
+
kind: "Field",
|
|
6930
|
+
name: {
|
|
6931
|
+
kind: "Name",
|
|
6932
|
+
value: "data"
|
|
6933
|
+
},
|
|
6934
|
+
arguments: [{
|
|
6935
|
+
kind: "Argument",
|
|
6936
|
+
name: {
|
|
6937
|
+
kind: "Name",
|
|
6938
|
+
value: "attributes"
|
|
6939
|
+
},
|
|
6940
|
+
value: {
|
|
6941
|
+
kind: "Variable",
|
|
6942
|
+
name: {
|
|
6943
|
+
kind: "Name",
|
|
6944
|
+
value: "textAttributes"
|
|
6945
|
+
}
|
|
6946
|
+
}
|
|
6947
|
+
}]
|
|
6948
|
+
},
|
|
6949
|
+
{
|
|
6950
|
+
kind: "Field",
|
|
6951
|
+
name: {
|
|
6952
|
+
kind: "Name",
|
|
6953
|
+
value: "voffice_facility"
|
|
6954
|
+
},
|
|
6955
|
+
selectionSet: {
|
|
6956
|
+
kind: "SelectionSet",
|
|
6957
|
+
selections: [{
|
|
6958
|
+
kind: "Field",
|
|
6959
|
+
name: {
|
|
6960
|
+
kind: "Name",
|
|
6961
|
+
value: "id"
|
|
6962
|
+
}
|
|
6963
|
+
}, {
|
|
6964
|
+
kind: "Field",
|
|
6965
|
+
name: {
|
|
6966
|
+
kind: "Name",
|
|
6967
|
+
value: "data"
|
|
6968
|
+
},
|
|
6969
|
+
arguments: [{
|
|
6970
|
+
kind: "Argument",
|
|
6971
|
+
name: {
|
|
6972
|
+
kind: "Name",
|
|
6973
|
+
value: "attributes"
|
|
6974
|
+
},
|
|
6975
|
+
value: {
|
|
6976
|
+
kind: "Variable",
|
|
6977
|
+
name: {
|
|
6978
|
+
kind: "Name",
|
|
6979
|
+
value: "textAttributes"
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6982
|
+
}]
|
|
6983
|
+
}]
|
|
6984
|
+
}
|
|
6985
|
+
}
|
|
6986
|
+
]
|
|
6987
|
+
}
|
|
6988
|
+
}]
|
|
6989
|
+
}
|
|
6990
|
+
}]
|
|
6991
|
+
},
|
|
6992
|
+
"\n query CoreSDK_FacilityTexts($language: String, $textAttributes: [String!]! = []) {\n facilities: voffice_facilities(language: $language) {\n id\n data(attributes: $textAttributes)\n }\n }\n": {
|
|
6993
|
+
kind: "Document",
|
|
6994
|
+
definitions: [{
|
|
6995
|
+
kind: "OperationDefinition",
|
|
6996
|
+
operation: "query",
|
|
6997
|
+
name: {
|
|
6998
|
+
kind: "Name",
|
|
6999
|
+
value: "CoreSDK_FacilityTexts"
|
|
7000
|
+
},
|
|
7001
|
+
variableDefinitions: [{
|
|
7002
|
+
kind: "VariableDefinition",
|
|
7003
|
+
variable: {
|
|
7004
|
+
kind: "Variable",
|
|
7005
|
+
name: {
|
|
7006
|
+
kind: "Name",
|
|
7007
|
+
value: "language"
|
|
7008
|
+
}
|
|
7009
|
+
},
|
|
7010
|
+
type: {
|
|
7011
|
+
kind: "NamedType",
|
|
7012
|
+
name: {
|
|
7013
|
+
kind: "Name",
|
|
7014
|
+
value: "String"
|
|
7015
|
+
}
|
|
7016
|
+
}
|
|
7017
|
+
}, {
|
|
7018
|
+
kind: "VariableDefinition",
|
|
7019
|
+
variable: {
|
|
7020
|
+
kind: "Variable",
|
|
7021
|
+
name: {
|
|
7022
|
+
kind: "Name",
|
|
7023
|
+
value: "textAttributes"
|
|
7024
|
+
}
|
|
7025
|
+
},
|
|
7026
|
+
type: {
|
|
7027
|
+
kind: "NonNullType",
|
|
7028
|
+
type: {
|
|
7029
|
+
kind: "ListType",
|
|
7030
|
+
type: {
|
|
7031
|
+
kind: "NonNullType",
|
|
7032
|
+
type: {
|
|
7033
|
+
kind: "NamedType",
|
|
7034
|
+
name: {
|
|
7035
|
+
kind: "Name",
|
|
7036
|
+
value: "String"
|
|
7037
|
+
}
|
|
7038
|
+
}
|
|
7039
|
+
}
|
|
7040
|
+
}
|
|
7041
|
+
},
|
|
7042
|
+
defaultValue: {
|
|
7043
|
+
kind: "ListValue",
|
|
7044
|
+
values: []
|
|
7045
|
+
}
|
|
7046
|
+
}],
|
|
7047
|
+
selectionSet: {
|
|
7048
|
+
kind: "SelectionSet",
|
|
7049
|
+
selections: [{
|
|
7050
|
+
kind: "Field",
|
|
7051
|
+
alias: {
|
|
7052
|
+
kind: "Name",
|
|
7053
|
+
value: "facilities"
|
|
7054
|
+
},
|
|
7055
|
+
name: {
|
|
7056
|
+
kind: "Name",
|
|
7057
|
+
value: "voffice_facilities"
|
|
7058
|
+
},
|
|
7059
|
+
arguments: [{
|
|
7060
|
+
kind: "Argument",
|
|
7061
|
+
name: {
|
|
7062
|
+
kind: "Name",
|
|
7063
|
+
value: "language"
|
|
7064
|
+
},
|
|
7065
|
+
value: {
|
|
7066
|
+
kind: "Variable",
|
|
7067
|
+
name: {
|
|
7068
|
+
kind: "Name",
|
|
7069
|
+
value: "language"
|
|
7070
|
+
}
|
|
7071
|
+
}
|
|
7072
|
+
}],
|
|
7073
|
+
selectionSet: {
|
|
7074
|
+
kind: "SelectionSet",
|
|
7075
|
+
selections: [{
|
|
7076
|
+
kind: "Field",
|
|
7077
|
+
name: {
|
|
7078
|
+
kind: "Name",
|
|
7079
|
+
value: "id"
|
|
7080
|
+
}
|
|
7081
|
+
}, {
|
|
7082
|
+
kind: "Field",
|
|
7083
|
+
name: {
|
|
7084
|
+
kind: "Name",
|
|
7085
|
+
value: "data"
|
|
7086
|
+
},
|
|
7087
|
+
arguments: [{
|
|
7088
|
+
kind: "Argument",
|
|
7089
|
+
name: {
|
|
7090
|
+
kind: "Name",
|
|
7091
|
+
value: "attributes"
|
|
7092
|
+
},
|
|
7093
|
+
value: {
|
|
7094
|
+
kind: "Variable",
|
|
7095
|
+
name: {
|
|
7096
|
+
kind: "Name",
|
|
7097
|
+
value: "textAttributes"
|
|
7098
|
+
}
|
|
7099
|
+
}
|
|
7100
|
+
}]
|
|
7101
|
+
}]
|
|
7102
|
+
}
|
|
7103
|
+
}]
|
|
7104
|
+
}
|
|
7105
|
+
}]
|
|
7106
|
+
},
|
|
6802
7107
|
"\n query CoreSDK_Search(\n $first: Int!\n $page: Int\n $language: String\n $vofficeData: VofficeData\n $basicQueryInputs: [BasicQueryInput!]\n $dataAttributes: [String!]! = []\n ) {\n search(\n first: $first\n page: $page\n language: $language\n voffice: $vofficeData\n data: $basicQueryInputs\n ) {\n paginatorInfo {\n hasMorePages\n currentPage\n total\n }\n data {\n voffice_id\n voffice_images {\n id\n path\n title\n description\n }\n voffice_room_images {\n id\n path\n name\n title\n description\n }\n additional_voffice_data {\n foundExactMatch\n alternatives {\n fromdate\n tilldate\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n matchingPeriods {\n fromdate\n tilldate\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n data(attributes: $dataAttributes)\n }\n }\n }\n": {
|
|
6803
7108
|
kind: "Document",
|
|
6804
7109
|
definitions: [{
|
|
@@ -8059,6 +8364,33 @@ graphql(`
|
|
|
8059
8364
|
}
|
|
8060
8365
|
}
|
|
8061
8366
|
`);
|
|
8367
|
+
/** Only the texts of rentals and their facility, in one language: what the description
|
|
8368
|
+
* fallback marker compares against, and nothing else. */
|
|
8369
|
+
const rentalTextsQuery = graphql(`
|
|
8370
|
+
query CoreSDK_RentalTexts(
|
|
8371
|
+
$language: String
|
|
8372
|
+
$voffice_ids: [Int!]
|
|
8373
|
+
$textAttributes: [String!]! = []
|
|
8374
|
+
) {
|
|
8375
|
+
all(language: $language, voffice_ids: $voffice_ids) {
|
|
8376
|
+
voffice_id
|
|
8377
|
+
data(attributes: $textAttributes)
|
|
8378
|
+
voffice_facility {
|
|
8379
|
+
id
|
|
8380
|
+
data(attributes: $textAttributes)
|
|
8381
|
+
}
|
|
8382
|
+
}
|
|
8383
|
+
}
|
|
8384
|
+
`);
|
|
8385
|
+
/** Only the texts of every facility, in one language, for object-group facility relations. */
|
|
8386
|
+
const facilityTextsQuery = graphql(`
|
|
8387
|
+
query CoreSDK_FacilityTexts($language: String, $textAttributes: [String!]! = []) {
|
|
8388
|
+
facilities: voffice_facilities(language: $language) {
|
|
8389
|
+
id
|
|
8390
|
+
data(attributes: $textAttributes)
|
|
8391
|
+
}
|
|
8392
|
+
}
|
|
8393
|
+
`);
|
|
8062
8394
|
//#endregion
|
|
8063
8395
|
//#region codegen/v9/graphql-codegen/operations/search.ts
|
|
8064
8396
|
const searchQuery = graphql(`
|
|
@@ -8178,4 +8510,4 @@ const voucherValidityQuery = graphql(`
|
|
|
8178
8510
|
}
|
|
8179
8511
|
`);
|
|
8180
8512
|
//#endregion
|
|
8181
|
-
export {
|
|
8513
|
+
export { parseVofficeRatingData as C, parseVofficeFeedbackData as S, VofficeUnitDataPropertyCategoryValues as _, hubFiltersQuery as a, parseJsonData as b, rentalIdsQuery as c, rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery as d, rentalsAllFeedbacksQuery as f, VofficeUnitDataPropertyCategoryLabelKeys as g, VofficeUnitDataFieldSchemas as h, facilityTextsQuery as i, rentalRegionsQuery as l, RegionSchema as m, mapSearchQuery as n, hubRentalDataQuery as o, rentalsAllWithoutFeedbacksQuery as p, searchQuery as r, rentalFacilitiesForObjectGroupRelationQuery as s, voucherValidityQuery as t, rentalTextsQuery as u, VofficeUnitDataPropertyMetadata as v, parseVofficeUnitData as w, parseVofficeFacilityData as x, customDataAttribute as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Qt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-
|
|
2
|
-
import { S as
|
|
3
|
-
import { a as toFacilityImages, c as
|
|
4
|
-
import { CoreSDKError, makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } from "@v-office/sdk-core";
|
|
1
|
+
import { Qt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-CE4V_ybW.mjs";
|
|
2
|
+
import { S as parseVofficeFeedbackData, _ as VofficeUnitDataPropertyCategoryValues, a as hubFiltersQuery, c as rentalIdsQuery, d as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, f as rentalsAllFeedbacksQuery, g as VofficeUnitDataPropertyCategoryLabelKeys, h as VofficeUnitDataFieldSchemas, i as facilityTextsQuery, p as rentalsAllWithoutFeedbacksQuery, s as rentalFacilitiesForObjectGroupRelationQuery, u as rentalTextsQuery, v as VofficeUnitDataPropertyMetadata, w as parseVofficeUnitData, x as parseVofficeFacilityData } from "./operations-DMqLD3e2.mjs";
|
|
3
|
+
import { a as toFacilityImages, c as toCapacity, i as toLocation, l as toAddress, o as toImages, r as renderVofficePropertyAttribute, t as toRentalHighlights, u as toLocalizedString } from "./to-rental-highlights-BE6TdXYa.mjs";
|
|
4
|
+
import { CoreSDKError, makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey, toReviewClassification } from "@v-office/sdk-core";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
//#region src/legacy-v9/parser/rentals/to-description.ts
|
|
7
7
|
const toDescription = (data, locale) => {
|
|
@@ -270,13 +270,6 @@ const toRentalVicinity = ({ locale, translations, attributes }) => Effect.gen(fu
|
|
|
270
270
|
});
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region src/legacy-v9/parser/rentals/to-reviews.ts
|
|
273
|
-
const toClassification = (rating) => {
|
|
274
|
-
if (rating >= 4.5) return "excellent";
|
|
275
|
-
if (rating >= 4) return "very-good";
|
|
276
|
-
if (rating >= 3) return "good";
|
|
277
|
-
if (rating >= 2) return "fair";
|
|
278
|
-
return "poor";
|
|
279
|
-
};
|
|
280
273
|
const roundRatingUp = (rating) => Math.ceil(Number(rating.toFixed(6)) * 10) / 10;
|
|
281
274
|
const renderTemplate = (template, values) => Object.entries(values).reduce((result, [key, value]) => result.replaceAll(`{${key}}`, value), template);
|
|
282
275
|
const toTravelDate = (locale, value) => {
|
|
@@ -368,8 +361,9 @@ const toReviews = ({ locale, translations, rental, options }) => Effect.gen(func
|
|
|
368
361
|
if (ratings.length === 0) return { items };
|
|
369
362
|
const summaryRating = roundRatingUp(ratings.reduce((ratingSum, rating) => ratingSum + rating, 0) / ratings.length);
|
|
370
363
|
const summaryRatingTemplate = yield* translations.translate(locale, "reviews.summary.rating");
|
|
371
|
-
const
|
|
372
|
-
const
|
|
364
|
+
const pluralCountTemplate = yield* translations.translate(locale, "reviews.summary.count");
|
|
365
|
+
const summaryCountTemplate = ratings.length === 1 ? yield* translations.translate(locale, "reviews.summary.count.one", pluralCountTemplate) : pluralCountTemplate;
|
|
366
|
+
const classification = toReviewClassification(summaryRating);
|
|
373
367
|
const categories = toCategories({
|
|
374
368
|
items: parsedItems,
|
|
375
369
|
criteria: options.criteria,
|
|
@@ -487,6 +481,8 @@ const toRentalRentalsOutput = ({ rental, locale, translations, imageProxyBaseUrl
|
|
|
487
481
|
if (translatedRentalType != null) item.rentalType = translatedRentalType;
|
|
488
482
|
if (location != null) item.location = location;
|
|
489
483
|
if (Object.keys(address).length > 0) item.address = address;
|
|
484
|
+
const capacity = toCapacity(data);
|
|
485
|
+
if (capacity != null) item.capacity = capacity;
|
|
490
486
|
if (Object.keys(description).length > 0) item.description = description;
|
|
491
487
|
if (images.length > 0) item.images = images;
|
|
492
488
|
if (attributes != null) item.attributes = attributes;
|
|
@@ -584,4 +580,4 @@ const associateRentalsWithFacilitiesByObjectGroups = ({ attributeId, facilities,
|
|
|
584
580
|
//#region src/legacy-v9/runtime/rentals.ts
|
|
585
581
|
const defaultRentalDataAttributes = Object.keys(VofficeUnitDataFieldSchemas);
|
|
586
582
|
//#endregion
|
|
587
|
-
export { associateRentalsWithFacilitiesByObjectGroups, defaultRentalDataAttributes, hubFiltersQuery, rentalFacilitiesForObjectGroupRelationQuery, rentalIdsQuery, rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, rentalsAllFeedbacksQuery, rentalsAllWithoutFeedbacksQuery, toRentalRentalsOutput };
|
|
583
|
+
export { associateRentalsWithFacilitiesByObjectGroups, defaultRentalDataAttributes, facilityTextsQuery, hubFiltersQuery, parseVofficeFacilityData, parseVofficeUnitData, rentalFacilitiesForObjectGroupRelationQuery, rentalIdsQuery, rentalTextsQuery, rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, rentalsAllFeedbacksQuery, rentalsAllWithoutFeedbacksQuery, toRentalRentalsOutput };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as makeV9CustomAttributeFilterCapabilities, c as parseQueryParameters, d as toVoucherCode, l as toQueryString, o as toBasicQueryInputs, s as collectQueryParameters, u as applyVofficeFilterDerivedBasicQueryInputs } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import { i as toLocation, n as toV9RentalHighlightKey, o as toImages, s as
|
|
1
|
+
import { a as makeV9CustomAttributeFilterCapabilities, c as parseQueryParameters, d as toVoucherCode, l as toQueryString, o as toBasicQueryInputs, s as collectQueryParameters, u as applyVofficeFilterDerivedBasicQueryInputs } from "./client-CE4V_ybW.mjs";
|
|
2
|
+
import { n as mapSearchQuery, r as searchQuery, w as parseVofficeUnitData } from "./operations-DMqLD3e2.mjs";
|
|
3
|
+
import { c as toCapacity, i as toLocation, l as toAddress, n as toV9RentalHighlightKey, o as toImages, s as CAPACITY_DATA_ATTRIBUTES, t as toRentalHighlights } from "./to-rental-highlights-BE6TdXYa.mjs";
|
|
4
4
|
import { CoreSDKError, STABLE_SEARCH_INPUTS, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, parseChildrenAges, parseOccupancyCount, resolveExpandedCompositions, toFormattedSearchPrice, toIsoDateFromPeriodQueryDate, toStableSearchInputBackendQueryKeys, toStableSearchInputParameterValues, toStableSearchInputQueryKeys, toUnusedFilterKeys } from "@v-office/sdk-core";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
//#region src/legacy-v9/parser/search/input/search-input-error.ts
|
|
@@ -293,6 +293,8 @@ const toSearchOutputItem = ({ locale, imageProxyBaseUrl, rentalHighlightPrioriti
|
|
|
293
293
|
};
|
|
294
294
|
const address = toAddress(data, locale);
|
|
295
295
|
if (Object.keys(address).length > 0) item.address = address;
|
|
296
|
+
const capacity = toCapacity(data);
|
|
297
|
+
if (capacity != null) item.capacity = capacity;
|
|
296
298
|
const images = toImages(imageProxyBaseUrl, rental, locale, data);
|
|
297
299
|
if (images.length > 0) item.images = images;
|
|
298
300
|
const highlights = yield* toRentalHighlights({
|
|
@@ -326,7 +328,8 @@ const toSearchPeriods = ({ locale, periods }) => Effect.succeed((periods ?? []).
|
|
|
326
328
|
//#region src/legacy-v9/runtime/search.ts
|
|
327
329
|
/**
|
|
328
330
|
* The rental data `toSearchOutputItem` reads: name, address with the region name,
|
|
329
|
-
* images, and the v9 attribute behind each configured
|
|
331
|
+
* images, the counts behind `capacity`, and the v9 attribute behind each configured
|
|
332
|
+
* highlight key. Requesting
|
|
330
333
|
* every known attribute instead more than doubles the response for the same output.
|
|
331
334
|
*/
|
|
332
335
|
const toSearchDataAttributes = (rentalHighlightPrioritization) => [.../* @__PURE__ */ new Set([
|
|
@@ -334,6 +337,7 @@ const toSearchDataAttributes = (rentalHighlightPrioritization) => [.../* @__PURE
|
|
|
334
337
|
"address",
|
|
335
338
|
"regionName",
|
|
336
339
|
"images",
|
|
340
|
+
...CAPACITY_DATA_ATTRIBUTES,
|
|
337
341
|
...rentalHighlightPrioritization.flatMap((key) => toV9RentalHighlightKey(key) ?? [])
|
|
338
342
|
])];
|
|
339
343
|
const mapSearchDataAttributes = ["loc"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { localeToLanguage, makeTranslate, renderLabeledAttributeValue, renderResolvedCustomAttribute, toCountry } from "@v-office/sdk-core";
|
|
1
|
+
import { v as VofficeUnitDataPropertyMetadata } from "./operations-DMqLD3e2.mjs";
|
|
2
|
+
import { localeToLanguage, makeTranslate, renderLabeledAttributeValue, renderResolvedCustomAttribute, toCountLabelKey, toCountry, toRentalCapacity } from "@v-office/sdk-core";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
//#region src/legacy-v9/parser/rentals/to-localized-string.ts
|
|
5
5
|
const isNonEmptyString$1 = (value) => typeof value === "string" && value.length > 0;
|
|
@@ -37,6 +37,25 @@ const toAddress = (data, locale) => {
|
|
|
37
37
|
return address;
|
|
38
38
|
};
|
|
39
39
|
//#endregion
|
|
40
|
+
//#region src/legacy-v9/parser/rentals/to-capacity.ts
|
|
41
|
+
/** The unit data `toCapacity` reads; search requests them next to its highlight attributes. */
|
|
42
|
+
const CAPACITY_DATA_ATTRIBUTES = [
|
|
43
|
+
"beds",
|
|
44
|
+
"bedrooms",
|
|
45
|
+
"bathrooms",
|
|
46
|
+
"rooms",
|
|
47
|
+
"squareMeters"
|
|
48
|
+
];
|
|
49
|
+
/** `capacity` from the unit data. v9 counts sleeping places (`beds`) and states no adults. */
|
|
50
|
+
const toCapacity = (data) => toRentalCapacity({
|
|
51
|
+
maxGuests: data.known.beds,
|
|
52
|
+
maxAdults: void 0,
|
|
53
|
+
bedrooms: data.known.bedrooms,
|
|
54
|
+
bathrooms: data.known.bathrooms,
|
|
55
|
+
rooms: data.known.rooms,
|
|
56
|
+
livingAreaSqm: data.known.squareMeters
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
40
59
|
//#region src/legacy-v9/parser/rentals/to-image.ts
|
|
41
60
|
const IMAGE_ASPECT_RATIO = 3 / 2;
|
|
42
61
|
const IMAGE_SRCSET_WIDTHS = [
|
|
@@ -289,7 +308,6 @@ const toLocation = (location) => {
|
|
|
289
308
|
};
|
|
290
309
|
//#endregion
|
|
291
310
|
//#region src/legacy-v9/parser/rentals/render-property-attribute.ts
|
|
292
|
-
const countLabelKey = (labelKey, value) => `${labelKey.slice(0, -6)}.count.${value === 1 ? "one" : "other"}`;
|
|
293
311
|
const renderVofficePropertyAttribute = ({ key, metadata, locale, translate, value }) => Effect.gen(function* () {
|
|
294
312
|
if (metadata.sourceType === "OPT") {
|
|
295
313
|
if (typeof value !== "number" || !Number.isInteger(value)) return void 0;
|
|
@@ -303,7 +321,7 @@ const renderVofficePropertyAttribute = ({ key, metadata, locale, translate, valu
|
|
|
303
321
|
if (value === 0) return void 0;
|
|
304
322
|
if (key.endsWith("distance")) return `${label}: ${value}m`;
|
|
305
323
|
if (key === "squareMeters") return `${value} m²`;
|
|
306
|
-
return `${value} ${yield* translate(
|
|
324
|
+
return `${value} ${yield* translate(toCountLabelKey(metadata.labelKey, value), label)}`;
|
|
307
325
|
}
|
|
308
326
|
return renderLabeledAttributeValue({
|
|
309
327
|
key,
|
|
@@ -701,4 +719,4 @@ const toRentalHighlights = ({ locale, translations, highlightPrioritization, cus
|
|
|
701
719
|
return highlights;
|
|
702
720
|
});
|
|
703
721
|
//#endregion
|
|
704
|
-
export { toFacilityImages as a,
|
|
722
|
+
export { toFacilityImages as a, toCapacity as c, toLocation as i, toAddress as l, toV9RentalHighlightKey as n, toImages as o, renderVofficePropertyAttribute as r, CAPACITY_DATA_ATTRIBUTES as s, toRentalHighlights as t, toLocalizedString as u };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"insurance.notOffered.label": "Keine Versicherung",
|
|
2
3
|
"insurance.none.label": "Ich verzichte auf den angebotenen Reiseschutz",
|
|
3
4
|
"insurance.none.description": "Im Fall einer Stornierung nach der kostenlosen Stornofrist trage ich das Risiko und die anfallenden Kosten selbst.",
|
|
4
5
|
"insurance.ergo.resources.inf.label": "Produktbeschreibung",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"reviews.summary.rating": "{rating}/{maxRating}",
|
|
3
3
|
"reviews.summary.count": "{count} Bewertungen",
|
|
4
|
-
"reviews.summary.
|
|
5
|
-
"reviews.summary.classification.
|
|
6
|
-
"reviews.summary.classification.good": "
|
|
7
|
-
"reviews.summary.classification.
|
|
4
|
+
"reviews.summary.count.one": "{count} Bewertung",
|
|
5
|
+
"reviews.summary.classification.excellent": "Hervorragend",
|
|
6
|
+
"reviews.summary.classification.very-good": "Sehr gut",
|
|
7
|
+
"reviews.summary.classification.good": "Gut",
|
|
8
|
+
"reviews.summary.classification.fair": "Ordentlich",
|
|
8
9
|
"reviews.summary.classification.poor": "Ausreichend",
|
|
9
10
|
"reviews.item.author": "{author}",
|
|
10
11
|
"reviews.item.authorWithDate": "{author}, verreist im {date}"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"insurance.notOffered.label": "No insurance",
|
|
2
3
|
"insurance.none.label": "I decline the offered travel insurance",
|
|
3
4
|
"insurance.none.description": "In case of a cancellation after the free cancellation period, I take the risk and the costs myself.",
|
|
4
5
|
"insurance.ergo.resources.inf.label": "Product description",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"reviews.summary.rating": "{rating}/{maxRating}",
|
|
3
3
|
"reviews.summary.count": "{count} reviews",
|
|
4
|
-
"reviews.summary.
|
|
4
|
+
"reviews.summary.count.one": "{count} review",
|
|
5
|
+
"reviews.summary.classification.excellent": "Exceptional",
|
|
5
6
|
"reviews.summary.classification.very-good": "Very good",
|
|
6
7
|
"reviews.summary.classification.good": "Good",
|
|
7
|
-
"reviews.summary.classification.fair": "
|
|
8
|
-
"reviews.summary.classification.poor": "
|
|
8
|
+
"reviews.summary.classification.fair": "Decent",
|
|
9
|
+
"reviews.summary.classification.poor": "Adequate",
|
|
9
10
|
"reviews.item.author": "{author}",
|
|
10
|
-
"reviews.item.authorWithDate": "{author},
|
|
11
|
+
"reviews.item.authorWithDate": "{author}, stayed in {date}"
|
|
11
12
|
}
|
|
@@ -2899,7 +2899,7 @@
|
|
|
2899
2899
|
"Property.name.placeholder": "Property.name.placeholder",
|
|
2900
2900
|
"Property.propertyType.help": "Anlagen Typ Hilfe",
|
|
2901
2901
|
"Property.propertyType.label": "Typ",
|
|
2902
|
-
"Property.propertyType.option.APARTMENT_COMPLEX": "
|
|
2902
|
+
"Property.propertyType.option.APARTMENT_COMPLEX": "Apartmentanlage",
|
|
2903
2903
|
"Property.propertyType.option.CAMPGROUND": "Campingplatz",
|
|
2904
2904
|
"Property.propertyType.option.FARM": "Bauernhof",
|
|
2905
2905
|
"Property.propertyType.option.HOLIDAY_HOME_COMPLEX": "Ferienhausanlage",
|
|
@@ -4495,7 +4495,7 @@
|
|
|
4495
4495
|
"RentalAttributes.lakeview.placeholder": "Platzhalter",
|
|
4496
4496
|
"RentalAttributes.lakeviewType.help": "Art der Wasserlage (z. B. direkt am Wasser, erhöht)",
|
|
4497
4497
|
"RentalAttributes.lakeviewType.label": "Art des Seeblicks",
|
|
4498
|
-
"RentalAttributes.lakeviewType.option.EXCEPTIONALLY_GOOD": "
|
|
4498
|
+
"RentalAttributes.lakeviewType.option.EXCEPTIONALLY_GOOD": "Außergewöhnlich gut",
|
|
4499
4499
|
"RentalAttributes.lakeviewType.option.GOOD": "Gut",
|
|
4500
4500
|
"RentalAttributes.lakeviewType.option.LIMITED": "Eingeschränkt",
|
|
4501
4501
|
"RentalAttributes.lakeviewType.placeholder": "Platzhalter",
|
|
@@ -4670,9 +4670,9 @@
|
|
|
4670
4670
|
"RentalAttributes.seaview.placeholder": "Platzhalter",
|
|
4671
4671
|
"RentalAttributes.seaviewType.help": "Art des Meerblicks (direkt, seitlich, eingeschränkt)",
|
|
4672
4672
|
"RentalAttributes.seaviewType.label": "Art des Meerblicks",
|
|
4673
|
-
"RentalAttributes.seaviewType.option.EXCEPTIONALLY_GOOD": "
|
|
4673
|
+
"RentalAttributes.seaviewType.option.EXCEPTIONALLY_GOOD": "Außergewöhnlich gut",
|
|
4674
4674
|
"RentalAttributes.seaviewType.option.GOOD": "Gut",
|
|
4675
|
-
"RentalAttributes.seaviewType.option.LIMITED": "
|
|
4675
|
+
"RentalAttributes.seaviewType.option.LIMITED": "Eingeschränkt",
|
|
4676
4676
|
"RentalAttributes.seaviewType.placeholder": "Platzhalter",
|
|
4677
4677
|
"RentalAttributes.semiDetached.help": "RentalAttributes.semiDetached.help",
|
|
4678
4678
|
"RentalAttributes.semiDetached.label": "Doppelhaushälfte / Angebaut",
|
|
@@ -4818,6 +4818,7 @@
|
|
|
4818
4818
|
"RentalAttributes.valleyView.help": "Blick ins Tal vorhanden",
|
|
4819
4819
|
"RentalAttributes.valleyView.label": "Talblick",
|
|
4820
4820
|
"RentalAttributes.valleyView.placeholder": "Platzhalter",
|
|
4821
|
+
"RentalAttributes.valleyViewType.label": "Art des Talblicks",
|
|
4821
4822
|
"RentalAttributes.valleyViewType.help": "Art der Aussicht (z. B. bewaldet, offen)",
|
|
4822
4823
|
"RentalAttributes.valleyViewType.option.EXCEPTIONALLY_GOOD": "Außergewöhnlich gut",
|
|
4823
4824
|
"RentalAttributes.valleyViewType.option.GOOD": "Gut",
|
|
@@ -5899,21 +5900,33 @@
|
|
|
5899
5900
|
"RoomsCard.tiling.cancel": "Abbrechen",
|
|
5900
5901
|
"RoomSummary.bathrooms.help": "Anzahl Bäder",
|
|
5901
5902
|
"RoomSummary.bathrooms.label": "Badezimmer",
|
|
5903
|
+
"RoomSummary.bathrooms.count.one": "Badezimmer",
|
|
5904
|
+
"RoomSummary.bathrooms.count.other": "Badezimmer",
|
|
5902
5905
|
"RoomSummary.bathrooms.placeholder": "Platzhalter",
|
|
5903
5906
|
"RoomSummary.bedrooms.help": "Anzahl Schlafzimmer",
|
|
5904
5907
|
"RoomSummary.bedrooms.label": "Schlafzimmer",
|
|
5908
|
+
"RoomSummary.bedrooms.count.one": "Schlafzimmer",
|
|
5909
|
+
"RoomSummary.bedrooms.count.other": "Schlafzimmer",
|
|
5905
5910
|
"RoomSummary.bedrooms.placeholder": "Platzhalter",
|
|
5906
5911
|
"RoomSummary.livingrooms.help": "Wohnzimmer vorhanden",
|
|
5907
5912
|
"RoomSummary.livingrooms.label": "Wohnzimmer",
|
|
5913
|
+
"RoomSummary.livingrooms.count.one": "Wohnzimmer",
|
|
5914
|
+
"RoomSummary.livingrooms.count.other": "Wohnzimmer",
|
|
5908
5915
|
"RoomSummary.livingrooms.placeholder": "Platzhalter",
|
|
5909
5916
|
"RoomSummary.maxAdults.help": "Maximale Erwachsene (Empfehlung)",
|
|
5910
5917
|
"RoomSummary.maxAdults.label": "Maximale Erwachsene",
|
|
5918
|
+
"RoomSummary.maxAdults.count.one": "Erwachsener",
|
|
5919
|
+
"RoomSummary.maxAdults.count.other": "Erwachsene",
|
|
5911
5920
|
"RoomSummary.maxAdults.placeholder": "Platzhalter",
|
|
5912
5921
|
"RoomSummary.maxPersons.help": "Gesamtpersonenzahl möglich",
|
|
5913
5922
|
"RoomSummary.maxPersons.label": "Maximale Personenzahl",
|
|
5923
|
+
"RoomSummary.maxPersons.count.one": "Gast",
|
|
5924
|
+
"RoomSummary.maxPersons.count.other": "Gäste",
|
|
5914
5925
|
"RoomSummary.maxPersons.placeholder": "Platzhalter",
|
|
5915
5926
|
"RoomSummary.rooms.help": "Anzahl Räume insgesamt",
|
|
5916
5927
|
"RoomSummary.rooms.label": "Zimmer",
|
|
5928
|
+
"RoomSummary.rooms.count.one": "Zimmer",
|
|
5929
|
+
"RoomSummary.rooms.count.other": "Zimmer",
|
|
5917
5930
|
"RoomSummary.rooms.placeholder": "Platzhalter",
|
|
5918
5931
|
"safe": "safe",
|
|
5919
5932
|
"sandbox": "sandbox",
|