@v-office/website-sdk 3.2.1 → 3.4.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 (29) hide show
  1. package/dist/cli.mjs +3 -3
  2. package/dist/{client-F2V6hCg6.mjs → client-BEL6ow0i.mjs} +122 -119
  3. package/dist/index.d.mts +214 -166
  4. package/dist/index.mjs +2 -2
  5. package/dist/instructions/CHANGELOG.md +2 -0
  6. package/dist/instructions/MIGRATION.md +2 -0
  7. package/dist/instructions/quote.md +2 -2
  8. package/dist/instructions/rentals.md +82 -1
  9. package/dist/instructions/search.md +2 -1
  10. package/dist/instructions/versions/3.3.0/CHANGELOG.md +22 -0
  11. package/dist/instructions/versions/3.3.0/MIGRATION.md +22 -0
  12. package/dist/instructions/versions/3.4.0/CHANGELOG.md +39 -0
  13. package/dist/instructions/versions/3.4.0/MIGRATION.md +44 -0
  14. package/dist/{operations-Bc3WxjV8.mjs → operations-DY2e_2Hd.mjs} +235 -13
  15. package/dist/{rentals-DfDeL0Qk.mjs → rentals-DVMCyGI9.mjs} +65 -4
  16. package/dist/{search-_gISebZ1.mjs → search-6EvRB-i0.mjs} +3 -3
  17. package/dist/{to-rental-highlights-9AbqVIso.mjs → to-rental-highlights-DptWc7-q.mjs} +1 -1
  18. package/instructions/CHANGELOG.md +2 -0
  19. package/instructions/MIGRATION.md +2 -0
  20. package/instructions/quote.md +2 -2
  21. package/instructions/rentals.md +82 -1
  22. package/instructions/search.md +2 -1
  23. package/instructions/versions/3.3.0/CHANGELOG.md +22 -0
  24. package/instructions/versions/3.3.0/MIGRATION.md +22 -0
  25. package/instructions/versions/3.3.0/release.json +3 -0
  26. package/instructions/versions/3.4.0/CHANGELOG.md +39 -0
  27. package/instructions/versions/3.4.0/MIGRATION.md +44 -0
  28. package/instructions/versions/3.4.0/release.json +3 -0
  29. package/package.json +3 -3
@@ -3139,14 +3139,6 @@ const VofficeUnitDataPropertyMetadata = {
3139
3139
  labelKey: "RentalAttributesCategory.ACTIVITY.label"
3140
3140
  }
3141
3141
  },
3142
- matterport: {
3143
- sourceType: "CODE",
3144
- labelKey: "RentalAttributes.matterport.label",
3145
- category: {
3146
- key: "GENERAL",
3147
- labelKey: "RentalAttributesCategory.GENERAL.label"
3148
- }
3149
- },
3150
3142
  metaDescription: {
3151
3143
  sourceType: "TEXT",
3152
3144
  labelKey: "RentalAttributes.metaDescription.label",
@@ -4898,7 +4890,21 @@ const VofficeFeedbackDataFieldSchemas = {
4898
4890
  avgRating: Schema.Number
4899
4891
  };
4900
4892
  const parseVofficeFeedbackData = (input) => parseJsonData(VofficeFeedbackDataFieldSchemas, input);
4901
- Schema.String, Schema.String, Schema.Number;
4893
+ /** Known structure of VofficeOffer.data attributes. */
4894
+ const VofficeOfferDataFieldSchemas = {
4895
+ name: Schema.String,
4896
+ description: Schema.NullOr(Schema.String),
4897
+ type: Schema.NullOr(Schema.String),
4898
+ discountType: Schema.String,
4899
+ value: Schema.Number,
4900
+ minStay: Schema.NullOr(Schema.Number),
4901
+ timeSpan: Schema.NullOr(Schema.Number),
4902
+ voucherCode: Schema.NullOr(Schema.String),
4903
+ fromdate: Schema.NullOr(Schema.String),
4904
+ tilldate: Schema.NullOr(Schema.String),
4905
+ visible4interfaces: Schema.Boolean
4906
+ };
4907
+ const parseVofficeOfferData = (input) => parseJsonData(VofficeOfferDataFieldSchemas, input);
4902
4908
  /** Known structure of VofficeRating.data attributes. */
4903
4909
  const VofficeRatingDataFieldSchemas = {
4904
4910
  fb_avg: Schema.Number,
@@ -5167,7 +5173,7 @@ const documents = {
5167
5173
  }
5168
5174
  }]
5169
5175
  },
