ochre-sdk 1.3.30 → 1.3.32

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.
@@ -1,11 +1,12 @@
1
1
  import { FetchBaseOptions, FetchLanguages } from "../parsers/helpers.mjs";
2
2
  import { ItemLocation, Query } from "../types/index.mjs";
3
+ import { Website } from "../types/website.mjs";
3
4
  /**
4
5
  Fetches the location of every Set or Tree item that matches a query, without paging
5
6
 
6
7
  Each item carries only its identification, the scope Sets and Trees it
7
- belongs to, its publication date, its coordinates, optionally its map
8
- polygons, and the values of the requested property variables (inherited
8
+ belongs to, its publication date, its coordinates, its popupView, optionally
9
+ its map polygons, and the values of the requested property variables (inherited
9
10
  values included), which is what a map needs to draw, color and group every
10
11
  match into layers while a list pages through the same query with
11
12
  {@link fetchSetItems} or {@link fetchTreeItems}.
@@ -17,6 +18,7 @@ match into layers while a list pages through the same query with
17
18
  @param parameters.propertyVariableUuids - The property variables whose values each item should carry
18
19
  @param parameters.isMapDataIncluded - Whether each item should carry its map polygons
19
20
  @param options - Options for the fetch
21
+ @param options.website - The website the items are shown in, whose page and component settings each item's popupView starts from, as the website's own pages do
20
22
  @param options.fetch - The fetch function to use
21
23
  @returns The item locations, or an error if the fetch/parse fails
22
24
  */
@@ -26,7 +28,9 @@ export declare function fetchItemLocations<const TLanguages extends ReadonlyArra
26
28
  queries?: Query | null;
27
29
  propertyVariableUuids?: Array<string>;
28
30
  isMapDataIncluded?: boolean;
