@v-office/website-sdk 2.30.2 → 2.31.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.
@@ -201,6 +201,8 @@ The CLI requests these keys. Use them as they are.
201
201
  | --------------------------------------------------- | ------------------------------------------------------------- | ------------------------ |
202
202
  | `objectGroup` | filter by object group | vOffice object group ID |
203
203
  | `facility_search` | filter by facility | vOffice facility ID |
204
+ | `region` | filter by region, subregions included | vOffice region ID |
205
+ | `type` | filter by property type | vOffice type, `HOUSE` |
204
206
  | `offers` | rentals with any special offer; the key must be `offers` | flag |
205
207
  | `offer` | rentals linked to one special offer, without a validity check | vOffice offer ID |
206
208
  | `facility_scope`, `objectGroup_scope`, `voffice_id` | set by the SDK for the rental scope and `rentalIdsIn` | none, never configure it |
@@ -219,9 +221,11 @@ steps to do it, and prints the matching `backendFilter` definitions:
219
221
  website-sdk --backend v9 --config ./website-sdk-config.json hub-filters request --object-group --offers
220
222
  ```
221
223
 
222
- Flags: `--object-group`, `--facility`, `--offers`, `--offer`, `--unit` (the filter by
223
- vOffice unit ID, see [v9: Favourites As A Search Filter](#v9-favourites-as-a-search-filter)),
224
- and `--out <file>` (default `hub-filter-request.md`). A rental scope and
224
+ Flags: `--object-group`, `--facility`, `--region`, `--type`, `--offers`, `--offer`,
225
+ `--unit` (the filter by vOffice unit ID, see
226
+ [v9: Favourites As A Search Filter](#v9-favourites-as-a-search-filter)), `--field`,
227
+ `--min` and `--max` (see [Filters On vOffice Fields](#filters-on-voffice-fields)), and
228
+ `--out <file>` (default `hub-filter-request.md`). A rental scope and
225
229
  `rentalIdsSearch: true` add their keys to the request. The CLI reads the rental scope
226
230
  from `--options` and the two settings from `--config` or, with environment
227
231
  configuration, from `HUB_RENTAL_SCOPE_PROPERTY_KIND` and `HUB_RENTAL_IDS_SEARCH`.
@@ -240,11 +244,10 @@ website-sdk --backend v9 --config ./website-sdk-config.json --options ./website-
240
244
 
241
245
  `hub-filters check` compares every configured `backendFilter` key, the scope key and
242
246
  `voffice_id` (when `rentalIdsSearch` is on) with the Hub. It exits non-zero and names
243
- the missing keys, with the `hub-filters request` flags for the fixed ones. A custom
244
- key outside the fixed ones has no request flag: the SDK does not know which rental
245
- field it compares, so a developer adds its entry by hand. The check sees only that a
246
- key exists, not whether its entry is complete. When it passes, delete the request
247
- file.
247
+ the missing keys, with the `hub-filters request` flags for the fixed ones. For any
248
+ other key it points to `--field`, `--min` and `--max`, because it does not know which
249
+ vOffice field the key compares. The check sees only that a key exists, not whether its
250
+ entry is complete. When it passes, delete the request file.
248
251
 
249
252
  #### A Filter By Object Group
250
253
 
@@ -291,6 +294,98 @@ which is a different ID, so do not build filter links from `rental.property.id`.
291
294
  the Hub entry exists, the CLI prints the definition with the options (ID and name) the
292
295
  Hub knows. The English labels are the German names; translate them.
293
296
 
297
+ #### A Filter By Region
298
+
299
+ `region` keeps rentals in one vOffice region and in its subregions: the region "Sylt"
300
+ also finds the rentals in "Westerland" and "Kampen". The be-on! Hub builds the list of
301
+ regions from the rentals of the be-on key.
302
+
303
+ Request `--region`. Once the Hub entry exists, the CLI prints the definition with the
304
+ regions the Hub knows (ID and name), each region before its subregions. Keep the
305
+ regions the site offers and drop the others. The English labels are the German names;
306
+ translate them. A link to a region page uses the region ID:
307
+
308
+ ```ts
309
+ "region=9927";
310
+ "start=20-06-2026&end=27-06-2026&region=9926";
311
+ ```
312
+
313
+ #### A Filter By Property Type
314
+
315
+ `type` keeps rentals of one vOffice property type, for example `HOUSE` (holiday home) or
316
+ `FLAT` (holiday apartment). vOffice also knows `ROOM`, `PRIVAT`, `MOBILEHOME` and
317
+ `YACHT`.
318
+
319
+ Request `--type`. The CLI reads the types the be-on key's rentals have and writes them
320
+ into the Hub entry and the definition, with German and English labels. A type that
321
+ first appears later is missing from the select. Request `--type` again then: the CLI
322
+ sees that the Hub entry lacks the type and writes a new request file. The Hub's filter
323
+ field is not empty by then, so the file asks the user to hand it to a developer, who
324
+ replaces the entry.
325
+
326
+ #### Filters On vOffice Fields
327
+
328
+ For a filter on a rental field in vOffice that no fixed key covers, such as an e-car
329
+ charger, a thatched roof or the distance to the beach, name the key and the vOffice
330
+ field:
331
+
332
+ ```sh
333
+ website-sdk --backend v9 hub-filters request --field kamin=fireside --field reet=p_14418
334
+ website-sdk --backend v9 hub-filters request --min beds_min=beds --max beachdistance_max=beachdistance
335
+ ```
336
+
337
+ - `--field <key>=<field>` is a yes/no filter: it keeps rentals whose field is set.
338
+ Several fields, `--field reet=p_14418,p_14326`, match when any of them is set. Use
339
+ this for a feature an agency stores in two vOffice fields.
340
+ - `--min <key>=<field>` keeps rentals whose numeric field is at least the visitor's
341
+ value, `--max <key>=<field>` at most.
342
+
343
+ Each flag is repeatable. The key is the query key on the site; it must not be a
344
+ built-in or fixed filter key, nor a period or occupancy key such as `start` or `adults`.
345
+
346
+ Do not guess the field from its English name: `fireplace` is a fire pit outdoors
347
+ (Feuerstelle), a fireplace indoors is `fireside` (Kamin/Ofen). Look the field up by
348
+ the word the user used:
349
+
350
+ ```sh
351
+ website-sdk --backend v9 hub-filters fields --search kamin
352
+ ```
353
+
354
+ It lists the standard vOffice fields with their type (`BOOL` for `--field`, `INT` for
355
+ `--min` and `--max`), German and English label, and `builtInFilter` when a built-in
356
+ filter already covers the field. Use the built-in filter then; it needs no Hub entry.
357
+
358
+ The CLI checks every standard field against this list and refuses an unknown field, a
359
+ field of the wrong type, and a single field a built-in filter covers. The filter takes
360
+ the field's vOffice label as its name in the Hub and in the printed definition.
361
+
362
+ Fields named `p_<number>` are features an agency defined in its own vOffice, such as
363
+ a thatched roof. `hub-filters fields` does not know them. vOffice lists them as
364
+ `p_<number>` with their names, next to the standard fields, for the agency's vOffice
365
+ key:
366
+
367
+ ```text
368
+ https://api.v-office.com/export/properties?key=<vOffice key>
369
+ ```
370
+
371
+ Tell the user about this link when they want a filter on such a feature. The vOffice
372
+ key is not the be-on key (`apiKey`); the agency or a be-on! developer has it. It is a
373
+ secret: the user opens the link in a browser and tells you the field name. Never ask
374
+ for the key in the chat, and never write it into the site, its configuration, a file or
375
+ a commit. A `p_` field gets the key as its label; replace it with the filter's name.
376
+
377
+ The CLI then reads the fields from the be-on key's rentals and prints how many rentals
378
+ have a field set, or the range of a numeric field. A field no rental has set yet still
379
+ gets its entry, because the agency may not have maintained it in vOffice yet; the CLI
380
+ warns that the filter finds nothing until then. A mistyped field or `p_` number looks
381
+ the same, so the request file asks the user, above the code, to check the spelling and
382
+ the `p_` number. Confirm the field with the user before you offer the filter.
383
+
384
+ ```ts
385
+ "start=20-06-2026&end=27-06-2026&kamin";
386
+ "adults=2&beachdistance_max=500";
387
+ ```
388
+
294
389
  #### Special Offers
295
390
 
296
391
  - `offers` keeps rentals with any special offer that vOffice shows to websites. With a
@@ -0,0 +1,52 @@
1
+ # Changelog: 2.31.0
2
+
3
+ On v9, `website-sdk hub-filters request` can now ask for more filters: by region, by
4
+ property type, and on any yes/no or numeric field of a rental in vOffice. Until now these
5
+ needed a be-on! developer to write the Hub entry by hand.
6
+
7
+ ## Added
8
+
9
+ - `--region` requests a region filter. A region also finds the rentals of its
10
+ subregions. Once the Hub entry is saved, the CLI prints the definition with the
11
+ regions of the be-on key, each region before its subregions.
12
+ - `--type` requests a property type filter (`HOUSE`, `FLAT` and the other vOffice types)
13
+ with the types the be-on key's rentals have, labelled in German and English.
14
+ - `--field <key>=<field>` requests a yes/no filter on a vOffice field, for example
15
+ `--field reet=p_14418`. Several fields separated by commas match when any of them is
16
+ set.
17
+ - `--min <key>=<field>` and `--max <key>=<field>` request a filter for rentals whose
18
+ numeric field is at least or at most the visitor's value, for example
19
+ `--max beachdistance_max=beachdistance`.
20
+ - `website-sdk --backend v9 hub-filters fields --search <word>` finds a standard vOffice field by its
21
+ name or its German or English label, with its type and the built-in filter that
22
+ already covers it. `--search kamin` finds `fireside` (Kamin/Ofen).
23
+ An agency's own features (`p_<number>` fields) are not in it; the CLI points to
24
+ vOffice's property list for the agency's vOffice key, which shows them.
25
+
26
+ The CLI checks standard fields against the vOffice field list: it refuses an unknown
27
+ field, a field of the wrong type, and a single field a built-in filter already covers.
28
+ A filter on a standard field takes its German and English label from vOffice. The CLI
29
+ also reads the requested fields from the be-on key's rentals and prints how many have a
30
+ field set. When none has, it still writes the entry, warns that the filter finds nothing
31
+ until the agency maintains the field in vOffice, and asks the user in the request file
32
+ to check the field's spelling and `p_` number.
33
+
34
+ ## Changed
35
+
36
+ - `hub-filters check` names `--region` and `--type` for those missing keys. For any other
37
+ missing key it points to `--field`, `--min` and `--max` instead of a be-on! developer.
38
+
39
+ ## Fixed
40
+
41
+ - v9 search sends a `backendFilter` whose key is also the name of a JavaScript object
42
+ member, such as `constructor` or `valueOf`, to the Hub. It was taken for a built-in
43
+ filter and silently left out of the search.
44
+
45
+ - `hub-filters request` also prints the `backendFilter` definitions when the Hub already
46
+ has every requested key. Running it again after the user saved the entries now prints
47
+ the facility and region options the Hub returns, as its notes ask.
48
+
49
+ - The English label of the v9 built-in filter `fireplace` is "Fire pit". The filter
50
+ matches vOffice's "Feuerstelle", an outdoor fire pit, and was labelled "Fireplace". The
51
+ German label "Feuerstelle" stays. vOffice's indoor fireplace (Kamin/Ofen) is the field
52
+ `fireside`, which `--field` can request.
@@ -0,0 +1,16 @@
1
+ # Migration: 2.30.2 to 2.31.0
2
+
3
+ No changes required. Existing Hub filters and `backendFilter` definitions keep working.
4
+
5
+ ## 1. Upgrade
6
+
7
+ ```sh
8
+ pnpm add @v-office/website-sdk@2.31.0
9
+ ```
10
+
11
+ ## 2. Optional: replace hand-written Hub filters
12
+
13
+ A site whose be-on! Hub entry holds one `ComplexFilter` per place, such as one for
14
+ "Westerland" and one for "Kampen", can use a single `region` filter instead. Request it
15
+ with `website-sdk --backend v9 hub-filters request --region`. A region includes its subregions, so a
16
+ link to "Sylt" finds the rentals in every place on the island.
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": []
3
+ }
@@ -0,0 +1,9 @@
1
+ # Changelog: 2.31.1
2
+
3
+ Ships with `@v-office/sdk-core` 1.25.0, which lets a server-side runtime widen the PMS request
4
+ budget of the v10 adapters. The website SDK does not pass that option on, so a website keeps one
5
+ request start per second with five in flight.
6
+
7
+ ## Changed
8
+
9
+ - `@v-office/sdk-core` 1.24.2 → 1.25.0. No change in behavior for websites.
@@ -0,0 +1,9 @@
1
+ # Migration: 2.31.0 to 2.31.1
2
+
3
+ ## 1. Upgrade
4
+
5
+ ```sh
6
+ pnpm add @v-office/website-sdk@2.31.1
7
+ ```
8
+
9
+ No changes required.
@@ -0,0 +1,3 @@
1
+ {
2
+ "componentsAffectedByHeadlessChange": []
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-sdk",
3
- "version": "2.30.2",
3
+ "version": "2.31.1",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@graphql-typed-document-node/core": "3.2.0",
46
- "@v-office/sdk-core": "1.24.2",
46
+ "@v-office/sdk-core": "1.25.0",
47
47
  "effect": "4.0.0-rc.115",
48
48
  "graphql": "17.0.2",
49
49
  "yaml": "^2.9.0"