5170
- "\n query CoreSDK_RentalsAllWithoutFeedbacks(\n $language: String\n $voffice_ids: [Int!]\n $rentalDataAttributes: [String!]! = []\n $rentalFacilityDataAttributes: [String!]! = []\n $rentalRatingDataAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n id\n voffice_id\n voffice_facility_id\n name\n publish\n data(attributes: $rentalDataAttributes)\n additional_voffice_data {\n beds\n }\n voffice_groups {\n voffice_group_id\n }\n voffice_facility {\n id\n voffice_id\n name\n publish\n data(attributes: $rentalFacilityDataAttributes)\n }\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 voffice_rating {\n id\n data(attributes: $rentalRatingDataAttributes)\n }\n }\n }\n": {
5176
+ "\n query CoreSDK_RentalsAllWithoutFeedbacks(\n $language: String\n $voffice_ids: [Int!]\n $rentalDataAttributes: [String!]! = []\n $rentalFacilityDataAttributes: [String!]! = []\n $rentalRatingDataAttributes: [String!]! = []\n $rentalOfferDataAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n id\n voffice_id\n voffice_facility_id\n name\n publish\n data(attributes: $rentalDataAttributes)\n additional_voffice_data {\n beds\n }\n voffice_groups {\n voffice_group_id\n }\n voffice_facility {\n id\n voffice_id\n name\n publish\n data(attributes: $rentalFacilityDataAttributes)\n }\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 voffice_rating {\n id\n data(attributes: $rentalRatingDataAttributes)\n }\n voffice_offers {\n voffice_offer_id\n data(attributes: $rentalOfferDataAttributes)\n }\n }\n }\n": {
5171
5177
  kind: "Document",
5172
5178
  definitions: [{
5173
5179
  kind: "OperationDefinition",
@@ -5306,6 +5312,36 @@ const documents = {
5306
5312
  kind: "ListValue",
5307
5313
  values: []
5308
5314
  }
5315
+ },
5316
+ {
5317
+ kind: "VariableDefinition",
5318
+ variable: {
5319
+ kind: "Variable",
5320
+ name: {
5321
+ kind: "Name",
5322
+ value: "rentalOfferDataAttributes"
5323
+ }
5324
+ },
5325
+ type: {
5326
+ kind: "NonNullType",
5327
+ type: {
5328
+ kind: "ListType",
5329
+ type: {
5330
+ kind: "NonNullType",
5331
+ type: {
5332
+ kind: "NamedType",
5333
+ name: {
5334
+ kind: "Name",
5335
+ value: "String"
5336
+ }
5337
+ }
5338
+ }
5339
+ }
5340
+ },
5341
+ defaultValue: {
5342
+ kind: "ListValue",
5343
+ values: []
5344
+ }
5309
5345
  }
5310
5346
  ],
5311
5347
  selectionSet: {
@@ -5620,6 +5656,43 @@ const documents = {
5620
5656
  }]
5621
5657
  }]
5622
5658
  }
5659
+ },
5660
+ {
5661
+ kind: "Field",
5662
+ name: {
5663
+ kind: "Name",
5664
+ value: "voffice_offers"
5665
+ },
5666
+ selectionSet: {
5667
+ kind: "SelectionSet",
5668
+ selections: [{
5669
+ kind: "Field",
5670
+ name: {
5671
+ kind: "Name",
5672
+ value: "voffice_offer_id"
5673
+ }
5674
+ }, {
5675
+ kind: "Field",
5676
+ name: {
5677
+ kind: "Name",
5678
+ value: "data"
5679
+ },
5680
+ arguments: [{
5681
+ kind: "Argument",
5682
+ name: {
5683
+ kind: "Name",
5684
+ value: "attributes"
5685
+ },
5686
+ value: {
5687
+ kind: "Variable",
5688
+ name: {
5689
+ kind: "Name",
5690
+ value: "rentalOfferDataAttributes"
5691
+ }
5692
+ }
5693
+ }]
5694
+ }]
5695
+ }
5623
5696
  }
5624
5697
  ]
5625
5698
  }
@@ -5627,7 +5700,7 @@ const documents = {
5627
5700
  }
5628
5701
  }]
5629
5702
  },