29
- }, options?: FetchBaseOptions<TLanguages>): Promise<{
31
+ }, options?: FetchBaseOptions<TLanguages> & {
32
+ website?: Pick<Website, "properties"> | null;
33
+ }): Promise<{
30
34
  totalCount: number;
31
35
  items: Array<ItemLocation<FetchLanguages<TLanguages>>>;
32
36
  error: null;
@@ -2,14 +2,30 @@ import { normalizeItemCategory } from "../categories.mjs";
2
2
  import { getErrorOutput } from "../errors.mjs";
3
3
  import { requestOchre } from "./request.mjs";
4
4
  import { parseRequiredContentLike } from "../parsers/helpers.mjs";
5
- import { parseCoordinates, parseIdentification, parseSpatialUnitMapData } from "../parsers/index.mjs";
6
- import { parseRequestedLanguages, resolveContentLanguages } from "../parsers/languages.mjs";
5
+ import { parseCoordinates, parseIdentification, parseMetadata, parseSpatialUnitMapData } from "../parsers/index.mjs";
6
+ import { parseRequestedLanguages, resolveContentLanguages, resolveDefaultLanguage } from "../parsers/languages.mjs";
7
+ import { parseWebpageView } from "../parsers/website/index.mjs";
7
8
  import { compileContainerItemsQuery } from "../query.mjs";
8
9
  import { itemLocationsParametersSchema } from "../schemas.mjs";
9
10
  import { XMLItemLocationsData } from "../xml/schemas.mjs";
10
11
  import { getContentLanguage, stringLiteral } from "../xquery.mjs";
11
12
  import * as v from "valibot";
12
13
  // src/fetchers/item-locations.ts
14
+ function parseViewContexts(scopes, languages) {
15
+ const viewContexts = /* @__PURE__ */ new Map();
16
+ for (const scope of scopes) viewContexts.set(scope.uuid, {
17
+ belongsTo: {
18
+ uuid: scope.uuidBelongsTo,
19
+ abbreviation: scope.belongsTo
20
+ },
21
+ metadata: parseMetadata(scope, { languages }, resolveDefaultLanguage(scope, languages))
22
+ });
23
+ return viewContexts;
24
+ }
25
+ function parsePopupView(popupView, viewContext, languages, website) {
26
+ if (popupView == null || viewContext == null) return null;
27
+ return parseWebpageView(popupView, { languages }, viewContext, website);
28
+ }
13
29
  async function fetchItemLocations(parameters, options) {
14
30
  try {
15
31
  const { setScopeUuids, treeScopeUuids, belongsToCollectionScopeUuids, queries, propertyVariableUuids, isMapDataIncluded } = v.parse(itemLocationsParametersSchema, parameters);
@@ -30,11 +46,14 @@ async function fetchItemLocations(parameters, options) {
30
46
  body: ({ items }) => ` let $propertyVariableUuids := (${Array.from(propertyVariableUuids, (uuid) => stringLiteral(uuid)).join(", ")})
31
47
 
32
48
  return <items totalCount="{count(${items})}">{
49
+ for $ochre in ${items}[popupView]/ancestor::ochre[1]
50
+ return <scope uuid="{$ochre/${container}/@uuid}" uuidBelongsTo="{$ochre/@uuidBelongsTo}" belongsTo="{$ochre/@belongsTo}">{$ochre/metadata}</scope>,
33
51
  for $item in ${items}
34
52
  return <itemLocation uuid="{$item/@uuid}" category="{local-name($item)}" scopeUuid="{$item/ancestor::${container}[1]/@uuid}">{
35
53
  ${container === "tree" ? "($item/@publicationDateTime, $item/ancestor::tree[1]/@publicationDateTime)[1]" : "$item/@publicationDateTime"},
36
54
  $item/identification,
37
- $item/coordinates,${isMapDataIncluded ? "\n $item/mapData," : ""}
55
+ $item/coordinates,
56
+ $item/popupView,${isMapDataIncluded ? "\n $item/mapData," : ""}
38
57
  for $value in $item//properties//property[label/@uuid = $propertyVariableUuids]/value[@uuid]
39
58
  return <value variable="{$value/../label/@uuid}" uuid="{$value/@uuid}">{$value/content}</value>
40
59
  }</itemLocation>
@@ -47,6 +66,7 @@ async function fetchItemLocations(parameters, options) {
47
66
  const languages = resolveContentLanguages(outputs.map((output) => output.result.ochre.items), parseRequestedLanguages(options?.languages));
48
67
  let totalCount = 0;
49
68
  for (const output of outputs) totalCount += output.result.ochre.items.totalCount;
69
+ const viewContextsByScopeUuid = parseViewContexts(outputs.flatMap((output) => output.result.ochre.items.scope ?? []), languages);
50
70
  const itemsByUuid = /* @__PURE__ */ new Map();
51
71
  const itemLocations = outputs.flatMap((output) => output.result.ochre.items.itemLocation ?? []);
52
72
  for (const itemLocation of itemLocations) {
@@ -78,6 +98,7 @@ async function fetchItemLocations(parameters, options) {
78
98
  identification: parseIdentification(itemLocation.identification, { languages }),
79
99
  coordinates: parseCoordinates(itemLocation.coordinates, { languages }),
80
100
  mapData: parseSpatialUnitMapData(itemLocation.mapData),
101
+ popupView: parsePopupView(itemLocation.popupView, viewContextsByScopeUuid.get(itemLocation.scopeUuid), languages, options?.website ?? null),
81
102
  propertyValues
82
103
  });
83
104
  }
@@ -18,6 +18,18 @@ const WEBPAGE_PROPERTY_LABELS = {
18
18
  isNavbarSearchBarDisplayed: "navbar-search-bar-displayed"
19
19
  };
20
20
  /**
21
+ A hex color as lowercase `#rrggbb`, from `#rgb` or `#rrggbb` with or without
22
+ the `#`
23
+
24
+ @param value - The raw OCHRE value
25
+ @returns The normalized hex color, or null when the value is not one
26
+ */
27
+ function parseHexColor(value) {
28
+ const hex = /^#?([\da-f]{3}|[\da-f]{6})$/i.exec(value?.trim() ?? "")?.[1]?.toLowerCase();
29
+ if (hex == null) return null;
30
+ return `#${hex.length === 3 ? [...hex].map((digit) => digit.repeat(2)).join("") : hex}`;
31
+ }
32
+ /**
21
33
  Parses raw website properties into a standardized Website properties structure
22
34
 
23
35
  @param websiteReader - Reader over the website's "presentation" properties
@@ -35,6 +47,7 @@ function parseWebsiteProperties(websiteReader, websiteTree, sidebar, options, pa
35
47
  isThemeToggleDisplayed: true,
36
48
  defaultTheme: "system"
37
49
  },
50
+ colors: { primary: parent?.colors.primary ?? null },
38
51
  icon: {
39
52
  logoUuid: null,
40
53
  faviconUuid: null,
@@ -114,6 +127,7 @@ function parseWebsiteProperties(websiteReader, websiteTree, sidebar, options, pa
114
127
  };
115
128
  else throw new Error(`Contact property must use “name;email”, got “${contactProperty.values[0]?.content}” (website uuid “${websiteTree.uuid}”)`, { cause: websiteTree });
116
129
  }
130
+ returnProperties.colors.primary = parseHexColor(websiteReader.stringValue("primary-color")) ?? returnProperties.colors.primary;
117
131
  websiteReader.readAll(returnProperties, {
118
132
  type: "webUI",
119
133
  status: "status",
@@ -648,6 +648,7 @@ export type ItemLocation<T extends LanguageCodes = LanguageCodes> = {
648
648
  identification: Identification<T>;
649
649
  coordinates: Array<Coordinates<T>>;
650
650
  mapData: SpatialUnit<T>["mapData"];
651
+ popupView: Webpage<T> | null;
651
652
  propertyValues: Array<{
652
653
  variableUuid: string;
653
654
  valueUuid: string;
@@ -173,6 +173,14 @@ export type Website<T extends LanguageCodes = LanguageCodes> = {
173
173
  isThemeToggleDisplayed: boolean;
174
174
  defaultTheme: "light" | "dark" | "system";
175
175
  };
176
+ /**
177
+ The website's brand colors as lowercase `#rrggbb` hex, read from a hex
178
+ value with or without its `#`, each null when the website leaves it unset
179
+ or sets a value that is not a hex color
180
+ */
181
+ colors: {
182
+ primary: string | null;
183
+ };
176
184
  icon: {
177
185
  logoUuid: string | null;
178
186
  faviconUuid: string | null;
@@ -4336,6 +4336,496 @@ export declare const XMLItemLocationsData: v.ObjectSchema<{
4336
4336
  rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4337
4337
  whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4338
4338
  }, "XMLString: Shape error">], undefined>, v.CheckAction<string | XMLString, "XMLNumber: string is not a number">, v.TransformAction<string | XMLString, number>]>;
4339
+ readonly scope: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
4340
+ readonly uuid: v.StringSchema<"XMLItemLocationsData: scope uuid is string and required">;
4341
+ readonly uuidBelongsTo: v.StringSchema<"XMLItemLocationsData: scope uuidBelongsTo is string and required">;
4342
+ readonly belongsTo: v.StringSchema<"XMLItemLocationsData: scope belongsTo is string and required">;
4343
+ readonly metadata: v.ObjectSchema<{
4344
+ readonly dataset: v.ObjectSchema<{
4345
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4346
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4347
+ properties: v.OptionalSchema<v.ObjectSchema<{
4348
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4349
+ }, undefined>, undefined>;
4350
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4351
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4352
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4353
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4354
+ }, "XMLString: Shape error">;
4355
+ readonly description: v.ObjectSchema<{
4356
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4357
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4358
+ properties: v.OptionalSchema<v.ObjectSchema<{
4359
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4360
+ }, undefined>, undefined>;
4361
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4362
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4363
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4364
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4365
+ }, "XMLString: Shape error">;
4366
+ readonly publisher: v.UnionSchema<[v.ObjectSchema<{
4367
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4368
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4369
+ properties: v.OptionalSchema<v.ObjectSchema<{
4370
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4371
+ }, undefined>, undefined>;
4372
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4373
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4374
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4375
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4376
+ }, "XMLString: Shape error">, v.ArraySchema<v.ObjectSchema<{
4377
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4378
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4379
+ properties: v.OptionalSchema<v.ObjectSchema<{
4380
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4381
+ }, undefined>, undefined>;
4382
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4383
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4384
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4385
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4386
+ }, "XMLString: Shape error">, undefined>], undefined>;
4387
+ readonly identifier: v.ObjectSchema<{
4388
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4389
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4390
+ properties: v.OptionalSchema<v.ObjectSchema<{
4391
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4392
+ }, undefined>, undefined>;
4393
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4394
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4395
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4396
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4397
+ }, "XMLString: Shape error">;
4398
+ readonly language: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
4399
+ readonly payload: v.StringSchema<"XMLMetadata: language is string and required">;
4400
+ readonly default: v.OptionalSchema<v.LiteralSchema<"true", "XMLMetadata: default is true">, undefined>;
4401
+ }, "XMLMetadata: language is array of object with payload and default">, "XMLMetadata: language is array of object with payload and default">, undefined>;
4402
+ readonly project: v.OptionalSchema<v.ObjectSchema<{
4403
+ readonly uuid: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"XMLMetadata: uuid is string and optional">, v.CheckAction<string, "XMLMetadata: uuid is not a valid pseudo-UUID">]>, undefined>;
4404
+ readonly identification: v.ObjectSchema<{
4405
+ readonly label: v.UnionSchema<[v.ObjectSchema<{
4406
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4407
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4408
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4409
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4410
+ }, undefined>, undefined>;
4411
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4412
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4413
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4414
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4415
+ properties: v.OptionalSchema<v.ObjectSchema<{
4416
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4417
+ }, undefined>, undefined>;
4418
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4419
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4420
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4421
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4422
+ }, "XMLString: Shape error">, undefined>;
4423
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4424
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4425
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4426
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4427
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4428
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4429
+ properties: v.OptionalSchema<v.ObjectSchema<{
4430
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4431
+ }, undefined>, undefined>;
4432
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4433
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4434
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4435
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4436
+ }, "XMLString: Shape error">], undefined>;
4437
+ readonly abbreviation: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4438
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4439
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4440
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4441
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4442
+ }, undefined>, undefined>;
4443
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4444
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4445
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4446
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4447
+ properties: v.OptionalSchema<v.ObjectSchema<{
4448
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4449
+ }, undefined>, undefined>;
4450
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4451
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4452
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4453
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4454
+ }, "XMLString: Shape error">, undefined>;
4455
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4456
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4457
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4458
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4459
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4460
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4461
+ properties: v.OptionalSchema<v.ObjectSchema<{
4462
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4463
+ }, undefined>, undefined>;
4464
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4465
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4466
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4467
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4468
+ }, "XMLString: Shape error">], undefined>, undefined>;
4469
+ readonly code: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4470
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4471
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4472
+ properties: v.OptionalSchema<v.ObjectSchema<{
4473
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4474
+ }, undefined>, undefined>;
4475
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4476
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4477
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4478
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4479
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: code is string and optional">], undefined>, undefined>;
4480
+ readonly email: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4481
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4482
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4483
+ properties: v.OptionalSchema<v.ObjectSchema<{
4484
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4485
+ }, undefined>, undefined>;
4486
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4487
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4488
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4489
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4490
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: email is string and optional">], undefined>, undefined>;
4491
+ readonly website: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4492
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4493
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4494
+ properties: v.OptionalSchema<v.ObjectSchema<{
4495
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4496
+ }, undefined>, undefined>;
4497
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4498
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4499
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4500
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4501
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: website is string and optional">], undefined>, undefined>;
4502
+ }, "XMLIdentification: Shape error">;
4503
+ readonly dateFormat: v.OptionalSchema<v.StringSchema<"XMLMetadata: dateFormat is string and optional">, undefined>;
4504
+ readonly page: v.OptionalSchema<v.PicklistSchema<["item", "entry"], "XMLMetadata: page is item or entry and optional">, undefined>;
4505
+ }, "XMLMetadata: project is object with uuid and identification">, undefined>;
4506
+ readonly collection: v.OptionalSchema<v.ObjectSchema<{
4507
+ readonly uuid: v.SchemaWithPipe<readonly [v.StringSchema<"XMLMetadata: uuid is string and required">, v.CheckAction<string, "XMLMetadata: uuid is not a valid pseudo-UUID">]>;
4508
+ readonly identification: v.ObjectSchema<{
4509
+ readonly label: v.UnionSchema<[v.ObjectSchema<{
4510
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4511
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4512
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4513
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4514
+ }, undefined>, undefined>;
4515
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4516
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4517
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4518
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4519
+ properties: v.OptionalSchema<v.ObjectSchema<{
4520
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4521
+ }, undefined>, undefined>;
4522
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4523
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4524
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4525
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4526
+ }, "XMLString: Shape error">, undefined>;
4527
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4528
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4529
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4530
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4531
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4532
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4533
+ properties: v.OptionalSchema<v.ObjectSchema<{
4534
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4535
+ }, undefined>, undefined>;
4536
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4537
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4538
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4539
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4540
+ }, "XMLString: Shape error">], undefined>;
4541
+ readonly abbreviation: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4542
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4543
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4544
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4545
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4546
+ }, undefined>, undefined>;
4547
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4548
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4549
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4550
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4551
+ properties: v.OptionalSchema<v.ObjectSchema<{
4552
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4553
+ }, undefined>, undefined>;
4554
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4555
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4556
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4557
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4558
+ }, "XMLString: Shape error">, undefined>;
4559
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4560
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4561
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4562
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4563
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4564
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4565
+ properties: v.OptionalSchema<v.ObjectSchema<{
4566
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4567
+ }, undefined>, undefined>;
4568
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4569
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4570
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4571
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4572
+ }, "XMLString: Shape error">], undefined>, undefined>;
4573
+ readonly code: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4574
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4575
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4576
+ properties: v.OptionalSchema<v.ObjectSchema<{
4577
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4578
+ }, undefined>, undefined>;
4579
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4580
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4581
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4582
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4583
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: code is string and optional">], undefined>, undefined>;
4584
+ readonly email: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4585
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4586
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4587
+ properties: v.OptionalSchema<v.ObjectSchema<{
4588
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4589
+ }, undefined>, undefined>;
4590
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4591
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4592
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4593
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4594
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: email is string and optional">], undefined>, undefined>;
4595
+ readonly website: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4596
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4597
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4598
+ properties: v.OptionalSchema<v.ObjectSchema<{
4599
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4600
+ }, undefined>, undefined>;
4601
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4602
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4603
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4604
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4605
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: website is string and optional">], undefined>, undefined>;
4606
+ }, "XMLIdentification: Shape error">;
4607
+ readonly page: v.PicklistSchema<["item", "entry"], "XMLMetadata: page is item or entry">;
4608
+ }, "XMLMetadata: collection is object with uuid, identification, and page">, undefined>;
4609
+ readonly publication: v.OptionalSchema<v.ObjectSchema<{
4610
+ readonly uuid: v.SchemaWithPipe<readonly [v.StringSchema<"XMLMetadata: uuid is string and required">, v.CheckAction<string, "XMLMetadata: uuid is not a valid pseudo-UUID">]>;
4611
+ readonly identification: v.ObjectSchema<{
4612
+ readonly label: v.UnionSchema<[v.ObjectSchema<{
4613
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4614
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4615
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4616
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4617
+ }, undefined>, undefined>;
4618
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4619
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4620
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4621
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4622
+ properties: v.OptionalSchema<v.ObjectSchema<{
4623
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4624
+ }, undefined>, undefined>;
4625
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4626
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4627
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4628
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4629
+ }, "XMLString: Shape error">, undefined>;
4630
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4631
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4632
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4633
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4634
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4635
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4636
+ properties: v.OptionalSchema<v.ObjectSchema<{
4637
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4638
+ }, undefined>, undefined>;
4639
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4640
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4641
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4642
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4643
+ }, "XMLString: Shape error">], undefined>;
4644
+ readonly abbreviation: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4645
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4646
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4647
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4648
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4649
+ }, undefined>, undefined>;
4650
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4651
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4652
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4653
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4654
+ properties: v.OptionalSchema<v.ObjectSchema<{
4655
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4656
+ }, undefined>, undefined>;
4657
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4658
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4659
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4660
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4661
+ }, "XMLString: Shape error">, undefined>;
4662
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4663
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4664
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4665
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4666
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4667
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4668
+ properties: v.OptionalSchema<v.ObjectSchema<{
4669
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4670
+ }, undefined>, undefined>;
4671
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4672
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4673
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4674
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4675
+ }, "XMLString: Shape error">], undefined>, undefined>;
4676
+ readonly code: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4677
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4678
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4679
+ properties: v.OptionalSchema<v.ObjectSchema<{
4680
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4681
+ }, undefined>, undefined>;
4682
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4683
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4684
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4685
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4686
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: code is string and optional">], undefined>, undefined>;
4687
+ readonly email: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4688
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4689
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4690
+ properties: v.OptionalSchema<v.ObjectSchema<{
4691
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4692
+ }, undefined>, undefined>;
4693
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4694
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4695
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4696
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4697
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: email is string and optional">], undefined>, undefined>;
4698
+ readonly website: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4699
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4700
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4701
+ properties: v.OptionalSchema<v.ObjectSchema<{
4702
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4703
+ }, undefined>, undefined>;
4704
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4705
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4706
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4707
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4708
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: website is string and optional">], undefined>, undefined>;
4709
+ }, "XMLIdentification: Shape error">;
4710
+ readonly page: v.PicklistSchema<["item", "entry"], "XMLMetadata: page is item or entry and required">;
4711
+ }, "XMLMetadata: publication is object with uuid, identification, and page">, undefined>;
4712
+ readonly item: v.OptionalSchema<v.ObjectSchema<{
4713
+ readonly uuid: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"XMLMetadata: uuid is string and optional">, v.CheckAction<string, "XMLMetadata: uuid is not a valid pseudo-UUID">]>, undefined>;
4714
+ readonly identification: v.ObjectSchema<{
4715
+ readonly label: v.UnionSchema<[v.ObjectSchema<{
4716
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4717
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4718
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4719
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4720
+ }, undefined>, undefined>;
4721
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4722
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4723
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4724
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4725
+ properties: v.OptionalSchema<v.ObjectSchema<{
4726
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4727
+ }, undefined>, undefined>;
4728
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4729
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4730
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4731
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4732
+ }, "XMLString: Shape error">, undefined>;
4733
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4734
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4735
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4736
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4737
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4738
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4739
+ properties: v.OptionalSchema<v.ObjectSchema<{
4740
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4741
+ }, undefined>, undefined>;
4742
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4743
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4744
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4745
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4746
+ }, "XMLString: Shape error">], undefined>;
4747
+ readonly abbreviation: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4748
+ readonly content: v.ArraySchema<v.ObjectSchema<{
4749
+ readonly links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4750
+ readonly properties: v.OptionalSchema<v.ObjectSchema<{
4751
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4752
+ }, undefined>, undefined>;
4753
+ readonly annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4754
+ readonly string: v.ArraySchema<v.ObjectSchema<{
4755
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4756
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4757
+ properties: v.OptionalSchema<v.ObjectSchema<{
4758
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4759
+ }, undefined>, undefined>;
4760
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4761
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4762
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4763
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4764
+ }, "XMLString: Shape error">, undefined>;
4765
+ readonly title: v.OptionalSchema<v.StringSchema<"XMLContent: title is string and optional">, undefined>;
4766
+ readonly lang: v.StringSchema<"XMLContent: lang is string and required">;
4767
+ }, undefined>, "XMLContent: content is array of object with string, title, and lang">;
4768
+ }, "XMLContent: Shape error">, v.ObjectSchema<{
4769
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4770
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4771
+ properties: v.OptionalSchema<v.ObjectSchema<{
4772
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4773
+ }, undefined>, undefined>;
4774
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4775
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4776
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4777
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4778
+ }, "XMLString: Shape error">], undefined>, undefined>;
4779
+ readonly code: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4780
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4781
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4782
+ properties: v.OptionalSchema<v.ObjectSchema<{
4783
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4784
+ }, undefined>, undefined>;
4785
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4786
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4787
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4788
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4789
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: code is string and optional">], undefined>, undefined>;
4790
+ readonly email: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4791
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4792
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4793
+ properties: v.OptionalSchema<v.ObjectSchema<{
4794
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4795
+ }, undefined>, undefined>;
4796
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4797
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4798
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4799
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4800
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: email is string and optional">], undefined>, undefined>;
4801
+ readonly website: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
4802
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4803
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4804
+ properties: v.OptionalSchema<v.ObjectSchema<{
4805
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4806
+ }, undefined>, undefined>;
4807
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4808
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4809
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4810
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4811
+ }, "XMLString: Shape error">, v.StringSchema<"XMLIdentification: website is string and optional">], undefined>, undefined>;
4812
+ }, "XMLIdentification: Shape error">;
4813
+ readonly category: v.PicklistSchema<readonly ["tree", "bibliography", "spatialUnit", "concept", "period", "person", "propertyVariable", "variable", "propertyValue", "value", "resource", "text", "set"], undefined>;
4814
+ readonly type: v.StringSchema<"XMLMetadata: type is string and required">;
4815
+ readonly maxLength: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<"XMLNumber: string is string and required">, v.ObjectSchema<{
4816
+ string: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLString>>, "XMLString: string is array of XMLString">, undefined>;
4817
+ links: v.OptionalSchema<v.LazySchema<v.GenericSchema<unknown, XMLLink$1>>, undefined>;
4818
+ properties: v.OptionalSchema<v.ObjectSchema<{
4819
+ readonly property: v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLProperty>>, "XMLRichTextEnvelope: properties is array of XMLProperty">;
4820
+ }, undefined>, undefined>;
4821
+ annotation: v.OptionalSchema<v.StringSchema<"XMLRichTextEnvelope: annotation is string and optional">, undefined>;
4822
+ payload: v.OptionalSchema<v.StringSchema<"XMLString: payload is string and optional">, undefined>;
4823
+ rend: v.OptionalSchema<v.StringSchema<"XMLString: rend is string and optional">, undefined>;
4824
+ whitespace: v.OptionalSchema<v.StringSchema<"XMLString: whitespace is string and optional">, undefined>;
4825
+ }, "XMLString: Shape error">], undefined>, v.CheckAction<string | XMLString, "XMLNumber: string is not a number">, v.TransformAction<string | XMLString, number | undefined>]>, undefined>;
4826
+ }, "XMLMetadata: item is object with identification, category, type, and maxLength">, undefined>;
4827
+ }, undefined>;
4828
+ }, "XMLItemLocationsData: scope is object with uuid, uuidBelongsTo, belongsTo, and metadata">, undefined>, undefined>;
4339
4829
  readonly itemLocation: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
