@v-office/website-sdk 2.32.0 → 2.33.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $t as V9_HUB_FACILITY_SEARCH_FILTER_KEY, Jt as defineWebsiteSDKOptions, Qt as V9_HUB_FACILITY_SCOPE_FILTER_KEY, Xt as defineV9PropertyHighlightSourcesFromUnknown, _ as rental_attributes_default$1, an as V9_HUB_RENTAL_IDS_FILTER_KEY, cn as stable_filters_default, en as V9_HUB_OBJECT_GROUP_FILTER_KEY, f as makeV9GraphQLClient, h as makeV0OpenApiClientFetchLive, i as toV9SdkOwnedHubFilterKeys, in as V9_HUB_REGION_FILTER_KEY, n as checkV9HubFilters, nn as V9_HUB_OFFERS_FILTER_KEY, on as V9_HUB_UNIT_TYPE_FILTER_KEY, p as V0OpenApiClient, r as toV9RequiredHubFilterKeys, rn as V9_HUB_OFFER_FILTER_KEY, sn as V9_SDK_OWNED_HUB_FILTER_KEYS, t as createWebsiteSDK, tn as V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY, v as rental_attributes_default } from "./client-mC56Qyoy.mjs";
2
+ import { $t as V9_HUB_FACILITY_SCOPE_FILTER_KEY, Yt as defineWebsiteSDKOptions, Zt as defineV9PropertyHighlightSourcesFromUnknown, _ as rental_attributes_default$1, an as V9_HUB_REGION_FILTER_KEY, cn as V9_SDK_OWNED_HUB_FILTER_KEYS, en as V9_HUB_FACILITY_SEARCH_FILTER_KEY, f as makeV9GraphQLClient, h as makeV0OpenApiClientFetchLive, i as toV9SdkOwnedHubFilterKeys, in as V9_HUB_OFFER_FILTER_KEY, ln as stable_filters_default, n as checkV9HubFilters, nn as V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY, on as V9_HUB_RENTAL_IDS_FILTER_KEY, p as V0OpenApiClient, r as toV9RequiredHubFilterKeys, rn as V9_HUB_OFFERS_FILTER_KEY, sn as V9_HUB_UNIT_TYPE_FILTER_KEY, t as createWebsiteSDK, tn as V9_HUB_OBJECT_GROUP_FILTER_KEY, v as rental_attributes_default } from "./client-BSyJzzk0.mjs";
3
3
  import { a as hubRentalDataQuery, g as parseJsonData, i as hubFiltersQuery, m as VofficeUnitDataPropertyMetadata, u as rentalsAllWithoutFeedbacksQuery, y as parseVofficeRatingData } from "./operations-CUWcmNGK.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 = "2.32.0";
20
+ var version = "2.33.0";
21
21
  //#endregion
22
22
  //#region src/cli/output.ts
23
23
  const toJson = (value) => Effect.try({
@@ -419,6 +419,16 @@ const staticCommands = [
419
419
  command: "website-sdk --backend v9 rentals-by-ids --locale en-US --rental-ids 12,34",
420
420
  description: "Fetch two v9 rentals in English."
421
421
  }])),