5630
- "\n query CoreSDK_RentalsAllByFacilityObjectGroupsWithoutFeedbacks(\n $language: String\n $voffice_ids: [Int!]\n $rentalDataAttributes: [String!]! = []\n $rentalRatingDataAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n id\n voffice_id\n voffice_facility_id\n name\n publish\n data(attributes: $rentalDataAttributes)\n additional_voffice_data {\n beds\n }\n voffice_groups {\n voffice_group_id\n }\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 voffice_rating {\n id\n data(attributes: $rentalRatingDataAttributes)\n }\n }\n }\n": {
5703
+ "\n query CoreSDK_RentalsAllByFacilityObjectGroupsWithoutFeedbacks(\n $language: String\n $voffice_ids: [Int!]\n $rentalDataAttributes: [String!]! = []\n $rentalRatingDataAttributes: [String!]! = []\n $rentalOfferDataAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n id\n voffice_id\n voffice_facility_id\n name\n publish\n data(attributes: $rentalDataAttributes)\n additional_voffice_data {\n beds\n }\n voffice_groups {\n voffice_group_id\n }\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 voffice_rating {\n id\n data(attributes: $rentalRatingDataAttributes)\n }\n voffice_offers {\n voffice_offer_id\n data(attributes: $rentalOfferDataAttributes)\n }\n }\n }\n": {
5631
5704
  kind: "Document",
5632
5705
  definitions: [{
5633
5706
  kind: "OperationDefinition",
@@ -5736,6 +5809,36 @@ const documents = {
5736
5809
  kind: "ListValue",
5737
5810
  values: []
5738
5811
  }
5812
+ },
5813
+ {
5814
+ kind: "VariableDefinition",
5815
+ variable: {
5816
+ kind: "Variable",
5817
+ name: {
5818
+ kind: "Name",
5819
+ value: "rentalOfferDataAttributes"
5820
+ }
5821
+ },
5822
+ type: {
5823
+ kind: "NonNullType",
5824
+ type: {
5825
+ kind: "ListType",
5826
+ type: {
5827
+ kind: "NonNullType",
5828
+ type: {
5829
+ kind: "NamedType",
5830
+ name: {
5831
+ kind: "Name",
5832
+ value: "String"
5833
+ }
5834
+ }
5835
+ }
5836
+ }
5837
+ },
5838
+ defaultValue: {
5839
+ kind: "ListValue",
5840
+ values: []
5841
+ }
5739
5842
  }
5740
5843
  ],
5741
5844
  selectionSet: {
@@ -5989,6 +6092,43 @@ const documents = {
5989
6092
  }]
5990
6093
  }]
5991
6094
  }
6095
+ },
6096
+ {
6097
+ kind: "Field",
6098
+ name: {
6099
+ kind: "Name",
6100
+ value: "voffice_offers"
6101
+ },
6102
+ selectionSet: {
6103
+ kind: "SelectionSet",
6104
+ selections: [{
6105
+ kind: "Field",
6106
+ name: {
6107
+ kind: "Name",
6108
+ value: "voffice_offer_id"
6109
+ }
6110
+ }, {
6111
+ kind: "Field",
6112
+ name: {
6113
+ kind: "Name",
6114
+ value: "data"
6115
+ },
6116
+ arguments: [{
6117
+ kind: "Argument",
6118
+ name: {
6119
+ kind: "Name",
6120
+ value: "attributes"
6121
+ },
6122
+ value: {
6123
+ kind: "Variable",
6124
+ name: {
6125
+ kind: "Name",
6126
+ value: "rentalOfferDataAttributes"
6127
+ }
6128
+ }
6129
+ }]
6130
+ }]
6131
+ }
5992
6132
  }
5993
6133
  ]
5994
6134
  }
@@ -6295,7 +6435,7 @@ const documents = {
6295
6435
  }
6296
6436
  }]
6297
6437
  },
6298
- "\n query CoreSDK_RentalsAll(\n $language: String\n $voffice_ids: [Int!]\n $rentalDataAttributes: [String!]! = []\n $rentalFacilityDataAttributes: [String!]! = []\n $rentalRatingDataAttributes: [String!]! = []\n $rentalFeedbackDataAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n id\n voffice_id\n voffice_facility_id\n name\n publish\n data(attributes: $rentalDataAttributes)\n additional_voffice_data {\n beds\n }\n voffice_facility {\n id\n voffice_id\n name\n publish\n data(attributes: $rentalFacilityDataAttributes)\n }\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 voffice_rating {\n id\n data(attributes: $rentalRatingDataAttributes)\n }\n voffice_feedbacks {\n data(attributes: $rentalFeedbackDataAttributes)\n }\n }\n }\n": {
6438
+ "\n query CoreSDK_RentalsAll(\n $language: String\n $voffice_ids: [Int!]\n $rentalDataAttributes: [String!]! = []\n $rentalFacilityDataAttributes: [String!]! = []\n $rentalRatingDataAttributes: [String!]! = []\n $rentalFeedbackDataAttributes: [String!]! = []\n $rentalOfferDataAttributes: [String!]! = []\n ) {\n all(language: $language, voffice_ids: $voffice_ids) {\n id\n voffice_id\n voffice_facility_id\n name\n publish\n data(attributes: $rentalDataAttributes)\n additional_voffice_data {\n beds\n }\n voffice_facility {\n id\n voffice_id\n name\n publish\n data(attributes: $rentalFacilityDataAttributes)\n }\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 voffice_rating {\n id\n data(attributes: $rentalRatingDataAttributes)\n }\n voffice_feedbacks {\n data(attributes: $rentalFeedbackDataAttributes)\n }\n voffice_offers {\n voffice_offer_id\n data(attributes: $rentalOfferDataAttributes)\n }\n }\n }\n": {
6299
6439
  kind: "Document",
6300
6440
  definitions: [{
6301
6441
  kind: "OperationDefinition",
@@ -6464,6 +6604,36 @@ const documents = {
6464
6604
  kind: "ListValue",
6465
6605
  values: []
6466
6606
  }
6607
+ },
6608
+ {
6609
+ kind: "VariableDefinition",
6610
+ variable: {
6611
+ kind: "Variable",
6612
+ name: {
6613
+ kind: "Name",
6614
+ value: "rentalOfferDataAttributes"
6615
+ }
6616
+ },
6617
+ type: {
6618
+ kind: "NonNullType",
6619
+ type: {
6620
+ kind: "ListType",
6621
+ type: {
6622
+ kind: "NonNullType",
6623
+ type: {
6624
+ kind: "NamedType",
6625
+ name: {
6626
+ kind: "Name",
6627
+ value: "String"
6628
+ }
6629
+ }
6630
+ }
6631
+ }
6632
+ },
6633
+ defaultValue: {
6634
+ kind: "ListValue",
6635
+ values: []
6636
+ }
6467
6637
  }
6468
6638
  ],
6469
6639
  selectionSet: {
@@ -6792,6 +6962,43 @@ const documents = {
6792
6962
  }]
6793
6963
  }]
