ochre-sdk 1.0.0-beta.1 → 1.0.0-beta.10

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/index.d.mts CHANGED
@@ -5,23 +5,39 @@
5
5
  */
6
6
  type MultilingualStringEntry = {
7
7
  text: string;
8
+ richText: string;
8
9
  isPrimary: boolean;
9
10
  };
11
+ type MultilingualStringText = {
12
+ text: string;
13
+ richText: string;
14
+ };
15
+ type MultilingualStringInput = string | {
16
+ text: string;
17
+ richText?: string;
18
+ };
10
19
  type MultilingualStringJSON<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
11
20
  content: Partial<Record<T[number], Array<MultilingualStringEntry>>>;
12
21
  aliases: Array<string>;
13
22
  };
23
+ type MultilingualStringObject<T extends ReadonlyArray<string> = ReadonlyArray<string>> = Partial<Record<T[number], MultilingualStringInput>>;
24
+ type MultilingualStringEntries<T extends ReadonlyArray<string> = ReadonlyArray<string>> = Partial<Record<T[number], ReadonlyArray<MultilingualStringInput>>>;
14
25
  /**
15
26
  * Options for creating and working with multilingual strings
16
27
  */
17
28
  type MultilingualOptions = {
18
- /** Whether this string contains rich text/HTML content */isRichText?: boolean; /** Default language to use for fallbacks */
19
- defaultLanguage?: string; /** Available languages for this string */
29
+ /** Default language to use for fallbacks */defaultLanguage?: string; /** Available languages for this string */
20
30
  availableLanguages?: ReadonlyArray<string>; /** Alias values carried by OCHRE as zxx content */
21
31
  aliases?: ReadonlyArray<string>;
22
32
  };
23
- type MultilingualInputContent<T extends ReadonlyArray<string>> = Partial<Record<T[number], string>>;
24
- type MultilingualEntriesInput<T extends ReadonlyArray<string>> = Partial<Record<T[number], ReadonlyArray<string>>>;
33
+ type MultilingualContent<T extends ReadonlyArray<string>> = Partial<Record<T[number], ReadonlyArray<MultilingualStringEntry>>>;
34
+ declare const MULTILINGUAL_STRING_INTERNAL_INIT: unique symbol;
35
+ type MultilingualStringInternalInit<T extends ReadonlyArray<string>> = {
36
+ readonly [MULTILINGUAL_STRING_INTERNAL_INIT]: true;
37
+ content: MultilingualContent<T>;
38
+ options: Required<MultilingualOptions>;
39
+ availableLanguages: ReadonlyArray<T[number]>;
40
+ };
25
41
  /**
26
42
  * Multilingual string
27
43
  */
@@ -30,44 +46,72 @@ declare class MultilingualString<T extends ReadonlyArray<string> = ReadonlyArray
30
46
  private readonly _options;
31
47
  private readonly _availableLanguages;
32
48
  private readonly _aliases;
33
- private constructor();
49
+ /**
50
+ * Create a new multilingual string from an object of language codes to text.
51
+ */
52
+ /** @internal */
53
+ constructor(init: MultilingualStringInternalInit<T>);
54
+ constructor(content: MultilingualStringObject<T>, languages: T, options?: MultilingualOptions);
55
+ constructor(content?: Partial<Record<string, MultilingualStringInput>>, languages?: undefined, options?: MultilingualOptions);
56
+ private static fromNormalized;
34
57
  /**
35
58
  * Create a new multilingual string from an object of language codes to text
36
59
  */
