@v-office/website-sdk 2.20.2 → 2.20.4
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-BC2JLEak.mjs → client-BGeG3B_l.mjs} +67 -7
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +2 -0
- package/dist/instructions/MIGRATION.md +2 -0
- package/dist/instructions/versions/2.20.3/CHANGELOG.md +8 -0
- package/dist/instructions/versions/2.20.3/MIGRATION.md +9 -0
- package/dist/instructions/versions/2.20.4/CHANGELOG.md +25 -0
- package/dist/instructions/versions/2.20.4/MIGRATION.md +11 -0
- package/dist/{rentals-YT5xN2Gl.mjs → rentals-wTGB1cL6.mjs} +1 -1
- package/dist/{search-BYXTiE9L.mjs → search-D3oV3tAf.mjs} +1 -1
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/versions/2.20.3/CHANGELOG.md +8 -0
- package/instructions/versions/2.20.3/MIGRATION.md +9 -0
- package/instructions/versions/2.20.3/release.json +3 -0
- package/instructions/versions/2.20.4/CHANGELOG.md +25 -0
- package/instructions/versions/2.20.4/MIGRATION.md +11 -0
- package/instructions/versions/2.20.4/release.json +3 -0
- package/package.json +4 -3
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Vt as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK, zt as defineWebsiteSDKOptions } from "./client-
|
|
2
|
+
import { Vt as defineV9PropertyHighlightSourcesFromUnknown, t as createWebsiteSDK, zt as defineWebsiteSDKOptions } from "./client-BGeG3B_l.mjs";
|
|
3
3
|
import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
|
|
4
4
|
import { ByteSize, Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
|
|
5
5
|
import { Command, Flag } from "effect/unstable/cli";
|
|
@@ -16,7 +16,7 @@ var CLICheckFailed = class extends Error {
|
|
|
16
16
|
const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region package.json
|
|
19
|
-
var version = "2.20.
|
|
19
|
+
var version = "2.20.4";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/cli/output.ts
|
|
22
22
|
const toJson = (value) => Effect.try({
|
|
@@ -2,7 +2,7 @@ import { a as customDataAttribute } from "./v9-data-BnYxa2Ek.mjs";
|
|
|
2
2
|
import { AvailabilityService, BookingBookOutput, BookingService, ContactService, CoreSDKError, DEFAULT_RENTAL_HIGHLIGHT_PRIORITIZATION, DEFAULT_RENTAL_PROPERTY_HIGHLIGHT_PRIORITIZATION, DocumentsService, EMPTY_CUSTOM_ATTRIBUTE_REGISTRY, FilterService, QuoteService, RentalService, SearchService, TranslationService, addGuestQuoteAdditionalServiceSelection, asArray, asRecord, assertNoNestedCustomAttributeFilterCompositions, assertNoReservedQueryKeys, assertUniqueCustomFilterQueryKeys, assertUniqueFilterQueryKeys, clearGuestQuoteAdditionalServiceSelections, collectQueryParameters, createCoreRuntime, expandCustomAttributeFilterCompositions, firstNumber, firstString, formatCurrency, formatLocalDate, getBookingBookGuestToken, getGuestQuoteBackendContext, getGuestQuoteInput, isDisplayableCustomAttribute, localeToLanguage, makeMinIntervalLimiter, makeTranslationLive, parseQueryParameters, refreshGuestQuoteInsurancePassthrough, removeGuestQuoteAdditionalServiceSelection, selectGuestQuoteCancellationPolicySelection, toCustomAttributeFilterLabel, toCustomAttributeFilterOutputItem, toCustomAttributeList, toInitialAvailabilityCalendarDays, toQueryString, toResolvedCustomAttributeCategoryTranslationKey, toStartDateSelectedCalendarDays, validateContactSubmitInput, withGuestQuoteInsurance, withGuestQuoteInsuranceRefresh } from "@v-office/sdk-core";
|
|
3
3
|
import { Context, Data, DateTime, Effect, Layer, Schema, SchemaGetter } from "effect";
|
|
4
4
|
import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http";
|
|
5
|
-
import { print } from "graphql";
|
|
5
|
+
import { Kind, print, visit } from "graphql";
|
|
6
6
|
//#region codegen/v9/graphql-codegen/stable-filters.json
|
|
7
7
|
var stable_filters_default = {
|
|
8
8
|
bedrooms: {
|
|
@@ -4321,11 +4321,11 @@ const toInsuranceBookingOutput = (raw) => {
|
|
|
4321
4321
|
//#endregion
|
|
4322
4322
|
//#region src/legacy-v9/parser/booking/to-booking-service-lines.ts
|
|
4323
4323
|
const hasSelectedAmount = (line) => (line.amount ?? 0) > 0;
|
|
4324
|
-
const stringValue = (value) => typeof value === "string" ? value : void 0;
|
|
4324
|
+
const stringValue$1 = (value) => typeof value === "string" ? value : void 0;
|
|
4325
4325
|
const numberValue = (value) => typeof value === "number" ? value : void 0;
|
|
4326
4326
|
const toBookingServiceLine = (line) => {
|
|
4327
4327
|
if (line.service?.id == null) return void 0;
|
|
4328
|
-
const discountName = stringValue(line.discountName);
|
|
4328
|
+
const discountName = stringValue$1(line.discountName);
|
|
4329
4329
|
const specialOffer = numberValue(line.specialOffer);
|
|
4330
4330
|
const oPrice = numberValue(line.oPrice);
|
|
4331
4331
|
const oTotal = numberValue(line.oTotal);
|
|
@@ -5513,8 +5513,68 @@ const makeResponseDiagnostics = ({ response, rawBody, parseError }) => ({
|
|
|
5513
5513
|
bodyPreview: rawBody.length === 0 ? "<empty>" : previewResponseBody(rawBody),
|
|
5514
5514
|
...parseError === void 0 ? {} : { parseError: serializeErrorCause(parseError) }
|
|
5515
5515
|
});
|
|
5516
|
+
/**
|
|
5517
|
+
* Field arguments the be-on! Hub reads from the query text instead of `$args`.
|
|
5518
|
+
*
|
|
5519
|
+
* `DataJsonResolver` in the Hub resolves every translated `data(attributes:)`
|
|
5520
|
+
* field (units, facilities, feedbacks, ratings, services, offers, images) and
|
|
5521
|
+
* never receives the `language` argument of the parent field. It re-reads the
|
|
5522
|
+
* HTTP body and matches `/language\s*:\s*"([^"]+)"/` against the query
|
|
5523
|
+
* string. A language sent as a GraphQL variable never appears there, so the Hub
|
|
5524
|
+
* silently falls back to the member's default language and every text comes
|
|
5525
|
+
* back in it. Only a literal in the query text is honored. Resolvers that do
|
|
5526
|
+
* read `$args` (`filter`, regions) accept both forms, so inlining is safe.
|
|
5527
|
+
*/
|
|
5528
|
+
const HUB_QUERY_TEXT_ARGUMENTS = /* @__PURE__ */ new Set(["language"]);
|
|
5529
|
+
const stringValue = (value) => ({
|
|
5530
|
+
kind: Kind.STRING,
|
|
5531
|
+
value,
|
|
5532
|
+
block: false
|
|
5533
|
+
});
|
|
5534
|
+
/**
|
|
5535
|
+
* Replaces `argument: $variable` with `argument: "value"` for the arguments the
|
|
5536
|
+
* Hub only reads from the query text. A variable that is no longer referenced
|
|
5537
|
+
* afterwards is dropped from the operation and from `variables`; one that is
|
|
5538
|
+
* still used elsewhere stays. Documents without such arguments are returned
|
|
5539
|
+
* as-is.
|
|
5540
|
+
*/
|
|
5541
|
+
const inlineHubQueryTextArguments = (document, variables) => {
|
|
5542
|
+
const values = variables;
|
|
5543
|
+
const inlined = /* @__PURE__ */ new Set();
|
|
5544
|
+
const withLiterals = visit(document, { Argument(node) {
|
|
5545
|
+
if (!HUB_QUERY_TEXT_ARGUMENTS.has(node.name.value)) return void 0;
|
|
5546
|
+
if (node.value.kind !== Kind.VARIABLE) return void 0;
|
|
5547
|
+
const value = values?.[node.value.name.value];
|
|
5548
|
+
if (typeof value !== "string") return void 0;
|
|
5549
|
+
inlined.add(node.value.name.value);
|
|
5550
|
+
return {
|
|
5551
|
+
...node,
|
|
5552
|
+
value: stringValue(value)
|
|
5553
|
+
};
|
|
5554
|
+
} });
|
|
5555
|
+
if (inlined.size === 0) return {
|
|
5556
|
+
document,
|
|
5557
|
+
variables
|
|
5558
|
+
};
|
|
5559
|
+
const stillReferenced = /* @__PURE__ */ new Set();
|
|
5560
|
+
visit(withLiterals, { Variable(node, _key, parent) {
|
|
5561
|
+
if (!(parent != null && "kind" in parent && parent.kind === Kind.VARIABLE_DEFINITION)) stillReferenced.add(node.name.value);
|
|
5562
|
+
} });
|
|
5563
|
+
const removable = [...inlined].filter((name) => !stillReferenced.has(name));
|
|
5564
|
+
if (removable.length === 0) return {
|
|
5565
|
+
document: withLiterals,
|
|
5566
|
+
variables
|
|
5567
|
+
};
|
|
5568
|
+
return {
|
|
5569
|
+
document: visit(withLiterals, { VariableDefinition(node) {
|
|
5570
|
+
return removable.includes(node.variable.name.value) ? null : void 0;
|
|
5571
|
+
} }),
|
|
5572
|
+
variables: Object.fromEntries(Object.entries(values ?? {}).filter(([name]) => !removable.includes(name)))
|
|
5573
|
+
};
|
|
5574
|
+
};
|
|
5516
5575
|
const makeV9GraphQLClient = (config) => ({ execute: (document, variables) => Effect.tryPromise({
|
|
5517
5576
|
try: async () => {
|
|
5577
|
+
const request = inlineHubQueryTextArguments(document, variables);
|
|
5518
5578
|
const response = await fetch(config.graphqlUrl, {
|
|
5519
5579
|
method: "POST",
|
|
5520
5580
|
headers: {
|
|
@@ -5522,8 +5582,8 @@ const makeV9GraphQLClient = (config) => ({ execute: (document, variables) => Eff
|
|
|
5522
5582
|
"api-key": config.apiKey
|
|
5523
5583
|
},
|
|
5524
5584
|
body: JSON.stringify({
|
|
5525
|
-
query: print(document),
|
|
5526
|
-
variables
|
|
5585
|
+
query: print(request.document),
|
|
5586
|
+
variables: request.variables
|
|
5527
5587
|
})
|
|
5528
5588
|
});
|
|
5529
5589
|
const rawBody = await response.text();
|
|
@@ -5639,7 +5699,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
5639
5699
|
return page;
|
|
5640
5700
|
});
|
|
5641
5701
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
5642
|
-
try: () => import("./search-
|
|
5702
|
+
try: () => import("./search-D3oV3tAf.mjs"),
|
|
5643
5703
|
catch: (cause) => new CoreSDKError({
|
|
5644
5704
|
source: "v10",
|
|
5645
5705
|
operation: "v9.search.runtime",
|
|
@@ -6037,7 +6097,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
|
|
|
6037
6097
|
});
|
|
6038
6098
|
};
|
|
6039
6099
|
const loadV9RentalsRuntime = Effect.tryPromise({
|
|
6040
|
-
try: () => import("./rentals-
|
|
6100
|
+
try: () => import("./rentals-wTGB1cL6.mjs"),
|
|
6041
6101
|
catch: (cause) => new CoreSDKError({
|
|
6042
6102
|
source: "v10",
|
|
6043
6103
|
operation: "v9.rentals.runtime",
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, Bt as defineV9PropertyHighlightSources, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getRentalsEffect, E as DocumentSummarySchema, Et as getInitialAvailabilityEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsurancePaymentEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, I as ErgoReadPreContractRequestSchema, It as submitContactEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitPaymentOption, M as ErgoCreatePreContractRequestSchema, Mt as searchEffect, N as ErgoPersonSchema, Nt as selectCancellationPolicyEffect, O as ErgoAddressSchema, Ot as getStartDateSelectedAvailabilityEffect, P as ErgoPlanSearchRequestSchema, Pt as selectInsuranceEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOptionEffect, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getFiltersEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, Vt as defineV9PropertyHighlightSourcesFromUnknown, W as QuotePricesPayloadSchema, X as RegionListResponseSchema, Y as RawVofficeObjectSchema, Z as RoomImageSchema, _ as CalendarDaySchema, _t as V1_OPERATIONS, at as TileCollectionResponseSchema, b as CustomerUnitSummarySchema, bt as addAdditionalServiceEffect, c as V0OpenApiClient, ct as TravelInsuranceBookingSchema, d as makeV0OpenApiClientLive, dt as UnitListItemSchema, et as ServiceImageSchema, f as V1OpenApiClient, ft as UnitListResponseSchema, g as ApiEnvelopeBaseSchema, gt as V1_BASE_URL, h as makeV1OpenApiClientLive, ht as UnitServicePriceSchema, it as SetupResponseSchema, j as ErgoCommonFieldsSchema, jt as removeAdditionalServiceEffect, k as ErgoBankSchema, kt as getTermsAndPrivacyPolicyEffect, l as V0OpenApiClientError, lt as TravelInsuranceBookingStoreRequestSchema, m as makeV1OpenApiClientFetchLive, mt as UnitResponseSchema, nt as ServiceListResponseSchema, ot as TileSchema, p as V1OpenApiClientError, pt as UnitOfferSchema, q as QuoteServiceSchema, rt as SetupDataSchema, st as TileTagSchema, t as createWebsiteSDK, tt as ServiceLimitSchema, u as makeV0OpenApiClientFetchLive, ut as UnitIdsResponseSchema, v as CalendarResponseSchema, vt as VideoResponseSchema, w as DocumentStatusSchema, wt as createInsurancePreContractEffect, x as DocumentCollectionResponseSchema, xt as bookEffect, y as CurrentMemberResponseSchema, yt as decodeV1OperationResponse, z as OnOfficeUnitCollectionResponseSchema, zt as defineWebsiteSDKOptions } from "./client-
|
|
1
|
+
import { $ as ServiceBeonDataSchema, A as ErgoBookRequestSchema, At as quoteEffect, B as OnOfficeUnitSchema, Bt as defineV9PropertyHighlightSources, C as DocumentResourceSchema, Ct as clearAdditionalServicesEffect, D as DocumentTypeSchema, Dt as getRentalsEffect, E as DocumentSummarySchema, Et as getInitialAvailabilityEffect, F as ErgoPolicyNumberRequestSchema, Ft as selectInsurancePaymentEffect, G as QuotePricesResponseSchema, H as PaymentScheduleSchema, I as ErgoReadPreContractRequestSchema, It as submitContactEffect, J as RawObjectResponseSchema, K as QuoteSchema, L as ErgoTripAndCustomerRequestSchema, Lt as submitPaymentOption, M as ErgoCreatePreContractRequestSchema, Mt as searchEffect, N as ErgoPersonSchema, Nt as selectCancellationPolicyEffect, O as ErgoAddressSchema, Ot as getStartDateSelectedAvailabilityEffect, P as ErgoPlanSearchRequestSchema, Pt as selectInsuranceEffect, Q as SearchPropertiesResponseSchema, R as FacilityListResponseSchema, Rt as submitPaymentOptionEffect, S as DocumentResourceResponseSchema, St as bookInsuranceEffect, T as DocumentStatusUpdateRequestSchema, Tt as getFiltersEffect, U as QuoteLineSchema, V as PaymentScheduleItemSchema, Vt as defineV9PropertyHighlightSourcesFromUnknown, W as QuotePricesPayloadSchema, X as RegionListResponseSchema, Y as RawVofficeObjectSchema, Z as RoomImageSchema, _ as CalendarDaySchema, _t as V1_OPERATIONS, at as TileCollectionResponseSchema, b as CustomerUnitSummarySchema, bt as addAdditionalServiceEffect, c as V0OpenApiClient, ct as TravelInsuranceBookingSchema, d as makeV0OpenApiClientLive, dt as UnitListItemSchema, et as ServiceImageSchema, f as V1OpenApiClient, ft as UnitListResponseSchema, g as ApiEnvelopeBaseSchema, gt as V1_BASE_URL, h as makeV1OpenApiClientLive, ht as UnitServicePriceSchema, it as SetupResponseSchema, j as ErgoCommonFieldsSchema, jt as removeAdditionalServiceEffect, k as ErgoBankSchema, kt as getTermsAndPrivacyPolicyEffect, l as V0OpenApiClientError, lt as TravelInsuranceBookingStoreRequestSchema, m as makeV1OpenApiClientFetchLive, mt as UnitResponseSchema, nt as ServiceListResponseSchema, ot as TileSchema, p as V1OpenApiClientError, pt as UnitOfferSchema, q as QuoteServiceSchema, rt as SetupDataSchema, st as TileTagSchema, t as createWebsiteSDK, tt as ServiceLimitSchema, u as makeV0OpenApiClientFetchLive, ut as UnitIdsResponseSchema, v as CalendarResponseSchema, vt as VideoResponseSchema, w as DocumentStatusSchema, wt as createInsurancePreContractEffect, x as DocumentCollectionResponseSchema, xt as bookEffect, y as CurrentMemberResponseSchema, yt as decodeV1OperationResponse, z as OnOfficeUnitCollectionResponseSchema, zt as defineWebsiteSDKOptions } from "./client-BGeG3B_l.mjs";
|
|
2
2
|
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, CustomAttributeCatalogSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, 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,8 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.20.4/CHANGELOG.md`: release notes for 2.20.4
|
|
8
|
+
- `versions/2.20.3/CHANGELOG.md`: release notes for 2.20.3
|
|
7
9
|
- `versions/2.20.2/CHANGELOG.md`: release notes for 2.20.2
|
|
8
10
|
- `versions/2.20.1/CHANGELOG.md`: release notes for 2.20.1
|
|
9
11
|
- `versions/2.20.0/CHANGELOG.md`: release notes for 2.20.0
|
|
@@ -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/2.20.4/MIGRATION.md`: Migration: 2.20.3 to 2.20.4
|
|
8
|
+
- `versions/2.20.3/MIGRATION.md`: Migration: 2.20.2 to 2.20.3
|
|
7
9
|
- `versions/2.20.2/MIGRATION.md`: Migration: 2.20.1 to 2.20.2
|
|
8
10
|
- `versions/2.20.1/MIGRATION.md`: Migration: 2.20.0 to 2.20.1
|
|
9
11
|
- `versions/2.20.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changelog: 2.20.3
|
|
2
|
+
|
|
3
|
+
This release updates the packaged `@v-office/sdk-core` dependency to `1.22.0`.
|
|
4
|
+
|
|
5
|
+
## Changed
|
|
6
|
+
|
|
7
|
+
- The exact core dependency now includes owner period-blocking, rental-review and selected-service
|
|
8
|
+
summary capabilities. Website-facing behavior is unchanged.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog: 2.20.4
|
|
2
|
+
|
|
3
|
+
Against a v9 hub, every text the hub translates (description, headline, intro,
|
|
4
|
+
name, region name, image titles, `p_*` attribute values and the like) came back
|
|
5
|
+
in the agency's default language regardless of the locale the website asked
|
|
6
|
+
for. Filters, amenities and other catalog-driven labels were already localized,
|
|
7
|
+
so an English site showed English chrome around German descriptions.
|
|
8
|
+
|
|
9
|
+
## Fixed
|
|
10
|
+
|
|
11
|
+
- `rentals.getRentals` and `search.search` now receive texts in the requested
|
|
12
|
+
locale from a v9 hub. The hub's `data(attributes:)` resolver does not read the
|
|
13
|
+
`language` argument like a regular GraphQL argument; it scans the raw query
|
|
14
|
+
text for a literal `language: "xx"` and otherwise falls back to the default
|
|
15
|
+
language. The SDK sent the language as a GraphQL variable, which that scan
|
|
16
|
+
never sees. The v9 GraphQL client now inlines the language as a literal into
|
|
17
|
+
the query text before sending, for every operation that has one.
|
|
18
|
+
|
|
19
|
+
## Unchanged
|
|
20
|
+
|
|
21
|
+
- The input and output types of `getRentals` and `search`.
|
|
22
|
+
- Texts of a rental that has no translation in the requested language: the hub
|
|
23
|
+
still falls back to the agency's default language for those, as before.
|
|
24
|
+
- The v10 backend, and the v9 REST calls (availability, quote, booking,
|
|
25
|
+
contact), which already passed the language as a query parameter.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Migration: 2.20.3 to 2.20.4
|
|
2
|
+
|
|
3
|
+
## 1. Upgrade
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @v-office/website-sdk@2.20.4
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
No changes are required. Sites on a v9 hub that build more than one locale
|
|
10
|
+
should rebuild after upgrading: the non-default locales pick up translated
|
|
11
|
+
texts on the next build.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-
|
|
1
|
+
import { Ht as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-BGeG3B_l.mjs";
|
|
2
2
|
import { c as parseVofficeUnitData, i as VofficeUnitDataPropertyMetadata, n as VofficeUnitDataPropertyCategoryLabelKeys, o as parseVofficeFacilityData, r as VofficeUnitDataPropertyCategoryValues, s as parseVofficeFeedbackData, t as VofficeUnitDataFieldSchemas } from "./v9-data-BnYxa2Ek.mjs";
|
|
3
3
|
import { a as toAddress, c as rentalFacilitiesForObjectGroupRelationQuery, d as rentalsAllFeedbacksQuery, f as rentalsAllWithoutFeedbacksQuery, i as toImages, l as rentalIdsQuery, n as renderVofficePropertyAttribute, o as toLocalizedString, r as toFacilityImages, t as toRentalHighlights, u as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery } from "./to-rental-highlights-CN-wpRh3.mjs";
|
|
4
4
|
import { CoreSDKError, makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } from "@v-office/sdk-core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-
|
|
1
|
+
import { a as parseQueryParameters, i as collectQueryParameters, n as makeV9CustomAttributeFilterCapabilities, o as toQueryString, r as toBasicQueryInputs, s as applyVofficeFilterDerivedBasicQueryInputs } from "./client-BGeG3B_l.mjs";
|
|
2
2
|
import { c as parseVofficeUnitData, t as VofficeUnitDataFieldSchemas } from "./v9-data-BnYxa2Ek.mjs";
|
|
3
3
|
import { a as toAddress, i as toImages, s as searchQuery, t as toRentalHighlights } from "./to-rental-highlights-CN-wpRh3.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
|
|
|
5
5
|
Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/2.20.4/CHANGELOG.md`: release notes for 2.20.4
|
|
8
|
+
- `versions/2.20.3/CHANGELOG.md`: release notes for 2.20.3
|
|
7
9
|
- `versions/2.20.2/CHANGELOG.md`: release notes for 2.20.2
|
|
8
10
|
- `versions/2.20.1/CHANGELOG.md`: release notes for 2.20.1
|
|
9
11
|
- `versions/2.20.0/CHANGELOG.md`: release notes for 2.20.0
|
|
@@ -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/2.20.4/MIGRATION.md`: Migration: 2.20.3 to 2.20.4
|
|
8
|
+
- `versions/2.20.3/MIGRATION.md`: Migration: 2.20.2 to 2.20.3
|
|
7
9
|
- `versions/2.20.2/MIGRATION.md`: Migration: 2.20.1 to 2.20.2
|
|
8
10
|
- `versions/2.20.1/MIGRATION.md`: Migration: 2.20.0 to 2.20.1
|
|
9
11
|
- `versions/2.20.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changelog: 2.20.3
|
|
2
|
+
|
|
3
|
+
This release updates the packaged `@v-office/sdk-core` dependency to `1.22.0`.
|
|
4
|
+
|
|
5
|
+
## Changed
|
|
6
|
+
|
|
7
|
+
- The exact core dependency now includes owner period-blocking, rental-review and selected-service
|
|
8
|
+
summary capabilities. Website-facing behavior is unchanged.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog: 2.20.4
|
|
2
|
+
|
|
3
|
+
Against a v9 hub, every text the hub translates (description, headline, intro,
|
|
4
|
+
name, region name, image titles, `p_*` attribute values and the like) came back
|
|
5
|
+
in the agency's default language regardless of the locale the website asked
|
|
6
|
+
for. Filters, amenities and other catalog-driven labels were already localized,
|
|
7
|
+
so an English site showed English chrome around German descriptions.
|
|
8
|
+
|
|
9
|
+
## Fixed
|
|
10
|
+
|
|
11
|
+
- `rentals.getRentals` and `search.search` now receive texts in the requested
|
|
12
|
+
locale from a v9 hub. The hub's `data(attributes:)` resolver does not read the
|
|
13
|
+
`language` argument like a regular GraphQL argument; it scans the raw query
|
|
14
|
+
text for a literal `language: "xx"` and otherwise falls back to the default
|
|
15
|
+
language. The SDK sent the language as a GraphQL variable, which that scan
|
|
16
|
+
never sees. The v9 GraphQL client now inlines the language as a literal into
|
|
17
|
+
the query text before sending, for every operation that has one.
|
|
18
|
+
|
|
19
|
+
## Unchanged
|
|
20
|
+
|
|
21
|
+
- The input and output types of `getRentals` and `search`.
|
|
22
|
+
- Texts of a rental that has no translation in the requested language: the hub
|
|
23
|
+
still falls back to the agency's default language for those, as before.
|
|
24
|
+
- The v10 backend, and the v9 REST calls (availability, quote, booking,
|
|
25
|
+
contact), which already passed the language as a query parameter.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Migration: 2.20.3 to 2.20.4
|
|
2
|
+
|
|
3
|
+
## 1. Upgrade
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @v-office/website-sdk@2.20.4
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
No changes are required. Sites on a v9 hub that build more than one locale
|
|
10
|
+
should rebuild after upgrading: the non-default locales pick up translated
|
|
11
|
+
texts on the next build.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.4",
|
|
4
4
|
"description": "Website-facing SDK facade backed by @v-office/sdk-core",
|
|
5
5
|
"bin": {
|
|
6
6
|
"website-sdk": "./dist/cli.mjs"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
45
|
-
"@v-office/sdk-core": "1.
|
|
45
|
+
"@v-office/sdk-core": "1.22.0",
|
|
46
46
|
"effect": "4.0.0-rc.115",
|
|
47
47
|
"graphql": "17.0.2",
|
|
48
48
|
"yaml": "^2.9.0"
|
|
@@ -77,10 +77,11 @@
|
|
|
77
77
|
"fmt": "oxfmt",
|
|
78
78
|
"fmt:check": "oxfmt --check",
|
|
79
79
|
"check": "pnpm run typecheck && pnpm run lint && pnpm run fmt:check",
|
|
80
|
-
"test": "pnpm run test:v9:openapi && pnpm run test:v9:properties && pnpm run test:v9:rentals && pnpm run test:v9:availability && pnpm run test:v9:search && pnpm run build && node --test test/*.test.mjs",
|
|
80
|
+
"test": "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 build && node --test test/*.test.mjs",
|
|
81
81
|
"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",
|
|
82
82
|
"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",
|
|
83
83
|
"test:v9:rentals": "node --test src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts",
|
|
84
|
+
"test:v9:graphql": "node --test src/legacy-v9/graphql/client.test.ts",
|
|
84
85
|
"test:v9:availability": "node --test src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts",
|
|
85
86
|
"test:v9:search": "node --test src/legacy-v9/parser/search/resolve-exact-match.test.ts",
|
|
86
87
|
"playground:custom-attributes": "pnpm run build && node --env-file=.env playground/custom-attributes.ts"
|