@v-office/website-sdk 1.2.1 → 2.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 (58) hide show
  1. package/README.md +93 -232
  2. package/dist/cli.mjs +105 -84
  3. package/dist/client-xkXV7Nf-.mjs +5127 -0
  4. package/dist/index.d.mts +1444 -11259
  5. package/dist/index.mjs +16 -4
  6. package/dist/instructions/CHANGELOG.md +10 -0
  7. package/dist/instructions/MIGRATION.md +10 -0
  8. package/dist/instructions/README.md +64 -0
  9. package/dist/instructions/availability.md +157 -0
  10. package/dist/instructions/booking.md +165 -0
  11. package/dist/instructions/contact.md +110 -0
  12. package/dist/instructions/creation.md +223 -0
  13. package/dist/instructions/document-structured-json.md +100 -0
  14. package/dist/instructions/filter.md +158 -0
  15. package/dist/instructions/quote.md +342 -0
  16. package/dist/instructions/rentals.md +152 -0
  17. package/dist/instructions/search.md +238 -0
  18. package/dist/instructions/versions/2.0.0/CHANGELOG.md +69 -0
  19. package/dist/instructions/versions/2.0.0/MIGRATION.md +223 -0
  20. package/dist/instructions/versions/2.1.0/CHANGELOG.md +32 -0
  21. package/dist/instructions/versions/2.1.0/MIGRATION.md +89 -0
  22. package/dist/{quote-DQGps4dy.mjs → quote--25SMlYS.mjs} +41 -19
  23. package/dist/{rentals-plxPVx83.mjs → rentals-DCKUaLnB.mjs} +22 -16
  24. package/dist/{search-BuR5apFw.mjs → search-8iCC0Nel.mjs} +40 -23
  25. package/dist/to-rental-highlights-CZYJeR1D.mjs +5905 -0
  26. package/dist/translations/shared/de-DE/contact.json +19 -0
  27. package/dist/translations/shared/de-DE/quote.json +5 -1
  28. package/dist/translations/shared/en-US/contact.json +19 -0
  29. package/dist/translations/shared/en-US/quote.json +5 -1
  30. package/dist/translations/v10/de-DE/mapped-search-filters.json +3 -0
  31. package/dist/translations/v10/en-US/mapped-search-filters.json +3 -0
  32. package/instructions/CHANGELOG.md +10 -0
  33. package/instructions/MIGRATION.md +10 -0
  34. package/instructions/README.md +64 -0
  35. package/instructions/availability.md +157 -0
  36. package/instructions/booking.md +165 -0
  37. package/instructions/contact.md +110 -0
  38. package/instructions/creation.md +223 -0
  39. package/instructions/document-structured-json.md +100 -0
  40. package/instructions/filter.md +158 -0
  41. package/instructions/quote.md +342 -0
  42. package/instructions/rentals.md +152 -0
  43. package/instructions/search.md +238 -0
  44. package/instructions/versions/2.0.0/CHANGELOG.md +69 -0
  45. package/instructions/versions/2.0.0/MIGRATION.md +223 -0
  46. package/instructions/versions/2.1.0/CHANGELOG.md +32 -0
  47. package/instructions/versions/2.1.0/MIGRATION.md +89 -0
  48. package/package.json +42 -56
  49. package/dist/client-DeEUMMOh.mjs +0 -33237
  50. package/dist/custom-attribute-D5Kb1YHA.mjs +0 -54
  51. package/dist/errors-2cuUGSvi.mjs +0 -5
  52. package/dist/operations-B4IgNB3E.mjs +0 -12618
  53. package/dist/operations-DcU1qt7g.mjs +0 -1158
  54. package/dist/quote-BVx3TAHE.mjs +0 -513
  55. package/dist/quote-CRjV_lf-.mjs +0 -609
  56. package/dist/rentals-H3RYtMqT.mjs +0 -323
  57. package/dist/search-filter-metadata-DZP0-Udc.mjs +0 -4294
  58. package/dist/to-rental-highlights-CAATPqan.mjs +0 -524