4340
4830
  readonly uuid: v.StringSchema<"XMLItemLocation: uuid is string and required">;
4341
4831
  readonly category: v.StringSchema<"XMLItemLocation: category is string and required">;
@@ -4920,6 +5410,9 @@ export declare const XMLItemLocationsData: v.ObjectSchema<{
4920
5410
  }, "XMLString: Shape error">], undefined>, v.CheckAction<string | XMLString, "XMLNumber: string is not a number">, v.TransformAction<string | XMLString, number>]>;
4921
5411
  }, undefined>;
4922
5412
  }, "XMLMapData: mapData is object with geoJSON">, undefined>;
5413
+ readonly popupView: v.OptionalSchema<v.ObjectSchema<{
5414
+ readonly resource: v.OptionalSchema<v.ArraySchema<v.LazySchema<v.GenericSchema<unknown, XMLWebsiteResource>>, undefined>, undefined>;
5415
+ }, undefined>, undefined>;
4923
5416
  readonly value: v.OptionalSchema<v.ArraySchema<v.IntersectSchema<[v.ObjectSchema<{
4924
5417
  readonly variable: v.StringSchema<"XMLItemLocation: value variable is string and required">;
4925
5418
  readonly uuid: v.StringSchema<"XMLItemLocation: value uuid is string and required">;
@@ -976,6 +976,7 @@ const XMLItemLocation = v.object({
976
976
  identification: XMLIdentification,
977
977
  coordinates: v.optional(XMLCoordinates),
978
978
  mapData: XMLMapData,
979
+ popupView: v.optional(XMLItemView),
979
980
  value: v.optional(v.array(v.intersect([v.object({
980
981
  variable: v.string("XMLItemLocation: value variable is string and required"),
981
982
  uuid: v.string("XMLItemLocation: value uuid is string and required")
@@ -983,6 +984,12 @@ const XMLItemLocation = v.object({
983
984
  }, "XMLItemLocation: Shape error");
984
985
  const XMLItemLocationsData = v.object({ result: v.object({ ochre: v.object({ items: v.object({
985
986
  totalCount: XMLNumber,
987
+ scope: v.optional(v.array(v.object({
988
+ uuid: v.string("XMLItemLocationsData: scope uuid is string and required"),
989
+ uuidBelongsTo: v.string("XMLItemLocationsData: scope uuidBelongsTo is string and required"),
990
+ belongsTo: v.string("XMLItemLocationsData: scope belongsTo is string and required"),
991
+ metadata: XMLMetadata
992
+ }, "XMLItemLocationsData: scope is object with uuid, uuidBelongsTo, belongsTo, and metadata"))),
986
993
  itemLocation: v.optional(v.array(XMLItemLocation, "XMLItemLocationsData: itemLocation is array of XMLItemLocation"))
987
994
  }, "XMLItemLocationsData: items is object with totalCount") }, "XMLItemLocationsData: ochre") }) }, "XMLItemLocationsData: Shape error");
988
995
  const XMLMapLayer = v.object({
@@ -927,6 +927,7 @@ export type XMLItemLocation = {
927
927
  identification: XMLIdentification;
928
928
  coordinates?: XMLCoordinates;
929
929
  mapData?: XMLSpatialUnit["mapData"];
930
+ popupView?: XMLItemView;
930
931
  value?: Array<{
931
932
  variable: string;
932
933
  uuid: string;
@@ -937,6 +938,12 @@ export type XMLItemLocationsData = {
937
938
  ochre: {
938
939
  items: {
939
940
  totalCount: number;
941
+ scope?: Array<{
942
+ uuid: string;
943
+ uuidBelongsTo: string;
944
+ belongsTo: string;
945
+ metadata: XMLMetadata;
946
+ }>;
940
947
  itemLocation?: Array<XMLItemLocation>;
941
948
  };
942
949
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "1.3.30",
3
+ "version": "1.3.32",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",