6794
6964
  }
6965
+ },
6966
+ {
6967
+ kind: "Field",
6968
+ name: {
6969
+ kind: "Name",
6970
+ value: "voffice_offers"
6971
+ },
6972
+ selectionSet: {
6973
+ kind: "SelectionSet",
6974
+ selections: [{
6975
+ kind: "Field",
6976
+ name: {
6977
+ kind: "Name",
6978
+ value: "voffice_offer_id"
6979
+ }
6980
+ }, {
6981
+ kind: "Field",
6982
+ name: {
6983
+ kind: "Name",
6984
+ value: "data"
6985
+ },
6986
+ arguments: [{
6987
+ kind: "Argument",
6988
+ name: {
6989
+ kind: "Name",
6990
+ value: "attributes"
6991
+ },
6992
+ value: {
6993
+ kind: "Variable",
6994
+ name: {
6995
+ kind: "Name",
6996
+ value: "rentalOfferDataAttributes"
6997
+ }
6998
+ }
6999
+ }]
7000
+ }]
7001
+ }
6795
7002
  }
6796
7003
  ]
6797
7004
  }
@@ -8272,6 +8479,7 @@ const rentalsAllWithoutFeedbacksQuery = graphql(`
8272
8479
  $rentalDataAttributes: [String!]! = []
8273
8480
  $rentalFacilityDataAttributes: [String!]! = []
8274
8481
  $rentalRatingDataAttributes: [String!]! = []
8482
+ $rentalOfferDataAttributes: [String!]! = []
8275
8483
  ) {
8276
8484
  all(language: $language, voffice_ids: $voffice_ids) {
8277
8485
  id
@@ -8310,6 +8518,10 @@ const rentalsAllWithoutFeedbacksQuery = graphql(`
8310
8518
  id
8311
8519
  data(attributes: $rentalRatingDataAttributes)
8312
8520
  }
8521
+ voffice_offers {
8522
+ voffice_offer_id
8523
+ data(attributes: $rentalOfferDataAttributes)
8524
+ }
8313
8525
  }
8314
8526
  }
8315
8527
  `);
@@ -8319,6 +8531,7 @@ const rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery = graphql(`
8319
8531
  $voffice_ids: [Int!]
8320
8532
  $rentalDataAttributes: [String!]! = []
8321
8533
  $rentalRatingDataAttributes: [String!]! = []
8534
+ $rentalOfferDataAttributes: [String!]! = []
8322
8535
  ) {
8323
8536
  all(language: $language, voffice_ids: $voffice_ids) {
8324
8537
  id
@@ -8350,6 +8563,10 @@ const rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery = graphql(`
8350
8563
  id
8351
8564
  data(attributes: $rentalRatingDataAttributes)
8352
8565
  }
8566
+ voffice_offers {
8567
+ voffice_offer_id
8568
+ data(attributes: $rentalOfferDataAttributes)
8569
+ }
8353
8570
  }
8354
8571
  }
8355
8572
  `);
@@ -8389,6 +8606,7 @@ graphql(`
8389
8606
  $rentalFacilityDataAttributes: [String!]! = []
8390
8607
  $rentalRatingDataAttributes: [String!]! = []
8391
8608
  $rentalFeedbackDataAttributes: [String!]! = []
8609
+ $rentalOfferDataAttributes: [String!]! = []
8392
8610
  ) {
8393
8611
  all(language: $language, voffice_ids: $voffice_ids) {
8394
8612
  id
@@ -8427,6 +8645,10 @@ graphql(`
8427
8645
  voffice_feedbacks {
8428
8646
  data(attributes: $rentalFeedbackDataAttributes)
8429
8647
  }
8648
+ voffice_offers {
8649
+ voffice_offer_id
8650
+ data(attributes: $rentalOfferDataAttributes)
8651
+ }
8430
8652
  }
8431
8653
  }
8432
8654
  `);
@@ -8586,4 +8808,4 @@ const voucherValidityQuery = graphql(`
8586
8808
  }