37
- static fromObject<U extends ReadonlyArray<string>>(content: MultilingualInputContent<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
38
- static fromObject(content: Partial<Record<string, string>>, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
60
+ static fromObject<U extends ReadonlyArray<string>>(content: MultilingualStringObject<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
61
+ static fromObject(content: Partial<Record<string, MultilingualStringInput>>, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
39
62
  /**
40
63
  * Create a new multilingual string from language entries.
41
64
  */
42
- static fromEntries<U extends ReadonlyArray<string>>(content: MultilingualEntriesInput<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
43
- static fromEntries(content: Partial<Record<string, ReadonlyArray<string>>>, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
65
+ static fromEntries<U extends ReadonlyArray<string>>(content: MultilingualStringEntries<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
66
+ static fromEntries(content: Partial<Record<string, ReadonlyArray<MultilingualStringInput>>>, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
44
67
  /**
45
68
  * Create a new multilingual string for a single language
46
69
  */
47
- static create<U extends ReadonlyArray<string>>(language: U[number], text: string, languages: U, options?: MultilingualOptions): MultilingualString<U>;
48
- static create(language: string, text: string, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
70
+ static create<U extends ReadonlyArray<string>>(language: U[number], text: MultilingualStringInput, languages: U, options?: MultilingualOptions): MultilingualString<U>;
71
+ static create(language: string, text: MultilingualStringInput, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
49
72
  /**
50
73
  * Create an empty multilingual string
51
74
  */
52
75
  static empty<U extends ReadonlyArray<string>>(languages: U, options?: MultilingualOptions): MultilingualString<U>;
53
76
  static empty(languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
77
+ /**
78
+ * Recreate a multilingual string from its JSON representation.
79
+ */
80
+ static fromJSON<U extends ReadonlyArray<string>>(json: MultilingualStringJSON<U>, languages: U, options?: Omit<MultilingualOptions, "aliases">): MultilingualString<U>;
81
+ static fromJSON(json: MultilingualStringJSON, languages?: undefined, options?: Omit<MultilingualOptions, "aliases">): MultilingualString<ReadonlyArray<string>>;
54
82
  private getPrimaryEntry;
55
83
  /**
56
84
  * Get text in a specific language with automatic fallback
57
85
  */
58
86
  getText(language?: T[number]): string;
87
+ /**
88
+ * Get rich text in a specific language with automatic fallback
89
+ */
90
+ getRichText(language?: T[number]): string;
59
91
  /**
60
92
  * Get primary text in a specific language without fallback
61
93
  */
62
94
  getExactText(language: T[number]): string | null;
95
+ /**
96
+ * Get primary rich text in a specific language without fallback
97
+ */
98
+ getExactRichText(language: T[number]): string | null;
63
99
  /**
64
100
  * Get all text entries in a specific language without fallback
65
101
  */
66
102
  getExactTexts(language: T[number]): Array<string>;
103
+ /**
104
+ * Get all rich text entries in a specific language without fallback
105
+ */
106
+ getExactRichTexts(language: T[number]): Array<string>;
67
107
  /**
68
108
  * Get all text entries in a specific language with fallback
69
109
  */
70
110
  getTexts(language?: T[number]): Array<string>;
111
+ /**
112
+ * Get all rich text entries in a specific language with fallback
113
+ */
114
+ getRichTexts(language?: T[number]): Array<string>;
71
115
  /**
72
116
  * Get all entries in a specific language without fallback
73
117
  */
@@ -108,18 +152,14 @@ declare class MultilingualString<T extends ReadonlyArray<string> = ReadonlyArray
108
152
  * Get the default language
109
153
  */
110
154
  getDefaultLanguage(): T[number];
111
- /**
112
- * Check if this string contains rich text
113
- */
114
- isRichText(): boolean;
115
155
  /**
116
156
  * Add or update the primary text for a language (returns new instance)
117
157
  */
118
- withText(language: T[number], text: string): MultilingualString<T>;
158
+ withText(language: T[number], text: MultilingualStringInput): MultilingualString<T>;
119
159
  /**
120
160
  * Add another text entry for a language (returns new instance)
121
161
  */
122
- withEntry(language: T[number], text: string): MultilingualString<T>;
162
+ withEntry(language: T[number], text: MultilingualStringInput): MultilingualString<T>;
123
163
  /**
124
164
  * Replace aliases (returns new instance)
125
165
  */
@@ -228,9 +268,11 @@ type ItemLocation = "topLevel" | "nested";
228
268
  type ItemOrigin<T extends ReadonlyArray<string>, U extends ItemLocation> = U extends "topLevel" ? {
229
269
  belongsTo: BelongsTo;
230
270
  metadata: Metadata<T>;
271
+ persistentUrl: string | null;
231
272
  } : {
232
273
  belongsTo: null;
233
274
  metadata: null;
275
+ persistentUrl: null;
234
276
  };
235
277
  /**
236
278
  * License in OCHRE
@@ -272,7 +314,7 @@ type Event<T extends ReadonlyArray<string>> = {
272
314
  end: Date;
273
315
  } | null;
274
316
  label: MultilingualString<T>;
275
- comment: string | null;
317
+ comment: MultilingualString<T> | null;
276
318
  agent: {
277
319
  uuid: string;
278
320
  label: MultilingualString<T>;
@@ -380,7 +422,7 @@ type ImageMap = {
380
422
  */
381
423
  type Note<T extends ReadonlyArray<string>> = {
382
424
  number: number;
383
- title: string | null;
425
+ title: MultilingualString<T> | null;
384
426
  content: MultilingualString<T>;
385
427
  authors: Array<Person<T, "nested">>;
386
428
  };
@@ -418,19 +460,34 @@ type PropertyValueContent<T extends ReadonlyArray<string>> = Prettify<{
418
460
  * Property in OCHRE
419
461
  */
420
462
  type Property<T extends ReadonlyArray<string>> = {
421
- label: {
463
+ variable: {
422
464
  uuid: string;
465
+ label: MultilingualString<T>;
423
466
  publicationDateTime: Date | null;
424
- name: string;
425
467
  };
426
468
  values: Array<PropertyValueContent<T>>;
427
469
  comment: MultilingualString<T> | null;
428
470
  properties: Array<Property<T>>;
429
471
  };
472
+ /**
473
+ * Simplified property in OCHRE website payloads. Simplified property variables
474
+ * expose scalar labels rather than multilingual labels.
475
+ */
476
+ type SimplifiedProperty<T extends ReadonlyArray<string>> = {
477
+ variable: {
478
+ uuid: string;
479
+ label: string;
480
+ publicationDateTime: Date | null;
481
+ };
482
+ values: Array<PropertyValueContent<T>>;
483
+ comment: MultilingualString<T> | null;
484
+ properties: Array<SimplifiedProperty<T>>;
485
+ };
430
486
  /**
431
487
  * Property in a Set item. OCHRE exposes Set item properties as a flat list.
432
488
  */
433
489
  type SingleHierarchyProperty<T extends ReadonlyArray<string>> = Omit<Property<T>, "properties">;
490
+ type SingleHierarchySimplifiedProperty<T extends ReadonlyArray<string>> = Omit<SimplifiedProperty<T>, "properties">;
434
491
  type WithSingleHierarchyProperties<U extends {
435
492
  properties: Array<Property<T>>;
436
493
  }, T extends ReadonlyArray<string>> = U extends {
@@ -806,7 +863,7 @@ type PropertyValueQueryItem = {
806
863
  count: number;
807
864
  dataType: Exclude<PropertyValueContent<ReadonlyArray<string>>["dataType"], "coordinate">;
808
865
  content: string | number | boolean | null;
809
- label: string | null;
866
+ label: MultilingualString | null;
810
867
  };
811
868
  /**
812
869
  * Represents a grouped Set attribute value query item
@@ -923,7 +980,6 @@ type Query = QueryLeaf | QueryGroup;
923
980
  type FetchFunction$4 = (input: string | URL | globalThis.Request, init?: RequestInit) => Promise<Response>;
924
981
  type FetchGalleryBaseOptions<TLanguages extends ReadonlyArray<string> | undefined = undefined> = {
925
982
  languages?: TLanguages;
926
- isRichText?: boolean;
927
983
  fetch?: FetchFunction$4;
928
984
  };
929
985
  type FetchGalleryLanguages<TLanguages extends ReadonlyArray<string> | undefined> = TLanguages extends readonly [] ? ReadonlyArray<string> : TLanguages extends ReadonlyArray<string> ? TLanguages : ReadonlyArray<string>;
@@ -937,7 +993,6 @@ type FetchGalleryLanguages<TLanguages extends ReadonlyArray<string> | undefined>
937
993
  * @param params.perPage - The number of items per page
938
994
  * @param options - The options for the fetch
939
995
  * @param options.languages - Language codes to parse. Inline arrays preserve literal types automatically.
940
- * @param options.isRichText - Whether to parse rich text fields as HTML strings
941
996
  * @param options.fetch - The fetch function to use
942
997
  * @returns The parsed gallery or an error message if the fetch/parse fails
943
998
  */
@@ -958,7 +1013,6 @@ declare function fetchGallery<const TLanguages extends ReadonlyArray<string> | u
958
1013
  type FetchFunction$3 = (input: string | URL | globalThis.Request, init?: RequestInit) => Promise<Response>;
959
1014
  type FetchItemLinksBaseOptions<TLanguages extends ReadonlyArray<string> | undefined = undefined> = {
960
1015
  languages?: TLanguages;
961
- isRichText?: boolean;
962
1016
  fetch?: FetchFunction$3;
963
1017
  };
964
1018
  type FetchItemLinksLanguages<TLanguages extends ReadonlyArray<string> | undefined> = TLanguages extends readonly [] ? ReadonlyArray<string> : TLanguages extends ReadonlyArray<string> ? TLanguages : ReadonlyArray<string>;
@@ -969,7 +1023,6 @@ type FetchItemLinksLanguages<TLanguages extends ReadonlyArray<string> | undefine
969
1023
  * @param options - Fetch and parser options
970
1024
  * @param options.itemCategory - The category of items inside linked Trees/Sets to parse. Tree accepts one category; Set accepts one category or an array.
971
1025
  * @param options.languages - Language codes to parse. Inline arrays preserve literal types automatically.
972
- * @param options.isRichText - Whether to parse the text as rich text
973
1026
  * @param options.fetch - Custom fetch function to use instead of the default fetch
974
1027
  * @returns An object containing parsed linked items
975
1028
  */
@@ -987,7 +1040,6 @@ declare function fetchItemLinks<const TItemCategory extends HierarchyItemCategor
987
1040
  type FetchFunction$2 = (input: string | URL | globalThis.Request, init?: RequestInit) => Promise<Response>;
988
1041
  type FetchItemBaseOptions<TLanguages extends ReadonlyArray<string> | undefined = undefined> = {
989
1042
  languages?: TLanguages;
990
- isRichText?: boolean;
991
1043
  fetch?: FetchFunction$2;
992
1044
  };
993
1045
  type FetchItemLanguages<TLanguages extends ReadonlyArray<string> | undefined> = TLanguages extends readonly [] ? ReadonlyArray<string> : TLanguages extends ReadonlyArray<string> ? TLanguages : ReadonlyArray<string>;
@@ -1014,7 +1066,6 @@ declare function withLanguages<const TLanguages extends ReadonlyArray<string>>(l
1014
1066
  * @param options.category - The category of the OCHRE item to fetch
1015
1067
  * @param options.itemCategory - The category of items inside the OCHRE item to fetch. Only valid for Trees and Sets. Tree accepts one category; Set accepts one category or an array.
1016
1068
  * @param options.languages - Language codes to parse. Inline arrays preserve literal types automatically.
1017
- * @param options.isRichText - Whether to parse the text as rich text
1018
1069
  * @param options.fetch - Custom fetch function to use instead of the default fetch
1019
1070
  * @returns An object containing the parsed item
1020
1071
  */
@@ -1053,7 +1104,6 @@ declare function fetchItem<const TCategory extends DataCategory, const TLanguage
1053
1104
  type FetchFunction$1 = (input: string | URL | globalThis.Request, init?: RequestInit) => Promise<Response>;
1054
1105
  type FetchSetItemsBaseOptions<TLanguages extends ReadonlyArray<string> | undefined = undefined> = {
1055
1106
  languages?: TLanguages;
1056
- isRichText?: boolean;
1057
1107
  fetch?: FetchFunction$1;
1058
1108
  };
1059
1109
  type FetchSetItemsLanguages<TLanguages extends ReadonlyArray<string> | undefined> = TLanguages extends readonly [] ? ReadonlyArray<string> : TLanguages extends ReadonlyArray<string> ? TLanguages : ReadonlyArray<string>;
@@ -1514,7 +1564,7 @@ type WebElementComponent<T extends ReadonlyArray<string> = ReadonlyArray<string>
1514
1564
  component: "query";
1515
1565
  linkUuids: Array<string>;
1516
1566
  items: Array<{
1517
- label: string;
1567
+ label: MultilingualString<T>;
1518
1568
  queries: Array<WebsitePropertyQuery<T>>;
1519
1569
  startIcon: string | null;
1520
1570
  endIcon: string | null;
@@ -1546,7 +1596,7 @@ type WebElementComponent<T extends ReadonlyArray<string> = ReadonlyArray<string>
1546
1596
  } | {
1547
1597
  component: "search-bar";
1548
1598
  queryVariant: "submit" | "change";
1549
- placeholder: string | null;
1599
+ placeholder: MultilingualString<T> | null;
1550
1600
  baseFilterQueries: string | null;
1551
1601
  boundElementUuid: string | null;
1552
1602
  href: string | null;
@@ -1648,7 +1698,6 @@ type FetchFunction = (input: string | URL | globalThis.Request, init?: RequestIn
1648
1698
  declare function fetchWebsite<const T extends ReadonlyArray<string> = ReadonlyArray<string>>(abbreviation: string, options?: {
1649
1699
  fetch?: FetchFunction;
1650
1700
  languages?: T;
1651
- isRichText?: boolean;
1652
1701
  }): Promise<{
1653
1702
  website: Website<T>;
1654
1703
  error: null;
@@ -1666,127 +1715,146 @@ type PropertyOptions = {
1666
1715
  limitToLeafPropertyValues?: boolean;
1667
1716
  };
1668
1717
  type PropertyContent<T extends ReadonlyArray<string>> = PropertyValueContent<T>["content"];
1718
+ type SearchableProperty<T extends ReadonlyArray<string>> = Property<T> | SingleHierarchyProperty<T> | SimplifiedProperty<T> | SingleHierarchySimplifiedProperty<T>;
1669
1719
  /**
1670
- * Finds a property by its label UUID in an array of properties.
1720
+ * Finds a property by its variable UUID in an array of properties.
1671
1721
  *
1672
1722
  * @param properties - Array of properties to search through
1673
- * @param labelUuid - The property label UUID to search for
1723
+ * @param variableUuid - The property variable UUID to search for
1674
1724
  * @param options - Search options, including whether to include nested properties
1675
1725
  * @returns The matching Property object, or null if not found
1676
1726
  */
1677
- declare function getPropertyByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelUuid: string, options?: PropertyOptions): Property<T> | null;
1727
+ declare function getPropertyByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, variableUuid: string, options?: PropertyOptions): Property<T> | null;
1728
+ declare function getPropertyByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, variableUuid: string, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1729
+ declare function getPropertyByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableUuid: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
1730
+ declare function getPropertyByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, variableUuid: string, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1678
1731
  /**
1679
- * Retrieves all values for a property with the given label UUID.
1732
+ * Retrieves all values for a property with the given variable UUID.
1680
1733
  *
1681
1734
  * @param properties - Array of properties to search through
1682
- * @param labelUuid - The property label UUID to search for
1735
+ * @param variableUuid - The property variable UUID to search for
1683
1736
  * @param options - Search options, including whether to include nested properties
1684
1737
  * @returns Array of property values, or null if property not found
1685
1738
  */
1686
- declare function getPropertyValuesByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelUuid: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1739
+ declare function getPropertyValuesByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1687
1740
  /**
1688
- * Retrieves all value contents for a property with the given label UUID.
1741
+ * Retrieves all value contents for a property with the given variable UUID.
1689
1742
  *
1690
1743
  * @param properties - Array of properties to search through
1691
- * @param labelUuid - The property label UUID to search for
1744
+ * @param variableUuid - The property variable UUID to search for
1692
1745
  * @param options - Search options, including whether to include nested properties
1693
1746
  * @returns Array of property value contents, or null if property not found
1694
1747
  */
1695
- declare function getPropertyValueContentsByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelUuid: string, options?: PropertyOptions): Array<PropertyContent<T>> | null;
1748
+ declare function getPropertyValueContentsByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): Array<PropertyContent<T>> | null;
1696
1749
  /**
1697
- * Gets the first value of a property with the given label UUID.
1750
+ * Gets the first value of a property with the given variable UUID.
1698
1751
  *
1699
1752
  * @param properties - Array of properties to search through
1700
- * @param labelUuid - The property label UUID to search for
1753
+ * @param variableUuid - The property variable UUID to search for
1701
1754
  * @param options - Search options, including whether to include nested properties
1702
1755
  * @returns The first property value, or null if property not found
1703
1756
  */
1704
- declare function getPropertyValueByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelUuid: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1757
+ declare function getPropertyValueByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1705
1758
  /**
1706
- * Gets the first value content of a property with the given label UUID.
1759
+ * Gets the first value content of a property with the given variable UUID.
1707
1760
  *
1708
1761
  * @param properties - Array of properties to search through
1709
- * @param labelUuid - The property label UUID to search for
1762
+ * @param variableUuid - The property variable UUID to search for
1710
1763
  * @param options - Search options, including whether to include nested properties
1711
1764
  * @returns The first property value content, or null if property not found
1712
1765
  */
1713
- declare function getPropertyValueContentByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelUuid: string, options?: PropertyOptions): PropertyContent<T> | null;
1766
+ declare function getPropertyValueContentByVariableUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): PropertyContent<T> | null;
1714
1767
  /**
1715
- * Finds a property by its label name in an array of properties.
1768
+ * Finds a property by its variable label in an array of properties.
1716
1769
  *
1717
1770
  * @param properties - Array of properties to search through
1718
- * @param labelName - The property label name to search for
1771
+ * @param variableLabel - The property variable label to search for
1719
1772
  * @param options - Search options, including whether to include nested properties
1720
1773
  * @returns The matching Property object, or null if not found
1721
1774
  */
1722
- declare function getPropertyByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, options?: PropertyOptions): Property<T> | null;
1775
+ declare function getPropertyByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, variableLabel: string, options?: PropertyOptions): Property<T> | null;
1776
+ declare function getPropertyByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, variableLabel: string, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1777
+ declare function getPropertyByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
1778
+ declare function getPropertyByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, variableLabel: string, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1723
1779
  /**
1724
- * Finds a property by its label name and all values.
1780
+ * Finds a property by its variable label and all values.
1725
1781
  *
1726
1782
  * @param properties - Array of properties to search through
1727
- * @param labelName - The property label name to search for
1783
+ * @param variableLabel - The property variable label to search for
1728
1784
  * @param values - The property values to search for
1729
1785
  * @param options - Search options, including whether to include nested properties
1730
1786
  * @returns The matching Property object, or null if not found or all values do not match
1731
1787
  */
1732
- declare function getPropertyByLabelNameAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): Property<T> | null;
1788
+ declare function getPropertyByVariableLabelAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): Property<T> | null;
1789
+ declare function getPropertyByVariableLabelAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1790
+ declare function getPropertyByVariableLabelAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1791
+ declare function getPropertyByVariableLabelAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1733
1792
  /**
1734
- * Finds a property by its label name and all value contents.
1793
+ * Finds a property by its variable label and all value contents.
1735
1794
  *
1736
1795
  * @param properties - Array of properties to search through
1737
- * @param labelName - The property label name to search for
1796
+ * @param variableLabel - The property variable label to search for
1738
1797
  * @param valueContents - The value contents to search for
1739
1798
  * @param options - Search options, including whether to include nested properties
1740
1799
  * @returns The matching Property object, or null if not found or all value contents do not match
1741
1800
  */
1742
- declare function getPropertyByLabelNameAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): Property<T> | null;
1801
+ declare function getPropertyByVariableLabelAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): Property<T> | null;
1802
+ declare function getPropertyByVariableLabelAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1803
+ declare function getPropertyByVariableLabelAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1804
+ declare function getPropertyByVariableLabelAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1743
1805
  /**
1744
- * Finds a property by its label name and one value.
1806
+ * Finds a property by its variable label and one value.
1745
1807
  *
1746
1808
  * @param properties - Array of properties to search through
1747
- * @param labelName - The property label name to search for
1809
+ * @param variableLabel - The property variable label to search for
1748
1810
  * @param value - The property value to search for
1749
1811
  * @param options - Search options, including whether to include nested properties
1750
1812
  * @returns The matching Property object, or null if not found or value does not match
1751
1813
  */
1752
- declare function getPropertyByLabelNameAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, value: PropertyValueContent<T>, options?: PropertyOptions): Property<T> | null;
1814
+ declare function getPropertyByVariableLabelAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): Property<T> | null;
1815
+ declare function getPropertyByVariableLabelAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1816
+ declare function getPropertyByVariableLabelAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1817
+ declare function getPropertyByVariableLabelAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1753
1818
  /**
1754
- * Finds a property by its label name and one value content.
1819
+ * Finds a property by its variable label and one value content.
1755
1820
  *
1756
1821
  * @param properties - Array of properties to search through
1757
- * @param labelName - The property label name to search for
1822
+ * @param variableLabel - The property variable label to search for
1758
1823
  * @param valueContent - The value content to search for
1759
1824
  * @param options - Search options, including whether to include nested properties
1760
1825
  * @returns The matching Property object, or null if not found or value content does not match
1761
1826
  */
1762
- declare function getPropertyByLabelNameAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, valueContent: PropertyContent<T>, options?: PropertyOptions): Property<T> | null;
1827
+ declare function getPropertyByVariableLabelAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): Property<T> | null;
1828
+ declare function getPropertyByVariableLabelAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1829
+ declare function getPropertyByVariableLabelAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1830
+ declare function getPropertyByVariableLabelAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1763
1831
  /**
1764
- * Retrieves all values for a property with the given label name.
1832
+ * Retrieves all values for a property with the given variable label.
1765
1833
  *
1766
1834
  * @param properties - Array of properties to search through
1767
- * @param labelName - The property label name to search for
1835
+ * @param variableLabel - The property variable label to search for
1768
1836
  * @param options - Search options, including whether to include nested properties
1769
1837
  * @returns Array of property values, or null if property not found
1770
1838
  */
1771
- declare function getPropertyValuesByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1839
+ declare function getPropertyValuesByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1772
1840
  /**
1773
- * Gets the first value of a property with the given label name.
1841
+ * Gets the first value of a property with the given variable label.
1774
1842
  *
1775
1843
  * @param properties - Array of properties to search through
1776
- * @param labelName - The property label name to search for
1844
+ * @param variableLabel - The property variable label to search for
1777
1845
  * @param options - Search options, including whether to include nested properties
1778
1846
  * @returns The first property value, or null if property not found
1779
1847
  */
1780
- declare function getPropertyValueByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1848
+ declare function getPropertyValueByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1781
1849
  /**
1782
- * Gets the first value content of a property with the given label name.
1850
+ * Gets the first value content of a property with the given variable label.
1783
1851
  *
1784
1852
  * @param properties - Array of properties to search through
1785
- * @param labelName - The property label name to search for
1853
+ * @param variableLabel - The property variable label to search for
1786
1854
  * @param options - Search options, including whether to include nested properties
1787
1855
  * @returns The first property value content, or null if property not found
1788
1856
  */
1789
- declare function getPropertyValueContentByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, options?: PropertyOptions): PropertyContent<T> | null;
1857
+ declare function getPropertyValueContentByVariableLabel<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): PropertyContent<T> | null;
1790
1858
  /**
1791
1859
  * Gets all unique properties from an array of properties.
1792
1860
  *
@@ -1795,14 +1863,17 @@ declare function getPropertyValueContentByLabelName<T extends ReadonlyArray<stri
1795
1863
  * @returns Array of unique properties
1796
1864
  */
