@v-office/website-sdk 2.38.0 → 3.1.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 (33) hide show
  1. package/dist/cli.mjs +3 -3
  2. package/dist/{client-CE4V_ybW.mjs → client-C6r06QHZ.mjs} +599 -171
  3. package/dist/index.d.mts +133 -4
  4. package/dist/index.mjs +1 -1
  5. package/dist/instructions/CHANGELOG.md +2 -0
  6. package/dist/instructions/MIGRATION.md +2 -0
  7. package/dist/instructions/booking.md +1 -1
  8. package/dist/instructions/quote.md +33 -19
  9. package/dist/instructions/rentals.md +46 -6
  10. package/dist/instructions/search.md +25 -6
  11. package/dist/instructions/versions/3.0.0/CHANGELOG.md +62 -0
  12. package/dist/instructions/versions/3.0.0/MIGRATION.md +69 -0
  13. package/dist/instructions/versions/3.1.0/CHANGELOG.md +47 -0
  14. package/dist/instructions/versions/3.1.0/MIGRATION.md +32 -0
  15. package/dist/{operations-DMqLD3e2.mjs → operations-Bc3WxjV8.mjs} +79 -3
  16. package/dist/{rentals-BsHvdwQt.mjs → rentals-BP7dfcfg.mjs} +88 -25
  17. package/dist/{search-DqdRIJwF.mjs → search-BvgpkUPo.mjs} +22 -11
  18. package/dist/{to-rental-highlights-BE6TdXYa.mjs → to-rental-highlights-9AbqVIso.mjs} +68 -32
  19. package/dist/translations/v9/de-DE/core.json +7 -1
  20. package/dist/translations/v9/en-US/core.json +7 -1
  21. package/instructions/CHANGELOG.md +2 -0
  22. package/instructions/MIGRATION.md +2 -0
  23. package/instructions/booking.md +1 -1
  24. package/instructions/quote.md +33 -19
  25. package/instructions/rentals.md +46 -6
  26. package/instructions/search.md +25 -6
  27. package/instructions/versions/3.0.0/CHANGELOG.md +62 -0
  28. package/instructions/versions/3.0.0/MIGRATION.md +69 -0
  29. package/instructions/versions/3.0.0/release.json +3 -0
  30. package/instructions/versions/3.1.0/CHANGELOG.md +47 -0
  31. package/instructions/versions/3.1.0/MIGRATION.md +32 -0
  32. package/instructions/versions/3.1.0/release.json +3 -0
  33. package/package.json +5 -4
@@ -0,0 +1,32 @@
1
+ # Migration: 3.0.0 to 3.1.0
2
+
3
+ No changes required.
4
+
5
+ ## 1. Upgrade
6
+
7
+ ```sh
8
+ pnpm add @v-office/website-sdk@3.1.0
9
+ ```
10
+
11
+ ## 2. Optional: stop parsing prices and discount names
12
+
13
+ - A site that reads a number out of `formattedTotal` or `discount.formattedOriginalTotal`
14
+ (for a strikethrough, a saving or a sort) can read `total.amount` and
15
+ `discount.originalTotal.amount` instead. The formatted strings use the locale's separators
16
+ ("1.033,39 €", "€1,033.39"), so parsing them breaks between languages.
17
+ - A v10 site that filters or groups campaigns by `discount.applied[].label` can use
18
+ `discount.applied[].type`: the label is translated, the type is not.
19
+
20
+ ## 3. English pages: German alt texts and room descriptions
21
+
22
+ An English page now gets the German alt text of an image and the German description of a room
23
+ where no English exists (v10: before, none). Mark them as German where `altFallback` or
24
+ `descriptionFallback` is set, for example `<img lang="de" …>`.
25
+
26
+ ## 4. Optional: curate by key, not by text
27
+
28
+ A site that recognizes amenities, distances, highlights or room features by their text
29
+ („Entfernung zum Strand", „WLAN") loses them on an English page. Read the facts instead:
30
+ `facts` in attribute subcategories and vicinity groups, `highlightFacts`, and `attributeFacts` /
31
+ `typeKey` on rooms. Match on `key`, read numbers from `value` (distances in meters), and show
32
+ `text`.
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": []
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-sdk",
3
- "version": "2.38.0",
3
+ "version": "3.1.0",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@graphql-typed-document-node/core": "3.2.0",
51
- "@v-office/sdk-core": "1.29.0",
51
+ "@v-office/sdk-core": "1.30.0",
52
52
  "effect": "4.0.0-rc.115",