8587
8809
  `);
8588
8810
  //#endregion
8589
- 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 };
8811
+ export { parseVofficeOfferData as C, parseVofficeFeedbackData as S, parseVofficeUnitData as T, 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, parseVofficeRatingData as w, parseVofficeFacilityData as x, customDataAttribute as y };
@@ -1,6 +1,6 @@
1
- import { Qt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-F2V6hCg6.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-Bc3WxjV8.mjs";
3
- import { a as toLocation, d as toLocalizedString, l as toCapacity, n as renderVofficePropertyAttribute, o as toFacilityImages, r as toV9Fact, s as toImages, t as toRentalHighlights, u as toAddress } from "./to-rental-highlights-9AbqVIso.mjs";
1
+ import { $t as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-BEL6ow0i.mjs";
2
+ import { C as parseVofficeOfferData, S as parseVofficeFeedbackData, T as parseVofficeUnitData, _ 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, x as parseVofficeFacilityData } from "./operations-DY2e_2Hd.mjs";
3
+ import { a as toLocation, d as toLocalizedString, l as toCapacity, n as renderVofficePropertyAttribute, o as toFacilityImages, r as toV9Fact, s as toImages, t as toRentalHighlights, u as toAddress } from "./to-rental-highlights-DptWc7-q.mjs";
4
4
  import { CoreSDKError, makeTranslate, pushFact, renderResolvedCustomAttribute, toCustomAttributeFact, toCustomAttributeList, toFact, toResolvedCustomAttributeCategoryTranslationKey, toReviewClassification } from "@v-office/sdk-core";
5
5
  import { Effect } from "effect";
6
6
  //#region src/legacy-v9/parser/rentals/to-description.ts
@@ -25,6 +25,24 @@ const toDescription = (data, locale) => {
25
25
  return description;
26
26
  };
27
27
  //#endregion
28
+ //#region src/legacy-v9/parser/rentals/to-links.ts
29
+ const MATTERPORT_MODEL_ID = /^[A-Za-z0-9]{11}$/;
30
+ const toMatterportUrl = (value) => {
31
+ if (MATTERPORT_MODEL_ID.test(value)) return `https://my.matterport.com/show/?m=${value}`;
32
+ if (!URL.canParse(value)) return void 0;
33
+ const url = new URL(value);
34
+ const isMatterport = url.hostname === "matterport.com" || url.hostname.endsWith(".matterport.com");
35
+ return url.protocol === "https:" && isMatterport ? url.href : void 0;
36
+ };
37
+ const toLinks = (data) => {
38
+ const matterport = data.known.matterport?.trim();
39
+ const url = matterport != null ? toMatterportUrl(matterport) : void 0;
40
+ return url != null ? [{
41
+ type: "THREE_D",
42
+ url
43
+ }] : [];
44
+ };
45
+ //#endregion
28
46
  //#region src/legacy-v9/parser/rentals/to-property-attributes.ts