1797
1865
  declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, options?: PropertyOptions): Array<Property<T>>;
1866
+ declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, options?: PropertyOptions): Array<SingleHierarchyProperty<T>>;
1867
+ declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, options?: PropertyOptions): Array<SimplifiedProperty<T>>;
1868
+ declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, options?: PropertyOptions): Array<SingleHierarchySimplifiedProperty<T>>;
1798
1869
  /**
1799
- * Gets all unique property label names from an array of properties.
1870
+ * Gets all unique property variable labels from an array of properties.
1800
1871
  *
1801
- * @param properties - Array of properties to get unique property labels from
1872
+ * @param properties - Array of properties to get unique property variable labels from
1802
1873
  * @param options - Search options, including whether to include nested properties
1803
- * @returns Array of unique property label names
1874
+ * @returns Array of unique property variable labels
1804
1875
  */
1805
- declare function getUniquePropertyLabelNames<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, options?: PropertyOptions): Array<string>;
1876
+ declare function getUniquePropertyVariableLabels<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, options?: PropertyOptions): Array<string>;
1806
1877
  /**
1807
1878
  * Get the leaf property values from an array of property values.
1808
1879
  *
@@ -1811,17 +1882,17 @@ declare function getUniquePropertyLabelNames<T extends ReadonlyArray<string> = R
1811
1882
  */
