@v-office/website-sdk 2.5.0 → 2.5.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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Pt as defineWebsiteSDKOptions, t as createWebsiteSDK } from "./client-
|
|
2
|
+
import { Pt as defineWebsiteSDKOptions, t as createWebsiteSDK } from "./client-C5ojrNQA.mjs";
|
|
3
3
|
import { SearchSearchSortSchema } from "@v-office/sdk-core";
|
|
4
4
|
import { 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.5.
|
|
19
|
+
var version = "2.5.1";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/cli/output.ts
|
|
22
22
|
const toJson = (value) => Effect.try({
|
|
@@ -973,6 +973,19 @@ const toOpenApiErrorRaw = (raw) => {
|
|
|
973
973
|
};
|
|
974
974
|
};
|
|
975
975
|
//#endregion
|
|
976
|
+
//#region src/legacy-v9/openapi/trace-propagation.ts
|
|
977
|
+
/**
|
|
978
|
+
* Effect's `HttpClient` attaches `traceparent` and `b3` headers to every outgoing
|
|
979
|
+
* request. Those headers are not CORS-safelisted, so from a browser they turn
|
|
980
|
+
* otherwise-simple v9 requests into preflighted ones - and the v9 gateway answers
|
|
981
|
+
* `OPTIONS` without any `Access-Control-Allow-*` headers, which fails the request.
|
|
982
|
+
*
|
|
983
|
+
* Suppressing propagation only drops the trace link into the v9 backend; client
|
|
984
|
+
* spans are still created, and requests to our own services keep propagating.
|
|
985
|
+
* Remove this once the v9 gateway handles preflights.
|
|
986
|
+
*/
|
|
987
|
+
const withoutTracePropagation = HttpClient.transformResponse(Effect.provideService(HttpClient.TracerPropagationEnabled, false));
|
|
988
|
+
//#endregion
|
|
976
989
|
//#region src/legacy-v9/openapi/v1-client.ts
|
|
977
990
|
const V1OpenApiClientErrorBase = Data.TaggedError("V1OpenApiClientError");
|
|
978
991
|
var V1OpenApiClientError = class extends V1OpenApiClientErrorBase {};
|
|
@@ -1030,7 +1043,7 @@ const readResponseBody$1 = (operationId, response, contentType) => {
|
|
|
1030
1043
|
};
|
|
1031
1044
|
var V1OpenApiClient = class extends Context.Service()("@v-office/website-sdk/legacy-v9/V1OpenApiClient") {};
|
|
1032
1045
|
const makeV1OpenApiClientLive = (options) => Layer.effect(V1OpenApiClient, Effect.gen(function* () {
|
|
1033
|
-
const client = yield* HttpClient.HttpClient;
|
|
1046
|
+
const client = withoutTracePropagation(yield* HttpClient.HttpClient);
|
|
1034
1047
|
return V1OpenApiClient.of({ execute: (operationId, request) => Effect.gen(function* () {
|
|
1035
1048
|
const runtimeRequest = request;
|
|
1036
1049
|
const operation = V1_OPERATIONS[operationId];
|
|
@@ -3191,7 +3204,7 @@ const readResponseBody = (operationId, response, contentType) => {
|
|
|
3191
3204
|
};
|
|
3192
3205
|
var V0OpenApiClient = class extends Context.Service()("@v-office/website-sdk/legacy-v9/V0OpenApiClient") {};
|
|
3193
3206
|
const makeV0OpenApiClientLive = (options) => Layer.effect(V0OpenApiClient, Effect.gen(function* () {
|
|
3194
|
-
const client = yield* HttpClient.HttpClient;
|
|
3207
|
+
const client = withoutTracePropagation(yield* HttpClient.HttpClient);
|
|
3195
3208
|
return V0OpenApiClient.of({ execute: (operationId, request) => Effect.gen(function* () {
|
|
3196
3209
|
const runtimeRequest = request;
|
|
3197
3210
|
const operation = V0_OPERATIONS[operationId];
|
|
@@ -4673,7 +4686,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
|
|
|
4673
4686
|
return page;
|
|
4674
4687
|
});
|
|
4675
4688
|
const loadV9SearchRuntime = Effect.tryPromise({
|
|
4676
|
-
try: () => import("./search-
|
|
4689
|
+
try: () => import("./search-9yzAqHCg.mjs"),
|
|
4677
4690
|
catch: (cause) => new CoreSDKError({
|
|
4678
4691
|
source: "v10",
|
|
4679
4692
|
operation: "v9.search.runtime",
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SetupResponseSchema, A as ErgoPolicyNumberRequestSchema, At as selectInsurancePaymentEffect, B as QuotePricesResponseSchema, C as ErgoAddressSchema, Ct as getStartDateSelectedAvailabilityEffect, D as ErgoCreatePreContractRequestSchema, Dt as searchEffect, E as ErgoCommonFieldsSchema, Et as removeAdditionalServiceEffect, F as OnOfficeUnitSchema, G as RegionListResponseSchema, H as QuoteServiceSchema, I as PaymentScheduleItemSchema, J as ServiceBeonDataSchema, K as RoomImageSchema, L as PaymentScheduleSchema, M as ErgoTripAndCustomerRequestSchema, Mt as submitPaymentOption, N as FacilityListResponseSchema, Nt as submitPaymentOptionEffect, O as ErgoPersonSchema, Ot as selectCancellationPolicyEffect, P as OnOfficeUnitCollectionResponseSchema, Pt as defineWebsiteSDKOptions, Q as SetupDataSchema, R as QuoteLineSchema, S as DocumentTypeSchema, St as getRentalsEffect, T as ErgoBookRequestSchema, Tt as quoteEffect, U as RawObjectResponseSchema, V as QuoteSchema, W as RawVofficeObjectSchema, X as ServiceLimitSchema, Y as ServiceImageSchema, Z as ServiceListResponseSchema, _ as DocumentResourceResponseSchema, _t as bookInsuranceEffect, a as makeV0OpenApiClientFetchLive, at as UnitIdsResponseSchema, b as DocumentStatusUpdateRequestSchema, bt as getFiltersEffect, c as V1OpenApiClientError, ct as UnitOfferSchema, d as ApiEnvelopeBaseSchema, dt as V1_BASE_URL, et as TileCollectionResponseSchema, f as CalendarDaySchema, ft as V1_OPERATIONS, g as DocumentCollectionResponseSchema, gt as bookEffect, h as CustomerUnitSummarySchema, ht as addAdditionalServiceEffect, i as V0OpenApiClientError, it as TravelInsuranceBookingStoreRequestSchema, j as ErgoReadPreContractRequestSchema, jt as submitContactEffect, k as ErgoPlanSearchRequestSchema, kt as selectInsuranceEffect, l as makeV1OpenApiClientFetchLive, lt as UnitResponseSchema, m as CurrentMemberResponseSchema, mt as decodeV1OperationResponse, nt as TileTagSchema, o as makeV0OpenApiClientLive, ot as UnitListItemSchema, p as CalendarResponseSchema, pt as VideoResponseSchema, q as SearchPropertiesResponseSchema, r as V0OpenApiClient, rt as TravelInsuranceBookingSchema, s as V1OpenApiClient, st as UnitListResponseSchema, t as createWebsiteSDK, tt as TileSchema, u as makeV1OpenApiClientLive, ut as UnitServicePriceSchema, v as DocumentResourceSchema, vt as clearAdditionalServicesEffect, w as ErgoBankSchema, wt as getTermsAndPrivacyPolicyEffect, x as DocumentSummarySchema, xt as getInitialAvailabilityEffect, y as DocumentStatusSchema, yt as createInsurancePreContractEffect, z as QuotePricesPayloadSchema } from "./client-
|
|
1
|
+
import { $ as SetupResponseSchema, A as ErgoPolicyNumberRequestSchema, At as selectInsurancePaymentEffect, B as QuotePricesResponseSchema, C as ErgoAddressSchema, Ct as getStartDateSelectedAvailabilityEffect, D as ErgoCreatePreContractRequestSchema, Dt as searchEffect, E as ErgoCommonFieldsSchema, Et as removeAdditionalServiceEffect, F as OnOfficeUnitSchema, G as RegionListResponseSchema, H as QuoteServiceSchema, I as PaymentScheduleItemSchema, J as ServiceBeonDataSchema, K as RoomImageSchema, L as PaymentScheduleSchema, M as ErgoTripAndCustomerRequestSchema, Mt as submitPaymentOption, N as FacilityListResponseSchema, Nt as submitPaymentOptionEffect, O as ErgoPersonSchema, Ot as selectCancellationPolicyEffect, P as OnOfficeUnitCollectionResponseSchema, Pt as defineWebsiteSDKOptions, Q as SetupDataSchema, R as QuoteLineSchema, S as DocumentTypeSchema, St as getRentalsEffect, T as ErgoBookRequestSchema, Tt as quoteEffect, U as RawObjectResponseSchema, V as QuoteSchema, W as RawVofficeObjectSchema, X as ServiceLimitSchema, Y as ServiceImageSchema, Z as ServiceListResponseSchema, _ as DocumentResourceResponseSchema, _t as bookInsuranceEffect, a as makeV0OpenApiClientFetchLive, at as UnitIdsResponseSchema, b as DocumentStatusUpdateRequestSchema, bt as getFiltersEffect, c as V1OpenApiClientError, ct as UnitOfferSchema, d as ApiEnvelopeBaseSchema, dt as V1_BASE_URL, et as TileCollectionResponseSchema, f as CalendarDaySchema, ft as V1_OPERATIONS, g as DocumentCollectionResponseSchema, gt as bookEffect, h as CustomerUnitSummarySchema, ht as addAdditionalServiceEffect, i as V0OpenApiClientError, it as TravelInsuranceBookingStoreRequestSchema, j as ErgoReadPreContractRequestSchema, jt as submitContactEffect, k as ErgoPlanSearchRequestSchema, kt as selectInsuranceEffect, l as makeV1OpenApiClientFetchLive, lt as UnitResponseSchema, m as CurrentMemberResponseSchema, mt as decodeV1OperationResponse, nt as TileTagSchema, o as makeV0OpenApiClientLive, ot as UnitListItemSchema, p as CalendarResponseSchema, pt as VideoResponseSchema, q as SearchPropertiesResponseSchema, r as V0OpenApiClient, rt as TravelInsuranceBookingSchema, s as V1OpenApiClient, st as UnitListResponseSchema, t as createWebsiteSDK, tt as TileSchema, u as makeV1OpenApiClientLive, ut as UnitServicePriceSchema, v as DocumentResourceSchema, vt as clearAdditionalServicesEffect, w as ErgoBankSchema, wt as getTermsAndPrivacyPolicyEffect, x as DocumentSummarySchema, xt as getInitialAvailabilityEffect, y as DocumentStatusSchema, yt as createInsurancePreContractEffect, z as QuotePricesPayloadSchema } from "./client-C5ojrNQA.mjs";
|
|
2
2
|
import { AdditionalServiceLimitExceeded, CoreSDKError, CoreSDKError as CMSError, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, UnknownAdditionalService, validateContactSubmitInput } from "@v-office/sdk-core";
|
|
3
3
|
//#region codegen/v9/heuristic-generation/public-api.ts
|
|
4
4
|
const customDataAttribute = (name) => name;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as stable_filters_default } from "./client-
|
|
1
|
+
import { n as stable_filters_default } from "./client-C5ojrNQA.mjs";
|
|
2
2
|
import { a as searchQuery, c as VofficeUnitDataFieldSchemas, m as parseVofficeUnitData, n as toImages, r as toAddress, t as toRentalHighlights } from "./to-rental-highlights-CxWlq76f.mjs";
|
|
3
3
|
import { CoreSDKError, STABLE_SEARCH_INPUTS, collectQueryParameters, daysBetweenLocalDates, expandCustomAttributeFilterCompositions, parseChildrenAges, parseOccupancyCount, parseQueryParameters, toCustomAttributeFilterLabel, toFormattedSearchPrice, toIsoDateFromPeriodQueryDate, toQueryString, toStableSearchInputBackendQueryKeys, toStableSearchInputParameterValues, toStableSearchInputQueryKeys, toUnusedFilterKeys } from "@v-office/sdk-core";
|
|
4
4
|
import { Effect } from "effect";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-sdk",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Website-facing SDK facade backed by @v-office/sdk-core",
|
|
5
5
|
"bin": {
|
|
6
6
|
"website-sdk": "./dist/cli.mjs"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
44
|
-
"@v-office/sdk-core": "^1.6.
|
|
44
|
+
"@v-office/sdk-core": "^1.6.1",
|
|
45
45
|
"effect": "4.0.0-beta.85",
|
|
46
46
|
"graphql": "16.14.2",
|
|
47
47
|
"yaml": "^2.9.0"
|