@v-office/website-sdk 2.18.2 → 2.20.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.
- package/dist/cli.mjs +25 -25
- package/dist/{client-BnA0oXd_.mjs → client-ssUMkYeM.mjs} +11 -8
- 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.19.0/CHANGELOG.md +18 -0
- package/dist/instructions/versions/2.19.0/MIGRATION.md +22 -0
- package/dist/instructions/versions/2.20.0/CHANGELOG.md +19 -0
- package/dist/instructions/versions/2.20.0/MIGRATION.md +15 -0
- package/dist/{rentals-GfJVIv7i.mjs → rentals-BxAIq-V4.mjs} +2 -2
- package/dist/{search-CR1UjnmR.mjs → search-BCQzRzvO.mjs} +17 -6
- package/dist/{to-rental-highlights-CJvDxSLw.mjs → to-rental-highlights-CN-wpRh3.mjs} +251 -140
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/versions/2.19.0/CHANGELOG.md +18 -0
- package/instructions/versions/2.19.0/MIGRATION.md +22 -0
- package/instructions/versions/2.19.0/release.json +3 -0
- package/instructions/versions/2.20.0/CHANGELOG.md +19 -0
- package/instructions/versions/2.20.0/MIGRATION.md +15 -0
- package/instructions/versions/2.20.0/release.json +3 -0
- package/package.json +6 -5
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-ssUMkYeM.mjs";
|
|
3
3
|
import { SearchSearchSortSchema, defineCustomAttributesFromUnknown } from "@v-office/sdk-core";
|
|
4
|
-
import { Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
|
|
4
|
+
import { ByteSize, Console, Effect, FileSystem, Layer, Option, Path, Schema, Stdio, Terminal } from "effect";
|
|
5
5
|
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { inspect } from "node:util";
|
|
7
7
|
import { ChildProcessSpawner } from "effect/unstable/process";
|
|
@@ -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.
|
|
19
|
+
var version = "2.20.0";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/cli/output.ts
|
|
22
22
|
const toJson = (value) => Effect.try({
|
|
@@ -35,15 +35,15 @@ const printOutput = (root, value) => {
|
|
|
35
35
|
const printSuccess = (root) => printOutput(root, { ok: true });
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/cli/root.ts
|
|
38
|
-
const backendFlag = Flag.
|
|
39
|
-
const localeFlag = Flag.
|
|
40
|
-
const inputFileFlag = Flag.
|
|
41
|
-
const confirmFlag = Flag.
|
|
38
|
+
const backendFlag = Flag.Literals("backend", ["v9", "v10"]).pipe(Flag.withDescription("Backend to use for this command."));
|
|
39
|
+
const localeFlag = Flag.Literals("locale", ["de-DE", "en-US"]).pipe(Flag.withDescription("Locale used for localized SDK calls."), Flag.withDefault("de-DE"));
|
|
40
|
+
const inputFileFlag = Flag.File("input", { mustExist: true }).pipe(Flag.withDescription("Path to a JSON input file."));
|
|
41
|
+
const confirmFlag = Flag.Boolean("yes").pipe(Flag.withDescription("Confirm execution of commands that submit or mutate backend state."));
|
|
42
42
|
const websiteSdkCommand = Command.make("website-sdk").pipe(Command.withDescription("Run @v-office/website-sdk operations from the command line."), Command.withSharedFlags({
|
|
43
43
|
backend: backendFlag,
|
|
44
|
-
config: Flag.
|
|
45
|
-
options: Flag.
|
|
46
|
-
output: Flag.
|
|
44
|
+
config: Flag.File("config", { mustExist: true }).pipe(Flag.optional, Flag.withDescription("Path to a JSON WebsiteSDKConfig file. Defaults to environment variables.")),
|
|
45
|
+
options: Flag.File("options", { mustExist: true }).pipe(Flag.optional, Flag.withDescription("Path to a JSON WebsiteSDKOptions file.")),
|
|
46
|
+
output: Flag.Literals("output", ["json", "pretty"]).pipe(Flag.withDescription("Output format."), Flag.withDefault("json"))
|
|
47
47
|
}));
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/cli/json.ts
|
|
@@ -172,9 +172,9 @@ const withSDK = (root, run) => Effect.gen(function* () {
|
|
|
172
172
|
});
|
|
173
173
|
//#endregion
|
|
174
174
|
//#region src/cli/commands/availability.ts
|
|
175
|
-
const rentalIdFlag = Flag.
|
|
176
|
-
const calculateFromDateFlag = Flag.
|
|
177
|
-
const calculateThroughDateFlag = Flag.
|
|
175
|
+
const rentalIdFlag = Flag.String("rental-id").pipe(Flag.withDescription("Backend rental identifier."));
|
|
176
|
+
const calculateFromDateFlag = Flag.String("calculate-from-date").pipe(Flag.withDescription("First local date to calculate, formatted as YYYY-MM-DD."));
|
|
177
|
+
const calculateThroughDateFlag = Flag.String("calculate-through-date").pipe(Flag.withDescription("Last local date to calculate, formatted as YYYY-MM-DD."));
|
|
178
178
|
const initial = Command.make("initial", {
|
|
179
179
|
locale: localeFlag,
|
|
180
180
|
rentalId: rentalIdFlag,
|
|
@@ -187,7 +187,7 @@ const initial = Command.make("initial", {
|
|
|
187
187
|
const startDateSelected = Command.make("start-date-selected", {
|
|
188
188
|
locale: localeFlag,
|
|
189
189
|
rentalId: rentalIdFlag,
|
|
190
|
-
selectedStartDate: Flag.
|
|
190
|
+
selectedStartDate: Flag.String("selected-start-date").pipe(Flag.withDescription("Selected start date, formatted as YYYY-MM-DD.")),
|
|
191
191
|
calculateFromDate: calculateFromDateFlag,
|
|
192
192
|
calculateThroughDate: calculateThroughDateFlag
|
|
193
193
|
}, (input) => websiteSdkCommand.pipe(Effect.flatMap((root) => withSDK(root, (sdk) => sdk.live.availability.getStartDateSelectedAvailability(input)).pipe(Effect.flatMap((result) => printOutput(root, result)))))).pipe(Command.withDescription("Fetch availability after selecting a start date."), Command.withExamples([{
|
|
@@ -229,9 +229,9 @@ const configCommand = Command.make("config").pipe(Command.withDescription("Inspe
|
|
|
229
229
|
const requireConfirmation = (root, confirmed, commandName) => confirmed ? Effect.void : Effect.fail(new CLICheckFailed(`${commandName} can submit data to the configured backend. Re-run with --yes to confirm.`));
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region src/cli/commands/live.ts
|
|
232
|
-
const quoteInputFileFlag = Flag.
|
|
233
|
-
const contactInputFileFlag = Flag.
|
|
234
|
-
const relativeRedirectUrlFlag = Flag.
|
|
232
|
+
const quoteInputFileFlag = Flag.File("quote-input", { mustExist: true }).pipe(Flag.withDescription("Path to a JSON QuoteQuoteInput file."));
|
|
233
|
+
const contactInputFileFlag = Flag.File("contact-input", { mustExist: true }).pipe(Flag.withDescription("Path to a JSON BookingContact file."));
|
|
234
|
+
const relativeRedirectUrlFlag = Flag.String("relative-redirect-url").pipe(Flag.withDescription("Redirect URL passed to booking payment initialization."));
|
|
235
235
|
const quote = Command.make("quote", { input: inputFileFlag }, ({ input }) => websiteSdkCommand.pipe(Effect.flatMap((root) => readJsonFile(input, "quote input").pipe(Effect.flatMap((quoteInput) => withSDK(root, (sdk) => sdk.live.quote.quote(quoteInput))), Effect.flatMap((result) => printOutput(root, result)))))).pipe(Command.withDescription("Create a live guest quote from a JSON QuoteQuoteInput file."), Command.withExamples([{
|
|
236
236
|
command: "website-sdk --backend v10 quote --input ./quote-input.json",
|
|
237
237
|
description: "Create a quote using a reusable JSON fixture."
|
|
@@ -289,12 +289,12 @@ const staticCommands = [
|
|
|
289
289
|
}])),
|
|
290
290
|
Command.make("search", {
|
|
291
291
|
locale: localeFlag,
|
|
292
|
-
query: Flag.
|
|
293
|
-
limit: Flag.
|
|
294
|
-
cursor: Flag.
|
|
295
|
-
rentalIdsIn: Flag.
|
|
296
|
-
voucher: Flag.
|
|
297
|
-
sort: Flag.
|
|
292
|
+
query: Flag.String("query").pipe(Flag.withDescription("Search query string, for example \"city=munich&adults=2\".")),
|
|
293
|
+
limit: Flag.Int("limit").pipe(Flag.optional, Flag.withDescription("Optional positive result limit.")),
|
|
294
|
+
cursor: Flag.String("cursor").pipe(Flag.optional, Flag.withDescription("Optional pagination cursor.")),
|
|
295
|
+
rentalIdsIn: Flag.String("rental-ids-in").pipe(Flag.optional, Flag.withDescription("Optional comma-separated rental IDs to restrict v10 search results.")),
|
|
296
|
+
voucher: Flag.String("voucher").pipe(Flag.optional, Flag.withDescription("Optional voucher code for v10 search pricing.")),
|
|
297
|
+
sort: Flag.String("sort").pipe(Flag.optional, Flag.withDescription("Optional SearchSearchSort JSON, for example '{\"by\":\"price\",\"direction\":\"ASC\"}'."))
|
|
298
298
|
}, ({ locale, query, limit, cursor, rentalIdsIn, voucher, sort }) => websiteSdkCommand.pipe(Effect.flatMap((root) => {
|
|
299
299
|
return Effect.gen(function* () {
|
|
300
300
|
const parsedRentalIdsIn = Option.isSome(rentalIdsIn) ? rentalIdsIn.value.split(",").map((rentalId) => rentalId.trim()).filter((rentalId) => rentalId.length > 0) : [];
|
|
@@ -390,8 +390,8 @@ const FileSystemLive = Layer.succeed(FileSystem.FileSystem, {
|
|
|
390
390
|
uid: Option.some(stats.uid),
|
|
391
391
|
gid: Option.some(stats.gid),
|
|
392
392
|
rdev: Option.some(stats.rdev),
|
|
393
|
-
size:
|
|
394
|
-
blksize: Option.some(
|
|
393
|
+
size: ByteSize.bytes(stats.size),
|
|
394
|
+
blksize: Option.some(ByteSize.bytes(stats.blksize)),
|
|
395
395
|
blocks: Option.some(stats.blocks)
|
|
396
396
|
};
|
|
397
397
|
},
|
|
@@ -5623,7 +5623,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
5623
5623
|
return page;
|
|
5624
5624
|
});
|
|
5625
5625
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
5626
|
-
try: () => import("./search-
|
|
5626
|
+
try: () => import("./search-BCQzRzvO.mjs"),
|
|
5627
5627
|
catch: (cause) => new CoreSDKError({
|
|
5628
5628
|
source: "v10",
|
|
5629
5629
|
operation: "v9.search.runtime",
|
|
@@ -5645,7 +5645,7 @@ const makeV9SearchApi = ({ config, options }) => {
|
|
|
5645
5645
|
})
|
|
5646
5646
|
}));
|
|
5647
5647
|
return { search: (input) => Effect.runPromise(limitSearch(Effect.gen(function* () {
|
|
5648
|
-
const { defaultSearchDataAttributes, searchQuery, toAlternativePeriods, toQueryInput, toSearchOutputItem } = yield* loadV9SearchRuntime;
|
|
5648
|
+
const { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toAlternativePeriods, toQueryInput, toSearchOutputItem } = yield* loadV9SearchRuntime;
|
|
5649
5649
|
const dataAttributes = [
|
|
5650
5650
|
...defaultSearchDataAttributes,
|
|
5651
5651
|
...config.rentalDataAttributes ?? [],
|
|
@@ -5674,24 +5674,27 @@ const makeV9SearchApi = ({ config, options }) => {
|
|
|
5674
5674
|
...scopedQueryInput
|
|
5675
5675
|
});
|
|
5676
5676
|
const entries = yield* Effect.all(data.search.data.map((rental) => Effect.gen(function* () {
|
|
5677
|
-
const
|
|
5678
|
-
const isExactPeriodMatch = alternatives === null;
|
|
5677
|
+
const { isExactMatch, exactMatchCalc, periods } = resolveExactMatch(rental.additional_voffice_data);
|
|
5679
5678
|
const item = yield* toSearchOutputItem({
|
|
5680
5679
|
locale: input.locale,
|
|
5681
5680
|
imageProxyBaseUrl: config.imageProxyBaseUrl,
|
|
5682
5681
|
rentalHighlightPrioritization: [...options.rentalHighlightPrioritization],
|
|
5683
5682
|
customAttributes: options.customAttributes,
|
|
5684
5683
|
rental,
|
|
5685
|
-
|
|
5684
|
+
exactMatchCalc,
|
|
5686
5685
|
translations
|
|
5687
5686
|
});
|
|
5688
|
-
if (
|
|
5687
|
+
if (isExactMatch) return {
|
|
5688
|
+
type: "item",
|
|
5689
|
+
item
|
|
5690
|
+
};
|
|
5691
|
+
if (periods.length === 0) return {
|
|
5689
5692
|
type: "item",
|
|
5690
5693
|
item
|
|
5691
5694
|
};
|
|
5692
5695
|
const alternativePeriods = yield* toAlternativePeriods({
|
|
5693
5696
|
locale: input.locale,
|
|
5694
|
-
alternatives
|
|
5697
|
+
alternatives: periods
|
|
5695
5698
|
});
|
|
5696
5699
|
if (alternativePeriods.length === 0) return {
|
|
5697
5700
|
type: "item",
|
|
@@ -6018,7 +6021,7 @@ const orderRentalsById = ({ rentalIds, rentals }) => {
|
|
|
6018
6021
|
});
|
|
6019
6022
|
};
|
|
6020
6023
|
const loadV9RentalsRuntime = Effect.tryPromise({
|
|
6021
|
-
try: () => import("./rentals-
|
|
6024
|
+
try: () => import("./rentals-BxAIq-V4.mjs"),
|
|
6022
6025
|
catch: (cause) => new CoreSDKError({
|
|
6023
6026
|
source: "v10",
|
|
6024
6027
|
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-ssUMkYeM.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.0/CHANGELOG.md`: release notes for 2.20.0
|
|
8
|
+
- `versions/2.19.0/CHANGELOG.md`: release notes for 2.19.0
|
|
7
9
|
- `versions/2.18.2/CHANGELOG.md`: release notes for 2.18.2
|
|
8
10
|
- `versions/2.18.1/CHANGELOG.md`: release notes for 2.18.1
|
|
9
11
|
- `versions/2.18.0/CHANGELOG.md`: release notes for 2.18.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.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
|
|
8
|
+
- `versions/2.19.0/MIGRATION.md`: Migration: 2.18.2 to 2.19.0
|
|
7
9
|
- `versions/2.18.2/MIGRATION.md`: Migration: 2.18.1 to 2.18.2
|
|
8
10
|
- `versions/2.18.1/MIGRATION.md`: Migration: 2.18.0 to 2.18.1
|
|
9
11
|
- `versions/2.18.0/MIGRATION.md`: Migration: 2.17.1 to 2.18.0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog: 2.19.0
|
|
2
|
+
|
|
3
|
+
Moves the website SDK and its core to the Effect 4 release candidate. The
|
|
4
|
+
public API is unchanged. Sites that import `effect` directly must move to the
|
|
5
|
+
release candidate as well.
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
|
|
9
|
+
- `@v-office/sdk-core` is pinned to `1.21.0`, which runs on `effect@4.0.0-rc.115`
|
|
10
|
+
(was `4.0.0-beta.85`). See the core's 1.21.0 notes for the details.
|
|
11
|
+
- `effect` is `4.0.0-rc.115` for the website SDK as well.
|
|
12
|
+
- The `website-sdk` command line uses the release candidate's PascalCase flag
|
|
13
|
+
constructors internally. Every flag keeps its name, type and help text.
|
|
14
|
+
|
|
15
|
+
## Unchanged
|
|
16
|
+
|
|
17
|
+
- Every exported symbol of 2.18.2; the declaration file exposes the same names.
|
|
18
|
+
- The behavior of every capability, the CLI subcommands and their output.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Migration: 2.18.2 to 2.19.0
|
|
2
|
+
|
|
3
|
+
No code changes in calls to the SDK. Sites that import `effect` themselves
|
|
4
|
+
must move to the same release candidate, because `Effect` values from this
|
|
5
|
+
SDK do not typecheck against `Effect` types from the beta.
|
|
6
|
+
|
|
7
|
+
## 1. Upgrade
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @v-office/website-sdk@2.19.0 effect@4.0.0-rc.115
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Skip the `effect` part if your site does not depend on `effect` directly.
|
|
14
|
+
|
|
15
|
+
## 2. Follow the release candidate renames in your own Effect code
|
|
16
|
+
|
|
17
|
+
Only needed where the site uses these APIs itself; the SDK's own exports are
|
|
18
|
+
unchanged:
|
|
19
|
+
|
|
20
|
+
- `Schema.TaggedErrorClass` → `Schema.TaggedError`, `Schema.ErrorClass` → `Schema.Error`
|
|
21
|
+
- `SchemaTransformation.transformOrFail` → `SchemaTransformation.transformEffect`
|
|
22
|
+
- `Schedule.both` → `Schedule.max([...])`, `Schedule.either` → `Schedule.min([...])`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog: 2.20.0
|
|
2
|
+
|
|
3
|
+
Fixes a case in legacy-v9 search where a rental that exactly matched the
|
|
4
|
+
guest's search dates could be returned without its price.
|
|
5
|
+
|
|
6
|
+
## Fixed
|
|
7
|
+
|
|
8
|
+
- A search result that exactly matches the requested dates now reliably shows
|
|
9
|
+
its formatted price. Previously, whether the price appeared depended on an
|
|
10
|
+
internal detail of the vOffice response that did not always align with an
|
|
11
|
+
exact match, so some exact matches were shown with no price at all.
|
|
12
|
+
- A rental is no longer shown as an "alternative dates" result when it was in
|
|
13
|
+
fact an exact match for the requested dates.
|
|
14
|
+
|
|
15
|
+
## Unchanged
|
|
16
|
+
|
|
17
|
+
- The public `getSearch` input and output types.
|
|
18
|
+
- How alternative date periods are resolved and rendered when a rental does
|
|
19
|
+
not exactly match the requested dates.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration: 2.19.0 to 2.20.0
|
|
2
|
+
|
|
3
|
+
No changes required. The `getSearch` signature and output type are unchanged.
|
|
4
|
+
|
|
5
|
+
Complete search snapshots can change: a query that previously rendered as an
|
|
6
|
+
alternative-period result (because `alternatives` was non-null) now renders
|
|
7
|
+
as an exact match with its formatted price when the Hub reports
|
|
8
|
+
`foundExactMatch: true`. Render the returned item as-is; no client-side
|
|
9
|
+
branching is required.
|
|
10
|
+
|
|
11
|
+
## 1. Upgrade
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
pnpm add @v-office/website-sdk@2.20.0
|
|
15
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ht as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-
|
|
1
|
+
import { Ht as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-ssUMkYeM.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
|
-
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-
|
|
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";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
//#region src/legacy-v9/parser/rentals/to-description.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
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-ssUMkYeM.mjs";
|
|
2
2
|
import { c as parseVofficeUnitData, t as VofficeUnitDataFieldSchemas } from "./v9-data-BnYxa2Ek.mjs";
|
|
3
|
-
import { a as toAddress, i as toImages, s as searchQuery, t as toRentalHighlights } from "./to-rental-highlights-
|
|
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";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
//#region src/legacy-v9/parser/search/input/search-input-error.ts
|
|
@@ -223,6 +223,7 @@ const toQueryInput = ({ query, sort, customAttributeFilterDefinitions, locale, t
|
|
|
223
223
|
vofficeData: {
|
|
224
224
|
filter: Object.keys(filter).length > 0 ? filter : void 0,
|
|
225
225
|
alternatives: true,
|
|
226
|
+
splitAlternatives: true,
|
|
226
227
|
sorting: toVofficeSorting(sort)
|
|
227
228
|
},
|
|
228
229
|
basicQueryInputs: basicQueryInputs.length > 0 ? basicQueryInputs : null
|
|
@@ -231,6 +232,16 @@ const toQueryInput = ({ query, sort, customAttributeFilterDefinitions, locale, t
|
|
|
231
232
|
};
|
|
232
233
|
});
|
|
233
234
|
//#endregion
|
|
235
|
+
//#region src/legacy-v9/parser/search/resolve-exact-match.ts
|
|
236
|
+
const resolveExactMatch = (additionalData) => {
|
|
237
|
+
const isExactMatch = additionalData?.foundExactMatch === true;
|
|
238
|
+
return {
|
|
239
|
+
isExactMatch,
|
|
240
|
+
exactMatchCalc: isExactMatch ? additionalData?.calc ?? additionalData?.matchingPeriods?.[0]?.calc : void 0,
|
|
241
|
+
periods: isExactMatch ? [] : additionalData?.alternatives ?? []
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
//#endregion
|
|
234
245
|
//#region src/legacy-v9/parser/search/output/to-search-price-fields.ts
|
|
235
246
|
const DEFAULT_V9_SEARCH_CURRENCY = "EUR";
|
|
236
247
|
const toSearchPriceFields = ({ locale, calc }) => {
|
|
@@ -263,7 +274,7 @@ const toSearchPriceFields = ({ locale, calc }) => {
|
|
|
263
274
|
};
|
|
264
275
|
//#endregion
|
|
265
276
|
//#region src/legacy-v9/parser/search/to-search-output-item.ts
|
|
266
|
-
const toSearchOutputItem = ({ locale, imageProxyBaseUrl, rentalHighlightPrioritization, customAttributes, rental, translations,
|
|
277
|
+
const toSearchOutputItem = ({ locale, imageProxyBaseUrl, rentalHighlightPrioritization, customAttributes, rental, translations, exactMatchCalc }) => Effect.gen(function* () {
|
|
267
278
|
const data = parseVofficeUnitData(rental.data);
|
|
268
279
|
const item = {
|
|
269
280
|
id: rental.voffice_id.toString(),
|
|
@@ -282,9 +293,9 @@ const toSearchOutputItem = ({ locale, imageProxyBaseUrl, rentalHighlightPrioriti
|
|
|
282
293
|
attributes: data
|
|
283
294
|
});
|
|
284
295
|
if (highlights != null) item.highlights = highlights;
|
|
285
|
-
if (
|
|
296
|
+
if (exactMatchCalc != null) Object.assign(item, toSearchPriceFields({
|
|
286
297
|
locale,
|
|
287
|
-
calc:
|
|
298
|
+
calc: exactMatchCalc
|
|
288
299
|
}));
|
|
289
300
|
return item;
|
|
290
301
|
});
|
|
@@ -305,4 +316,4 @@ const toAlternativePeriods = ({ locale, alternatives }) => Effect.succeed((alter
|
|
|
305
316
|
//#region src/legacy-v9/runtime/search.ts
|
|
306
317
|
const defaultSearchDataAttributes = Object.keys(VofficeUnitDataFieldSchemas);
|
|
307
318
|
//#endregion
|
|
308
|
-
export { defaultSearchDataAttributes, searchQuery, toAlternativePeriods, toQueryInput, toSearchOutputItem };
|
|
319
|
+
export { defaultSearchDataAttributes, resolveExactMatch, searchQuery, toAlternativePeriods, toQueryInput, toSearchOutputItem };
|
|
@@ -1650,7 +1650,7 @@ const documents = {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
}]
|
|
1652
1652
|
},
|
|
1653
|
-
"\n query CoreSDK_Search(\n $first: Int!\n $page: Int\n $language: String\n $vofficeData: VofficeData\n $basicQueryInputs: [BasicQueryInput!]\n $dataAttributes: [String!]! = []\n ) {\n search(\n first: $first\n page: $page\n language: $language\n voffice: $vofficeData\n data: $basicQueryInputs\n ) {\n paginatorInfo {\n hasMorePages\n currentPage\n }\n data {\n voffice_id\n voffice_images {\n id\n path\n title\n description\n }\n voffice_room_images {\n id\n path\n name\n title\n description\n }\n additional_voffice_data {\n alternatives {\n fromdate\n tilldate\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n data(attributes: $dataAttributes)\n }\n }\n }\n": {
|
|
1653
|
+
"\n query CoreSDK_Search(\n $first: Int!\n $page: Int\n $language: String\n $vofficeData: VofficeData\n $basicQueryInputs: [BasicQueryInput!]\n $dataAttributes: [String!]! = []\n ) {\n search(\n first: $first\n page: $page\n language: $language\n voffice: $vofficeData\n data: $basicQueryInputs\n ) {\n paginatorInfo {\n hasMorePages\n currentPage\n }\n data {\n voffice_id\n voffice_images {\n id\n path\n title\n description\n }\n voffice_room_images {\n id\n path\n name\n title\n description\n }\n additional_voffice_data {\n foundExactMatch\n alternatives {\n fromdate\n tilldate\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n matchingPeriods {\n fromdate\n tilldate\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n calc {\n total\n rent\n summary\n oTotal\n oRent\n oSummary\n discountName\n }\n }\n data(attributes: $dataAttributes)\n }\n }\n }\n": {
|
|
1654
1654
|
kind: "Document",
|
|
1655
1655
|
definitions: [{
|
|
1656
1656
|
kind: "OperationDefinition",
|
|
@@ -2000,153 +2000,250 @@ const documents = {
|
|
|
2000
2000
|
},
|
|
2001
2001
|
selectionSet: {
|
|
2002
2002
|
kind: "SelectionSet",
|
|
2003
|
-
selections: [
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2003
|
+
selections: [
|
|
2004
|
+
{
|
|
2005
|
+
kind: "Field",
|
|
2006
|
+
name: {
|
|
2007
|
+
kind: "Name",
|
|
2008
|
+
value: "foundExactMatch"
|
|
2009
|
+
}
|
|
2008
2010
|
},
|
|
2009
|
-
|
|
2010
|
-
kind: "
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
}
|
|
2025
|
-
},
|
|
2026
|
-
{
|
|
2027
|
-
kind: "Field",
|
|
2028
|
-
name: {
|
|
2029
|
-
kind: "Name",
|
|
2030
|
-
value: "calc"
|
|
2011
|
+
{
|
|
2012
|
+
kind: "Field",
|
|
2013
|
+
name: {
|
|
2014
|
+
kind: "Name",
|
|
2015
|
+
value: "alternatives"
|
|
2016
|
+
},
|
|
2017
|
+
selectionSet: {
|
|
2018
|
+
kind: "SelectionSet",
|
|
2019
|
+
selections: [
|
|
2020
|
+
{
|
|
2021
|
+
kind: "Field",
|
|
2022
|
+
name: {
|
|
2023
|
+
kind: "Name",
|
|
2024
|
+
value: "fromdate"
|
|
2025
|
+
}
|
|
2031
2026
|
},
|
|
2032
|
-
|
|
2033
|
-
kind: "
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2027
|
+
{
|
|
2028
|
+
kind: "Field",
|
|
2029
|
+
name: {
|
|
2030
|
+
kind: "Name",
|
|
2031
|
+
value: "tilldate"
|
|
2032
|
+
}
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
kind: "Field",
|
|
2036
|
+
name: {
|
|
2037
|
+
kind: "Name",
|
|
2038
|
+
value: "calc"
|
|
2039
|
+
},
|
|
2040
|
+
selectionSet: {
|
|
2041
|
+
kind: "SelectionSet",
|
|
2042
|
+
selections: [
|
|
2043
|
+
{
|
|
2044
|
+
kind: "Field",
|
|
2045
|
+
name: {
|
|
2046
|
+
kind: "Name",
|
|
2047
|
+
value: "total"
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
kind: "Field",
|
|
2052
|
+
name: {
|
|
2053
|
+
kind: "Name",
|
|
2054
|
+
value: "rent"
|
|
2055
|
+
}
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
kind: "Field",
|
|
2059
|
+
name: {
|
|
2060
|
+
kind: "Name",
|
|
2061
|
+
value: "summary"
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
kind: "Field",
|
|
2066
|
+
name: {
|
|
2067
|
+
kind: "Name",
|
|
2068
|
+
value: "oTotal"
|
|
2069
|
+
}
|
|
2070
|
+
},
|
|
2071
|
+
{
|
|
2072
|
+
kind: "Field",
|
|
2073
|
+
name: {
|
|
2074
|
+
kind: "Name",
|
|
2075
|
+
value: "oRent"
|
|
2076
|
+
}
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
kind: "Field",
|
|
2080
|
+
name: {
|
|
2081
|
+
kind: "Name",
|
|
2082
|
+
value: "oSummary"
|
|
2083
|
+
}
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
kind: "Field",
|
|
2087
|
+
name: {
|
|
2088
|
+
kind: "Name",
|
|
2089
|
+
value: "discountName"
|
|
2090
|
+
}
|
|
2082
2091
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2092
|
+
]
|
|
2093
|
+
}
|
|
2085
2094
|
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
}
|
|
2089
|
-
}, {
|
|
2090
|
-
kind: "Field",
|
|
2091
|
-
name: {
|
|
2092
|
-
kind: "Name",
|
|
2093
|
-
value: "calc"
|
|
2095
|
+
]
|
|
2096
|
+
}
|
|
2094
2097
|
},
|
|
2095
|
-
|
|
2096
|
-
kind: "
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2098
|
+
{
|
|
2099
|
+
kind: "Field",
|
|
2100
|
+
name: {
|
|
2101
|
+
kind: "Name",
|
|
2102
|
+
value: "matchingPeriods"
|
|
2103
|
+
},
|
|
2104
|
+
selectionSet: {
|
|
2105
|
+
kind: "SelectionSet",
|
|
2106
|
+
selections: [
|
|
2107
|
+
{
|
|
2108
|
+
kind: "Field",
|
|
2109
|
+
name: {
|
|
2110
|
+
kind: "Name",
|
|
2111
|
+
value: "fromdate"
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
kind: "Field",
|
|
2116
|
+
name: {
|
|
2117
|
+
kind: "Name",
|
|
2118
|
+
value: "tilldate"
|
|
2119
|
+
}
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
kind: "Field",
|
|
2123
|
+
name: {
|
|
2124
|
+
kind: "Name",
|
|
2125
|
+
value: "calc"
|
|
2126
|
+
},
|
|
2127
|
+
selectionSet: {
|
|
2128
|
+
kind: "SelectionSet",
|
|
2129
|
+
selections: [
|
|
2130
|
+
{
|
|
2131
|
+
kind: "Field",
|
|
2132
|
+
name: {
|
|
2133
|
+
kind: "Name",
|
|
2134
|
+
value: "total"
|
|
2135
|
+
}
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
kind: "Field",
|
|
2139
|
+
name: {
|
|
2140
|
+
kind: "Name",
|
|
2141
|
+
value: "rent"
|
|
2142
|
+
}
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
kind: "Field",
|
|
2146
|
+
name: {
|
|
2147
|
+
kind: "Name",
|
|
2148
|
+
value: "summary"
|
|
2149
|
+
}
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
kind: "Field",
|
|
2153
|
+
name: {
|
|
2154
|
+
kind: "Name",
|
|
2155
|
+
value: "oTotal"
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
kind: "Field",
|
|
2160
|
+
name: {
|
|
2161
|
+
kind: "Name",
|
|
2162
|
+
value: "oRent"
|
|
2163
|
+
}
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
kind: "Field",
|
|
2167
|
+
name: {
|
|
2168
|
+
kind: "Name",
|
|
2169
|
+
value: "oSummary"
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
kind: "Field",
|
|
2174
|
+
name: {
|
|
2175
|
+
kind: "Name",
|
|
2176
|
+
value: "discountName"
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
]
|
|
2180
|
+
}
|
|
2138
2181
|
}
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2182
|
+
]
|
|
2183
|
+
}
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
kind: "Field",
|
|
2187
|
+
name: {
|
|
2188
|
+
kind: "Name",
|
|
2189
|
+
value: "calc"
|
|
2190
|
+
},
|
|
2191
|
+
selectionSet: {
|
|
2192
|
+
kind: "SelectionSet",
|
|
2193
|
+
selections: [
|
|
2194
|
+
{
|
|
2195
|
+
kind: "Field",
|
|
2196
|
+
name: {
|
|
2197
|
+
kind: "Name",
|
|
2198
|
+
value: "total"
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
kind: "Field",
|
|
2203
|
+
name: {
|
|
2204
|
+
kind: "Name",
|
|
2205
|
+
value: "rent"
|
|
2206
|
+
}
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
kind: "Field",
|
|
2210
|
+
name: {
|
|
2211
|
+
kind: "Name",
|
|
2212
|
+
value: "summary"
|
|
2213
|
+
}
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
kind: "Field",
|
|
2217
|
+
name: {
|
|
2218
|
+
kind: "Name",
|
|
2219
|
+
value: "oTotal"
|
|
2220
|
+
}
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
kind: "Field",
|
|
2224
|
+
name: {
|
|
2225
|
+
kind: "Name",
|
|
2226
|
+
value: "oRent"
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
kind: "Field",
|
|
2231
|
+
name: {
|
|
2232
|
+
kind: "Name",
|
|
2233
|
+
value: "oSummary"
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
kind: "Field",
|
|
2238
|
+
name: {
|
|
2239
|
+
kind: "Name",
|
|
2240
|
+
value: "discountName"
|
|
2241
|
+
}
|
|
2145
2242
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2243
|
+
]
|
|
2244
|
+
}
|
|
2148
2245
|
}
|
|
2149
|
-
|
|
2246
|
+
]
|
|
2150
2247
|
}
|
|
2151
2248
|
},
|
|
2152
2249
|
{
|
|
@@ -2391,6 +2488,7 @@ const searchQuery = graphql(`
|
|
|
2391
2488
|
description
|
|
2392
2489
|
}
|
|
2393
2490
|
additional_voffice_data {
|
|
2491
|
+
foundExactMatch
|
|
2394
2492
|
alternatives {
|
|
2395
2493
|
fromdate
|
|
2396
2494
|
tilldate
|
|
@@ -2404,6 +2502,19 @@ const searchQuery = graphql(`
|
|
|
2404
2502
|
discountName
|
|
2405
2503
|
}
|
|
2406
2504
|
}
|
|
2505
|
+
matchingPeriods {
|
|
2506
|
+
fromdate
|
|
2507
|
+
tilldate
|
|
2508
|
+
calc {
|
|
2509
|
+
total
|
|
2510
|
+
rent
|
|
2511
|
+
summary
|
|
2512
|
+
oTotal
|
|
2513
|
+
oRent
|
|
2514
|
+
oSummary
|
|
2515
|
+
discountName
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2407
2518
|
calc {
|
|
2408
2519
|
total
|
|
2409
2520
|
rent
|
|
@@ -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.0/CHANGELOG.md`: release notes for 2.20.0
|
|
8
|
+
- `versions/2.19.0/CHANGELOG.md`: release notes for 2.19.0
|
|
7
9
|
- `versions/2.18.2/CHANGELOG.md`: release notes for 2.18.2
|
|
8
10
|
- `versions/2.18.1/CHANGELOG.md`: release notes for 2.18.1
|
|
9
11
|
- `versions/2.18.0/CHANGELOG.md`: release notes for 2.18.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.0/MIGRATION.md`: Migration: 2.19.0 to 2.20.0
|
|
8
|
+
- `versions/2.19.0/MIGRATION.md`: Migration: 2.18.2 to 2.19.0
|
|
7
9
|
- `versions/2.18.2/MIGRATION.md`: Migration: 2.18.1 to 2.18.2
|
|
8
10
|
- `versions/2.18.1/MIGRATION.md`: Migration: 2.18.0 to 2.18.1
|
|
9
11
|
- `versions/2.18.0/MIGRATION.md`: Migration: 2.17.1 to 2.18.0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog: 2.19.0
|
|
2
|
+
|
|
3
|
+
Moves the website SDK and its core to the Effect 4 release candidate. The
|
|
4
|
+
public API is unchanged. Sites that import `effect` directly must move to the
|
|
5
|
+
release candidate as well.
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
|
|
9
|
+
- `@v-office/sdk-core` is pinned to `1.21.0`, which runs on `effect@4.0.0-rc.115`
|
|
10
|
+
(was `4.0.0-beta.85`). See the core's 1.21.0 notes for the details.
|
|
11
|
+
- `effect` is `4.0.0-rc.115` for the website SDK as well.
|
|
12
|
+
- The `website-sdk` command line uses the release candidate's PascalCase flag
|
|
13
|
+
constructors internally. Every flag keeps its name, type and help text.
|
|
14
|
+
|
|
15
|
+
## Unchanged
|
|
16
|
+
|
|
17
|
+
- Every exported symbol of 2.18.2; the declaration file exposes the same names.
|
|
18
|
+
- The behavior of every capability, the CLI subcommands and their output.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Migration: 2.18.2 to 2.19.0
|
|
2
|
+
|
|
3
|
+
No code changes in calls to the SDK. Sites that import `effect` themselves
|
|
4
|
+
must move to the same release candidate, because `Effect` values from this
|
|
5
|
+
SDK do not typecheck against `Effect` types from the beta.
|
|
6
|
+
|
|
7
|
+
## 1. Upgrade
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
pnpm add @v-office/website-sdk@2.19.0 effect@4.0.0-rc.115
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Skip the `effect` part if your site does not depend on `effect` directly.
|
|
14
|
+
|
|
15
|
+
## 2. Follow the release candidate renames in your own Effect code
|
|
16
|
+
|
|
17
|
+
Only needed where the site uses these APIs itself; the SDK's own exports are
|
|
18
|
+
unchanged:
|
|
19
|
+
|
|
20
|
+
- `Schema.TaggedErrorClass` → `Schema.TaggedError`, `Schema.ErrorClass` → `Schema.Error`
|
|
21
|
+
- `SchemaTransformation.transformOrFail` → `SchemaTransformation.transformEffect`
|
|
22
|
+
- `Schedule.both` → `Schedule.max([...])`, `Schedule.either` → `Schedule.min([...])`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog: 2.20.0
|
|
2
|
+
|
|
3
|
+
Fixes a case in legacy-v9 search where a rental that exactly matched the
|
|
4
|
+
guest's search dates could be returned without its price.
|
|
5
|
+
|
|
6
|
+
## Fixed
|
|
7
|
+
|
|
8
|
+
- A search result that exactly matches the requested dates now reliably shows
|
|
9
|
+
its formatted price. Previously, whether the price appeared depended on an
|
|
10
|
+
internal detail of the vOffice response that did not always align with an
|
|
11
|
+
exact match, so some exact matches were shown with no price at all.
|
|
12
|
+
- A rental is no longer shown as an "alternative dates" result when it was in
|
|
13
|
+
fact an exact match for the requested dates.
|
|
14
|
+
|
|
15
|
+
## Unchanged
|
|
16
|
+
|
|
17
|
+
- The public `getSearch` input and output types.
|
|
18
|
+
- How alternative date periods are resolved and rendered when a rental does
|
|
19
|
+
not exactly match the requested dates.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration: 2.19.0 to 2.20.0
|
|
2
|
+
|
|
3
|
+
No changes required. The `getSearch` signature and output type are unchanged.
|
|
4
|
+
|
|
5
|
+
Complete search snapshots can change: a query that previously rendered as an
|
|
6
|
+
alternative-period result (because `alternatives` was non-null) now renders
|
|
7
|
+
as an exact match with its formatted price when the Hub reports
|
|
8
|
+
`foundExactMatch: true`. Render the returned item as-is; no client-side
|
|
9
|
+
branching is required.
|
|
10
|
+
|
|
11
|
+
## 1. Upgrade
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
pnpm add @v-office/website-sdk@2.20.0
|
|
15
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0",
|
|
4
4
|
"description": "Website-facing SDK facade backed by @v-office/sdk-core",
|
|
5
5
|
"bin": {
|
|
6
6
|
"website-sdk": "./dist/cli.mjs"
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
45
|
-
"@v-office/sdk-core": "1.
|
|
46
|
-
"effect": "4.0.0-
|
|
45
|
+
"@v-office/sdk-core": "1.21.0",
|
|
46
|
+
"effect": "4.0.0-rc.115",
|
|
47
47
|
"graphql": "17.0.2",
|
|
48
48
|
"yaml": "^2.9.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@effect/tsgo": "0.
|
|
51
|
+
"@effect/tsgo": "0.45.0",
|
|
52
52
|
"@graphql-codegen/cli": "7.4.1",
|
|
53
53
|
"@graphql-codegen/client-preset": "6.2.0",
|
|
54
54
|
"@types/node": "26.5.1",
|
|
@@ -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:properties && pnpm run test:v9:rentals && pnpm run test:v9:availability && pnpm run build && node --test test/*.test.mjs",
|
|
80
|
+
"test": "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",
|
|
81
81
|
"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",
|
|
82
82
|
"test:v9:rentals": "node --test src/legacy-v9/static/associate-rentals-with-facilities-by-object-groups.test.ts",
|
|
83
83
|
"test:v9:availability": "node --test src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts",
|
|
84
|
+
"test:v9:search": "node --test src/legacy-v9/parser/search/resolve-exact-match.test.ts",
|
|
84
85
|
"playground:custom-attributes": "pnpm run build && node --env-file=.env playground/custom-attributes.ts"
|
|
85
86
|
}
|
|
86
87
|
}
|