package/dist/index.mjs CHANGED
@@ -1,4 +1,16 @@
1
- import { $ as DocumentResourceSchema, $t as toStableSearchInputParameterValues, At as ServiceImageSchema, B as makeV0OpenApiClientFetchLive, Bt as UnitIdsResponseSchema, Ct as QuoteServiceSchema, Dt as RoomImageSchema, Et as RegionListResponseSchema, Ft as TileCollectionResponseSchema, G as makeV1OpenApiClientLive, Gt as UnitServicePriceSchema, H as V1OpenApiClient, Ht as UnitListResponseSchema, It as TileSchema, J as CalendarResponseSchema, Jt as VideoResponseSchema, K as ApiEnvelopeBaseSchema, Kt as V1_BASE_URL, Lt as TileTagSchema, Mt as ServiceListResponseSchema, Nt as SetupDataSchema, Ot as SearchPropertiesResponseSchema, Pt as SetupResponseSchema, Q as DocumentResourceResponseSchema, R as V0OpenApiClient, Rt as TravelInsuranceBookingSchema, St as QuoteSchema, Tt as RawVofficeObjectSchema, U as V1OpenApiClientError, Ut as UnitOfferSchema, V as makeV0OpenApiClientLive, Vt as UnitListItemSchema, W as makeV1OpenApiClientFetchLive, Wt as UnitResponseSchema, X as CustomerUnitSummarySchema, Y as CurrentMemberResponseSchema, Yt as decodeV1OperationResponse, Z as DocumentCollectionResponseSchema, Zt as defineStableSearchInputGroup, _t as PaymentScheduleItemSchema, a as defineVofficeFacilityDataAttributes, at as ErgoBankSchema, bt as QuotePricesPayloadSchema, c as defineVofficeOfferDataAttributes, ct as ErgoCreatePreContractRequestSchema, d as defineVofficeServiceDataAttributes, dt as ErgoPolicyNumberRequestSchema, en as toStableSearchInputQueryKeys, et as DocumentStatusSchema, f as defineVofficeTotalRatingDataAttributes, ft as ErgoReadPreContractRequestSchema, gt as OnOfficeUnitSchema, ht as OnOfficeUnitCollectionResponseSchema, i as defineDataAttributes, it as ErgoAddressSchema, jt as ServiceLimitSchema, kt as ServiceBeonDataSchema, l as defineVofficePriceDataAttributes, lt as ErgoPersonSchema, mt as FacilityListResponseSchema, n as defineCMSSDKOptions, nt as DocumentSummarySchema, o as defineVofficeFeedbackDataAttributes, ot as ErgoBookRequestSchema, p as defineVofficeUnitDataAttributes, pt as ErgoTripAndCustomerRequestSchema, q as CalendarDaySchema, qt as V1_OPERATIONS, r as customDataAttribute, rt as DocumentTypeSchema, s as defineVofficeImageDataAttributes, st as ErgoCommonFieldsSchema, t as createCMSSDKFromParsedConfig, tt as DocumentStatusUpdateRequestSchema, u as defineVofficeRatingDataAttributes, ut as ErgoPlanSearchRequestSchema, vt as PaymentScheduleSchema, wt as RawObjectResponseSchema, xt as QuotePricesResponseSchema, yt as QuoteLineSchema, z as V0OpenApiClientError, zt as TravelInsuranceBookingStoreRequestSchema } from "./client-DeEUMMOh.mjs";
2
- import { t as CMSError } from "./errors-2cuUGSvi.mjs";
3
- import { D as UnknownAdditionalService, E as InvalidAdditionalServiceQuantity, w as AdditionalServiceLimitExceeded } from "./quote-CRjV_lf-.mjs";
4
- export { AdditionalServiceLimitExceeded, ApiEnvelopeBaseSchema, CMSError, CalendarDaySchema, CalendarResponseSchema, CurrentMemberResponseSchema, CustomerUnitSummarySchema, DocumentCollectionResponseSchema, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatusSchema, DocumentStatusUpdateRequestSchema, DocumentSummarySchema, DocumentTypeSchema, ErgoAddressSchema, ErgoBankSchema, ErgoBookRequestSchema, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, InvalidAdditionalServiceQuantity, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, SearchPropertiesResponseSchema, ServiceBeonDataSchema, ServiceImageSchema, ServiceLimitSchema, ServiceListResponseSchema, SetupDataSchema, SetupResponseSchema, TileCollectionResponseSchema, TileSchema, TileTagSchema, TravelInsuranceBookingSchema, TravelInsuranceBookingStoreRequestSchema, UnitIdsResponseSchema, UnitListItemSchema, UnitListResponseSchema, UnitOfferSchema, UnitResponseSchema, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, V1OpenApiClient, V1OpenApiClientError, V1_BASE_URL, V1_OPERATIONS, VideoResponseSchema, createCMSSDKFromParsedConfig, customDataAttribute, decodeV1OperationResponse, defineCMSSDKOptions, defineDataAttributes, defineStableSearchInputGroup, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, toStableSearchInputParameterValues, toStableSearchInputQueryKeys };
1
+ import { $ as SetupResponseSchema, A as ErgoPolicyNumberRequestSchema, At as selectInsurancePaymentEffect, B as QuotePricesResponseSchema, C as ErgoAddressSchema, Ct as getStartDateSelectedAvailabilityEffect, D as ErgoCreatePreContractRequestSchema, Dt as searchEffect, E as ErgoCommonFieldsSchema, Et as removeAdditionalServiceEffect, F as OnOfficeUnitSchema, G as RegionListResponseSchema, H as QuoteServiceSchema, I as PaymentScheduleItemSchema, J as ServiceBeonDataSchema, K as RoomImageSchema, L as PaymentScheduleSchema, M as ErgoTripAndCustomerRequestSchema, Mt as submitPaymentOption, N as FacilityListResponseSchema, Nt as submitPaymentOptionEffect, O as ErgoPersonSchema, Ot as selectCancellationPolicyEffect, P as OnOfficeUnitCollectionResponseSchema, Pt as defineWebsiteSDKOptions, Q as SetupDataSchema, R as QuoteLineSchema, S as DocumentTypeSchema, St as getRentalsEffect, T as ErgoBookRequestSchema, Tt as quoteEffect, U as RawObjectResponseSchema, V as QuoteSchema, W as RawVofficeObjectSchema, X as ServiceLimitSchema, Y as ServiceImageSchema, Z as ServiceListResponseSchema, _ as DocumentResourceResponseSchema, _t as bookInsuranceEffect, a as makeV0OpenApiClientFetchLive, at as UnitIdsResponseSchema, b as DocumentStatusUpdateRequestSchema, bt as getFiltersEffect, c as V1OpenApiClientError, ct as UnitOfferSchema, d as ApiEnvelopeBaseSchema, dt as V1_BASE_URL, et as TileCollectionResponseSchema, f as CalendarDaySchema, ft as V1_OPERATIONS, g as DocumentCollectionResponseSchema, gt as bookEffect, h as CustomerUnitSummarySchema, ht as addAdditionalServiceEffect, i as V0OpenApiClientError, it as TravelInsuranceBookingStoreRequestSchema, j as ErgoReadPreContractRequestSchema, jt as submitContactEffect, k as ErgoPlanSearchRequestSchema, kt as selectInsuranceEffect, l as makeV1OpenApiClientFetchLive, lt as UnitResponseSchema, m as CurrentMemberResponseSchema, mt as decodeV1OperationResponse, nt as TileTagSchema, o as makeV0OpenApiClientLive, ot as UnitListItemSchema, p as CalendarResponseSchema, pt as VideoResponseSchema, q as SearchPropertiesResponseSchema, r as V0OpenApiClient, rt as TravelInsuranceBookingSchema, s as V1OpenApiClient, st as UnitListResponseSchema, t as createWebsiteSDK, tt as TileSchema, u as makeV1OpenApiClientLive, ut as UnitServicePriceSchema, v as DocumentResourceSchema, vt as clearAdditionalServicesEffect, w as ErgoBankSchema, wt as getTermsAndPrivacyPolicyEffect, x as DocumentSummarySchema, xt as getInitialAvailabilityEffect, y as DocumentStatusSchema, yt as createInsurancePreContractEffect, z as QuotePricesPayloadSchema } from "./client-xkXV7Nf-.mjs";
2
+ import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SearchSearchInputSchema, SearchSearchOutputSchema, UnknownAdditionalService, validateContactSubmitInput } from "@v-office/sdk-core";
3
+ //#region codegen/v9/heuristic-generation/public-api.ts
4
+ const customDataAttribute = (name) => name;
5
+ const defineDataAttributes = () => (attributes) => attributes;
6
+ const defineVofficeUnitDataAttributes = defineDataAttributes();
7
+ const defineVofficeImageDataAttributes = defineDataAttributes();
8
+ const defineVofficeFacilityDataAttributes = defineDataAttributes();
9
+ const defineVofficeServiceDataAttributes = defineDataAttributes();
10
+ const defineVofficePriceDataAttributes = defineDataAttributes();
11
+ const defineVofficeFeedbackDataAttributes = defineDataAttributes();
12
+ const defineVofficeOfferDataAttributes = defineDataAttributes();
13
+ const defineVofficeRatingDataAttributes = defineDataAttributes();
14
+ const defineVofficeTotalRatingDataAttributes = defineDataAttributes();
15
+ //#endregion
16
+ export { AdditionalServiceLimitExceeded, ApiEnvelopeBaseSchema, CMSError, CalendarDaySchema, CalendarResponseSchema, CoreSDKError, CurrentMemberResponseSchema, CustomerUnitSummarySchema, DocumentCollectionResponseSchema, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatusSchema, DocumentStatusUpdateRequestSchema, DocumentSummarySchema, DocumentTypeSchema, ErgoAddressSchema, ErgoBankSchema, ErgoBookRequestSchema, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, SearchPropertiesResponseSchema, SearchSearchInputSchema, SearchSearchOutputSchema, ServiceBeonDataSchema, ServiceImageSchema, ServiceLimitSchema, ServiceListResponseSchema, SetupDataSchema, SetupResponseSchema, TileCollectionResponseSchema, TileSchema, TileTagSchema, TravelInsuranceBookingSchema, TravelInsuranceBookingStoreRequestSchema, UnitIdsResponseSchema, UnitListItemSchema, UnitListResponseSchema, UnitOfferSchema, UnitResponseSchema, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, V1OpenApiClient, V1OpenApiClientError, V1_BASE_URL, V1_OPERATIONS, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineDataAttributes, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ This file is the versioned changelog index for the website SDK instructions.
4
+
5
+ ## Versions
6
+
7
+ - `versions/2.1.0/CHANGELOG.md`: `@v-office/website-sdk` 2.1.0 release notes.
8
+ - `versions/2.0.0/CHANGELOG.md`: `@v-office/website-sdk` 2.0.0 release notes.
9
+
10
+ Keep each future release in its own version directory so consumers can see which package version introduced each change.
@@ -0,0 +1,10 @@
1
+ # Migration
2
+
3
+ This file is the versioned migration index for the website SDK instructions.
4
+
5
+ ## Available Guides
6
+
7
+ - `versions/2.1.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.0.0 to 2.1.0.
8
+ - `versions/2.0.0/MIGRATION.md`: migrate from the legacy 1.x CMS-style website SDK API to `@v-office/website-sdk` 2.0.0.
9
+
10
+ Keep each future migration in its own version directory so consumers can clearly see the source and target versions for every upgrade path.
@@ -0,0 +1,64 @@
1
+ # Website SDK Instructions
2
+
3
+ These instructions describe `@v-office/website-sdk` 2.1.0.
4
+
5
+ Use this directory as the consumer-facing reference for the package:
6
+
7
+ - `creation.md`: SDK construction, config, options, and CLI config files.
8
+ - `rentals.md`: `sdk.static.rentals.getRentals`.
9
+ - `filter.md`: `sdk.static.filter.getFilters`.
10
+ - `search.md`: `sdk.live.search.search`.
11
+ - `availability.md`: date-picker availability flows.
12
+ - `quote.md`: quote, additional services, cancellation policy, and insurance flows.
13
+ - `booking.md`: booking and payment option submission.
14
+ - `contact.md`: contact submission.
15
+ - `document-structured-json.md`: `sdk.static.documents.getTermsAndPrivacyPolicy` and structured document JSON rendering rules.
16
+ - `CHANGELOG.md`: versioned changelog index.
17
+ - `MIGRATION.md`: versioned migration index.
18
+ - `versions/2.1.0/`: 2.1.0 release notes and 2.0.0-to-2.1.0 migration guide.
19
+ - `versions/2.0.0/`: release-specific 2.0.0 changelog and 1.x-to-2.0.0 migration guide.
20
+
21
+ ## Package
22
+
23
+ ```sh
24
+ pnpm add @v-office/website-sdk
25
+ ```
26
+
27
+ The package is ESM-only and exports the root SDK facade from `@v-office/website-sdk`.
28
+
29
+ ## Quick Start
30
+
31
+ ```ts
32
+ import { createWebsiteSDK, defineWebsiteSDKOptions } from "@v-office/website-sdk";
33
+
34
+ const sdk = createWebsiteSDK({
35
+ config: {
36
+ backend: "v10",
37
+ apiEndpoint: "https://api.example.com/graphql",
38
+ accessToken: "...",
39
+ imageBaseUrl: "https://images.example.com",
40
+ },
41
+ options: defineWebsiteSDKOptions({
42
+ rentalScope: {
43
+ propertyId: "property-1",
44
+ },
45
+ }),
46
+ });
47
+
48
+ try {
49
+ const rentals = await sdk.static.rentals.getRentals({ locale: "de-DE" });
50
+ console.log(rentals);
51
+ } finally {
52
+ await sdk.dispose();
53
+ }
54
+ ```
55
+
56
+ ## CLI
57
+
58
+ ```sh
59
+ website-sdk --backend v10 rentals --locale de-DE
60
+ website-sdk --backend v9 filters --locale en-US
61
+ website-sdk --backend v10 search --locale de-DE --query "adults=2"
62
+ ```
63
+
64
+ Config file examples in these docs use the flat `WebsiteSDKConfig` shape introduced in 2.0.0 and kept in 2.1.0.
@@ -0,0 +1,157 @@
1
+ # Availability
2
+
3
+ ## Service
4
+
5
+ Use the live availability API to build date-picker flows:
6
+
7
+ ```ts
8
+ const initial = await sdk.live.availability.getInitialAvailability(input);
9
+ const selected = await sdk.live.availability.getStartDateSelectedAvailability(input);
10
+ ```
11
+
12
+ `getInitialAvailability` marks possible start dates. `getStartDateSelectedAvailability` marks possible end dates after a start date was selected.
13
+
14
+ ## Input
15
+
16
+ Initial availability:
17
+
18
+ ```ts
19
+ type InitialAvailabilityInput = {
20
+ locale: "de-DE" | "en-US";
21
+ rentalId: string;
22
+ calculateFromDate: string;
23
+ calculateThroughDate: string;
24
+ };
25
+ ```
26
+
27
+ Start-date-selected availability:
28
+
29
+ ```ts
30
+ type StartDateSelectedAvailabilityInput = InitialAvailabilityInput & {
31
+ selectedStartDate: string;
32
+ };
33
+ ```
34
+
35
+ Sample:
36
+
37
+ ```json
38
+ {
39
+ "locale": "de-DE",
40
+ "rentalId": "123",
41
+ "calculateFromDate": "2026-07-01",
42
+ "calculateThroughDate": "2026-08-01"
43
+ }
44
+ ```
45
+
46
+ Dates are local dates formatted as `YYYY-MM-DD`. For `v9`, `rentalId` must be a numeric vOffice unit id.
47
+
48
+ ## Output
49
+
50
+ Initial availability returns `Promise<InitialAvailabilityOutput>`.
51
+
52
+ ```json
53
+ {
54
+ "calendarDays": {
55
+ "2026-07-01": {
56
+ "canBeStartDate": true,
57
+ "isAvailableDate": true,
58
+ "status": "available",
59
+ "formattedPrice": "120.00 EUR",
60
+ "tooltip": null
61
+ },
62
+ "2026-07-02": {
63
+ "canBeStartDate": false,
64
+ "isAvailableDate": false,
65
+ "status": "check_in_not_allowed",
66
+ "formattedPrice": null,
67
+ "tooltip": "Arrival is not possible on this date."
68
+ }
69
+ },
70
+ "minPersons": null,
71
+ "maxPersons": 6,
72
+ "maxAdults": 4
73
+ }
74
+ ```
75
+
76
+ Start-date-selected availability returns `Promise<StartDateSelectedAvailabilityOutput>`.
77
+
78
+ ```json
79
+ {
80
+ "calendarDays": {
81
+ "2026-07-08": {
82
+ "canBeEndDate": false,
83
+ "canBeNewStartDate": false,
84
+ "status": "same_day",
85
+ "tooltip": null
86
+ },
87
+ "2026-07-15": {
88
+ "canBeEndDate": true,
89
+ "canBeNewStartDate": false,
90
+ "status": "available",
91
+ "tooltip": null
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ Common statuses include `available`, `before_today`, `check_in_not_allowed`, `no_valid_check_out_from_start`, `after_last_bookable_date`, and `unavailable`. End-date results can also return `same_day`, `not_after_selected_start`, `minimum_stay_not_met`, `check_out_not_allowed`, and range-crossing statuses.
98
+
99
+ ## Configuration
100
+
101
+ Use flat `WebsiteSDKConfig` files.
102
+
103
+ `v9` config:
104
+
105
+ ```json
106
+ {
107
+ "backend": "v9",
108
+ "graphqlUrl": "https://example.com/graphql",
109
+ "v1ApiBaseUrl": "https://example.com/api/v1",
110
+ "apiKey": "...",
111
+ "imageProxyBaseUrl": "https://images.example.com"
112
+ }
113
+ ```
114
+
115
+ `v10` config:
116
+
117
+ ```json
118
+ {
119
+ "backend": "v10",
120
+ "apiEndpoint": "https://api.example.com/graphql",
121
+ "accessToken": "...",
122
+ "imageBaseUrl": "https://images.example.com"
123
+ }
124
+ ```
125
+
126
+ Availability uses localized tooltips from the translation service. `v10` availability queries are rate-limited to one backend request per second, queued up to five requests, and cached per rental for 30 seconds.
127
+
128
+ ## CLI Usage
129
+
130
+ Fetch initial availability:
131
+
132
+ ```sh
133
+ website-sdk --backend v10 availability initial --rental-id 123 --calculate-from-date 2026-07-01 --calculate-through-date 2026-08-01
134
+ ```
135
+
136
+ Fetch availability after selecting a start date:
137
+
138
+ ```sh
139
+ website-sdk --backend v9 availability start-date-selected --rental-id 123 --selected-start-date 2026-07-08 --calculate-from-date 2026-07-01 --calculate-through-date 2026-08-01
140
+ ```
141
+
142
+ Use files instead of environment variables:
143
+
144
+ ```sh
145
+ website-sdk --backend v10 --config ./website-sdk-config.json availability initial --rental-id 123 --calculate-from-date 2026-07-01 --calculate-through-date 2026-08-01
146
+ ```
147
+
148
+ Output defaults to JSON. Use `--output pretty` for inspected terminal output:
149
+
150
+ ```sh
151
+ website-sdk --backend v10 availability initial --rental-id 123 --calculate-from-date 2026-07-01 --calculate-through-date 2026-08-01 --output pretty
152
+ ```
153
+
154
+ Environment variables:
155
+
156
+ - `v9`: `HUB_GRAPHQL_URL`, `HUB_V1_API_BASE_URL`, optional `HUB_V0_API_BASE_URL`, `HUB_API_KEY`, `IMAGE_PROXY_BASE_URL`.
157
+ - `v10`: `VOFFICE_API_ENDPOINT`, `VOFFICE_LOCAL_DEV_ACCESS_TOKEN`, `VOFFICE_IMAGE_BASE_URL`.
@@ -0,0 +1,165 @@
1
+ # Booking
2
+
3
+ ## Service
4
+
5
+ Use the live booking API to turn an available `GuestQuote` into a booking:
6
+
7
+ ```ts
8
+ const booking = await sdk.live.booking.book(input);
9
+ ```
10
+
11
+ The `quote` must be the `GuestQuote` instance returned by `sdk.live.quote.quote(...)`, optionally updated through quote selection helpers.
12
+
13
+ ## Input
14
+
15
+ ```ts
16
+ type BookingInput = {
17
+ quote: GuestQuote;
18
+ contact: {
19
+ forename: string;
20
+ surname: string;
21
+ title?: string;
22
+ birthdate?: string;
23
+ address: {
24
+ street: string;
25
+ housenumber?: string;
26
+ postalcode: string;
27
+ city: string;
28
+ countryCode: string;
29
+ };
30
+ contactDetails: { email: string; phone: string } | { email: string } | { phone: string };
31
+ note?: string;
32
+ };
33
+ relativeRedirectUrl: string;
34
+ };
35
+ ```
36
+
37
+ Sample:
38
+
39
+ ```ts
40
+ const quoteResult = await sdk.live.quote.quote(quoteInput);
41
+ if (quoteResult.status !== "available") throw new Error(quoteResult.reason);
42
+
43
+ const booking = await sdk.live.booking.book({
44
+ quote: quoteResult.quote,
45
+ contact: {
46
+ forename: "Jane",
47
+ surname: "Doe",
48
+ title: "Ms",
49
+ address: {
50
+ street: "Main Street",
51
+ housenumber: "1",
52
+ postalcode: "12345",
53
+ city: "Berlin",
54
+ countryCode: "DE",
55
+ },
56
+ contactDetails: {
57
+ email: "jane@example.com",
58
+ phone: "+49123456789",
59
+ },
60
+ note: "Please prepare a baby bed.",
61
+ },
62
+ relativeRedirectUrl: "/booking/payment-return",
63
+ });
64
+ ```
65
+
66
+ `relativeRedirectUrl` is used for online payment redirects after booking creation.
67
+
68
+ ## Output
69
+
70
+ Returns `Promise<BookingOutput>`.
71
+
72
+ Sample:
73
+
74
+ ```json
75
+ {
76
+ "bookingNumber": "B-2026-0001",
77
+ "guestToken": "guest-token",
78
+ "paymentSchedules": [
79
+ {
80
+ "label": "Deposit",
81
+ "dueOn": "2026-06-15",
82
+ "lines": [
83
+ {
84
+ "label": "Deposit",
85
+ "amount": "300.00 EUR"
86
+ }
87
+ ],
88
+ "total": "300.00 EUR",
89
+ "paymentOptions": [
90
+ {
91
+ "kind": "bank_transfer",
92
+ "label": "Bank transfer",
93
+ "holder": "Example GmbH",
94
+ "iban": "DE02120300000000202051",
95
+ "swiftOrBic": "BYLADEM1001",
96
+ "remittanceText": "B-2026-0001"
97
+ },
98
+ {
99
+ "kind": "redirect",
100
+ "provider": "adyen",
101
+ "label": "Credit card",
102
+ "url": "https://checkout.example.com"
103
+ }
104
+ ]
105
+ }
106
+ ],
107
+ "insurancePaymentOptions": []
108
+ }
109
+ ```
110
+
111
+ Payment option variants:
112
+
113
+ - `bank_transfer`: display-only payment details.
114
+ - `redirect`: redirect the browser to the payment URL.
115
+ - `form_post`: submit a generated HTML form, currently used for PayPal-style flows.
116
+ - `stripe_checkout`: redirect to Stripe Checkout when a `url` is present.
117
+
118
+ Use `sdk.live.booking.submitPaymentOption(option)` or the top-level `submitPaymentOption(option)` export for non-bank-transfer payment options in a browser environment.
119
+
120
+ ## Configuration
121
+
122
+ Booking requests are rate-limited to one backend request per second with a queue size of five. `v9` books through the v0 `book` action and can initialize Stripe payment data. `v10` books through GraphQL and initializes Adyen redirect payment options.
123
+
124
+ ## CLI Usage
125
+
126
+ The CLI includes a booking command. It creates a fresh quote from a quote input file, then books that quote with a booking contact file:
127
+
128
+ ```sh
129
+ website-sdk --backend v10 booking book --quote-input ./quote-input.json --contact-input ./booking-contact.json --relative-redirect-url /booking/payment-return --yes
130
+ ```
131
+
132
+ The command requires `--yes` because it creates a booking in the configured backend.
133
+
134
+ Example `booking-contact.json`:
135
+
136
+ ```json
137
+ {
138
+ "forename": "Jane",
139
+ "surname": "Doe",
140
+ "title": "Ms",
141
+ "address": {
142
+ "street": "Main Street",
143
+ "housenumber": "1",
144
+ "postalcode": "12345",
145
+ "city": "Berlin",
146
+ "countryCode": "DE"
147
+ },
148
+ "contactDetails": {
149
+ "email": "jane@example.com",
150
+ "phone": "+49123456789"
151
+ },
152
+ "note": "Please prepare a baby bed."
153
+ }
154
+ ```
155
+
156
+ Use files instead of environment variables:
157
+
158
+ ```sh
159
+ website-sdk --backend v10 --config ./website-sdk-config.json booking book --quote-input ./quote-input.json --contact-input ./booking-contact.json --relative-redirect-url /booking/payment-return --yes
160
+ ```
161
+
162
+ Environment variables:
163
+
164
+ - `v9`: `HUB_GRAPHQL_URL`, `HUB_V1_API_BASE_URL`, optional `HUB_V0_API_BASE_URL`, `HUB_API_KEY`, `IMAGE_PROXY_BASE_URL`.
165
+ - `v10`: `VOFFICE_API_ENDPOINT`, `VOFFICE_LOCAL_DEV_ACCESS_TOKEN`, `VOFFICE_IMAGE_BASE_URL`.
@@ -0,0 +1,110 @@
1
+ # Contact
2
+
3
+ ## Service
4
+
5
+ Use the live contact API to submit a contact request:
6
+
7
+ ```ts
8
+ await sdk.live.contact.submit(input);
9
+ ```
10
+
11
+ `v9` submits the request through the v0 `saveMessage` action. `v10` submits the request through the `messengeremail_newContactRequest` GraphQL operation.
12
+
13
+ ## Input
14
+
15
+ ```ts
16
+ type ContactInput = {
17
+ locale?: "de-DE" | "en-US";
18
+ title: string;
19
+ professionalTitle: string;
20
+ forename: string;
21
+ surname: string;
22
+ address: {
23
+ streetAndHousenumber: string;
24
+ postalCode: string;
25
+ city: string;
26
+ countryCode: string;
27
+ };
28
+ email: string;
29
+ phone: string;
30
+ subject: string;
31
+ message: string;
32
+ };
33
+ ```
34
+
35
+ `ContactSubmitInput` is the core SDK type name. `ContactInput` remains exported as a legacy alias.
36
+
37
+ Sample:
38
+
39
+ ```json
40
+ {
41
+ "locale": "de-DE",
42
+ "title": "Ms",
43
+ "professionalTitle": "",
44
+ "forename": "Jane",
45
+ "surname": "Doe",
46
+ "address": {
47
+ "streetAndHousenumber": "Main Street 1",
48
+ "postalCode": "12345",
49
+ "city": "Berlin",
50
+ "countryCode": "DE"
51
+ },
52
+ "email": "jane@example.com",
53
+ "phone": "+49123456789",
54
+ "subject": "Question about a rental",
55
+ "message": "I have a question about a rental."
56
+ }
57
+ ```
58
+
59
+ ## Output
60
+
61
+ Returns `Promise<ContactSubmitOutput>`. `ContactSubmitOutput` is currently `void`.
62
+
63
+ Successful CLI output:
64
+
65
+ ```json
66
+ {
67
+ "ok": true
68
+ }
69
+ ```
70
+
71
+ Errors are reported as `CoreSDKError`, also exported as the compatibility alias `CMSError`. The current error shape uses `source` instead of the legacy `backend` field.
72
+
73
+ Contact input is validated before submitting to either backend. Validation failures reject with a `CoreSDKError` using `operation: "contact.submit.validation"`. The error `message` is translated with `input.locale` and defaults to German (`de-DE`) when no locale is provided. Field-level details are available on `error.cause.issues`:
74
+
75
+ ```json
76
+ {
77
+ "issues": [
78
+ {
79
+ "path": "email",
80
+ "code": "invalid_email",
81
+ "message": "Bitte geben Sie eine gültige E-Mail-Adresse ein."
82
+ }
83
+ ]
84
+ }
85
+ ```
86
+
87
+ ## Configuration
88
+
89
+ Contact requests are rate-limited to one request per second with a queue size of five.
90
+
91
+ ## CLI Usage
92
+
93
+ Create `contact-input.json` with a `ContactSubmitInput` object, then submit with explicit confirmation:
94
+
95
+ ```sh
96
+ website-sdk --backend v9 contact submit --input ./contact-input.json --yes
97
+ ```
98
+
99
+ Use files instead of environment variables:
100
+
101
+ ```sh
102
+ website-sdk --backend v9 --config ./website-sdk-config.json contact submit --input ./contact-input.json --yes
103
+ ```
104
+
105
+ Without `--yes`, the command fails before submitting because contact requests send data to the configured backend.
106
+
107
+ Environment variables:
108
+
109
+ - `v9`: `HUB_GRAPHQL_URL`, `HUB_V1_API_BASE_URL`, optional `HUB_V0_API_BASE_URL`, `HUB_API_KEY`, `IMAGE_PROXY_BASE_URL`.
110
+ - `v10`: `VOFFICE_API_ENDPOINT`, `VOFFICE_LOCAL_DEV_ACCESS_TOKEN`, `VOFFICE_IMAGE_BASE_URL`.