53
53
  "graphql": "17.0.2",
54
54
  "yaml": "^2.9.0"
@@ -87,15 +87,16 @@
87
87
  "fmt": "oxfmt",
88
88
  "fmt:check": "oxfmt --check",
89
89
  "check": "pnpm run typecheck && pnpm run lint && pnpm run fmt:check",
90
- "test": "pnpm run test:cli && pnpm run test:v9:openapi && pnpm run test:v9:properties && pnpm run test:v9:rentals && pnpm run test:v9:graphql && pnpm run test:v9:availability && pnpm run test:v9:search && pnpm run test:v9:booking && pnpm run test:v9:videos && pnpm run build && node --test test/*.test.mjs",
90
+ "test": "pnpm run test:cli && pnpm run test:v9:openapi && pnpm run test:v9:properties && pnpm run test:v9:rentals && pnpm run test:v9:graphql && pnpm run test:v9:availability && pnpm run test:v9:search && pnpm run test:v9:booking && pnpm run test:v9:insurance && pnpm run test:v9:videos && pnpm run build && node --test test/*.test.mjs",
91
91
  "test:cli": "node --test src/cli/v9-hub-filters.test.ts",
92
92
  "test:v9:openapi": "node --test codegen/v9/php-record.test.ts src/legacy-v9/openapi/setup-response.test.ts src/legacy-v9/openapi/quote-response.test.ts",
93
93
  "test:v9:properties": "node --test codegen/v9/heuristic-generation/generate/property.test.ts src/legacy-v9/property-highlight-sources.test.ts src/legacy-v9/parser/rentals/render-property-attribute.test.ts src/legacy-v9/parser/rentals/to-property.test.ts src/legacy-v9/parser/rentals/to-rooms.test.ts src/legacy-v9/parser/rentals/to-capacity.test.ts",
94
- "test:v9:rentals": "node --test src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts src/legacy-v9/parser/rentals/to-reviews.test.ts src/legacy-v9/parser/rentals/to-image.test.ts",
94
+ "test:v9:rentals": "node --test src/legacy-v9/static/description-fallbacks.test.ts src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts src/legacy-v9/parser/rentals/to-reviews.test.ts src/legacy-v9/parser/rentals/to-image.test.ts",
95
95
  "test:v9:graphql": "node --test src/legacy-v9/graphql/client.test.ts",
96
96
  "test:v9:availability": "node --test src/legacy-v9/parser/availability/to-availability-restrictions-by-date.test.ts src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts src/legacy-v9/parser/availability/to-occupancy-limits.test.ts src/legacy-v9/parser/availability/to-rent-night-prices.test.ts src/legacy-v9/parser/availability/to-start-date-selected-calendar-days.test.ts src/legacy-v9/parser/blocked-ranges/collect-v9-blocked-ranges.test.ts src/legacy-v9/parser/blocked-ranges/to-rental-blocked-ranges.test.ts",
97
97
  "test:v9:search": "node --test src/legacy-v9/parser/search/resolve-exact-match.test.ts src/legacy-v9/rental-scope.test.ts",
98
98
  "test:v9:booking": "node --test src/legacy-v9/parser/booking/output/to-payment-schedules.test.ts",
99
+ "test:v9:insurance": "node --test src/legacy-v9/live/quote-insurance.test.ts",
99
100
  "test:v9:videos": "node --test src/legacy-v9/parser/videos/to-videos.test.ts",
100
101
  "playground:custom-attributes": "pnpm run build && node --env-file=.env playground/custom-attributes.ts"
101
102
  }