@v-office/website-sdk 3.4.0 → 3.4.1
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 +2 -2
- package/dist/{client-BEL6ow0i.mjs → client-DY2AASUk.mjs} +3 -3
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +1 -0
- package/dist/instructions/MIGRATION.md +1 -0
- package/dist/instructions/versions/3.4.1/CHANGELOG.md +20 -0
- package/dist/instructions/versions/3.4.1/MIGRATION.md +9 -0
- package/dist/{quote-Co8iWjF6.mjs → quote-Bbw_fcGm.mjs} +25 -34
- package/dist/{rentals-DVMCyGI9.mjs → rentals-CgNZbpAB.mjs} +1 -1
- package/dist/{search-6EvRB-i0.mjs → search-CqFOCZ8I.mjs} +1 -1
- package/dist/translations/shared/de-DE/quote.json +2 -0
- package/dist/translations/shared/en-US/quote.json +2 -0
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/versions/3.4.1/CHANGELOG.md +20 -0
- package/instructions/versions/3.4.1/MIGRATION.md +9 -0
- package/instructions/versions/3.4.1/release.json +3 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Qt as defineV9PropertyHighlightSourcesFromUnknown, Xt as defineWebsiteSDKOptions, _ as rental_attributes_default$1, an as V9_HUB_OFFER_FILTER_KEY, cn as V9_HUB_UNIT_TYPE_FILTER_KEY, en as V9_HUB_FACILITY_SCOPE_FILTER_KEY, f as makeV9GraphQLClient, h as makeV0OpenApiClientFetchLive, i as toV9SdkOwnedHubFilterKeys, in as V9_HUB_OFFERS_FILTER_KEY, ln as V9_SDK_OWNED_HUB_FILTER_KEYS, n as checkV9HubFilters, nn as V9_HUB_OBJECT_GROUP_FILTER_KEY, on as V9_HUB_REGION_FILTER_KEY, p as V0OpenApiClient, r as toV9RequiredHubFilterKeys, rn as V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY, sn as V9_HUB_RENTAL_IDS_FILTER_KEY, t as createWebsiteSDK, tn as V9_HUB_FACILITY_SEARCH_FILTER_KEY, un as stable_filters_default, v as rental_attributes_default } from "./client-
|
|
2
|
+
import { Qt as defineV9PropertyHighlightSourcesFromUnknown, Xt as defineWebsiteSDKOptions, _ as rental_attributes_default$1, an as V9_HUB_OFFER_FILTER_KEY, cn as V9_HUB_UNIT_TYPE_FILTER_KEY, en as V9_HUB_FACILITY_SCOPE_FILTER_KEY, f as makeV9GraphQLClient, h as makeV0OpenApiClientFetchLive, i as toV9SdkOwnedHubFilterKeys, in as V9_HUB_OFFERS_FILTER_KEY, ln as V9_SDK_OWNED_HUB_FILTER_KEYS, n as checkV9HubFilters, nn as V9_HUB_OBJECT_GROUP_FILTER_KEY, on as V9_HUB_REGION_FILTER_KEY, p as V0OpenApiClient, r as toV9RequiredHubFilterKeys, rn as V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY, sn as V9_HUB_RENTAL_IDS_FILTER_KEY, t as createWebsiteSDK, tn as V9_HUB_FACILITY_SEARCH_FILTER_KEY, un as stable_filters_default, v as rental_attributes_default } from "./client-DY2AASUk.mjs";
|
|
3
3
|
import { a as hubFiltersQuery, b as parseJsonData, o as hubRentalDataQuery, p as rentalsAllWithoutFeedbacksQuery, v as VofficeUnitDataPropertyMetadata, w as parseVofficeRatingData } from "./operations-DY2e_2Hd.mjs";
|
|
4
4
|
import { STABLE_SEARCH_INPUTS, SearchSearchSortSchema, defineCustomAttributesFromUnknown, toStableSearchInputQueryKeys } from "@v-office/sdk-core";
|
|
5
5
|
import { ByteSize, Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
|
|
@@ -17,7 +17,7 @@ var CLICheckFailed = class extends Error {
|
|
|
17
17
|
const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "3.4.
|
|
20
|
+
var version = "3.4.1";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/cli/output.ts
|
|
23
23
|
const toJson = (value) => Effect.try({
|
|
@@ -6222,7 +6222,7 @@ const revokeV9InsurancePolicy = ({ policyNumber, booking, v1Client }) => Effect.
|
|
|
6222
6222
|
//#region src/legacy-v9/live/quote.ts
|
|
6223
6223
|
const loadQuoteRuntime = Effect.tryPromise({
|
|
6224
6224
|
try: async () => {
|
|
6225
|
-
return { toGuestQuote: (await import("./quote-
|
|
6225
|
+
return { toGuestQuote: (await import("./quote-Bbw_fcGm.mjs")).toGuestQuote };
|
|
6226
6226
|
},
|
|
6227
6227
|
catch: (cause) => new CoreSDKError({
|
|
6228
6228
|
source: "v9",
|
|
@@ -6577,7 +6577,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
6577
6577
|
return page;
|
|
6578
6578
|
});
|
|
6579
6579
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
6580
|
-
try: () => import("./search-
|
|
6580
|
+
try: () => import("./search-CqFOCZ8I.mjs"),
|
|
6581
6581
|
catch: (cause) => new CoreSDKError({
|
|
6582
6582
|
source: "v9",
|
|
6583
6583
|
operation: "v9.search.runtime",
|
|
@@ -7499,7 +7499,7 @@ const orderRentalsById = ({ rentalIds, rentals, missing }) => {
|
|
|
7499
7499
|
});
|
|
7500
7500
|
};
|
|
7501
7501
|
const loadV9RentalsRuntime = Effect.tryPromise({
|
|
7502
|
-
try: () => import("./rentals-
|
|
7502
|
+
try: () => import("./rentals-CgNZbpAB.mjs"),
|
|
7503
7503
|
catch: (cause) => new CoreSDKError({
|
|
7504
7504
|
source: "v9",
|
|
7505
7505
|
operation: "v9.rentals.runtime",
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as QuotePricesPayloadSchema, A as DocumentResourceSchema, At as bookEffect, B as ErgoCommonFieldsSchema, Bt as mapSearchEffect, C as ApiEnvelopeBaseSchema, Ct as UnitServicePriceSchema, D as CustomerUnitSummarySchema, Dt as VideoResponseSchema, E as CurrentMemberResponseSchema, Et as VideoListResponseSchema, F as ErgoAddressSchema, Ft as getFiltersEffect, G as ErgoTripAndCustomerRequestSchema, Gt as selectInsuranceEffect, H as ErgoPersonSchema, Ht as removeAdditionalServiceEffect, I as ErgoBankSchema, It as getInitialAvailabilityEffect, J as OnOfficeUnitCollectionResponseSchema, Jt as submitPaymentOption, K as FacilityListResponseSchema, Kt as selectInsurancePaymentEffect, L as ErgoBookRequestSchema, Lt as getRentalsEffect, M as DocumentStatusUpdateRequestSchema, Mt as clearAdditionalServicesEffect, N as DocumentSummarySchema, Nt as createInsurancePreContractEffect, O as DocumentCollectionResponseSchema, Ot as decodeV1OperationResponse, P as DocumentTypeSchema, Pt as getBankTransferDetailsEffect, Q as QuoteLineSchema, Qt as defineV9PropertyHighlightSourcesFromUnknown, R as ErgoBookingIdentityRequestSchema, Rt as getStartDateSelectedAvailabilityEffect, S as makeV1OpenApiClientLive, St as UnitResponseSchema, T as CalendarResponseSchema, Tt as V1_OPERATIONS, U as ErgoPlanSearchRequestSchema, Ut as searchEffect, V as ErgoCreatePreContractRequestSchema, Vt as quoteEffect, W as ErgoReadPreContractRequestSchema, Wt as selectCancellationPolicyEffect, X as PaymentScheduleItemSchema, Xt as defineWebsiteSDKOptions, Y as OnOfficeUnitSchema, Yt as submitPaymentOptionEffect, Z as PaymentScheduleSchema, Zt as defineV9PropertyHighlightSources, _t as TravelInsuranceBookingSchema, at as RegionListResponseSchema, b as V1OpenApiClientError, bt as UnitListResponseSchema, ct as ServiceBeonDataSchema, dt as ServiceListResponseSchema, et as QuotePricesResponseSchema, ft as SetupDataSchema, g as makeV0OpenApiClientLive, gt as TileTagSchema, h as makeV0OpenApiClientFetchLive, ht as TileSchema, it as RawVofficeObjectSchema, j as DocumentStatusSchema, jt as bookInsuranceEffect, k as DocumentResourceResponseSchema, kt as addAdditionalServiceEffect, lt as ServiceImageSchema, m as V0OpenApiClientError, mt as TileCollectionResponseSchema, nt as QuoteServiceSchema, ot as RoomImageSchema, p as V0OpenApiClient, pt as SetupResponseSchema, q as HubErrorSchema, qt as submitContactEffect, rt as RawObjectResponseSchema, st as SearchPropertiesResponseSchema, t as createWebsiteSDK, tt as QuoteSchema, ut as ServiceLimitSchema, vt as UnitIdsResponseSchema, w as CalendarDaySchema, wt as V1_BASE_URL, x as makeV1OpenApiClientFetchLive, xt as UnitOfferSchema, y as V1OpenApiClient, yt as UnitListItemSchema, z as ErgoBookingIdentitySchema, zt as getTermsAndPrivacyPolicyEffect } from "./client-
|
|
1
|
+
import { $ as QuotePricesPayloadSchema, A as DocumentResourceSchema, At as bookEffect, B as ErgoCommonFieldsSchema, Bt as mapSearchEffect, C as ApiEnvelopeBaseSchema, Ct as UnitServicePriceSchema, D as CustomerUnitSummarySchema, Dt as VideoResponseSchema, E as CurrentMemberResponseSchema, Et as VideoListResponseSchema, F as ErgoAddressSchema, Ft as getFiltersEffect, G as ErgoTripAndCustomerRequestSchema, Gt as selectInsuranceEffect, H as ErgoPersonSchema, Ht as removeAdditionalServiceEffect, I as ErgoBankSchema, It as getInitialAvailabilityEffect, J as OnOfficeUnitCollectionResponseSchema, Jt as submitPaymentOption, K as FacilityListResponseSchema, Kt as selectInsurancePaymentEffect, L as ErgoBookRequestSchema, Lt as getRentalsEffect, M as DocumentStatusUpdateRequestSchema, Mt as clearAdditionalServicesEffect, N as DocumentSummarySchema, Nt as createInsurancePreContractEffect, O as DocumentCollectionResponseSchema, Ot as decodeV1OperationResponse, P as DocumentTypeSchema, Pt as getBankTransferDetailsEffect, Q as QuoteLineSchema, Qt as defineV9PropertyHighlightSourcesFromUnknown, R as ErgoBookingIdentityRequestSchema, Rt as getStartDateSelectedAvailabilityEffect, S as makeV1OpenApiClientLive, St as UnitResponseSchema, T as CalendarResponseSchema, Tt as V1_OPERATIONS, U as ErgoPlanSearchRequestSchema, Ut as searchEffect, V as ErgoCreatePreContractRequestSchema, Vt as quoteEffect, W as ErgoReadPreContractRequestSchema, Wt as selectCancellationPolicyEffect, X as PaymentScheduleItemSchema, Xt as defineWebsiteSDKOptions, Y as OnOfficeUnitSchema, Yt as submitPaymentOptionEffect, Z as PaymentScheduleSchema, Zt as defineV9PropertyHighlightSources, _t as TravelInsuranceBookingSchema, at as RegionListResponseSchema, b as V1OpenApiClientError, bt as UnitListResponseSchema, ct as ServiceBeonDataSchema, dt as ServiceListResponseSchema, et as QuotePricesResponseSchema, ft as SetupDataSchema, g as makeV0OpenApiClientLive, gt as TileTagSchema, h as makeV0OpenApiClientFetchLive, ht as TileSchema, it as RawVofficeObjectSchema, j as DocumentStatusSchema, jt as bookInsuranceEffect, k as DocumentResourceResponseSchema, kt as addAdditionalServiceEffect, lt as ServiceImageSchema, m as V0OpenApiClientError, mt as TileCollectionResponseSchema, nt as QuoteServiceSchema, ot as RoomImageSchema, p as V0OpenApiClient, pt as SetupResponseSchema, q as HubErrorSchema, qt as submitContactEffect, rt as RawObjectResponseSchema, st as SearchPropertiesResponseSchema, t as createWebsiteSDK, tt as QuoteSchema, ut as ServiceLimitSchema, vt as UnitIdsResponseSchema, w as CalendarDaySchema, wt as V1_BASE_URL, x as makeV1OpenApiClientFetchLive, xt as UnitOfferSchema, y as V1OpenApiClient, yt as UnitListItemSchema, z as ErgoBookingIdentitySchema, zt as getTermsAndPrivacyPolicyEffect } from "./client-DY2AASUk.mjs";
|
|
2
2
|
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
3
3
|
//#region codegen/v9/heuristic-generation/public-api.ts
|
|
4
4
|
const customDataAttribute = (name) => name;
|
|
@@ -4,6 +4,7 @@
|
|
|
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.1/CHANGELOG.md`: release notes for 3.4.1
|
|
7
8
|
- `versions/3.4.0/CHANGELOG.md`: release notes for 3.4.0
|
|
8
9
|
- `versions/3.3.0/CHANGELOG.md`: release notes for 3.3.0
|
|
9
10
|
- `versions/3.2.1/CHANGELOG.md`: release notes for 3.2.1
|
|
@@ -4,6 +4,7 @@
|
|
|
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.1/MIGRATION.md`: Migration: 3.4.0 to 3.4.1
|
|
7
8
|
- `versions/3.4.0/MIGRATION.md`: Migration: 3.3.0 to 3.4.0
|
|
8
9
|
- `versions/3.3.0/MIGRATION.md`: Migration: 3.2.1 to 3.3.0
|
|
9
10
|
- `versions/3.2.1/MIGRATION.md`: Migration: 3.2.0 to 3.2.1
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog: 3.4.1
|
|
2
|
+
|
|
3
|
+
v9 additional services billed per day, week or month show the price the PMS bills per unit.
|
|
4
|
+
Totals already matched the PMS for per-day services and still do.
|
|
5
|
+
|
|
6
|
+
## Changed
|
|
7
|
+
|
|
8
|
+
- v9: a service billed per week reads "10,00 € / Woche" (the weekly price) instead of the amount
|
|
9
|
+
for the whole stay without a unit. The line total after `addAdditionalService` is unchanged.
|
|
10
|
+
- v9: a service billed per month reads "… / Monat". Below 30 nights the PMS bills it nothing, and
|
|
11
|
+
`quote.additionalServices` leaves it out instead of offering it for free.
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- v9: a service billed per day showed its total divided by the nights, while the PMS bills it
|
|
16
|
+
for nights + 1 days. For 7 nights at 12,00 a day, `charge` read "13,71 … / Tag"; it now reads
|
|
17
|
+
"12,00 … / Tag", and the booking card sub-line "1 × 12,00 … / Tag". The line total stays 96,00.
|
|
18
|
+
- v9: a selected service billed per week or month went to the booking and into the ERGO
|
|
19
|
+
insurance value with the price of one week or month, whatever the stay. It now goes with
|
|
20
|
+
`price × amount × timespan`, the same total the booking card shows.
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { GuestQuote, GuestQuoteBookingCardDisplayOrder, addGuestQuoteAdditionalServiceSelection, formatCurrency, toNightCount } from "@v-office/sdk-core";
|
|
2
2
|
import { DateTime, Effect } from "effect";
|
|
3
|
-
//#region src/legacy-v9/parser/quote/to-additional-service-calculation.ts
|
|
4
|
-
const toAdditionalServiceCalculation = (line) => {
|
|
5
|
-
switch (line.calculation) {
|
|
6
|
-
case "NIGHT": return "PER_NIGHT";
|
|
7
|
-
case "DAY": return "PER_DAY";
|
|
8
|
-
case "USAGE": return "PER_USAGE";
|
|
9
|
-
case "FLAT": return "FLAT";
|
|
10
|
-
default: return "FLAT";
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
3
|
//#region src/legacy-v9/parser/quote/to-charge.ts
|
|
15
4
|
const toCharge = ({ serviceLine, chargeAmount, currency, locale, translations }) => Effect.gen(function* () {
|
|
16
5
|
if (chargeAmount === 0) return yield* translations.translate(locale, "quote.additionalService.free");
|
|
17
6
|
switch (serviceLine.calculation) {
|
|
18
7
|
case "NIGHT": return `${formatCurrency(chargeAmount, locale, currency)}${yield* translations.translate(locale, "quote.additionalService.night")}`;
|
|
19
8
|
case "DAY": return `${formatCurrency(chargeAmount, locale, currency)}${yield* translations.translate(locale, "quote.additionalService.day")}`;
|
|
9
|
+
case "WEEK": return `${formatCurrency(chargeAmount, locale, currency)}${yield* translations.translate(locale, "quote.additionalService.week")}`;
|
|
10
|
+
case "MONTH": return `${formatCurrency(chargeAmount, locale, currency)}${yield* translations.translate(locale, "quote.additionalService.month")}`;
|
|
20
11
|
default: return formatCurrency(chargeAmount, locale, currency);
|
|
21
12
|
}
|
|
22
13
|
});
|
|
23
14
|
//#endregion
|
|
15
|
+
//#region src/legacy-v9/parser/quote/to-charge-units.ts
|
|
16
|
+
const toChargeUnits = (line, input) => {
|
|
17
|
+
const nights = toNightCount(input.period);
|
|
18
|
+
switch (line.calculation) {
|
|
19
|
+
case "NIGHT": return line.timespan ?? nights;
|
|
20
|
+
case "DAY": return line.timespan ?? nights + 1;
|
|
21
|
+
case "WEEK": return line.timespan ?? nights / 7;
|
|
22
|
+
case "MONTH": return line.timespan ?? Math.floor(nights / 30);
|
|
23
|
+
default: return 1;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
24
27
|
//#region src/legacy-v9/parser/quote/to-charge-amount.ts
|
|
25
28
|
const toChargeAmount = ({ input, serviceLine }) => {
|
|
26
29
|
if (serviceLine.total == null) return void 0;
|
|
30
|
+
const units = toChargeUnits(serviceLine, input);
|
|
31
|
+
if (units <= 0) return void 0;
|
|
27
32
|
const quantity = serviceLine.amount != null && serviceLine.amount > 0 ? serviceLine.amount : 1;
|
|
28
|
-
|
|
29
|
-
case "NIGHT": return serviceLine.total / toNightCount(input.period) / quantity;
|
|
30
|
-
case "DAY": return serviceLine.total / toNightCount(input.period) / quantity;
|
|
31
|
-
case "USAGE": return serviceLine.total / quantity;
|
|
32
|
-
default: return serviceLine.total / quantity;
|
|
33
|
-
}
|
|
33
|
+
return serviceLine.total / quantity / units;
|
|
34
34
|
};
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/legacy-v9/parser/quote/to-service-line-label.ts
|
|
@@ -110,7 +110,7 @@ const toAdditionalServices = ({ input, guestQuoteResult, locale, translations })
|
|
|
110
110
|
label,
|
|
111
111
|
charge,
|
|
112
112
|
chargeAmount,
|
|
113
|
-
|
|
113
|
+
chargeUnits: toChargeUnits(line, input),
|
|
114
114
|
...proposedQuantity === void 0 ? {} : { proposedQuantity },
|
|
115
115
|
...maxPerBooking === void 0 ? {} : { maxPerBooking },
|
|
116
116
|
...leadTimeDays === void 0 ? {} : { leadTimeDays },
|
|
@@ -123,33 +123,24 @@ const toAdditionalServices = ({ input, guestQuoteResult, locale, translations })
|
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/legacy-v9/parser/quote/to-backend-context.ts
|
|
125
125
|
const toSelectionQuantity = (selections, serviceId) => selections.find((selection) => selection.id === serviceId)?.quantity ?? 0;
|
|
126
|
-
const toSelectedTotal = (line, amount) =>
|
|
127
|
-
|
|
128
|
-
switch (line.calculation) {
|
|
129
|
-
case "NIGHT": return line.price * amount * (line.timespan ?? 1);
|
|
130
|
-
case "DAY": return line.price * amount * (line.timespan ?? 1);
|
|
131
|
-
case "PERC": return line.price * amount;
|
|
132
|
-
case "USAGE": return line.price * amount;
|
|
133
|
-
default: return line.price * amount;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const withSelectedAmount = (line, selections) => {
|
|
126
|
+
const toSelectedTotal = (line, amount, input) => line.price == null ? void 0 : Math.round(line.price * amount * toChargeUnits(line, input));
|
|
127
|
+
const withSelectedAmount = (line, selections, input) => {
|
|
137
128
|
const serviceId = getLineServiceId(line);
|
|
138
129
|
if (serviceId === void 0) return line;
|
|
139
130
|
const amount = toSelectionQuantity(selections, serviceId);
|
|
140
|
-
const total = toSelectedTotal(line, amount);
|
|
131
|
+
const total = toSelectedTotal(line, amount, input);
|
|
141
132
|
return {
|
|
142
133
|
...line,
|
|
143
134
|
amount,
|
|
144
135
|
...total === void 0 ? {} : { total }
|
|
145
136
|
};
|
|
146
137
|
};
|
|
147
|
-
const withSelectedServiceAmounts = (quote, selections) => {
|
|
138
|
+
const withSelectedServiceAmounts = (quote, selections, input) => {
|
|
148
139
|
if (quote === void 0) return quote;
|
|
149
140
|
return {
|
|
150
141
|
...quote,
|
|
151
|
-
...quote.optional === void 0 ? {} : { optional: quote.optional.map((line) => withSelectedAmount(line, selections)) },
|
|
152
|
-
...quote.onsiteOptional === void 0 ? {} : { onsiteOptional: quote.onsiteOptional.map((line) => withSelectedAmount(line, selections)) }
|
|
142
|
+
...quote.optional === void 0 ? {} : { optional: quote.optional.map((line) => withSelectedAmount(line, selections, input)) },
|
|
143
|
+
...quote.onsiteOptional === void 0 ? {} : { onsiteOptional: quote.onsiteOptional.map((line) => withSelectedAmount(line, selections, input)) }
|
|
153
144
|
};
|
|
154
145
|
};
|
|
155
146
|
const toV9QuoteBackendContext = (input, guestQuoteResult) => ({
|
|
@@ -161,7 +152,7 @@ const updateV9QuoteBackendContext = (context, selections) => {
|
|
|
161
152
|
if (context.backend !== "v9") return context;
|
|
162
153
|
return {
|
|
163
154
|
...context,
|
|
164
|
-
rawQuote: withSelectedServiceAmounts(context.rawQuote, selections)
|
|
155
|
+
rawQuote: withSelectedServiceAmounts(context.rawQuote, selections, context.input)
|
|
165
156
|
};
|
|
166
157
|
};
|
|
167
158
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-
|
|
1
|
+
import { $t as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-DY2AASUk.mjs";
|
|
2
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
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DY2AASUk.mjs";
|
|
2
2
|
import { T as parseVofficeUnitData, n as mapSearchQuery, r as searchQuery } from "./operations-DY2e_2Hd.mjs";
|
|
3
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";
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"quote.sections.tax": "Steuern & Abgaben",
|
|
5
5
|
"quote.additionalService.day": " / Tag",
|
|
6
6
|
"quote.additionalService.night": " / Nacht",
|
|
7
|
+
"quote.additionalService.week": " / Woche",
|
|
8
|
+
"quote.additionalService.month": " / Monat",
|
|
7
9
|
"quote.additionalService.free": "kostenlos",
|
|
8
10
|
"quote.status.unavailable.notBookable": "Nicht verfügbar",
|
|
9
11
|
"quote.optionCombination.unavailable": "Diese Optionskombination ist nicht verfügbar.",
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"quote.sections.tax": "Taxes & Fees",
|
|
5
5
|
"quote.additionalService.day": " / day",
|
|
6
6
|
"quote.additionalService.night": " / night",
|
|
7
|
+
"quote.additionalService.week": " / week",
|
|
8
|
+
"quote.additionalService.month": " / month",
|
|
7
9
|
"quote.additionalService.free": "free",
|
|
8
10
|
"quote.status.unavailable.notBookable": "Not available",
|
|
9
11
|
"quote.optionCombination.unavailable": "This option combination is unavailable.",
|
|
@@ -4,6 +4,7 @@
|
|
|
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.1/CHANGELOG.md`: release notes for 3.4.1
|
|
7
8
|
- `versions/3.4.0/CHANGELOG.md`: release notes for 3.4.0
|
|
8
9
|
- `versions/3.3.0/CHANGELOG.md`: release notes for 3.3.0
|
|
9
10
|
- `versions/3.2.1/CHANGELOG.md`: release notes for 3.2.1
|
|
@@ -4,6 +4,7 @@
|
|
|
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.1/MIGRATION.md`: Migration: 3.4.0 to 3.4.1
|
|
7
8
|
- `versions/3.4.0/MIGRATION.md`: Migration: 3.3.0 to 3.4.0
|
|
8
9
|
- `versions/3.3.0/MIGRATION.md`: Migration: 3.2.1 to 3.3.0
|
|
9
10
|
- `versions/3.2.1/MIGRATION.md`: Migration: 3.2.0 to 3.2.1
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog: 3.4.1
|
|
2
|
+
|
|
3
|
+
v9 additional services billed per day, week or month show the price the PMS bills per unit.
|
|
4
|
+
Totals already matched the PMS for per-day services and still do.
|
|
5
|
+
|
|
6
|
+
## Changed
|
|
7
|
+
|
|
8
|
+
- v9: a service billed per week reads "10,00 € / Woche" (the weekly price) instead of the amount
|
|
9
|
+
for the whole stay without a unit. The line total after `addAdditionalService` is unchanged.
|
|
10
|
+
- v9: a service billed per month reads "… / Monat". Below 30 nights the PMS bills it nothing, and
|
|
11
|
+
`quote.additionalServices` leaves it out instead of offering it for free.
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- v9: a service billed per day showed its total divided by the nights, while the PMS bills it
|
|
16
|
+
for nights + 1 days. For 7 nights at 12,00 a day, `charge` read "13,71 … / Tag"; it now reads
|
|
17
|
+
"12,00 … / Tag", and the booking card sub-line "1 × 12,00 … / Tag". The line total stays 96,00.
|
|
18
|
+
- v9: a selected service billed per week or month went to the booking and into the ERGO
|
|
19
|
+
insurance value with the price of one week or month, whatever the stay. It now goes with
|
|
20
|
+
`price × amount × timespan`, the same total the booking card shows.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
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.32.
|
|
51
|
+
"@v-office/sdk-core": "1.32.1",
|
|
52
52
|
"effect": "4.0.0-rc.115",
|
|
53
53
|
"graphql": "17.0.2",
|
|
54
54
|
"yaml": "^2.9.0"
|