422
+ Command.make("videos", {
423
+ placement: Flag.String("placement").pipe(Flag.optional, Flag.withDescription("Optional placement, for example \"frontpage\", \"object\" or a slug.")),
424
+ rentalId: Flag.String("rental-id").pipe(Flag.optional, Flag.withDescription("Optional vOffice rental ID to return only that rental's videos."))
425
+ }, ({ placement, rentalId }) => websiteSdkCommand.pipe(Effect.flatMap((root) => withSDK(root, (sdk) => sdk.backend === "v9" ? sdk.static.videos.getVideos({
426
+ ...Option.isSome(placement) ? { placement: placement.value } : {},
427
+ ...Option.isSome(rentalId) ? { rentalId: rentalId.value } : {}
428
+ }) : Promise.reject(/* @__PURE__ */ new Error("videos requires --backend v9."))).pipe(Effect.flatMap((result) => printOutput(root, result)))))).pipe(Command.withDescription("Fetch the v9 videos."), Command.withExamples([{
429
+ command: "website-sdk --backend v9 videos --placement object --rental-id 12",
430
+ description: "Fetch the object videos linked to one v9 rental."
431
+ }])),
422
432
  Command.make("search", {
423
433
  locale: localeFlag,
424
434
  query: Flag.String("query").pipe(Flag.withDescription("Search query string, for example \"city=munich&adults=2\".")),
@@ -1143,6 +1143,15 @@ const UnitServicePriceSchema = Schema.Struct({
1143
1143
  till_date: Schema.optionalKey(Schema.NullOr(Schema.String)),
1144
1144
  type: Schema.optionalKey(Schema.NullOr(Schema.String))
1145
1145
  });
1146
+ const VideoListResponseSchema = Schema.Struct({ data: Schema.mutable(Schema.Array(Schema.Struct({
1147
+ duration: Schema.Number,
1148
+ id: Schema.Number,
1149
+ name: Schema.String,
1150
+ thumbnail: Schema.NullOr(Schema.String),
1151
+ type: Schema.String,
1152
+ units: Schema.mutable(Schema.Array(Schema.Struct({ voffice_id: Schema.Number }))),
1153
+ url: Schema.String
1154
+ }))) });
1146
1155
  const VideoResponseSchema = Schema.Struct({ data: Schema.Struct({
1147
1156
  thumbnail: Schema.NullOr(Schema.String),
1148
1157
  url: Schema.String
@@ -1321,6 +1330,15 @@ const V1_OPERATIONS = {
1321
1330
  responseContentType: "application/json",
1322
1331
  responseSchema: Schema.suspend(() => VideoResponseSchema)
1323
1332
  },
1333
+ getVideos: {
1334
+ method: "GET",
1335
+ path: "/Videos",
1336
+ pathParameters: [],
1337
+ queryParameters: ["type"],
1338
+ responseStatus: "200",
1339
+ responseContentType: "application/json",
1340
+ responseSchema: Schema.suspend(() => VideoListResponseSchema)
1341
+ },
1324
1342
  listFacilities: {
1325
1343
  method: "GET",
1326
1344
  path: "/Facilities",
@@ -6071,7 +6089,7 @@ const parseV9SearchCursor = (cursor) => Effect.gen(function* () {
6071
6089
  return page;
6072
6090
  });
6073
6091
  const loadV9SearchRuntime = Effect.tryPromise({
6074
- try: () => import("./search-BQgxTBHd.mjs"),
6092
+ try: () => import("./search-Dv5e8hNc.mjs"),
6075
6093
  catch: (cause) => new CoreSDKError({
6076
6094
  source: "v9",
6077
6095
  operation: "v9.search.runtime",
@@ -6820,7 +6838,7 @@ const orderRentalsById = ({ rentalIds, rentals, missing }) => {
6820
6838
  });
6821
6839
  };
6822
6840
  const loadV9RentalsRuntime = Effect.tryPromise({
6823
- try: () => import("./rentals-Ov8pd9qV.mjs"),
6841
+ try: () => import("./rentals-Be1Zs2DQ.mjs"),
6824
6842
  catch: (cause) => new CoreSDKError({
6825
6843
  source: "v9",
6826
6844
  operation: "v9.rentals.runtime",
@@ -6981,6 +6999,40 @@ const makeV9RentalsApi = ({ config, options }) => {
6981
6999
  };
6982
7000
  };
6983
7001
  //#endregion
7002
+ //#region src/legacy-v9/parser/videos/to-videos.ts
7003
+ const toVideos = (items) => items.toSorted((a, b) => a.id - b.id).map((item) => ({
7004
+ id: String(item.id),
7005
+ placement: item.type,
7006
+ rentalIds: item.units.map((unit) => String(unit.voffice_id)),
7007
+ hlsUrl: item.url,
7008
+ posterUrl: item.thumbnail,
7009
+ durationSeconds: item.duration,
7010
+ fileName: item.name
7011
+ }));
7012
+ const filterVideos = ({ videos, input = {} }) => videos.filter((video) => (input.placement === void 0 || video.placement === input.placement) && (input.rentalId === void 0 || video.rentalIds.includes(input.rentalId)));
7013
+ //#endregion
7014
+ //#region src/legacy-v9/static/videos.ts
7015
+ const makeV9VideosApi = ({ config }) => {
7016
+ const openApiClientLive = makeV1OpenApiClientFetchLive({
7017
+ apiKey: config.apiKey,
7018
+ ...config.v1ApiBaseUrl === void 0 ? {} : { baseUrl: config.v1ApiBaseUrl }
7019
+ });
7020
+ const loadVideos = Effect.gen(function* () {
7021
+ const result = yield* (yield* V1OpenApiClient).execute("getVideos", {});
7022
+ return toVideos(result.data.data);
7023
+ }).pipe(Effect.provide(openApiClientLive), Effect.mapError((cause) => new CoreSDKError({
7024
+ source: "v9",
7025
+ operation: "v9.videos.getVideos",
7026
+ message: "Failed to load v9 videos from the v1 OpenAPI client.",
7027
+ cause
7028
+ })));
7029
+ const [loadVideosOnce, invalidateVideos] = Effect.runSync(Effect.cachedInvalidateWithTTL(loadVideos, Duration.infinity));
7030
+ return { getVideos: (input) => Effect.runPromise(loadVideosOnce.pipe(Effect.tapError(() => invalidateVideos), Effect.map((videos) => filterVideos({
7031
+ videos,
7032
+ input
7033
+ })))) };
7034
+ };
7035
+ //#endregion
6984
7036
  //#region src/client.ts
6985
7037
  function createWebsiteSDK({ config, options }) {
6986
7038
  const normalizedOptions = normalizeWebsiteSDKOptions(options);
@@ -7017,13 +7069,15 @@ function createWebsiteSDK({ config, options }) {
7017
7069
  config,
7018
7070
  options: v9Options
7019
7071
  });
7072
+ const videos = makeV9VideosApi({ config });
7020
7073
  recordConstructedBackend("v9");
7021
7074
  recordConstructedSdk(config, options);
7022
7075
  return {
7023
7076
  backend: "v9",
7024
7077
  static: {
7025
7078
  rentals: { getRentals: rentals.getRentals },
7026
- filter: { getFilters: filter.getFilters }
7079
+ filter: { getFilters: filter.getFilters },
7080
+ videos: { getVideos: videos.getVideos }
7027
7081
  },
7028
7082
  live: {
7029
7083
  contact: { submit: contact.submit },
@@ -7102,4 +7156,4 @@ function createWebsiteSDK({ config, options }) {
7102
7156
  return sdk;
7103
7157
  }
7104
7158
  //#endregion
7105
- export { QuoteSchema as $, V9_HUB_FACILITY_SEARCH_FILTER_KEY as $t, DocumentResourceSchema as A, clearAdditionalServicesEffect as At, ErgoPersonSchema as B, removeAdditionalServiceEffect as Bt, ApiEnvelopeBaseSchema as C, V1_BASE_URL as Ct, CustomerUnitSummarySchema as D, addAdditionalServiceEffect as Dt, CurrentMemberResponseSchema as E, decodeV1OperationResponse as Et, ErgoAddressSchema as F, getRentalsEffect as Ft, FacilityListResponseSchema as G, submitContactEffect as Gt, ErgoPolicyNumberRequestSchema as H, selectCancellationPolicyEffect as Ht, ErgoBankSchema as I, getStartDateSelectedAvailabilityEffect as It, PaymentScheduleItemSchema as J, defineWebsiteSDKOptions as Jt, OnOfficeUnitCollectionResponseSchema as K, submitPaymentOption as Kt, ErgoBookRequestSchema as L, getTermsAndPrivacyPolicyEffect as Lt, DocumentStatusUpdateRequestSchema as M, getBankTransferDetailsEffect as Mt, DocumentSummarySchema as N, getFiltersEffect as Nt, DocumentCollectionResponseSchema as O, bookEffect as Ot, DocumentTypeSchema as P, getInitialAvailabilityEffect as Pt, QuotePricesResponseSchema$1 as Q, V9_HUB_FACILITY_SCOPE_FILTER_KEY as Qt, ErgoCommonFieldsSchema as R, mapSearchEffect as Rt, makeV1OpenApiClientLive as S, UnitServicePriceSchema as St, CalendarResponseSchema$1 as T, VideoResponseSchema as Tt, ErgoReadPreContractRequestSchema as U, selectInsuranceEffect as Ut, ErgoPlanSearchRequestSchema as V, searchEffect as Vt, ErgoTripAndCustomerRequestSchema as W, selectInsurancePaymentEffect as Wt, QuoteLineSchema$1 as X, defineV9PropertyHighlightSourcesFromUnknown as Xt, PaymentScheduleSchema$1 as Y, defineV9PropertyHighlightSources as Yt, QuotePricesPayloadSchema as Z, V9_FACILITY_ATTRIBUTE_KEYS as Zt, rental_attributes_default as _, UnitIdsResponseSchema as _t, makeV9CustomAttributeFilterCapabilities as a, V9_HUB_RENTAL_IDS_FILTER_KEY as an, SearchPropertiesResponseSchema as at, V1OpenApiClientError as b, UnitOfferSchema as bt, parseQueryParameters as c, stable_filters_default as cn, ServiceLimitSchema as ct, toVoucherCode as d, SetupResponseSchema as dt, V9_HUB_OBJECT_GROUP_FILTER_KEY as en, QuoteServiceSchema as et, makeV9GraphQLClient as f, TileCollectionResponseSchema as ft, makeV0OpenApiClientLive as g, TravelInsuranceBookingStoreRequestSchema as gt, makeV0OpenApiClientFetchLive as h, TravelInsuranceBookingSchema as ht, toV9SdkOwnedHubFilterKeys as i, V9_HUB_REGION_FILTER_KEY as in, RoomImageSchema as it, DocumentStatusSchema as j, createInsurancePreContractEffect as jt, DocumentResourceResponseSchema as k, bookInsuranceEffect as kt, toQueryString as l, ServiceListResponseSchema as lt, V0OpenApiClientError as m, TileTagSchema as mt, checkV9HubFilters as n, V9_HUB_OFFERS_FILTER_KEY as nn, RawVofficeObjectSchema as nt, toBasicQueryInputs as o, V9_HUB_UNIT_TYPE_FILTER_KEY as on, ServiceBeonDataSchema as ot, V0OpenApiClient as p, TileSchema as pt, OnOfficeUnitSchema as q, submitPaymentOptionEffect as qt, toV9RequiredHubFilterKeys as r, V9_HUB_OFFER_FILTER_KEY as rn, RegionListResponseSchema as rt, collectQueryParameters as s, V9_SDK_OWNED_HUB_FILTER_KEYS as sn, ServiceImageSchema as st, createWebsiteSDK as t, V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY as tn, RawObjectResponseSchema as tt, applyVofficeFilterDerivedBasicQueryInputs as u, SetupDataSchema as ut, rental_attributes_default$1 as v, UnitListItemSchema as vt, CalendarDaySchema as w, V1_OPERATIONS as wt, makeV1OpenApiClientFetchLive as x, UnitResponseSchema as xt, V1OpenApiClient as y, UnitListResponseSchema as yt, ErgoCreatePreContractRequestSchema as z, quoteEffect as zt };
7159
+ export { QuoteSchema as $, V9_HUB_FACILITY_SCOPE_FILTER_KEY as $t, DocumentResourceSchema as A, bookInsuranceEffect as At, ErgoPersonSchema as B, quoteEffect as Bt, ApiEnvelopeBaseSchema as C, V1_BASE_URL as Ct, CustomerUnitSummarySchema as D, decodeV1OperationResponse as Dt, CurrentMemberResponseSchema as E, VideoResponseSchema as Et, ErgoAddressSchema as F, getInitialAvailabilityEffect as Ft, FacilityListResponseSchema as G, selectInsurancePaymentEffect as Gt, ErgoPolicyNumberRequestSchema as H, searchEffect as Ht, ErgoBankSchema as I, getRentalsEffect as It, PaymentScheduleItemSchema as J, submitPaymentOptionEffect as Jt, OnOfficeUnitCollectionResponseSchema as K, submitContactEffect as Kt, ErgoBookRequestSchema as L, getStartDateSelectedAvailabilityEffect as Lt, DocumentStatusUpdateRequestSchema as M, createInsurancePreContractEffect as Mt, DocumentSummarySchema as N, getBankTransferDetailsEffect as Nt, DocumentCollectionResponseSchema as O, addAdditionalServiceEffect as Ot, DocumentTypeSchema as P, getFiltersEffect as Pt, QuotePricesResponseSchema$1 as Q, V9_FACILITY_ATTRIBUTE_KEYS as Qt, ErgoCommonFieldsSchema as R, getTermsAndPrivacyPolicyEffect as Rt, makeV1OpenApiClientLive as S, UnitServicePriceSchema as St, CalendarResponseSchema$1 as T, VideoListResponseSchema as Tt, ErgoReadPreContractRequestSchema as U, selectCancellationPolicyEffect as Ut, ErgoPlanSearchRequestSchema as V, removeAdditionalServiceEffect as Vt, ErgoTripAndCustomerRequestSchema as W, selectInsuranceEffect as Wt, QuoteLineSchema$1 as X, defineV9PropertyHighlightSources as Xt, PaymentScheduleSchema$1 as Y, defineWebsiteSDKOptions as Yt, QuotePricesPayloadSchema as Z, defineV9PropertyHighlightSourcesFromUnknown as Zt, rental_attributes_default as _, UnitIdsResponseSchema as _t, makeV9CustomAttributeFilterCapabilities as a, V9_HUB_REGION_FILTER_KEY as an, SearchPropertiesResponseSchema as at, V1OpenApiClientError as b, UnitOfferSchema as bt, parseQueryParameters as c, V9_SDK_OWNED_HUB_FILTER_KEYS as cn, ServiceLimitSchema as ct, toVoucherCode as d, SetupResponseSchema as dt, V9_HUB_FACILITY_SEARCH_FILTER_KEY as en, QuoteServiceSchema as et, makeV9GraphQLClient as f, TileCollectionResponseSchema as ft, makeV0OpenApiClientLive as g, TravelInsuranceBookingStoreRequestSchema as gt, makeV0OpenApiClientFetchLive as h, TravelInsuranceBookingSchema as ht, toV9SdkOwnedHubFilterKeys as i, V9_HUB_OFFER_FILTER_KEY as in, RoomImageSchema as it, DocumentStatusSchema as j, clearAdditionalServicesEffect as jt, DocumentResourceResponseSchema as k, bookEffect as kt, toQueryString as l, stable_filters_default as ln, ServiceListResponseSchema as lt, V0OpenApiClientError as m, TileTagSchema as mt, checkV9HubFilters as n, V9_HUB_OBJECT_GROUP_SCOPE_FILTER_KEY as nn, RawVofficeObjectSchema as nt, toBasicQueryInputs as o, V9_HUB_RENTAL_IDS_FILTER_KEY as on, ServiceBeonDataSchema as ot, V0OpenApiClient as p, TileSchema as pt, OnOfficeUnitSchema as q, submitPaymentOption as qt, toV9RequiredHubFilterKeys as r, V9_HUB_OFFERS_FILTER_KEY as rn, RegionListResponseSchema as rt, collectQueryParameters as s, V9_HUB_UNIT_TYPE_FILTER_KEY as sn, ServiceImageSchema as st, createWebsiteSDK as t, V9_HUB_OBJECT_GROUP_FILTER_KEY as tn, RawObjectResponseSchema as tt, applyVofficeFilterDerivedBasicQueryInputs as u, SetupDataSchema as ut, rental_attributes_default$1 as v, UnitListItemSchema as vt, CalendarDaySchema as w, V1_OPERATIONS as wt, makeV1OpenApiClientFetchLive as x, UnitResponseSchema as xt, V1OpenApiClient as y, UnitListResponseSchema as yt, ErgoCreatePreContractRequestSchema as z, mapSearchEffect as zt };
package/dist/index.d.mts CHANGED
@@ -135,6 +135,21 @@ type V9SearchSearchOutput = Omit<SearchSearchOutput$1, "items"> & {
135
135
  readonly items: readonly V9SearchSearchOutputItem[];
136
136
  };
137
137
  //#endregion
138
+ //#region src/legacy-v9/videos.d.ts
139
+ type V9Video = {
140
+ readonly id: string;
141
+ readonly placement: string;
142
+ readonly rentalIds: ReadonlyArray<string>;
143
+ readonly hlsUrl: string;
144
+ readonly posterUrl: string | null;
145
+ readonly durationSeconds: number;
146
+ readonly fileName: string;
147
+ };
148
+ type V9VideosGetVideosInput = {
149
+ readonly placement?: string;
150
+ readonly rentalId?: string;
151
+ };
152
+ //#endregion
138
153
  //#region src/legacy-v9/voucher-input.d.ts
139
154
  type V9VoucherValidityReason = "valid" | "not_yet_valid" | "expired" | "unknown" | "stay_too_short" | "outside_booking_window" | "rate_limited";
140
155
  type V9VoucherValidateInput = {
@@ -172,6 +187,11 @@ type WebsiteSDKV10Static = WebsiteSDKSharedStatic & {
172
187
  readonly getBankTransferDetails: () => Promise<ReadonlyArray<BookingBankTransferDetails$1>>;
173
188
  };
174
189
  };
190
+ type WebsiteSDKV9Static = WebsiteSDKSharedStatic & {
191
+ readonly videos: {
192
+ readonly getVideos: (input?: V9VideosGetVideosInput) => Promise<ReadonlyArray<V9Video>>;
193
+ };
194
+ };
175
195
  type WebsiteSDKSharedLive = {
176
196
  readonly contact: {
177
197
  readonly submit: (input: ContactSubmitInput$1) => Promise<ContactSubmitOutput$1>;
@@ -248,10 +268,10 @@ type WebsiteSDKBase<Static extends WebsiteSDKSharedStatic, Live> = {
248
268
  readonly live: Live;
249
269
  readonly dispose: () => Promise<void>;
250
270
  };
251
- type WebsiteSDKV9 = WebsiteSDKBase<WebsiteSDKSharedStatic, WebsiteSDKV9Live> & {
271
+ type WebsiteSDKV9 = WebsiteSDKBase<WebsiteSDKV9Static, WebsiteSDKV9Live> & {
252
272
  readonly backend: "v9";
253
273
  };
254
- type WebsiteSDKV9AllRentalsAtOnce = WebsiteSDKBase<WebsiteSDKSharedStatic, WebsiteSDKV9AllRentalsAtOnceLive> & {
274
+ type WebsiteSDKV9AllRentalsAtOnce = WebsiteSDKBase<WebsiteSDKV9Static, WebsiteSDKV9AllRentalsAtOnceLive> & {
255
275
  readonly backend: "v9";
256
276
  };
257
277
  type WebsiteSDKV10 = WebsiteSDKBase<WebsiteSDKV10Static, WebsiteSDKV10Live> & {
@@ -2992,6 +3012,23 @@ interface paths {
2992
3012
  patch?: never;
2993
3013
  trace?: never;
2994
3014
  };
3015
+ "/Videos": {
3016
+ parameters: {
3017
+ query?: never;
3018
+ header?: never;
3019
+ path?: never;
3020
+ cookie?: never;
3021
+ };
3022
+ /** List videos */
3023
+ get: operations["getVideos"];
3024
+ put?: never;
3025
+ post?: never;
3026
+ delete?: never;
3027
+ options?: never;
3028
+ head?: never;
3029
+ patch?: never;
3030
+ trace?: never;
3031
+ };
2995
3032
  "/Tiles": {
2996
3033
  parameters: {
2997
3034
  query?: never;
@@ -3514,6 +3551,21 @@ interface components {
3514
3551
  thumbnail: string | null;
3515
3552
  };
3516
3553
  };
3554
+ VideoListResponse: {
3555
+ data: {
3556
+ id: number;
3557
+ name: string;
3558
+ type: string;
3559
+ /** Format: uri */
3560
+ url: string;
3561
+ /** Format: uri */
3562
+ thumbnail: string | null;
3563
+ duration: number;
3564
+ units: {
3565
+ voffice_id: number;
3566
+ }[];
3567
+ }[];
3568
+ };
3517
3569
  /** @enum {string} */
3518
3570
  TileTag: "guest_portal_home" | "guest_portal_property" | "guest_portal_brands" | "owner_portal_home" | "owner_portal_property" | "owner_portal_brands";
3519
3571
  TileCollectionResponse: {
@@ -4238,6 +4290,30 @@ interface operations {
4238
4290
  404: components["responses"]["NotFound"];
4239
4291
  };
4240
4292
  };
4293
+ getVideos: {
4294
+ parameters: {
4295
+ query?: {
4296
+ /** @description Optional placement filter, for example `frontpage`, `object` or a free slug. */
4297
+ type?: string;
4298
+ };
4299
+ header?: never;
4300
+ path?: never;
4301
+ cookie?: never;
4302
+ };
4303
+ requestBody?: never;
4304
+ responses: {
4305
+ /** @description Videos */
4306
+ 200: {
4307
+ headers: {
4308
+ [name: string]: unknown;
4309
+ };
4310
+ content: {
4311
+ "application/json": components["schemas"]["VideoListResponse"];
4312
+ };
4313
+ };
4314
+ 401: components["responses"]["Unauthorized"];
4315
+ };
4316
+ };
4241
4317
  listTiles: {
4242
4318
  parameters: {
4243
4319
  query: {
@@ -5954,6 +6030,20 @@ export declare const UnitServicePriceSchema: Schema.Struct<{
5954
6030
  readonly type: Schema.optionalKey<Schema.NullOr<Schema.String>>;
5955
6031
  }>;
5956
6032
  export type UnitServicePrice = typeof UnitServicePriceSchema.Type;
6033
+ export declare const VideoListResponseSchema: Schema.Struct<{
6034
+ readonly data: Schema.mutable<Schema.$Array<Schema.Struct<{
6035
+ readonly duration: Schema.Number;
6036
+ readonly id: Schema.Number;
6037
+ readonly name: Schema.String;
6038
+ readonly thumbnail: Schema.NullOr<Schema.String>;
6039
+ readonly type: Schema.String;
6040
+ readonly units: Schema.mutable<Schema.$Array<Schema.Struct<{
6041
+ readonly voffice_id: Schema.Number;
6042
+ }>>>;
6043
+ readonly url: Schema.String;
6044
+ }>>>;
6045
+ }>;
6046
+ export type VideoListResponse = typeof VideoListResponseSchema.Type;
5957
6047
  export declare const VideoResponseSchema: Schema.Struct<{
5958
6048
  readonly data: Schema.Struct<{
5959
6049
  readonly thumbnail: Schema.NullOr<Schema.String>;
@@ -6537,6 +6627,27 @@ export declare const V1_OPERATIONS: {
6537
6627
  }>;
6538
6628
  }>>;
6539
6629
  };
6630
+ readonly getVideos: {
6631
+ readonly method: "GET";
6632
+ readonly path: "/Videos";
6633
+ readonly pathParameters: readonly [];
6634
+ readonly queryParameters: readonly ["type"];
6635
+ readonly responseStatus: "200";
6636
+ readonly responseContentType: "application/json";
6637
+ readonly responseSchema: Schema.suspend<Schema.Struct<{
6638
+ readonly data: Schema.mutable<Schema.$Array<Schema.Struct<{
6639
+ readonly duration: Schema.Number;
6640
+ readonly id: Schema.Number;
6641
+ readonly name: Schema.String;
6642
+ readonly thumbnail: Schema.NullOr<Schema.String>;
6643
+ readonly type: Schema.String;
6644
+ readonly units: Schema.mutable<Schema.$Array<Schema.Struct<{
6645
+ readonly voffice_id: Schema.Number;
6646
+ }>>>;
6647
+ readonly url: Schema.String;
6648
+ }>>>;
6649
+ }>>;
6650
+ };
6540
6651
  readonly listFacilities: {
6541
6652
  readonly method: "GET";
6542
6653
  readonly path: "/Facilities";
@@ -7667,4 +7778,4 @@ export type RentalRentalsOutput = RentalGetRentalsOutput$1[number];
7667
7778
  export type RentalSearchInput = SearchSearchInput$1;
7668
7779
  export type RentalSearchOutput = SearchSearchOutput$1;
7669
7780
  //#endregion
7670
- export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9EndDateOption, type V9InitialAvailabilityOutput, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9RentalsGetRentalsByIdsInput, type V9ReviewCriterion, type V9ReviewCriterionDataAttribute, type V9ReviewsOptions, type V9SearchAllRentalsAtOnceInput, type V9SearchPagesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type V9StartDateSelectedAvailabilityOutput, type V9VoucherValidateInput, type V9VoucherValidateOutput, type V9VoucherValidityReason, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
7781
+ export { AdditionalServiceLimitExceeded, type AvailabilityGetInitialAvailabilityInput, type AvailabilityGetInitialAvailabilityOutput, type AvailabilityGetStartDateSelectedAvailabilityInput, type AvailabilityGetStartDateSelectedAvailabilityOutput, type BackendKind, type BookingBankTransferDetails, type BookingBookInput, type BookingBookOutput, type BookingPayment, type BookingPaymentAlternative, type BookingPaymentOption, type BookingPaymentScheduleItem, type BookingPaymentScheduleKind, type BookingPaymentScheduleLine, CMSError, type ContactSubmitInput, type ContactSubmitOutput, type ContactSubmitValidationIssue, type ContactSubmitValidationIssueCode, CoreSDKError, type CustomAttributeCatalog, type CustomAttributeCatalogDefinitionInput, type CustomAttributeCatalogInput, CustomAttributeCatalogSchema, type CustomAttributeCategoryKey, type CustomAttributeFilterCategoryKey, type CustomAttributeFilterDefinition, type CustomAttributeFilterExpression, type CustomAttributeFilterLabel, type CustomAttributeFilterNumericBounds, type CustomAttributeFilterOption, type CustomAttributeOverridesInput, type CustomAttributeRegistry, type CustomAttributeRegistrySnapshot, type CustomAttributeSelection, type CustomDataAttribute, type DataAttribute, type DocumentsGetTermsAndPrivacyPolicyInput, type DocumentsGetTermsAndPrivacyPolicyOutput, type FilterGetFiltersInput, type FilterGetFiltersOutput, type GeoLocation, type GuestQuote, type GuestQuoteInput, type GuestQuoteInsurance, type GuestQuoteResult, GuestQuoteSchema, type GuestQuoteSelectionResult, type GuestQuoteVoucher, type ImageData, type InsuranceBookingOutput, type InsuranceCustomerInformationInput, type InsurancePaymentInformationInput, type InsurancePaymentOptionOutput, type InsurancePreContractOutput, InvalidAdditionalServiceQuantity, type KnownVofficeFacilityData, type KnownVofficeFacilityDataAttribute, type KnownVofficeFeedbackData, type KnownVofficeFeedbackDataAttribute, type KnownVofficeImageData, type KnownVofficeImageDataAttribute, type KnownVofficeOfferData, type KnownVofficeOfferDataAttribute, type KnownVofficePriceData, type KnownVofficePriceDataAttribute, type KnownVofficeRatingData, type KnownVofficeRatingDataAttribute, type KnownVofficeServiceData, type KnownVofficeServiceDataAttribute, type KnownVofficeTotalRatingData, type KnownVofficeTotalRatingDataAttribute, type KnownVofficeUnitData, type KnownVofficeUnitDataAttribute, type Locale, LocaleSchema, type ParsedJsonData, type ParsedVofficeFacilityData, type ParsedVofficeFeedbackData, type ParsedVofficeImageData, type ParsedVofficeOfferData, type ParsedVofficePriceData, type ParsedVofficeRatingData, type ParsedVofficeServiceData, type ParsedVofficeTotalRatingData, type ParsedVofficeUnitData, type QuoteQuoteInput, type QuoteQuoteOutput, type RentalGetRentalsInput, type RentalGetRentalsOutput, type RentalHighlightPrioritizationKey, type RentalPropertyHighlightPrioritizationKey, type ResolvedCustomAttribute, type ResolvedV9PropertyHighlightSource, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, type SearchAllRentalsAtOnceInput, type SearchMapSearchInput, SearchMapSearchInputSchema, type SearchMapSearchOutput, type SearchMapSearchOutputItem, SearchMapSearchOutputSchema, type SearchSearchFieldOrderBy, SearchSearchFieldOrderBySchema, type SearchSearchFieldSort, SearchSearchFieldSortSchema, type SearchSearchInput, SearchSearchInputSchema, type SearchSearchOutput, SearchSearchOutputSchema, type SearchSearchPriceSort, SearchSearchPriceSortSchema, type SearchSearchRandomSort, SearchSearchRandomSortSchema, type SearchSearchRatingSort, SearchSearchRatingSortSchema, type SearchSearchSort, SearchSearchSortSchema, type SearchSortDirection, SearchSortDirectionSchema, type SelectableInsuranceOptionOutput, type SelectedInsuranceInformationInput, type SubmittableBookingPaymentOption, type TranslationOverrides, UnknownAdditionalService, type V0OpenApiClientOptions, type V0OpenApiOperationId, type V0OpenApiOperationRequest, type V0OpenApiOperationResponse, type V1OpenApiClientOptions, type components as V1OpenApiComponents, type V1OpenApiOperationId, type V1OpenApiOperationRequest, type V1OpenApiOperationResponse, type operations as V1OpenApiOperations, type paths as V1OpenApiPaths, type V9EndDateOption, type V9InitialAvailabilityOutput, type V9OnlyCustomAttributeInput, type V9PropertyHighlightDataAttribute, type V9PropertyHighlightSourceInput, type V9PropertyHighlightSourceRegistry, type V9PropertyHighlightSourcesInput, type V9RentalsGetRentalsByIdsInput, type V9ReviewCriterion, type V9ReviewCriterionDataAttribute, type V9ReviewsOptions, type V9SearchAllRentalsAtOnceInput, type V9SearchPagesInput, type V9SearchSearchInput, type V9SearchSearchOutput, type V9SearchSearchOutputItem, type V9SearchSearchSort, type V9StartDateSelectedAvailabilityOutput, type V9Video, type V9VideosGetVideosInput, type V9VoucherValidateInput, type V9VoucherValidateOutput, type V9VoucherValidityReason, type VofficeFacilityDataAttribute, type VofficeFacilityDataAttributes, type VofficeFeedbackDataAttribute, type VofficeFeedbackDataAttributes, type VofficeImageDataAttribute, type VofficeImageDataAttributes, type VofficeOfferDataAttribute, type VofficeOfferDataAttributes, type VofficePriceDataAttribute, type VofficePriceDataAttributes, type VofficeRatingDataAttribute, type VofficeRatingDataAttributes, type VofficeServiceDataAttribute, type VofficeServiceDataAttributes, type VofficeTotalRatingDataAttribute, type VofficeTotalRatingDataAttributes, type VofficeUnitDataAttribute, type VofficeUnitDataAttributes, type WebsiteSDK, type WebsiteSDKAllRentalsAtOnce, type WebsiteSDKConfig, type WebsiteSDKOptions, type WebsiteSDKSharedLive, type WebsiteSDKSharedStatic, type WebsiteSDKV10, type WebsiteSDKV10AllRentalsAtOnce, type WebsiteSDKV10AllRentalsAtOnceLive, type WebsiteSDKV10Live, type WebsiteSDKV10Static, type WebsiteSDKV9, type WebsiteSDKV9AllRentalsAtOnce, type WebsiteSDKV9AllRentalsAtOnceLive, type WebsiteSDKV9Live, type WebsiteSDKV9Static, defineWebsiteSDKOptions as defineCMSSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, fetchCustomAttributeCatalog, parseCustomAttributeCatalog, validateContactSubmitInput };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as QuoteSchema, A as DocumentResourceSchema, At as clearAdditionalServicesEffect, B as ErgoPersonSchema, Bt as removeAdditionalServiceEffect, C as ApiEnvelopeBaseSchema, Ct as V1_BASE_URL, D as CustomerUnitSummarySchema, Dt as addAdditionalServiceEffect, E as CurrentMemberResponseSchema, Et as decodeV1OperationResponse, F as ErgoAddressSchema, Ft as getRentalsEffect, G as FacilityListResponseSchema, Gt as submitContactEffect, H as ErgoPolicyNumberRequestSchema, Ht as selectCancellationPolicyEffect, I as ErgoBankSchema, It as getStartDateSelectedAvailabilityEffect, J as PaymentScheduleItemSchema, Jt as defineWebsiteSDKOptions, K as OnOfficeUnitCollectionResponseSchema, Kt as submitPaymentOption, L as ErgoBookRequestSchema, Lt as getTermsAndPrivacyPolicyEffect, M as DocumentStatusUpdateRequestSchema, Mt as getBankTransferDetailsEffect, N as DocumentSummarySchema, Nt as getFiltersEffect, O as DocumentCollectionResponseSchema, Ot as bookEffect, P as DocumentTypeSchema, Pt as getInitialAvailabilityEffect, Q as QuotePricesResponseSchema, R as ErgoCommonFieldsSchema, Rt as mapSearchEffect, S as makeV1OpenApiClientLive, St as UnitServicePriceSchema, T as CalendarResponseSchema, Tt as VideoResponseSchema, U as ErgoReadPreContractRequestSchema, Ut as selectInsuranceEffect, V as ErgoPlanSearchRequestSchema, Vt as searchEffect, W as ErgoTripAndCustomerRequestSchema, Wt as selectInsurancePaymentEffect, X as QuoteLineSchema, Xt as defineV9PropertyHighlightSourcesFromUnknown, Y as PaymentScheduleSchema, Yt as defineV9PropertyHighlightSources, Z as QuotePricesPayloadSchema, _t as UnitIdsResponseSchema, at as SearchPropertiesResponseSchema, b as V1OpenApiClientError, bt as UnitOfferSchema, ct as ServiceLimitSchema, dt as SetupResponseSchema, et as QuoteServiceSchema, ft as TileCollectionResponseSchema, g as makeV0OpenApiClientLive, gt as TravelInsuranceBookingStoreRequestSchema, h as makeV0OpenApiClientFetchLive, ht as TravelInsuranceBookingSchema, it as RoomImageSchema, j as DocumentStatusSchema, jt as createInsurancePreContractEffect, k as DocumentResourceResponseSchema, kt as bookInsuranceEffect, lt as ServiceListResponseSchema, m as V0OpenApiClientError, mt as TileTagSchema, nt as RawVofficeObjectSchema, ot as ServiceBeonDataSchema, p as V0OpenApiClient, pt as TileSchema, q as OnOfficeUnitSchema, qt as submitPaymentOptionEffect, rt as RegionListResponseSchema, st as ServiceImageSchema, t as createWebsiteSDK, tt as RawObjectResponseSchema, ut as SetupDataSchema, vt as UnitListItemSchema, w as CalendarDaySchema, wt as V1_OPERATIONS, x as makeV1OpenApiClientFetchLive, xt as UnitResponseSchema, y as V1OpenApiClient, yt as UnitListResponseSchema, z as ErgoCreatePreContractRequestSchema, zt as quoteEffect } from "./client-mC56Qyoy.mjs";
1
+ import { $ as QuoteSchema, A as DocumentResourceSchema, At as bookInsuranceEffect, B as ErgoPersonSchema, Bt as quoteEffect, C as ApiEnvelopeBaseSchema, Ct as V1_BASE_URL, D as CustomerUnitSummarySchema, Dt as decodeV1OperationResponse, E as CurrentMemberResponseSchema, Et as VideoResponseSchema, F as ErgoAddressSchema, Ft as getInitialAvailabilityEffect, G as FacilityListResponseSchema, Gt as selectInsurancePaymentEffect, H as ErgoPolicyNumberRequestSchema, Ht as searchEffect, I as ErgoBankSchema, It as getRentalsEffect, J as PaymentScheduleItemSchema, Jt as submitPaymentOptionEffect, K as OnOfficeUnitCollectionResponseSchema, Kt as submitContactEffect, L as ErgoBookRequestSchema, Lt as getStartDateSelectedAvailabilityEffect, M as DocumentStatusUpdateRequestSchema, Mt as createInsurancePreContractEffect, N as DocumentSummarySchema, Nt as getBankTransferDetailsEffect, O as DocumentCollectionResponseSchema, Ot as addAdditionalServiceEffect, P as DocumentTypeSchema, Pt as getFiltersEffect, Q as QuotePricesResponseSchema, R as ErgoCommonFieldsSchema, Rt as getTermsAndPrivacyPolicyEffect, S as makeV1OpenApiClientLive, St as UnitServicePriceSchema, T as CalendarResponseSchema, Tt as VideoListResponseSchema, U as ErgoReadPreContractRequestSchema, Ut as selectCancellationPolicyEffect, V as ErgoPlanSearchRequestSchema, Vt as removeAdditionalServiceEffect, W as ErgoTripAndCustomerRequestSchema, Wt as selectInsuranceEffect, X as QuoteLineSchema, Xt as defineV9PropertyHighlightSources, Y as PaymentScheduleSchema, Yt as defineWebsiteSDKOptions, Z as QuotePricesPayloadSchema, Zt as defineV9PropertyHighlightSourcesFromUnknown, _t as UnitIdsResponseSchema, at as SearchPropertiesResponseSchema, b as V1OpenApiClientError, bt as UnitOfferSchema, ct as ServiceLimitSchema, dt as SetupResponseSchema, et as QuoteServiceSchema, ft as TileCollectionResponseSchema, g as makeV0OpenApiClientLive, gt as TravelInsuranceBookingStoreRequestSchema, h as makeV0OpenApiClientFetchLive, ht as TravelInsuranceBookingSchema, it as RoomImageSchema, j as DocumentStatusSchema, jt as clearAdditionalServicesEffect, k as DocumentResourceResponseSchema, kt as bookEffect, lt as ServiceListResponseSchema, m as V0OpenApiClientError, mt as TileTagSchema, nt as RawVofficeObjectSchema, ot as ServiceBeonDataSchema, p as V0OpenApiClient, pt as TileSchema, q as OnOfficeUnitSchema, qt as submitPaymentOption, rt as RegionListResponseSchema, st as ServiceImageSchema, t as createWebsiteSDK, tt as RawObjectResponseSchema, ut as SetupDataSchema, vt as UnitListItemSchema, w as CalendarDaySchema, wt as V1_OPERATIONS, x as makeV1OpenApiClientFetchLive, xt as UnitResponseSchema, y as V1OpenApiClient, yt as UnitListResponseSchema, z as ErgoCreatePreContractRequestSchema, zt as mapSearchEffect } from "./client-BSyJzzk0.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;
@@ -13,4 +13,4 @@ const defineVofficeOfferDataAttributes = defineDataAttributes();
13
13
  const defineVofficeRatingDataAttributes = defineDataAttributes();
14
14
  const defineVofficeTotalRatingDataAttributes = defineDataAttributes();
15
15
  //#endregion
16
- export { AdditionalServiceLimitExceeded, ApiEnvelopeBaseSchema, CMSError, CalendarDaySchema, CalendarResponseSchema, CoreSDKError, CurrentMemberResponseSchema, CustomAttributeCatalogSchema, CustomerUnitSummarySchema, DocumentCollectionResponseSchema, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatusSchema, DocumentStatusUpdateRequestSchema, DocumentSummarySchema, DocumentTypeSchema, ErgoAddressSchema, ErgoBankSchema, ErgoBookRequestSchema, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchPropertiesResponseSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, ServiceBeonDataSchema, ServiceImageSchema, ServiceLimitSchema, ServiceListResponseSchema, SetupDataSchema, SetupResponseSchema, TileCollectionResponseSchema, TileSchema, TileTagSchema, TravelInsuranceBookingSchema, TravelInsuranceBookingStoreRequestSchema, UnitIdsResponseSchema, UnitListItemSchema, UnitListResponseSchema, UnitOfferSchema, UnitResponseSchema, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, V1OpenApiClient, V1OpenApiClientError, V1_BASE_URL, V1_OPERATIONS, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, defineDataAttributes, defineV9PropertyHighlightSources, defineV9PropertyHighlightSourcesFromUnknown, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, fetchCustomAttributeCatalog, getBankTransferDetailsEffect, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, mapSearchEffect, parseCustomAttributeCatalog, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
16
+ export { AdditionalServiceLimitExceeded, ApiEnvelopeBaseSchema, CMSError, CalendarDaySchema, CalendarResponseSchema, CoreSDKError, CurrentMemberResponseSchema, CustomAttributeCatalogSchema, CustomerUnitSummarySchema, DocumentCollectionResponseSchema, DocumentResourceResponseSchema, DocumentResourceSchema, DocumentStatusSchema, DocumentStatusUpdateRequestSchema, DocumentSummarySchema, DocumentTypeSchema, ErgoAddressSchema, ErgoBankSchema, ErgoBookRequestSchema, ErgoCommonFieldsSchema, ErgoCreatePreContractRequestSchema, ErgoPersonSchema, ErgoPlanSearchRequestSchema, ErgoPolicyNumberRequestSchema, ErgoReadPreContractRequestSchema, ErgoTripAndCustomerRequestSchema, FacilityListResponseSchema, GuestQuoteSchema, InvalidAdditionalServiceQuantity, LocaleSchema, OnOfficeUnitCollectionResponseSchema, OnOfficeUnitSchema, PaymentScheduleItemSchema, PaymentScheduleSchema, QuoteLineSchema, QuotePricesPayloadSchema, QuotePricesResponseSchema, QuoteSchema, QuoteServiceSchema, RawObjectResponseSchema, RawVofficeObjectSchema, RegionListResponseSchema, RoomImageSchema, SEARCH_ALL_RENTALS_AT_ONCE_MAX_RESULTS, SearchMapSearchInputSchema, SearchMapSearchOutputSchema, SearchPropertiesResponseSchema, SearchSearchFieldOrderBySchema, SearchSearchFieldSortSchema, SearchSearchInputSchema, SearchSearchOutputSchema, SearchSearchPriceSortSchema, SearchSearchRandomSortSchema, SearchSearchRatingSortSchema, SearchSearchSortSchema, SearchSortDirectionSchema, ServiceBeonDataSchema, ServiceImageSchema, ServiceLimitSchema, ServiceListResponseSchema, SetupDataSchema, SetupResponseSchema, TileCollectionResponseSchema, TileSchema, TileTagSchema, TravelInsuranceBookingSchema, TravelInsuranceBookingStoreRequestSchema, UnitIdsResponseSchema, UnitListItemSchema, UnitListResponseSchema, UnitOfferSchema, UnitResponseSchema, UnitServicePriceSchema, UnknownAdditionalService, V0OpenApiClient, V0OpenApiClientError, V1OpenApiClient, V1OpenApiClientError, V1_BASE_URL, V1_OPERATIONS, VideoListResponseSchema, VideoResponseSchema, addAdditionalServiceEffect, bookEffect, bookInsuranceEffect, clearAdditionalServicesEffect, createInsurancePreContractEffect, createWebsiteSDK, customDataAttribute, decodeV1OperationResponse, defineWebsiteSDKOptions as defineCMSSDKOptions, defineWebsiteSDKOptions, defineCustomAttributes, defineCustomAttributesFromUnknown, defineDataAttributes, defineV9PropertyHighlightSources, defineV9PropertyHighlightSourcesFromUnknown, defineVofficeFacilityDataAttributes, defineVofficeFeedbackDataAttributes, defineVofficeImageDataAttributes, defineVofficeOfferDataAttributes, defineVofficePriceDataAttributes, defineVofficeRatingDataAttributes, defineVofficeServiceDataAttributes, defineVofficeTotalRatingDataAttributes, defineVofficeUnitDataAttributes, fetchCustomAttributeCatalog, getBankTransferDetailsEffect, getFiltersEffect, getInitialAvailabilityEffect, getRentalsEffect, getStartDateSelectedAvailabilityEffect, getTermsAndPrivacyPolicyEffect, makeV0OpenApiClientFetchLive, makeV0OpenApiClientLive, makeV1OpenApiClientFetchLive, makeV1OpenApiClientLive, mapSearchEffect, parseCustomAttributeCatalog, quoteEffect, removeAdditionalServiceEffect, searchEffect, selectCancellationPolicyEffect, selectInsuranceEffect, selectInsurancePaymentEffect, submitContactEffect, submitPaymentOption, submitPaymentOptionEffect, validateContactSubmitInput };
@@ -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/2.33.0/CHANGELOG.md`: release notes for 2.33.0
7
8
  - `versions/2.32.0/CHANGELOG.md`: release notes for 2.32.0
8
9
  - `versions/2.31.1/CHANGELOG.md`: release notes for 2.31.1
9
10
  - `versions/2.31.0/CHANGELOG.md`: release notes for 2.31.0
@@ -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/2.33.0/MIGRATION.md`: Migration: 2.32.0 to 2.33.0
7
8
  - `versions/2.32.0/MIGRATION.md`: Migration: 2.31.1 to 2.32.0
8
9
  - `versions/2.31.1/MIGRATION.md`: Migration: 2.31.0 to 2.31.1
9
10
  - `versions/2.31.0/MIGRATION.md`: Migration: 2.30.2 to 2.31.0
@@ -9,6 +9,7 @@ Use this directory as the consumer-facing reference for the package:
9
9
  - `creation.md`: SDK construction, config, options, and CLI config files.
10
10
  - `rentals.md`: `sdk.static.rentals.getRentals` and, on v9, `sdk.live.rentals.getRentalsByIds`.
11
11
  - `filter.md`: `sdk.static.filter.getFilters`.
12
+ - `videos.md`: v9 only. `sdk.static.videos.getVideos`, placements, and HLS playback.
12
13
  - `custom-attributes.md`: custom attribute catalog, configuration, per-backend behaviour, and the v9-to-v10 move.
13
14
  - `search.md`: `sdk.live.search.search`, vouchers, and, on v9, `sdk.live.search.searchPages`, Hub filters, and `sdk.live.voucher.validate`.
14
15
  - `availability.md`: date-picker availability flows.
@@ -0,0 +1,21 @@
1
+ # Changelog: 2.33.0
2
+
3
+ v9 sites can now list the videos an agency uploaded in the be-on! agency portal and play
4
+ them, for example a home page video or a video on a rental page.
5
+
6
+ ## Added
7
+
8
+ - `sdk.static.videos.getVideos` on v9 returns the agency's videos, ordered by upload. Each
9
+ video has an `id`, a `placement`, the `rentalIds` it belongs to, an HLS stream URL
10
+ `hlsUrl`, an optional `posterUrl`, `durationSeconds` and the upload's `fileName`.
11
+ - Optional filters `placement` (`frontpage`, `object` or a free slug) and `rentalId`. They
12
+ combine; without them every video is returned.
13
+ - The SDK loads the list once per instance. A failing call rejects, so a build that needs
14
+ videos fails and the previous build stays live.
15
+ - The types `V9Video`, `V9VideosGetVideosInput` and `WebsiteSDKV9Static` are exported.
16
+ - The CLI has a `videos` command for v9 with `--placement` and `--rental-id`.
17
+ - `videos.md` describes the data and shows how to play the HLS stream with `hls.js`.
18
+
19
+ ## Changed
20
+
21
+ - Nothing for existing code. v10 is unchanged and has no videos.
@@ -0,0 +1,25 @@
1
+ # Migration: 2.32.0 to 2.33.0
2
+
3
+ No changes required. Existing v9 and v10 code keeps working, and v10 is unchanged. Follow
4
+ steps 2 and 3 only to show videos on a v9 site.
5
+
6
+ ## 1. Upgrade
7
+
8
+ ```sh
9
+ pnpm add @v-office/website-sdk@2.33.0
10
+ ```
11
+
12
+ ## 2. Load the videos (v9 only)
13
+
14
+ ```ts
15
+ if (sdk.backend === "v9") {
16
+ const videos = await sdk.static.videos.getVideos({ placement: "object", rentalId: rental.id });
17
+ }
18
+ ```
19
+
20
+ An empty list is normal. Do not show `fileName` to visitors. See `videos.md` for placements and
21
+ the data shape.
22
+
23
+ ## 3. Play the stream
24
+
25
+ Add `hls.js` as an exactly pinned dependency and attach `hlsUrl` as described in `videos.md`.
@@ -0,0 +1,168 @@
1
+ # Videos
2
+
3
+ Videos are available on v9 only. Check `sdk.backend === "v9"` before using them. v10 has no
4
+ `sdk.static.videos`.
5
+
6
+ ## Service
7
+
8
+ ```ts
9
+ if (sdk.backend === "v9") {
10
+ const all = await sdk.static.videos.getVideos();
11
+ const hero = await sdk.static.videos.getVideos({ placement: "frontpage" });
12
+ const ofRental = await sdk.static.videos.getVideos({ placement: "object", rentalId: "12345" });
13
+ }
14
+ ```
15
+
16
+ The SDK loads the list once per instance. Filters run locally and combine with AND; without
17
+ input every video is returned.
18
+
19
+ ## Input
20
+
21
+ ```ts
22
+ type V9VideosGetVideosInput = {
23
+ placement?: string;
24
+ rentalId?: string;
25
+ };
26
+ ```
27
+
28
+ ## Output
29
+
30
+ Returns `Promise<ReadonlyArray<V9Video>>`, ordered by upload (oldest first).
31
+
32
+ ```ts
33
+ type V9Video = {
34
+ id: string;
35
+ placement: string;
36
+ rentalIds: ReadonlyArray<string>;
37
+ hlsUrl: string;
38
+ posterUrl: string | null;
39
+ durationSeconds: number;
40
+ fileName: string;
41
+ };
42
+ ```
43
+
44
+ Sample item:
45
+
46
+ ```json
47
+ {
48
+ "id": "17",
49
+ "placement": "object",
50
+ "rentalIds": ["12345"],
51
+ "hlsUrl": "https://stream.example/abc/manifest/video.m3u8",
52
+ "posterUrl": "https://stream.example/abc/thumbnails/thumbnail.jpg",
53
+ "durationSeconds": 67.2,
54
+ "fileName": "haus-seeblick-final.mp4"
55
+ }
56
+ ```
57
+
58
+ - `placement` says where the agency wants the video. `frontpage` is the home page video
59
+ (at most one per agency). `object` videos belong to the rentals in `rentalIds`; one rental
60
+ can have several videos. Any other value is a free slug for a page of the agency's choosing,
61
+ for example a landing page. The agency picks the placement in the be-on! agency portal.
62
+ - `rentalIds` match `rental.id` of the rentals.
63
+ - `fileName` is the name of the uploaded file. Never show it to visitors. Label a video from
64
+ the rental name or the page it sits on.
65
+ - `posterUrl` is `null` when no still image exists.
66
+
67
+ ## Behaviour
68
+
69
+ - Call it at build time. A video the agency adds or deletes shows up after the next site
70
+ build.
71
+ - A failing call rejects, which fails the build. The previous build stays live.
72
+ - An empty list is normal. Render nothing, not an empty player.
73
+
74
+ ## Playback
75
+
76
+ `hlsUrl` is an HLS stream. Install `hls.js` as an exactly pinned dependency of the site. Safari
77
+ and iOS play HLS natively; other browsers need `hls.js`. Try native playback first, then load
78
+ `hls.js` on demand.
79
+
80
+ This snippet is temporary: a playback helper in `@v-office/website-headless` will replace it.
81
+
82
+ ### Rental video
83
+
84
+ ```astro
85
+ ---
86
+ const [video] = await sdk.static.videos.getVideos({ placement: "object", rentalId: rental.id });
87
+ ---
88
+
89
+ {
90
+ video && (
91
+ <video
92
+ data-hls={video.hlsUrl}
93
+ controls
94
+ poster={video.posterUrl ?? undefined}
95
+ preload="none"
96
+ playsinline
97
+ aria-label={`Video: ${rental.nameOrLabel}`}
98
+ />
99
+ )
100
+ }
101
+
102
+ <script>
103
+ const attach = async (video: HTMLVideoElement, src: string) => {
104
+ if (video.canPlayType("application/vnd.apple.mpegurl")) {
105
+ video.src = src;
106
+ return;
107
+ }
108
+ const { default: Hls } = await import("hls.js");
109
+ if (!Hls.isSupported()) return;
110
+ const hls = new Hls();
111
+ hls.loadSource(src);
112
+ hls.attachMedia(video);
113
+ };
114
+
115
+ document
116
+ .querySelectorAll<HTMLVideoElement>("video[data-hls]")
117
+ .forEach((video) => attach(video, video.dataset.hls!));
118
+ </script>
119
+ ```
120
+
121
+ ### Hero video
122
+
123
+ The home page video plays silently in the background, so it is muted, loops and carries no
124
+ native controls. Moving content that starts on its own needs a way to stop it, so the hero
125
+ gets a pause button and does not start for visitors who ask for reduced motion.
126
+
127
+ ```astro
128
+ ---
129
+ const [hero] = await sdk.static.videos.getVideos({ placement: "frontpage" });
130
+ ---
131
+
132
+ {
133
+ hero && (
134
+ <div class="hero-video">
135
+ <video
136
+ data-hls={hero.hlsUrl}
137
+ data-hero
138
+ muted
139
+ loop
140
+ playsinline
141
+ poster={hero.posterUrl ?? undefined}
142
+ aria-hidden="true"
143
+ />
144
+ <button type="button" data-hero-toggle>Pause video</button>
145
+ </div>
146
+ )
147
+ }
148
+
149
+ <script>
150
+ const video = document.querySelector<HTMLVideoElement>("video[data-hero]");
151
+ const toggle = document.querySelector<HTMLButtonElement>("button[data-hero-toggle]");
152
+ if (video && toggle) {
153
+ const sync = () => (toggle.textContent = video.paused ? "Play video" : "Pause video");
154
+ video.addEventListener("play", sync);
155
+ video.addEventListener("pause", sync);
156
+ toggle.addEventListener("click", () => (video.paused ? video.play() : video.pause()));
157
+ // hls.js attaches the source later; autoplay starts the video once it can play.
158
+ video.autoplay = !matchMedia("(prefers-reduced-motion: reduce)").matches;
159
+ if (video.autoplay && video.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA) {
160
+ video.play().catch(sync);
161
+ }
162
+ sync();
163
+ }
164
+ </script>
165
+ ```
166
+
167
+ Use the `<script>` from the rental video as well. It attaches every `video[data-hls]` on the
168
+ page.
@@ -1,4 +1,4 @@
1
- import { Zt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-mC56Qyoy.mjs";
1
+ import { Qt as V9_FACILITY_ATTRIBUTE_KEYS } from "./client-BSyJzzk0.mjs";
2
2
  import { _ as parseVofficeFacilityData, b as parseVofficeUnitData, c as rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery, d as VofficeUnitDataFieldSchemas, f as VofficeUnitDataPropertyCategoryLabelKeys, i as hubFiltersQuery, l as rentalsAllFeedbacksQuery, m as VofficeUnitDataPropertyMetadata, o as rentalFacilitiesForObjectGroupRelationQuery, p as VofficeUnitDataPropertyCategoryValues, s as rentalIdsQuery, u as rentalsAllWithoutFeedbacksQuery, v as parseVofficeFeedbackData } from "./operations-CUWcmNGK.mjs";
3
3
  import { a as toFacilityImages, c as toLocalizedString, i as toLocation, o as toImages, r as renderVofficePropertyAttribute, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-Dbnm6Y4_.mjs";
4
4
  import { CoreSDKError, makeTranslate, renderResolvedCustomAttribute, toCustomAttributeList, toResolvedCustomAttributeCategoryTranslationKey } 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-mC56Qyoy.mjs";
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-BSyJzzk0.mjs";
2
2
  import { b as parseVofficeUnitData, n as mapSearchQuery, r as searchQuery } from "./operations-CUWcmNGK.mjs";
3
3
  import { i as toLocation, n as toV9RentalHighlightKey, o as toImages, s as toAddress, t as toRentalHighlights } from "./to-rental-highlights-Dbnm6Y4_.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,7 @@
4
4
 
5
5
  Release notes of `@v-office/website-sdk`, newest first. Each version has its own directory.
6
6
 
7
+ - `versions/2.33.0/CHANGELOG.md`: release notes for 2.33.0
7
8
  - `versions/2.32.0/CHANGELOG.md`: release notes for 2.32.0
8
9
  - `versions/2.31.1/CHANGELOG.md`: release notes for 2.31.1
9
10
  - `versions/2.31.0/CHANGELOG.md`: release notes for 2.31.0
@@ -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/2.33.0/MIGRATION.md`: Migration: 2.32.0 to 2.33.0
7
8
  - `versions/2.32.0/MIGRATION.md`: Migration: 2.31.1 to 2.32.0
8
9
  - `versions/2.31.1/MIGRATION.md`: Migration: 2.31.0 to 2.31.1
9
10
  - `versions/2.31.0/MIGRATION.md`: Migration: 2.30.2 to 2.31.0
@@ -9,6 +9,7 @@ Use this directory as the consumer-facing reference for the package:
9
9
  - `creation.md`: SDK construction, config, options, and CLI config files.
10
10
  - `rentals.md`: `sdk.static.rentals.getRentals` and, on v9, `sdk.live.rentals.getRentalsByIds`.
11
11
  - `filter.md`: `sdk.static.filter.getFilters`.
12
+ - `videos.md`: v9 only. `sdk.static.videos.getVideos`, placements, and HLS playback.
12
13
  - `custom-attributes.md`: custom attribute catalog, configuration, per-backend behaviour, and the v9-to-v10 move.
13
14
  - `search.md`: `sdk.live.search.search`, vouchers, and, on v9, `sdk.live.search.searchPages`, Hub filters, and `sdk.live.voucher.validate`.
14
15
  - `availability.md`: date-picker availability flows.
@@ -0,0 +1,21 @@
1
+ # Changelog: 2.33.0
2
+
3
+ v9 sites can now list the videos an agency uploaded in the be-on! agency portal and play
4
+ them, for example a home page video or a video on a rental page.
5
+
6
+ ## Added
7
+
8
+ - `sdk.static.videos.getVideos` on v9 returns the agency's videos, ordered by upload. Each
9
+ video has an `id`, a `placement`, the `rentalIds` it belongs to, an HLS stream URL
10
+ `hlsUrl`, an optional `posterUrl`, `durationSeconds` and the upload's `fileName`.
11
+ - Optional filters `placement` (`frontpage`, `object` or a free slug) and `rentalId`. They
12
+ combine; without them every video is returned.
13
+ - The SDK loads the list once per instance. A failing call rejects, so a build that needs
14
+ videos fails and the previous build stays live.
15
+ - The types `V9Video`, `V9VideosGetVideosInput` and `WebsiteSDKV9Static` are exported.
16
+ - The CLI has a `videos` command for v9 with `--placement` and `--rental-id`.
17
+ - `videos.md` describes the data and shows how to play the HLS stream with `hls.js`.
18
+
19
+ ## Changed
20
+
21
+ - Nothing for existing code. v10 is unchanged and has no videos.
@@ -0,0 +1,25 @@
1
+ # Migration: 2.32.0 to 2.33.0
2
+
3
+ No changes required. Existing v9 and v10 code keeps working, and v10 is unchanged. Follow
4
+ steps 2 and 3 only to show videos on a v9 site.
5
+
6
+ ## 1. Upgrade
7
+
8
+ ```sh
9
+ pnpm add @v-office/website-sdk@2.33.0
10
+ ```
11
+
12
+ ## 2. Load the videos (v9 only)
13
+
14
+ ```ts
15
+ if (sdk.backend === "v9") {
16
+ const videos = await sdk.static.videos.getVideos({ placement: "object", rentalId: rental.id });
17
+ }
18
+ ```
19
+
20
+ An empty list is normal. Do not show `fileName` to visitors. See `videos.md` for placements and
21
+ the data shape.
22
+
23
+ ## 3. Play the stream
24
+
25
+ Add `hls.js` as an exactly pinned dependency and attach `hlsUrl` as described in `videos.md`.
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": []
3
+ }
@@ -0,0 +1,168 @@
1
+ # Videos
2
+
3
+ Videos are available on v9 only. Check `sdk.backend === "v9"` before using them. v10 has no
4
+ `sdk.static.videos`.
5
+
6
+ ## Service
7
+
8
+ ```ts
9
+ if (sdk.backend === "v9") {
10
+ const all = await sdk.static.videos.getVideos();
11
+ const hero = await sdk.static.videos.getVideos({ placement: "frontpage" });
12
+ const ofRental = await sdk.static.videos.getVideos({ placement: "object", rentalId: "12345" });
13
+ }
14
+ ```
15
+
16
+ The SDK loads the list once per instance. Filters run locally and combine with AND; without
17
+ input every video is returned.
18
+
19
+ ## Input
20
+
21
+ ```ts
22
+ type V9VideosGetVideosInput = {
23
+ placement?: string;
24
+ rentalId?: string;
25
+ };
26
+ ```
27
+
28
+ ## Output
29
+
30
+ Returns `Promise<ReadonlyArray<V9Video>>`, ordered by upload (oldest first).
31
+
32
+ ```ts
33
+ type V9Video = {
34
+ id: string;
35
+ placement: string;
36
+ rentalIds: ReadonlyArray<string>;
37
+ hlsUrl: string;
38
+ posterUrl: string | null;
39
+ durationSeconds: number;
40
+ fileName: string;
41
+ };
42
+ ```
43
+
44
+ Sample item:
45
+
46
+ ```json
47
+ {
48
+ "id": "17",
49
+ "placement": "object",
50
+ "rentalIds": ["12345"],
51
+ "hlsUrl": "https://stream.example/abc/manifest/video.m3u8",
52
+ "posterUrl": "https://stream.example/abc/thumbnails/thumbnail.jpg",
53
+ "durationSeconds": 67.2,
54
+ "fileName": "haus-seeblick-final.mp4"
55
+ }
56
+ ```
57
+
58
+ - `placement` says where the agency wants the video. `frontpage` is the home page video
59
+ (at most one per agency). `object` videos belong to the rentals in `rentalIds`; one rental
60
+ can have several videos. Any other value is a free slug for a page of the agency's choosing,
61
+ for example a landing page. The agency picks the placement in the be-on! agency portal.
62
+ - `rentalIds` match `rental.id` of the rentals.
63
+ - `fileName` is the name of the uploaded file. Never show it to visitors. Label a video from
64
+ the rental name or the page it sits on.
65
+ - `posterUrl` is `null` when no still image exists.
66
+
67
+ ## Behaviour
68
+
69
+ - Call it at build time. A video the agency adds or deletes shows up after the next site
70
+ build.
71
+ - A failing call rejects, which fails the build. The previous build stays live.
72
+ - An empty list is normal. Render nothing, not an empty player.
73
+
74
+ ## Playback
75
+
76
+ `hlsUrl` is an HLS stream. Install `hls.js` as an exactly pinned dependency of the site. Safari
77
+ and iOS play HLS natively; other browsers need `hls.js`. Try native playback first, then load
78
+ `hls.js` on demand.
79
+
80
+ This snippet is temporary: a playback helper in `@v-office/website-headless` will replace it.
81
+
82
+ ### Rental video
83
+
84
+ ```astro
85
+ ---
86
+ const [video] = await sdk.static.videos.getVideos({ placement: "object", rentalId: rental.id });
87
+ ---
88
+
89
+ {
90
+ video && (
91
+ <video
92
+ data-hls={video.hlsUrl}
93
+ controls
94
+ poster={video.posterUrl ?? undefined}
95
+ preload="none"
96
+ playsinline
97
+ aria-label={`Video: ${rental.nameOrLabel}`}
98
+ />
99
+ )
100
+ }
101
+
102
+ <script>
103
+ const attach = async (video: HTMLVideoElement, src: string) => {
104
+ if (video.canPlayType("application/vnd.apple.mpegurl")) {
105
+ video.src = src;
106
+ return;
107
+ }
108
+ const { default: Hls } = await import("hls.js");
109
+ if (!Hls.isSupported()) return;
110
+ const hls = new Hls();
111
+ hls.loadSource(src);
112
+ hls.attachMedia(video);
113
+ };
114
+
115
+ document
116
+ .querySelectorAll<HTMLVideoElement>("video[data-hls]")
117
+ .forEach((video) => attach(video, video.dataset.hls!));
118
+ </script>
119
+ ```
120
+
121
+ ### Hero video
122
+
123
+ The home page video plays silently in the background, so it is muted, loops and carries no
124
+ native controls. Moving content that starts on its own needs a way to stop it, so the hero
125
+ gets a pause button and does not start for visitors who ask for reduced motion.
126
+
127
+ ```astro
128
+ ---
129
+ const [hero] = await sdk.static.videos.getVideos({ placement: "frontpage" });
130
+ ---
131
+
132
+ {
133
+ hero && (
134
+ <div class="hero-video">
135
+ <video
136
+ data-hls={hero.hlsUrl}
137
+ data-hero
138
+ muted
139
+ loop
140
+ playsinline
141
+ poster={hero.posterUrl ?? undefined}
142
+ aria-hidden="true"
143
+ />
144
+ <button type="button" data-hero-toggle>Pause video</button>
145
+ </div>
146
+ )
147
+ }
148
+
149
+ <script>
150
+ const video = document.querySelector<HTMLVideoElement>("video[data-hero]");
151
+ const toggle = document.querySelector<HTMLButtonElement>("button[data-hero-toggle]");
152
+ if (video && toggle) {
153
+ const sync = () => (toggle.textContent = video.paused ? "Play video" : "Pause video");
154
+ video.addEventListener("play", sync);
155
+ video.addEventListener("pause", sync);
156
+ toggle.addEventListener("click", () => (video.paused ? video.play() : video.pause()));
157
+ // hls.js attaches the source later; autoplay starts the video once it can play.
158
+ video.autoplay = !matchMedia("(prefers-reduced-motion: reduce)").matches;
159
+ if (video.autoplay && video.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA) {
160
+ video.play().catch(sync);
161
+ }
162
+ sync();
163
+ }
164
+ </script>
165
+ ```
166
+
167
+ Use the `<script>` from the rental video as well. It attaches every `video[data-hls]` on the
168
+ page.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-sdk",
3
- "version": "2.32.0",
3
+ "version": "2.33.0",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -82,7 +82,7 @@
82
82
  "fmt": "oxfmt",
83
83
  "fmt:check": "oxfmt --check",
84
84
  "check": "pnpm run typecheck && pnpm run lint && pnpm run fmt:check",
85
- "test": "pnpm run test:cli && 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 test:v9:booking && pnpm run build && node --test test/*.test.mjs",
85
+ "test": "pnpm run test:cli && 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 test:v9:booking && pnpm run test:v9:videos && pnpm run build && node --test test/*.test.mjs",
86
86
  "test:cli": "node --test src/cli/v9-hub-filters.test.ts",
87
87
  "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",
88
88
  "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",
@@ -91,6 +91,7 @@
91
91
  "test:v9:availability": "node --test src/legacy-v9/parser/availability/to-availability-restrictions-by-date.test.ts src/legacy-v9/parser/availability/to-initial-availability-calendar-days.test.ts src/legacy-v9/parser/availability/to-occupancy-limits.test.ts src/legacy-v9/parser/availability/to-rent-night-prices.test.ts src/legacy-v9/parser/availability/to-start-date-selected-calendar-days.test.ts",
92
92
  "test:v9:search": "node --test src/legacy-v9/parser/search/resolve-exact-match.test.ts src/legacy-v9/rental-scope.test.ts",
93
93
  "test:v9:booking": "node --test src/legacy-v9/parser/booking/output/to-payment-schedules.test.ts",
94
+ "test:v9:videos": "node --test src/legacy-v9/parser/videos/to-videos.test.ts",
94
95
  "playground:custom-attributes": "pnpm run build && node --env-file=.env playground/custom-attributes.ts"
95
96
  }
96
97
  }