1812
1883
  declare function getLeafPropertyValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(propertyValues: ReadonlyArray<PropertyValueContent<T>>): Array<PropertyValueContent<T>>;
1813
1884
  /**
1814
- * Filters a property based on a label and value criterion.
1885
+ * Filters a property based on a variable label and value content criterion.
1815
1886
  *
1816
1887
  * @param property - The property to filter
1817
- * @param filter - Filter criteria containing label and value to match
1818
- * @param filter.labelName - The label name to filter by
1888
+ * @param filter - Filter criteria containing variable label and value to match
1889
+ * @param filter.variableLabel - The variable label to filter by
1819
1890
  * @param filter.value - The value to filter by
1820
1891
  * @param options - Search options, including whether to include nested properties
1821
1892
  * @returns True if the property matches the filter criteria, false otherwise
1822
1893
  */
1823
- declare function filterProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(property: Property<T>, filter: {
1824
- labelName: string;
1894
+ declare function filterProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(property: SearchableProperty<T>, filter: {
1895
+ variableLabel: string;
1825
1896
  value: PropertyValueContent<T>;
1826
1897
  }, options?: PropertyOptions): boolean;
1827
1898
  //#endregion
@@ -1840,4 +1911,4 @@ declare const DEFAULT_PAGE_SIZE = 48;
1840
1911
  */
1841
1912
  declare function flattenItemProperties<U extends DataCategory = DataCategory, V extends HierarchyItemDataCategory<U> = HierarchyItemDataCategory<U>, T extends ReadonlyArray<string> = ReadonlyArray<string>, W extends ItemLocation = "topLevel">(item: Item<U, V, T, W>): FlattenedItem<Item<U, V, T, W>, T>;
1842
1913
  //#endregion
1843
- export { BaseItem, BaseItemLink, BelongsTo, Bibliography, BibliographyEntryInfo, BibliographyItemLink, BibliographySourceDocument, Concept, ConceptItemLink, Context, ContextDataCategory, ContextItem, ContextNode, ContextTree, ContextTreeFilterLevel, ContextTreeLevel, ContextTreeLevelItem, Coordinates, CoordinatesSource, DEFAULT_PAGE_SIZE, DataCategory, DictionaryUnitItemLink, Event, Gallery, Heading, HeadingDataCategory, HierarchyDataCategory, HierarchyItemCategoryFromOption, HierarchyItemCategoryOption, HierarchyItemDataCategory, Identification, Image, ImageMap, ImageMapArea, Interpretation, Item, ItemLink, ItemLinkCategory, ItemLinks, ItemLocation, ItemsDataCategory, License, Metadata, Note, Observation, Period, PeriodItemLink, Person, PersonItemLink, Property, PropertyOptions, PropertyValue, PropertyValueContent, PropertyValueItemLink, PropertyValueQueryItem, PropertyVariable, PropertyVariableItemLink, Query, QueryGroup, QueryLeaf, RecursiveDataCategory, Resource, ResourceItemLink, Scope, Section, Set, SetAttributeValueQueryItem, SetBibliography, SetConcept, SetItem, SetItemDataCategory, SetItemLink, SetItemsSort, SetItemsSortDirection, SetPeriod, SetResource, SetSpatialUnit, SetTree, SingleHierarchyProperty, SpatialUnit, SpatialUnitItemLink, Style, StylesheetCategory, StylesheetItem, Text, TextItemLink, Tree, TreeItemLink, WebBlock, WebBlockLayout, WebElement, WebElementComponent, WebImage, WebSegment, WebSegmentItem, WebTitle, Webpage, Website, WebsitePropertyQuery, WebsitePropertyQueryNode, WebsiteType, defineLanguages, fetchGallery, fetchItem, fetchItemLinks, fetchSetItems, fetchSetPropertyValues, fetchWebsite, filterProperties, flattenItemProperties, getLeafPropertyValues, getPropertyByLabelName, getPropertyByLabelNameAndValue, getPropertyByLabelNameAndValueContent, getPropertyByLabelNameAndValueContents, getPropertyByLabelNameAndValues, getPropertyByLabelUuid, getPropertyValueByLabelName, getPropertyValueByLabelUuid, getPropertyValueContentByLabelName, getPropertyValueContentByLabelUuid, getPropertyValueContentsByLabelUuid, getPropertyValuesByLabelName, getPropertyValuesByLabelUuid, getUniqueProperties, getUniquePropertyLabelNames, withLanguages };
1914
+ export { BaseItem, BaseItemLink, BelongsTo, Bibliography, BibliographyEntryInfo, BibliographyItemLink, BibliographySourceDocument, Concept, ConceptItemLink, Context, ContextDataCategory, ContextItem, ContextNode, ContextTree, ContextTreeFilterLevel, ContextTreeLevel, ContextTreeLevelItem, Coordinates, CoordinatesSource, DEFAULT_PAGE_SIZE, DataCategory, DictionaryUnitItemLink, Event, Gallery, Heading, HeadingDataCategory, HierarchyDataCategory, HierarchyItemCategoryFromOption, HierarchyItemCategoryOption, HierarchyItemDataCategory, Identification, Image, ImageMap, ImageMapArea, Interpretation, Item, ItemLink, ItemLinkCategory, ItemLinks, ItemLocation, ItemsDataCategory, License, Metadata, type MultilingualOptions, MultilingualString, type MultilingualStringEntries, type MultilingualStringEntry, type MultilingualStringInput, type MultilingualStringJSON, type MultilingualStringObject, type MultilingualStringText, Note, Observation, Period, PeriodItemLink, Person, PersonItemLink, Property, PropertyOptions, PropertyValue, PropertyValueContent, PropertyValueItemLink, PropertyValueQueryItem, PropertyVariable, PropertyVariableItemLink, Query, QueryGroup, QueryLeaf, RecursiveDataCategory, Resource, ResourceItemLink, Scope, Section, Set, SetAttributeValueQueryItem, SetBibliography, SetConcept, SetItem, SetItemDataCategory, SetItemLink, SetItemsSort, SetItemsSortDirection, SetPeriod, SetResource, SetSpatialUnit, SetTree, SimplifiedProperty, SingleHierarchyProperty, SingleHierarchySimplifiedProperty, SpatialUnit, SpatialUnitItemLink, Style, StylesheetCategory, StylesheetItem, Text, TextItemLink, Tree, TreeItemLink, WebBlock, WebBlockLayout, WebElement, WebElementComponent, WebImage, WebSegment, WebSegmentItem, WebTitle, Webpage, Website, WebsitePropertyQuery, WebsitePropertyQueryNode, WebsiteType, defineLanguages, fetchGallery, fetchItem, fetchItemLinks, fetchSetItems, fetchSetPropertyValues, fetchWebsite, filterProperties, flattenItemProperties, getLeafPropertyValues, getPropertyByVariableLabel, getPropertyByVariableLabelAndValue, getPropertyByVariableLabelAndValueContent, getPropertyByVariableLabelAndValueContents, getPropertyByVariableLabelAndValues, getPropertyByVariableUuid, getPropertyValueByVariableLabel, getPropertyValueByVariableUuid, getPropertyValueContentByVariableLabel, getPropertyValueContentByVariableUuid, getPropertyValueContentsByVariableUuid, getPropertyValuesByVariableLabel, getPropertyValuesByVariableUuid, getUniqueProperties, getUniquePropertyVariableLabels, withLanguages };