29
47
  const toPropertyAttributes = ({ attributes, locale, translations }) => Effect.gen(function* () {
30
48
  const group = {
@@ -563,9 +581,52 @@ const toRentalRentalsOutput = ({ rental, locale, translations, imageProxyBaseUrl
563
581
  translations
564
582
  });
565
583
  if (reviews != null) item.reviews = reviews;
584
+ const links = toLinks(data);
585
+ if (links.length > 0) item.links = links;
566
586
  return item;
567
587
  });
568
588
  //#endregion
589
+ //#region src/legacy-v9/parser/rentals/to-rental-offers.ts
590
+ const HUNDREDTHS = 100;
591
+ const toDiscount = ({ discountType, value, minStay }) => {
592
+ if (value == null) return void 0;
593
+ switch (discountType) {
594
+ case "PERCENT": return {
595
+ type: "percent",
596
+ percent: value / HUNDREDTHS
597
+ };
598
+ case "FLAT": return {
599
+ type: "amount",
600
+ amount: {
601
+ amount: value,
602
+ currency: "EUR"
603
+ }
604
+ };
605
+ case "XY": return minStay == null ? void 0 : {
606
+ type: "stayPay",
607
+ stayNights: minStay,
608
+ payNights: value / HUNDREDTHS
609
+ };
610
+ default: return;
611
+ }
612
+ };
613
+ const isPublic = ({ known, unknown }) => known.visible4interfaces === true && known.voucherCode == null && !("voucherCode" in unknown);
614
+ const toRentalOffers = (offers) => (offers ?? []).flatMap((offer) => {
615
+ const data = parseVofficeOfferData(offer.data);
616
+ const { name, minStay, timeSpan, fromdate, tilldate } = data.known;
617
+ const discount = toDiscount(data.known);
618
+ if (!isPublic(data) || name == null || discount === void 0) return [];
619
+ return [{
620
+ id: String(offer.voffice_offer_id),
621
+ name,
622
+ discount,
623
+ ...minStay == null ? {} : { minNights: minStay },
624
+ ...timeSpan == null ? {} : { arrivalWithinDays: timeSpan },
625
+ ...fromdate == null ? {} : { validFrom: fromdate },
626
+ ...tilldate == null ? {} : { validUntil: tilldate }
627
+ }];
628
+ });
629
+ //#endregion
569
630
  //#region src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.ts
570
631
  const operation = "v9.rentals.facility-object-group-relation";
571
632
  const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -646,4 +707,4 @@ const associateRentalsWithFacilitiesByObjectGroups = ({ attributeId, facilities,
646
707
  //#region src/legacy-v9/runtime/rentals.ts
647
708
  const defaultRentalDataAttributes = Object.keys(VofficeUnitDataFieldSchemas);
648
709
  //#endregion
649
- export { associateRentalsWithFacilitiesByObjectGroups, defaultRentalDataAttributes, facilityTextsQuery, hubFiltersQuery, parseVofficeFacilityData, parseVofficeUnitData, rentalFacilitiesForObjectGroupRelationQuery, rentalIdsQuery, rentalTextsQuery, rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, rentalsAllFeedbacksQuery, rentalsAllWithoutFeedbacksQuery, toRentalRentalsOutput };
710
+ export { associateRentalsWithFacilitiesByObjectGroups, defaultRentalDataAttributes, facilityTextsQuery, hubFiltersQuery, parseVofficeFacilityData, parseVofficeUnitData, rentalFacilitiesForObjectGroupRelationQuery, rentalIdsQuery, rentalTextsQuery, rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, rentalsAllFeedbacksQuery, rentalsAllWithoutFeedbacksQuery, toRentalOffers, 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-F2V6hCg6.mjs";
2
- import { n as mapSearchQuery, r as searchQuery, w as parseVofficeUnitData } from "./operations-Bc3WxjV8.mjs";
3
- import { a as toLocation, c as CAPACITY_DATA_ATTRIBUTES, i as toV9RentalHighlightKey, l as toCapacity, s as toImages, t as toRentalHighlights, u as toAddress } from "./to-rental-highlights-9AbqVIso.mjs";
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-BEL6ow0i.mjs";
2
+ import { T as parseVofficeUnitData, n as mapSearchQuery, r as searchQuery } from "./operations-DY2e_2Hd.mjs";
3
+ import { a as toLocation, c as CAPACITY_DATA_ATTRIBUTES, i as toV9RentalHighlightKey, l as toCapacity, s as toImages, t as toRentalHighlights, u as toAddress } from "./to-rental-highlights-DptWc7-q.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
@@ -1,4 +1,4 @@
1
- import { v as VofficeUnitDataPropertyMetadata } from "./operations-Bc3WxjV8.mjs";
1
+ import { v as VofficeUnitDataPropertyMetadata } from "./operations-DY2e_2Hd.mjs";
2
2
  import { localeToLanguage, makeTranslate, renderLabeledAttributeValue, renderResolvedCustomAttribute, toCountLabelKey, toCountry, toCustomAttributeFact, toFact, toLocalizedText, toRentalCapacity } from "@v-office/sdk-core";
3
3
  import { Effect } from "effect";
4
4
  //#region src/legacy-v9/parser/rentals/to-localized-string.ts
@@ -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/3.4.0/CHANGELOG.md`: release notes for 3.4.0
8
+ - `versions/3.3.0/CHANGELOG.md`: release notes for 3.3.0
7
9
  - `versions/3.2.1/CHANGELOG.md`: release notes for 3.2.1
8
10
  - `versions/3.2.0/CHANGELOG.md`: release notes for 3.2.0
9
11
  - `versions/3.1.1/CHANGELOG.md`: release notes for 3.1.1
@@ -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/3.4.0/MIGRATION.md`: Migration: 3.3.0 to 3.4.0
8
+ - `versions/3.3.0/MIGRATION.md`: Migration: 3.2.1 to 3.3.0
7
9
  - `versions/3.2.1/MIGRATION.md`: Migration: 3.2.0 to 3.2.1
8
10
  - `versions/3.2.0/MIGRATION.md`: Migration: 3.1.1 to 3.2.0
9
11
  - `versions/3.1.1/MIGRATION.md`: Migration: 3.1.0 to 3.1.1
@@ -478,10 +478,10 @@ const insuranceBooking = await sdk.live.quote.bookInsurance({
478
478
  This is a breaking change in 2.13.0. The former public `guestToken` input is no
479
479
  longer used; see `versions/2.13.0/MIGRATION.md`.
480
480
 
481
- `v9` supports real insurance option refresh, pre-contract, payment selection, and booking. With ERGO, issued policies can be read and revoked (rejects on other accounts); revoking rejects with ERGO's reason when ERGO refuses:
481
+ `v9` supports real insurance option refresh, pre-contract, payment selection, and booking. With ERGO, the booking's active policy can be read and revoked (rejects on other accounts). Both need the booking and reject when it has no active policy with that number; revoking rejects with ERGO's reason when ERGO refuses:
482
482
 
483
483
  ```ts
484
- const policy = await sdk.live.insurance.readPolicy({ policyNumber });
484
+ const policy = await sdk.live.insurance.readPolicy({ policyNumber, booking });
485
485
  const revoked = await sdk.live.insurance.revokePolicy({ policyNumber, booking });
486
486
  ```
487
487
 
@@ -96,7 +96,7 @@ Sample item:
96
96
  }
97
97
  ```
98
98
 
99
- Optional fields include `scope`, `address`, `property`, `rooms`, `roomSummary`, `vicinity`, and `reviews`.
99
+ Optional fields include `scope`, `address`, `property`, `rooms`, `roomSummary`, `vicinity`, `reviews`, and `links`.
100
100
 
101
101
  ### Texts in another language
102
102
 
@@ -182,6 +182,46 @@ count the backend does not state, or states as 0, is omitted, never 0.
182
182
 
183
183
  Search items carry the same `capacity`.
184
184
 
185
+ ### Links and 3D tours
186
+
187
+ `links` lists the links the agency keeps on the rental, each `{ type, url, language? }`.
188
+ `type` is `THREE_D` (a 3D tour, usually Matterport), `VIDEO`, `EXPOSE`, `HP` (the rental's
189
+ own website) or `OTHER`. `language` is the language the PMS states for the link, omitted when
190
+ it states none. The field is omitted when the rental has no link. Search items do not
191
+ carry `links`; read them from `getRentals` or the rental details.
192
+
193
+ ```json
194
+ "links": [{ "type": "THREE_D", "url": "https://my.matterport.com/show/?m=ukGhLPgstJm" }]
195
+ ```
196
+
197
+ Where the agency maintains a 3D tour:
198
+
199
+ | Backend | Where in the PMS |
200
+ | ------- | --------------------------------------------------------------------------------- |
201
+ | v10 | the rental's links, type "3D-Tour" |
202
+ | v9 | the unit's feature "Matterport ID" (general): the model ID or the Matterport link |
203
+
204
+ On v9 the SDK turns the Matterport ID into a `THREE_D` link and drops a value that is neither
205
+ a model ID nor an `https` Matterport link. v9 has no other link types. When a rental has no
206
+ tour, tell the agency where to maintain it instead of building a placeholder.
207
+
208
+ To show a tour on the rental page, add a button labelled "3D-Rundgang" / "3D tour" that opens
209
+ a modal with the tour. Render the iframe only once the modal opens, so the page does not load
210
+ Matterport for every visitor:
211
+
212
+ ```html
213
+ <iframe
214
+ src="https://my.matterport.com/show/?m=ukGhLPgstJm"
215
+ title="3D-Rundgang"
216
+ allow="fullscreen; xr-spatial-tracking"
217
+ allowfullscreen
218
+ style="width: 100%; aspect-ratio: 16 / 9; border: 0"
219
+ ></iframe>
220
+ ```
221
+
222
+ Embed only URLs on `matterport.com`. Other providers often refuse to be framed: open their
223
+ `url` in a new tab (`target="_blank" rel="noopener"`).
224
+
185
225
  ### Legacy v9 Images
186
226
 
187
227
  v9 rental `images` and facility `property.images` come from vOffice's image service
@@ -538,6 +578,47 @@ A feedback with neither rating nor text is never an item. `summary.rating` and
538
578
  covers the included items. When no included item has a rating, `reviews` has
539
579
  `items` and no `summary`. A text answer to a `text` criterion counts as text.
540
580
 
581
+ ### Legacy v9 Special Offers
582
+
583
+ On v9, every item of `getRentals` and `getRentalsByIds` has `offers`: the special offers
584
+ vOffice links to the rental, without a period. Use them for an "Angebot" badge on a rental
585
+ page, an offers overview, or a campaign page. A rental without offers has `offers: []`;
586
+ that is the normal case, so hide the offer UI then instead of showing an empty state.
587
+
588
+ ```ts
589
+ type V9RentalOffer = {
590
+ id: string; // vOffice offer ID
591
+ name: string; // in the requested locale where vOffice has a translation
592
+ discount:
593
+ | { type: "percent"; percent: number } // 15 = 15 %
594
+ | { type: "amount"; amount: { amount: number; currency: string } } // minor unit, 2000 = 20,00 €
595
+ | { type: "stayPay"; stayNights: number; payNights: number }; // stay 7, pay 5
596
+ minNights?: number;
597
+ arrivalWithinDays?: number; // last minute: arrival at most this many days away
598
+ validFrom?: string; // YYYY-MM-DD, the arrival is not before this day
599
+ validUntil?: string; // YYYY-MM-DD, the departure is not after this day
600
+ };
601
+ ```
602
+
603
+ - `id` is the value the `offer` search filter takes
604
+ ([Special Offers](search.md#special-offers)), so a campaign page can link to a search
605
+ for its rentals. It is the Hub's `voffice_offer_id`. The Hub's `data(attributes: ["id"])`
606
+ is its own row ID and filters nothing, and the dates are `fromdate`/`tilldate`
607
+ (`validfrom`, `from_date` and similar spellings return `null`). Read `offers` instead of
608
+ querying the Hub.
609
+ - The SDK leaves out offers vOffice does not show to websites and offers redeemed with a
610
+ voucher code. The code never reaches the page.
611
+ - Offers come from the be-on! Hub's last import of the vOffice data, like the rest of
612
+ the rental. An offer can be linked and still apply to no stay in a given period: only a
613
+ search with dates says what it costs. Do not render "12 rentals on offer" as a property
614
+ of the campaign; it holds for one period only.
615
+ - `validFrom` and `validUntil` are the vOffice dates as stored. Hide an offer whose
616
+ `validUntil` has passed in the browser, not only at build time, since a static page can
617
+ outlive it.
618
+ - Many rentals share the same offer. For an overview page, group by `id`.
619
+
620
+ v10 rentals have no `offers`.
621
+
541
622
  ## Legacy v9 Rentals By ID
542
623
 
543
624
  `sdk.live.rentals.getRentalsByIds` loads the rentals with the given IDs, for example the
@@ -398,7 +398,8 @@ the `p_` number. Confirm the field with the user before you offer the filter.
398
398
  page about one campaign, for example an early-booking deal. It checks neither whether
399
399
  the offer is shown to websites nor whether it applies to the requested period, so a
400
400
  rental can match after its offer has ended. When the question is "which rentals have
401
- a deal right now", use `offers`. Request `--offer`.
401
+ a deal right now", use `offers`. Request `--offer`. The offer ID is the `id` of a
402
+ rental's `offers` entry ([Legacy v9 Special Offers](rentals.md#legacy-v9-special-offers)).
402
403
 
403
404
  `offers` is a `boolean` definition and `offer` an `int` definition with the offer ID:
404
405
 
@@ -0,0 +1,22 @@
1
+ # Changelog: 3.3.0
2
+
3
+ A site can show a rental's 3D tour (Matterport) from one field on v9 and v10, and v9 no longer
4
+ lists the Matterport ID as an amenity.
5
+
6
+ ## Added
7
+
8
+ - `links` on rentals and rental details: `{ type, url, language? }` per link, where `type` is
9
+ `THREE_D` (3D tour), `VIDEO`, `EXPOSE`, `HP` (the rental's own website) or `OTHER`. The field
10
+ is omitted when the rental has no link. Search items do not carry it.
11
+ - v10: the links of the rental in the PMS, as the PMS states them.
12
+ - v9: one `THREE_D` link from the unit's feature "Matterport ID". A model ID becomes
13
+ `https://my.matterport.com/show/?m=<id>`, a pasted `https` Matterport link is kept in
14
+ its normalized URL form (lowercase host, characters such as `"` percent-encoded),
15
+ any other value gives no link. v9 has no other link types.
16
+ - `rentals.md` ("Links and 3D tours"): where the agency maintains the tour on each backend and
17
+ how to show it as a "3D-Rundgang" button with a modal.
18
+
19
+ ## Changed
20
+
21
+ - v9: the Matterport ID is no longer an attribute. `attributes` no longer has the item
22
+ "Matterport ID: …" and its fact with the key `matterport`; read the tour from `links`.