ochre-sdk 1.0.0-beta.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -20,6 +20,8 @@ type MultilingualStringJSON<T extends ReadonlyArray<string> = ReadonlyArray<stri
20
20
  content: Partial<Record<T[number], Array<MultilingualStringEntry>>>;
21
21
  aliases: Array<string>;
22
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>>>;
23
25
  /**
24
26
  * Options for creating and working with multilingual strings
25
27
  */
@@ -28,8 +30,14 @@ type MultilingualOptions = {
28
30
  availableLanguages?: ReadonlyArray<string>; /** Alias values carried by OCHRE as zxx content */
29
31
  aliases?: ReadonlyArray<string>;
30
32
  };
31
- type MultilingualInputContent<T extends ReadonlyArray<string>> = Partial<Record<T[number], MultilingualStringInput>>;
32
- type MultilingualEntriesInput<T extends ReadonlyArray<string>> = Partial<Record<T[number], ReadonlyArray<MultilingualStringInput>>>;
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
+ };
33
41
  /**
34
42
  * Multilingual string
35
43
  */
@@ -38,16 +46,23 @@ declare class MultilingualString<T extends ReadonlyArray<string> = ReadonlyArray
38
46
  private readonly _options;
39
47
  private readonly _availableLanguages;
40
48
  private readonly _aliases;
41
- 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;
42
57
  /**
43
58
  * Create a new multilingual string from an object of language codes to text
44
59
  */
45
- static fromObject<U extends ReadonlyArray<string>>(content: MultilingualInputContent<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
60
+ static fromObject<U extends ReadonlyArray<string>>(content: MultilingualStringObject<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
46
61
  static fromObject(content: Partial<Record<string, MultilingualStringInput>>, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
47
62
  /**
48
63
  * Create a new multilingual string from language entries.
49
64
  */
50
- static fromEntries<U extends ReadonlyArray<string>>(content: MultilingualEntriesInput<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
65
+ static fromEntries<U extends ReadonlyArray<string>>(content: MultilingualStringEntries<U>, languages: U, options?: MultilingualOptions): MultilingualString<U>;
51
66
  static fromEntries(content: Partial<Record<string, ReadonlyArray<MultilingualStringInput>>>, languages?: undefined, options?: MultilingualOptions): MultilingualString<ReadonlyArray<string>>;
52
67
  /**
53
68
  * Create a new multilingual string for a single language
@@ -59,6 +74,11 @@ declare class MultilingualString<T extends ReadonlyArray<string> = ReadonlyArray
59
74
  */
60
75
  static empty<U extends ReadonlyArray<string>>(languages: U, options?: MultilingualOptions): MultilingualString<U>;
61
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>>;
62
82
  private getPrimaryEntry;
63
83
  /**
64
84
  * Get text in a specific language with automatic fallback
@@ -168,38 +188,48 @@ declare class MultilingualString<T extends ReadonlyArray<string> = ReadonlyArray
168
188
  //#endregion
169
189
  //#region src/types/index.d.ts
170
190
  type Prettify<T> = { [K in keyof T]: T[K] } & {};
191
+ /**
192
+ * Language-code tuple or array used by OCHRE multilingual fields.
193
+ *
194
+ * Use the default when the consumer does not need to narrow a value to a
195
+ * specific language tuple.
196
+ */
197
+ type LanguageCodes = ReadonlyArray<string>;
171
198
  /**
172
199
  * The category of an item in OCHRE
173
200
  */
174
- type DataCategory = "tree" | "bibliography" | "concept" | "spatialUnit" | "period" | "person" | "propertyVariable" | "propertyValue" | "resource" | "text" | "set";
175
- type HierarchyDataCategory = Extract<DataCategory, "tree" | "set">;
201
+ type ItemCategory = "tree" | "bibliography" | "concept" | "spatialUnit" | "period" | "person" | "propertyVariable" | "propertyValue" | "resource" | "text" | "set";
202
+ /**
203
+ * OCHRE item categories that can contain other items in API payloads.
204
+ */
205
+ type ItemContainerCategory = Extract<ItemCategory, "tree" | "set">;
176
206
  /**
177
207
  * The category of items in a Tree
178
208
  */
179
- type ItemsDataCategory = Exclude<DataCategory, "tree">;
209
+ type TreeItemCategory = Exclude<ItemCategory, "tree">;
180
210
  /**
181
211
  * The category of items in a Set
182
212
  */
183
- type SetItemDataCategory = DataCategory;
184
- type HierarchyItemDataCategory<U extends DataCategory> = U extends "tree" ? ItemsDataCategory : U extends "set" ? SetItemDataCategory : never;
185
- type HierarchyItemCategoryOption<U extends DataCategory> = U extends "tree" ? ItemsDataCategory : U extends "set" ? SetItemDataCategory | ReadonlyArray<SetItemDataCategory> : never;
186
- type HierarchyItemCategoryFromOption<U extends DataCategory, V extends HierarchyItemCategoryOption<U> | undefined> = V extends ReadonlyArray<infer W> ? Extract<W, HierarchyItemDataCategory<U>> : V extends HierarchyItemDataCategory<U> ? V : HierarchyItemDataCategory<U>;
213
+ type SetItemCategory = ItemCategory;
214
+ type ContainedItemCategory<U extends ItemCategory = ItemCategory> = U extends "tree" ? TreeItemCategory : U extends "set" ? SetItemCategory : never;
215
+ type ContainedItemCategoryOption<U extends ItemCategory = ItemCategory> = U extends "tree" ? TreeItemCategory : U extends "set" ? SetItemCategory | ReadonlyArray<SetItemCategory> : never;
216
+ type ContainedItemCategoryFromOption<U extends ItemCategory = ItemCategory, V extends ContainedItemCategoryOption<U> | undefined = undefined> = V extends ReadonlyArray<infer W> ? Extract<W, ContainedItemCategory<U>> : V extends ContainedItemCategory<U> ? V : ContainedItemCategory<U>;
187
217
  /**
188
218
  * The category of items in a heading
189
219
  */
190
- type HeadingDataCategory = Exclude<DataCategory, "tree" | "bibliography" | "spatialUnit" | "concept" | "period">;
220
+ type HeadingItemCategory = Exclude<ItemCategory, "tree" | "bibliography" | "spatialUnit" | "concept" | "period">;
191
221
  /**
192
- * The category of items that are in hierarchies (tree or set)
222
+ * The category of items that expose recursive subitem structures.
193
223
  */
194
- type RecursiveDataCategory = Exclude<DataCategory, "tree" | "person" | "propertyVariable" | "propertyValue" | "set">;
224
+ type RecursiveItemCategory = Exclude<ItemCategory, "tree" | "person" | "propertyVariable" | "propertyValue" | "set">;
195
225
  /**
196
226
  * The category names that can appear in OCHRE context paths
197
227
  */
198
- type ContextDataCategory = Exclude<DataCategory, "tree" | "person" | "set">;
228
+ type ContextItemCategory = Exclude<ItemCategory, "tree" | "person" | "set">;
199
229
  /**
200
230
  * Basic identification information
201
231
  */
202
- type Identification<T extends ReadonlyArray<string>> = {
232
+ type Identification<T extends LanguageCodes = LanguageCodes> = {
203
233
  label: MultilingualString<T>;
204
234
  abbreviation: MultilingualString<T> | null;
205
235
  code: string | null;
@@ -209,7 +239,7 @@ type Identification<T extends ReadonlyArray<string>> = {
209
239
  /**
210
240
  * Metadata in OCHRE
211
241
  */
212
- type Metadata<T extends ReadonlyArray<string>> = {
242
+ type Metadata<T extends LanguageCodes = LanguageCodes> = {
213
243
  dataset: string;
214
244
  description: string;
215
245
  publisher: string;
@@ -244,8 +274,8 @@ type BelongsTo = {
244
274
  uuid: string;
245
275
  abbreviation: string;
246
276
  };
247
- type ItemLocation = "topLevel" | "nested";
248
- type ItemOrigin<T extends ReadonlyArray<string>, U extends ItemLocation> = U extends "topLevel" ? {
277
+ type ItemPayloadKind = "topLevel" | "embedded";
278
+ type ItemEnvelopeFields<T extends LanguageCodes, U extends ItemPayloadKind> = U extends "topLevel" ? {
249
279
  belongsTo: BelongsTo;
250
280
  metadata: Metadata<T>;
251
281
  persistentUrl: string | null;
@@ -273,7 +303,7 @@ type ContextItem = {
273
303
  /**
274
304
  * Context node in OCHRE
275
305
  */
276
- type ContextNode<U extends ContextDataCategory> = {
306
+ type ContextNode<U extends ContextItemCategory = ContextItemCategory> = {
277
307
  tree: ContextItem;
278
308
  project: ContextItem;
279
309
  heading: Array<ContextItem>;
@@ -281,14 +311,14 @@ type ContextNode<U extends ContextDataCategory> = {
281
311
  /**
282
312
  * Context in OCHRE
283
313
  */
284
- type Context<U extends ContextDataCategory> = {
314
+ type Context<U extends ContextItemCategory = ContextItemCategory> = {
285
315
  nodes: Array<ContextNode<U>>;
286
316
  displayPath: string;
287
317
  };
288
318
  /**
289
319
  * Event in OCHRE
290
320
  */
291
- type Event<T extends ReadonlyArray<string>> = {
321
+ type Event<T extends LanguageCodes = LanguageCodes> = {
292
322
  date: Date | {
293
323
  start: Date;
294
324
  end: Date;
@@ -314,7 +344,7 @@ type Event<T extends ReadonlyArray<string>> = {
314
344
  /**
315
345
  * Source of coordinates in OCHRE
316
346
  */
317
- type CoordinatesSource<T extends ReadonlyArray<string>> = {
347
+ type CoordinatesSource<T extends LanguageCodes = LanguageCodes> = {
318
348
  context: "self";
319
349
  uuid: string;
320
350
  label: MultilingualString<T>;
@@ -335,7 +365,7 @@ type CoordinatesSource<T extends ReadonlyArray<string>> = {
335
365
  /**
336
366
  * Coordinates in OCHRE
337
367
  */
338
- type Coordinates<T extends ReadonlyArray<string>> = {
368
+ type Coordinates<T extends LanguageCodes = LanguageCodes> = {
339
369
  type: "point";
340
370
  latitude: number;
341
371
  longitude: number;
@@ -356,7 +386,7 @@ type Coordinates<T extends ReadonlyArray<string>> = {
356
386
  /**
357
387
  * Image in OCHRE
358
388
  */
359
- type Image<T extends ReadonlyArray<string>> = {
389
+ type Image<T extends LanguageCodes = LanguageCodes> = {
360
390
  publicationDateTime: Date | null;
361
391
  identification: Identification<T> | null;
362
392
  href: string | null;
@@ -400,16 +430,16 @@ type ImageMap = {
400
430
  /**
401
431
  * Note in OCHRE
402
432
  */
403
- type Note<T extends ReadonlyArray<string>> = {
433
+ type Note<T extends LanguageCodes = LanguageCodes> = {
404
434
  number: number;
405
435
  title: MultilingualString<T> | null;
406
436
  content: MultilingualString<T>;
407
- authors: Array<Person<T, "nested">>;
437
+ authors: Array<Person<T, "embedded">>;
408
438
  };
409
439
  /**
410
440
  * Property value content in OCHRE
411
441
  */
412
- type PropertyValueContent<T extends ReadonlyArray<string>> = Prettify<{
442
+ type PropertyValueContent<T extends LanguageCodes = LanguageCodes> = Prettify<{
413
443
  hierarchy: {
414
444
  isLeaf: boolean;
415
445
  level: number | null;
@@ -439,7 +469,7 @@ type PropertyValueContent<T extends ReadonlyArray<string>> = Prettify<{
439
469
  /**
440
470
  * Property in OCHRE
441
471
  */
442
- type Property<T extends ReadonlyArray<string>> = {
472
+ type Property<T extends LanguageCodes = LanguageCodes> = {
443
473
  variable: {
444
474
  uuid: string;
445
475
  label: MultilingualString<T>;
@@ -453,7 +483,7 @@ type Property<T extends ReadonlyArray<string>> = {
453
483
  * Simplified property in OCHRE website payloads. Simplified property variables
454
484
  * expose scalar labels rather than multilingual labels.
455
485
  */
456
- type SimplifiedProperty<T extends ReadonlyArray<string>> = {
486
+ type SimplifiedProperty<T extends LanguageCodes = LanguageCodes> = {
457
487
  variable: {
458
488
  uuid: string;
459
489
  label: string;
@@ -466,41 +496,45 @@ type SimplifiedProperty<T extends ReadonlyArray<string>> = {
466
496
  /**
467
497
  * Property in a Set item. OCHRE exposes Set item properties as a flat list.
468
498
  */
469
- type SingleHierarchyProperty<T extends ReadonlyArray<string>> = Omit<Property<T>, "properties">;
470
- type SingleHierarchySimplifiedProperty<T extends ReadonlyArray<string>> = Omit<SimplifiedProperty<T>, "properties">;
471
- type WithSingleHierarchyProperties<U extends {
499
+ type SetItemProperty<T extends LanguageCodes = LanguageCodes> = Omit<Property<T>, "properties">;
500
+ type SetItemSimplifiedProperty<T extends LanguageCodes = LanguageCodes> = Omit<SimplifiedProperty<T>, "properties">;
501
+ type PropertyLike<T extends LanguageCodes = LanguageCodes> = Property<T> | SetItemProperty<T> | SimplifiedProperty<T> | SetItemSimplifiedProperty<T>;
502
+ type ItemProperty<T extends LanguageCodes = LanguageCodes> = Property<T> | SetItemProperty<T>;
503
+ type PropertyValueDataType = PropertyValueContent["dataType"];
504
+ type QueryablePropertyValueDataType = Exclude<PropertyValueDataType, "coordinate">;
505
+ type WithSetItemProperties<U extends {
472
506
  properties: Array<Property<T>>;
473
- }, T extends ReadonlyArray<string>> = U extends {
507
+ }, T extends LanguageCodes> = U extends {
474
508
  properties: Array<Property<T>>;
475
509
  } ? Prettify<Omit<U, "properties"> & {
476
- properties: Array<SingleHierarchyProperty<T>>;
510
+ properties: Array<SetItemProperty<T>>;
477
511
  }> : never;
478
512
  /**
479
513
  * Base item in OCHRE
480
514
  */
481
- type BaseItem<U extends DataCategory = DataCategory, T extends ReadonlyArray<string> = ReadonlyArray<string>, V extends ItemLocation = "topLevel"> = ItemOrigin<T, V> & {
515
+ type BaseItem<U extends ItemCategory = ItemCategory, T extends LanguageCodes = LanguageCodes, V extends ItemPayloadKind = "topLevel"> = ItemEnvelopeFields<T, V> & {
482
516
  uuid: string;
483
517
  category: U;
484
518
  publicationDateTime: Date | null;
485
- context: Context<ContextDataCategory> | null;
519
+ context: Context<ContextItemCategory> | null;
486
520
  date: Date | null;
487
521
  license: License | null;
488
522
  copyright: MultilingualString<T> | null;
489
523
  watermark: MultilingualString<T> | null;
490
524
  identification: Identification<T>;
491
- creators: Array<Person<T, "nested">>;
525
+ creators: Array<Person<T, "embedded">>;
492
526
  description: MultilingualString<T> | null;
493
527
  events: Array<Event<T>>;
494
528
  };
495
- type ItemLinkCategory = DataCategory | "dictionaryUnit";
529
+ type ItemLinkCategory = ItemCategory | "dictionaryUnit";
496
530
  /**
497
531
  * Base item data exposed by OCHRE link and reverse-link payloads.
498
532
  */
499
- type BaseItemLink<U extends ItemLinkCategory = ItemLinkCategory, T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
533
+ type BaseItemLink<U extends ItemLinkCategory = ItemLinkCategory, T extends LanguageCodes = LanguageCodes> = {
500
534
  uuid: string;
501
535
  category: U;
502
536
  publicationDateTime: Date | null;
503
- context: Context<ContextDataCategory> | null;
537
+ context: Context<ContextItemCategory> | null;
504
538
  date: Date | null;
505
539
  identification: Identification<T>;
506
540
  description: MultilingualString<T> | null;
@@ -518,16 +552,16 @@ type BibliographyEntryInfo = {
518
552
  startPage: string;
519
553
  endPage: string;
520
554
  };
521
- type ItemLinks<T extends ReadonlyArray<string> = ReadonlyArray<string>> = Array<ItemLink<ItemLinkCategory, T>>;
522
- type TreeItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"tree", T> & {
555
+ type ItemLinks<T extends LanguageCodes = LanguageCodes> = Array<ItemLink<ItemLinkCategory, T>>;
556
+ type TreeItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"tree", T> & {
523
557
  type: string | null;
524
- itemsCategory: ItemsDataCategory | null;
558
+ containedItemCategory: TreeItemCategory | null;
525
559
  }>;
526
- type SetItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"set", T> & {
560
+ type SetItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"set", T> & {
527
561
  type: string | null;
528
- itemsCategory: Array<SetItemDataCategory> | null;
562
+ containedItemCategories: Array<SetItemCategory> | null;
529
563
  }>;
530
- type BibliographyItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"bibliography", T> & {
564
+ type BibliographyItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"bibliography", T> & {
531
565
  type: string | null;
532
566
  zoteroId: string | null;
533
567
  citationDetails: string | null;
@@ -541,35 +575,35 @@ type BibliographyItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLi
541
575
  startDate: Date | null;
542
576
  } | null;
543
577
  entryInfo: BibliographyEntryInfo | null;
544
- source: ItemLink<ItemsDataCategory, T> | null;
578
+ source: ItemLink<TreeItemCategory, T> | null;
545
579
  authors: Array<ItemLink<"person", T>>;
546
580
  periods: Array<ItemLink<"period", T>>;
547
581
  properties: Array<Property<T>>;
548
582
  }>;
549
- type ConceptItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"concept", T> & {
583
+ type ConceptItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"concept", T> & {
550
584
  image: Image<T> | null;
551
585
  coordinates: Array<Coordinates<T>>;
552
586
  }>;
553
- type SpatialUnitItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"spatialUnit", T> & {
587
+ type SpatialUnitItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"spatialUnit", T> & {
554
588
  image: Image<T> | null;
555
589
  coordinates: Array<Coordinates<T>>;
556
590
  }>;
557
- type PeriodItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"period", T> & {
591
+ type PeriodItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"period", T> & {
558
592
  type: string | null;
559
593
  coordinates: Array<Coordinates<T>>;
560
594
  }>;
561
- type PersonItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"person", T> & {
595
+ type PersonItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"person", T> & {
562
596
  type: string | null;
563
597
  coordinates: Array<Coordinates<T>>;
564
598
  }>;
565
- type PropertyVariableItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"propertyVariable", T> & {
599
+ type PropertyVariableItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"propertyVariable", T> & {
566
600
  type: string | null;
567
601
  coordinates: Array<Coordinates<T>>;
568
602
  }>;
569
- type PropertyValueItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"propertyValue", T> & {
603
+ type PropertyValueItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"propertyValue", T> & {
570
604
  coordinates: Array<Coordinates<T>>;
571
605
  }>;
572
- type ResourceItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"resource", T> & {
606
+ type ResourceItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"resource", T> & {
573
607
  type: string | null;
574
608
  href: string | null;
575
609
  fileFormat: string | null;
@@ -581,47 +615,50 @@ type ResourceItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"
581
615
  image: Image<T> | null;
582
616
  coordinates: Array<Coordinates<T>>;
583
617
  }>;
584
- type TextItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"text", T> & {
618
+ type TextItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"text", T> & {
585
619
  type: string | null;
586
620
  text: string | null;
587
621
  language: string | null;
588
622
  image: Image<T> | null;
589
623
  coordinates: Array<Coordinates<T>>;
590
624
  }>;
591
- type DictionaryUnitItemLink<T extends ReadonlyArray<string>> = Prettify<BaseItemLink<"dictionaryUnit", T>>;
625
+ type DictionaryUnitItemLink<T extends LanguageCodes = LanguageCodes> = Prettify<BaseItemLink<"dictionaryUnit", T>>;
592
626
  /**
593
627
  * An abridged item reference exposed inside OCHRE links and reverse links.
594
628
  */
595
- type ItemLink<U extends ItemLinkCategory = ItemLinkCategory, T extends ReadonlyArray<string> = ReadonlyArray<string>> = U extends ItemLinkCategory ? U extends "tree" ? TreeItemLink<T> : U extends "set" ? SetItemLink<T> : U extends "bibliography" ? BibliographyItemLink<T> : U extends "concept" ? ConceptItemLink<T> : U extends "spatialUnit" ? SpatialUnitItemLink<T> : U extends "period" ? PeriodItemLink<T> : U extends "person" ? PersonItemLink<T> : U extends "propertyVariable" ? PropertyVariableItemLink<T> : U extends "propertyValue" ? PropertyValueItemLink<T> : U extends "resource" ? ResourceItemLink<T> : U extends "text" ? TextItemLink<T> : U extends "dictionaryUnit" ? DictionaryUnitItemLink<T> : never : never;
629
+ type ItemLink<U extends ItemLinkCategory = ItemLinkCategory, T extends LanguageCodes = LanguageCodes> = U extends ItemLinkCategory ? U extends "tree" ? TreeItemLink<T> : U extends "set" ? SetItemLink<T> : U extends "bibliography" ? BibliographyItemLink<T> : U extends "concept" ? ConceptItemLink<T> : U extends "spatialUnit" ? SpatialUnitItemLink<T> : U extends "period" ? PeriodItemLink<T> : U extends "person" ? PersonItemLink<T> : U extends "propertyVariable" ? PropertyVariableItemLink<T> : U extends "propertyValue" ? PropertyValueItemLink<T> : U extends "resource" ? ResourceItemLink<T> : U extends "text" ? TextItemLink<T> : U extends "dictionaryUnit" ? DictionaryUnitItemLink<T> : never : never;
596
630
  /**
597
631
  * An Item in OCHRE (can be a tree, set, bibliography, concept, spatial unit, period, person, property value, property variable, or resource)
598
632
  */
599
- type Item<U extends DataCategory = DataCategory, V extends HierarchyItemDataCategory<U> = HierarchyItemDataCategory<U>, T extends ReadonlyArray<string> = ReadonlyArray<string>, W extends ItemLocation = "topLevel"> = U extends DataCategory ? U extends "tree" ? Tree<Extract<V, ItemsDataCategory>, T, W> : U extends "set" ? Set<Extract<V, SetItemDataCategory>, T, W> : U extends "bibliography" ? Bibliography<T, W> : U extends "concept" ? Concept<T, W> : U extends "spatialUnit" ? SpatialUnit<T, W> : U extends "period" ? Period<T, W> : U extends "person" ? Person<T, W> : U extends "propertyVariable" ? PropertyVariable<T, W> : U extends "propertyValue" ? PropertyValue<T, W> : U extends "resource" ? Resource<T, W> : U extends "text" ? Text<T, W> : never : never;
633
+ type Item<U extends ItemCategory = ItemCategory, V extends ContainedItemCategory<U> = ContainedItemCategory<U>, T extends LanguageCodes = LanguageCodes, W extends ItemPayloadKind = "topLevel"> = U extends ItemCategory ? U extends "tree" ? Tree<Extract<V, TreeItemCategory>, T, W> : U extends "set" ? Set<Extract<V, SetItemCategory>, T, W> : U extends "bibliography" ? Bibliography<T, W> : U extends "concept" ? Concept<T, W> : U extends "spatialUnit" ? SpatialUnit<T, W> : U extends "period" ? Period<T, W> : U extends "person" ? Person<T, W> : U extends "propertyVariable" ? PropertyVariable<T, W> : U extends "propertyValue" ? PropertyValue<T, W> : U extends "resource" ? Resource<T, W> : U extends "text" ? Text<T, W> : never : never;
634
+ type TopLevelItem<U extends ItemCategory = ItemCategory, V extends ContainedItemCategory<U> = ContainedItemCategory<U>, T extends LanguageCodes = LanguageCodes> = Item<U, V, T, "topLevel">;
635
+ type EmbeddedItem<U extends ItemCategory = ItemCategory, V extends ContainedItemCategory<U> = ContainedItemCategory<U>, T extends LanguageCodes = LanguageCodes> = Item<U, V, T, "embedded">;
636
+ type AnyItem<U extends ItemCategory = ItemCategory, V extends ContainedItemCategory<U> = ContainedItemCategory<U>, T extends LanguageCodes = LanguageCodes> = Item<U, V, T, ItemPayloadKind>;
600
637
  /**
601
638
  * Heading in OCHRE
602
639
  */
603
- type Heading<U extends HeadingDataCategory, T extends ReadonlyArray<string>> = {
640
+ type Heading<U extends HeadingItemCategory = HeadingItemCategory, T extends LanguageCodes = LanguageCodes> = {
604
641
  name: string;
605
642
  headings: Array<Heading<U, T>>;
606
- items: Array<Item<U, never, T, "nested">>;
643
+ items: Array<Item<U, never, T, "embedded">>;
607
644
  };
608
645
  /**
609
646
  * Tree in OCHRE
610
647
  */
611
- type Tree<U extends ItemsDataCategory, T extends ReadonlyArray<string>, V extends ItemLocation = "topLevel"> = Prettify<BaseItem<"tree", T, V> & {
648
+ type Tree<U extends TreeItemCategory = TreeItemCategory, T extends LanguageCodes = LanguageCodes, V extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"tree", T, V> & {
612
649
  type: string | null;
613
- itemsCategory: U | null;
650
+ containedItemCategory: U | null;
614
651
  links: ItemLinks<T>;
615
652
  notes: Array<Note<T>>;
616
653
  properties: Array<Property<T>>;
617
- bibliographies: Array<Bibliography<T, "nested">>;
618
- items: U extends HeadingDataCategory ? Array<Heading<U, T> | Item<U, never, T, "nested">> : Array<Item<U, never, T, "nested">>;
654
+ bibliographies: Array<Bibliography<T, "embedded">>;
655
+ items: U extends HeadingItemCategory ? Array<Heading<U, T> | Item<U, never, T, "embedded">> : Array<Item<U, never, T, "embedded">>;
619
656
  }>;
620
657
  /**
621
658
  * Set in OCHRE
622
659
  */
623
- type Set<U extends SetItemDataCategory, T extends ReadonlyArray<string>, V extends ItemLocation = "topLevel"> = Prettify<BaseItem<"set", T, V> & {
624
- itemsCategory: Array<U>;
660
+ type Set<U extends SetItemCategory = SetItemCategory, T extends LanguageCodes = LanguageCodes, V extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"set", T, V> & {
661
+ containedItemCategories: Array<U>;
625
662
  isTabularStructure: boolean;
626
663
  isSuppressingBlanks: boolean;
627
664
  links: ItemLinks<T>;
@@ -629,25 +666,25 @@ type Set<U extends SetItemDataCategory, T extends ReadonlyArray<string>, V exten
629
666
  properties: Array<Property<T>>;
630
667
  items: Array<SetItem<U, T>>;
631
668
  }>;
632
- type SetBibliography<T extends ReadonlyArray<string>> = Bibliography<T, "nested"> extends infer U ? U extends {
669
+ type SetBibliography<T extends LanguageCodes = LanguageCodes> = Bibliography<T, "embedded"> extends infer U ? U extends {
633
670
  properties: Array<Property<T>>;
634
671
  } ? Prettify<Omit<U, "properties" | "items"> & {
635
- properties: Array<SingleHierarchyProperty<T>>;
672
+ properties: Array<SetItemProperty<T>>;
636
673
  }> : never : never;
637
- type SetConcept<T extends ReadonlyArray<string>> = Prettify<Omit<Concept<T, "nested">, "interpretations" | "items"> & {
638
- properties: Array<SingleHierarchyProperty<T>>;
674
+ type SetConcept<T extends LanguageCodes = LanguageCodes> = Prettify<Omit<Concept<T, "embedded">, "interpretations" | "items"> & {
675
+ properties: Array<SetItemProperty<T>>;
639
676
  }>;
640
- type SetSpatialUnit<T extends ReadonlyArray<string>> = Prettify<Omit<SpatialUnit<T, "nested">, "observations" | "items"> & {
641
- properties: Array<SingleHierarchyProperty<T>>;
677
+ type SetSpatialUnit<T extends LanguageCodes = LanguageCodes> = Prettify<Omit<SpatialUnit<T, "embedded">, "observations" | "items"> & {
678
+ properties: Array<SetItemProperty<T>>;
642
679
  }>;
643
- type SetPeriod<T extends ReadonlyArray<string>> = Prettify<Omit<WithSingleHierarchyProperties<Period<T, "nested">, T>, "items">>;
644
- type SetResource<T extends ReadonlyArray<string>> = Prettify<Omit<WithSingleHierarchyProperties<Resource<T, "nested">, T>, "items">>;
645
- type SetTree<T extends ReadonlyArray<string>> = Prettify<Omit<WithSingleHierarchyProperties<Tree<ItemsDataCategory, T, "nested">, T>, "items">>;
646
- type SetItem<U extends SetItemDataCategory, T extends ReadonlyArray<string>> = U extends "tree" ? SetTree<T> : U extends "bibliography" ? SetBibliography<T> : U extends "concept" ? SetConcept<T> : U extends "spatialUnit" ? SetSpatialUnit<T> : U extends "period" ? SetPeriod<T> : U extends "person" ? WithSingleHierarchyProperties<Person<T, "nested">, T> : U extends "propertyVariable" ? PropertyVariable<T, "nested"> : U extends "propertyValue" ? WithSingleHierarchyProperties<PropertyValue<T, "nested">, T> : U extends "resource" ? SetResource<T> : U extends "text" ? Text<T, "nested"> : U extends "set" ? Omit<WithSingleHierarchyProperties<Set<SetItemDataCategory, T, "nested">, T>, "items"> : never;
680
+ type SetPeriod<T extends LanguageCodes = LanguageCodes> = Prettify<Omit<WithSetItemProperties<Period<T, "embedded">, T>, "items">>;
681
+ type SetResource<T extends LanguageCodes = LanguageCodes> = Prettify<Omit<WithSetItemProperties<Resource<T, "embedded">, T>, "items">>;
682
+ type SetTree<T extends LanguageCodes = LanguageCodes> = Prettify<Omit<WithSetItemProperties<Tree<TreeItemCategory, T, "embedded">, T>, "items">>;
683
+ type SetItem<U extends SetItemCategory = SetItemCategory, T extends LanguageCodes = LanguageCodes> = U extends "tree" ? SetTree<T> : U extends "bibliography" ? SetBibliography<T> : U extends "concept" ? SetConcept<T> : U extends "spatialUnit" ? SetSpatialUnit<T> : U extends "period" ? SetPeriod<T> : U extends "person" ? WithSetItemProperties<Person<T, "embedded">, T> : U extends "propertyVariable" ? PropertyVariable<T, "embedded"> : U extends "propertyValue" ? WithSetItemProperties<PropertyValue<T, "embedded">, T> : U extends "resource" ? SetResource<T> : U extends "text" ? Text<T, "embedded"> : U extends "set" ? Omit<WithSetItemProperties<Set<SetItemCategory, T, "embedded">, T>, "items"> : never;
647
684
  /**
648
685
  * Person in OCHRE
649
686
  */
650
- type Person<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"person", T, U> & {
687
+ type Person<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"person", T, U> & {
651
688
  type: string;
652
689
  image: Image<T> | null;
653
690
  address: {
@@ -658,7 +695,7 @@ type Person<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"
658
695
  } | null;
659
696
  coordinates: Array<Coordinates<T>>;
660
697
  content: MultilingualString<T> | null;
661
- periods: Array<Period<T, "nested">>;
698
+ periods: Array<Period<T, "embedded">>;
662
699
  links: ItemLinks<T>;
663
700
  notes: Array<Note<T>>;
664
701
  properties: Array<Property<T>>;
@@ -666,19 +703,19 @@ type Person<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"
666
703
  /**
667
704
  * Period in OCHRE
668
705
  */
669
- type Period<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"period", T, U> & {
706
+ type Period<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"period", T, U> & {
670
707
  type: string | null;
671
708
  coordinates: Array<Coordinates<T>>;
672
709
  links: ItemLinks<T>;
673
710
  notes: Array<Note<T>>;
674
711
  properties: Array<Property<T>>;
675
- bibliographies: Array<Bibliography<T, "nested">>;
676
- items: Array<Period<T, "nested">>;
712
+ bibliographies: Array<Bibliography<T, "embedded">>;
713
+ items: Array<Period<T, "embedded">>;
677
714
  }>;
678
715
  /**
679
716
  * Bibliography in OCHRE
680
717
  */
681
- type Bibliography<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"bibliography", T, U> & {
718
+ type Bibliography<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"bibliography", T, U> & {
682
719
  citationDetails: string | null;
683
720
  citationFormat: MultilingualString<T> | null;
684
721
  citationFormatSpan: string | null;
@@ -686,18 +723,18 @@ type Bibliography<T extends ReadonlyArray<string>, U extends ItemLocation = "top
686
723
  image: Image<T> | null;
687
724
  sourceDocument: BibliographySourceDocument | null;
688
725
  publicationInfo: {
689
- publishers: Array<Person<T, "nested">>;
726
+ publishers: Array<Person<T, "embedded">>;
690
727
  startDate: Date | null;
691
728
  } | null;
692
729
  entryInfo: BibliographyEntryInfo | null;
693
- source: ItemLink<ItemsDataCategory, T> | null;
694
- authors: Array<Person<T, "nested">>;
695
- periods: Array<Period<T, "nested">>;
730
+ source: ItemLink<TreeItemCategory, T> | null;
731
+ authors: Array<Person<T, "embedded">>;
732
+ periods: Array<Period<T, "embedded">>;
696
733
  links: ItemLinks<T>;
697
734
  notes: Array<Note<T>>;
698
735
  properties: Array<Property<T>>;
699
- bibliographies: Array<Bibliography<T, "nested">>;
700
- items: Array<Bibliography<T, "nested">>;
736
+ bibliographies: Array<Bibliography<T, "embedded">>;
737
+ items: Array<Bibliography<T, "embedded">>;
701
738
  } & ({
702
739
  type: "zotero";
703
740
  zoteroId: string;
@@ -708,29 +745,29 @@ type Bibliography<T extends ReadonlyArray<string>, U extends ItemLocation = "top
708
745
  /**
709
746
  * Concept in OCHRE
710
747
  */
711
- type Concept<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"concept", T, U> & {
748
+ type Concept<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"concept", T, U> & {
712
749
  image: Image<T> | null;
713
750
  interpretations: Array<Interpretation<T>>;
714
751
  coordinates: Array<Coordinates<T>>;
715
- items: Array<Concept<T, "nested">>;
752
+ items: Array<Concept<T, "embedded">>;
716
753
  }>;
717
754
  /**
718
755
  * Interpretation in OCHRE
719
756
  */
720
- type Interpretation<T extends ReadonlyArray<string>> = {
757
+ type Interpretation<T extends LanguageCodes = LanguageCodes> = {
721
758
  number: number;
722
759
  date: Date | null;
723
- observers: Array<Person<T, "nested">>;
724
- periods: Array<Period<T, "nested">>;
760
+ observers: Array<Person<T, "embedded">>;
761
+ periods: Array<Period<T, "embedded">>;
725
762
  links: ItemLinks<T>;
726
763
  notes: Array<Note<T>>;
727
764
  properties: Array<Property<T>>;
728
- bibliographies: Array<Bibliography<T, "nested">>;
765
+ bibliographies: Array<Bibliography<T, "embedded">>;
729
766
  };
730
767
  /**
731
768
  * Spatial unit in OCHRE
732
769
  */
733
- type SpatialUnit<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"spatialUnit", T, U> & {
770
+ type SpatialUnit<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"spatialUnit", T, U> & {
734
771
  image: Image<T> | null;
735
772
  coordinates: Array<Coordinates<T>>;
736
773
  mapData: {
@@ -740,46 +777,46 @@ type SpatialUnit<T extends ReadonlyArray<string>, U extends ItemLocation = "topL
740
777
  };
741
778
  } | null;
742
779
  observations: Array<Observation<T>>;
743
- bibliographies: Array<Bibliography<T, "nested">>;
744
- items: Array<SpatialUnit<T, "nested">>;
780
+ bibliographies: Array<Bibliography<T, "embedded">>;
781
+ items: Array<SpatialUnit<T, "embedded">>;
745
782
  }>;
746
783
  /**
747
784
  * Observation in OCHRE
748
785
  */
749
- type Observation<T extends ReadonlyArray<string>> = {
786
+ type Observation<T extends LanguageCodes = LanguageCodes> = {
750
787
  number: number;
751
788
  date: Date | null;
752
- observers: Array<string> | Array<Person<T, "nested">>;
753
- periods: Array<Period<T, "nested">>;
789
+ observers: Array<string> | Array<Person<T, "embedded">>;
790
+ periods: Array<Period<T, "embedded">>;
754
791
  links: ItemLinks<T>;
755
792
  notes: Array<Note<T>>;
756
793
  properties: Array<Property<T>>;
757
- bibliographies: Array<Bibliography<T, "nested">>;
794
+ bibliographies: Array<Bibliography<T, "embedded">>;
758
795
  };
759
796
  /**
760
797
  * Property variable in OCHRE
761
798
  */
762
- type PropertyVariable<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"propertyVariable", T, U> & {
799
+ type PropertyVariable<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"propertyVariable", T, U> & {
763
800
  type: string | null;
764
801
  coordinates: Array<Coordinates<T>>;
765
802
  links: ItemLinks<T>;
766
803
  notes: Array<Note<T>>;
767
- bibliographies: Array<Bibliography<T, "nested">>;
804
+ bibliographies: Array<Bibliography<T, "embedded">>;
768
805
  }>;
769
806
  /**
770
807
  * Property value in OCHRE
771
808
  */
772
- type PropertyValue<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"propertyValue", T, U> & {
809
+ type PropertyValue<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"propertyValue", T, U> & {
773
810
  coordinates: Array<Coordinates<T>>;
774
811
  links: ItemLinks<T>;
775
812
  notes: Array<Note<T>>;
776
813
  properties: Array<Property<T>>;
777
- bibliographies: Array<Bibliography<T, "nested">>;
814
+ bibliographies: Array<Bibliography<T, "embedded">>;
778
815
  }>;
779
816
  /**
780
817
  * Resource in OCHRE
781
818
  */
782
- type Resource<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"resource", T, U> & {
819
+ type Resource<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"resource", T, U> & {
783
820
  type: string;
784
821
  href: string | null;
785
822
  fileFormat: string | null;
@@ -791,18 +828,18 @@ type Resource<T extends ReadonlyArray<string>, U extends ItemLocation = "topLeve
791
828
  document: MultilingualString<T> | null;
792
829
  imageMap: ImageMap | null;
793
830
  coordinates: Array<Coordinates<T>>;
794
- periods: Array<Period<T, "nested">>;
831
+ periods: Array<Period<T, "embedded">>;
795
832
  links: ItemLinks<T>;
796
833
  reverseLinks: ItemLinks<T>;
797
834
  notes: Array<Note<T>>;
798
835
  properties: Array<Property<T>>;
799
- bibliographies: Array<Bibliography<T, "nested">>;
800
- items: Array<Resource<T, "nested">>;
836
+ bibliographies: Array<Bibliography<T, "embedded">>;
837
+ items: Array<Resource<T, "embedded">>;
801
838
  }>;
802
839
  /**
803
840
  * Text in OCHRE
804
841
  */
805
- type Text<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel"> = Prettify<BaseItem<"text", T, U> & {
842
+ type Text<T extends LanguageCodes = LanguageCodes, U extends ItemPayloadKind = "topLevel"> = Prettify<BaseItem<"text", T, U> & {
806
843
  type: string;
807
844
  text: string | null;
808
845
  language: string | null;
@@ -812,14 +849,14 @@ type Text<T extends ReadonlyArray<string>, U extends ItemLocation = "topLevel">
812
849
  reverseLinks: ItemLinks<T>;
813
850
  notes: Array<Note<T>>;
814
851
  sections: Array<Section<T>>;
815
- periods: Array<Period<T, "nested">>;
816
- creators: Array<Person<T, "nested">>;
817
- editions: Array<Person<T, "nested">>;
852
+ periods: Array<Period<T, "embedded">>;
853
+ creators: Array<Person<T, "embedded">>;
854
+ editions: Array<Person<T, "embedded">>;
818
855
  }>;
819
856
  /**
820
857
  * Section in OCHRE
821
858
  */
822
- type Section<T extends ReadonlyArray<string>> = {
859
+ type Section<T extends LanguageCodes = LanguageCodes> = {
823
860
  uuid: string;
824
861
  publicationDateTime: Date | null;
825
862
  identification: Identification<T>;
@@ -827,13 +864,35 @@ type Section<T extends ReadonlyArray<string>> = {
827
864
  identification: Identification<T>;
828
865
  } | null;
829
866
  };
867
+ type EmbeddedTree<U extends TreeItemCategory = TreeItemCategory, T extends LanguageCodes = LanguageCodes> = Tree<U, T, "embedded">;
868
+ type AnyTree<U extends TreeItemCategory = TreeItemCategory, T extends LanguageCodes = LanguageCodes> = Tree<U, T, ItemPayloadKind>;
869
+ type EmbeddedSet<U extends SetItemCategory = SetItemCategory, T extends LanguageCodes = LanguageCodes> = Set<U, T, "embedded">;
870
+ type AnySet<U extends SetItemCategory = SetItemCategory, T extends LanguageCodes = LanguageCodes> = Set<U, T, ItemPayloadKind>;
871
+ type EmbeddedBibliography<T extends LanguageCodes = LanguageCodes> = Bibliography<T, "embedded">;
872
+ type AnyBibliography<T extends LanguageCodes = LanguageCodes> = Bibliography<T, ItemPayloadKind>;
873
+ type EmbeddedConcept<T extends LanguageCodes = LanguageCodes> = Concept<T, "embedded">;
874
+ type AnyConcept<T extends LanguageCodes = LanguageCodes> = Concept<T, ItemPayloadKind>;
875
+ type EmbeddedSpatialUnit<T extends LanguageCodes = LanguageCodes> = SpatialUnit<T, "embedded">;
876
+ type AnySpatialUnit<T extends LanguageCodes = LanguageCodes> = SpatialUnit<T, ItemPayloadKind>;
877
+ type EmbeddedPeriod<T extends LanguageCodes = LanguageCodes> = Period<T, "embedded">;
878
+ type AnyPeriod<T extends LanguageCodes = LanguageCodes> = Period<T, ItemPayloadKind>;
879
+ type EmbeddedPerson<T extends LanguageCodes = LanguageCodes> = Person<T, "embedded">;
880
+ type AnyPerson<T extends LanguageCodes = LanguageCodes> = Person<T, ItemPayloadKind>;
881
+ type EmbeddedPropertyVariable<T extends LanguageCodes = LanguageCodes> = PropertyVariable<T, "embedded">;
882
+ type AnyPropertyVariable<T extends LanguageCodes = LanguageCodes> = PropertyVariable<T, ItemPayloadKind>;
883
+ type EmbeddedPropertyValue<T extends LanguageCodes = LanguageCodes> = PropertyValue<T, "embedded">;
884
+ type AnyPropertyValue<T extends LanguageCodes = LanguageCodes> = PropertyValue<T, ItemPayloadKind>;
885
+ type EmbeddedResource<T extends LanguageCodes = LanguageCodes> = Resource<T, "embedded">;
886
+ type AnyResource<T extends LanguageCodes = LanguageCodes> = Resource<T, ItemPayloadKind>;
887
+ type EmbeddedText<T extends LanguageCodes = LanguageCodes> = Text<T, "embedded">;
888
+ type AnyText<T extends LanguageCodes = LanguageCodes> = Text<T, ItemPayloadKind>;
830
889
  /**
831
890
  * Represents a gallery with its identification, project identification, resources and max length
832
891
  */
833
- type Gallery<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
892
+ type Gallery<T extends LanguageCodes = LanguageCodes> = {
834
893
  identification: Identification<T>;
835
894
  projectIdentification: Identification<T>;
836
- resources: Array<Resource<T, "nested">>;
895
+ resources: Array<Resource<T, "embedded">>;
837
896
  maxLength: number;
838
897
  };
839
898
  /**
@@ -841,7 +900,7 @@ type Gallery<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
841
900
  */
842
901
  type PropertyValueQueryItem = {
843
902
  count: number;
844
- dataType: Exclude<PropertyValueContent<ReadonlyArray<string>>["dataType"], "coordinate">;
903
+ dataType: QueryablePropertyValueDataType;
845
904
  content: string | number | boolean | null;
846
905
  label: MultilingualString | null;
847
906
  };
@@ -868,7 +927,7 @@ type SetItemsSort = {
868
927
  } | {
869
928
  target: "propertyValue";
870
929
  propertyVariableUuid: string;
871
- dataType: Exclude<PropertyValueContent<ReadonlyArray<string>>["dataType"], "coordinate">;
930
+ dataType: QueryablePropertyValueDataType;
872
931
  direction?: SetItemsSortDirection;
873
932
  language?: string;
874
933
  };
@@ -878,7 +937,7 @@ type SetItemsSort = {
878
937
  type QueryLeaf = {
879
938
  target: "property";
880
939
  propertyVariable?: string;
881
- dataType: Exclude<PropertyValueContent<ReadonlyArray<string>>["dataType"], "coordinate" | "date" | "dateTime">;
940
+ dataType: Exclude<QueryablePropertyValueDataType, "date" | "dateTime">;
882
941
  value?: string;
883
942
  from?: never;
884
943
  to?: never;
@@ -1001,15 +1060,15 @@ type FetchItemLinksLanguages<TLanguages extends ReadonlyArray<string> | undefine
1001
1060
  *
1002
1061
  * @param uuid - The UUID of the OCHRE item whose linked items should be fetched
1003
1062
  * @param options - Fetch and parser options
1004
- * @param options.itemCategory - The category of items inside linked Trees/Sets to parse. Tree accepts one category; Set accepts one category or an array.
1063
+ * @param options.containedItemCategory - The category of items inside linked Trees/Sets to parse. Tree accepts one category; Set accepts one category or an array.
1005
1064
  * @param options.languages - Language codes to parse. Inline arrays preserve literal types automatically.
1006
1065
  * @param options.fetch - Custom fetch function to use instead of the default fetch
1007
1066
  * @returns An object containing parsed linked items
1008
1067
  */
1009
- declare function fetchItemLinks<const TItemCategory extends HierarchyItemCategoryOption<HierarchyDataCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options?: FetchItemLinksBaseOptions<TLanguages> & {
1010
- itemCategory?: TItemCategory;
1068
+ declare function fetchItemLinks<const TContainedItemCategory extends ContainedItemCategoryOption<ItemContainerCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options?: FetchItemLinksBaseOptions<TLanguages> & {
1069
+ containedItemCategory?: TContainedItemCategory;
1011
1070
  }): Promise<{
1012
- items: Array<Item<DataCategory, HierarchyItemCategoryFromOption<DataCategory, TItemCategory>, FetchItemLinksLanguages<TLanguages>, "nested">>;
1071
+ items: Array<Item<ItemCategory, ContainedItemCategoryFromOption<ItemCategory, TContainedItemCategory>, FetchItemLinksLanguages<TLanguages>, "embedded">>;
1013
1072
  error: null;
1014
1073
  } | {
1015
1074
  items: null;
@@ -1044,36 +1103,36 @@ declare function withLanguages<const TLanguages extends ReadonlyArray<string>>(l
1044
1103
  * @param uuid - The UUID of the OCHRE item to fetch
1045
1104
  * @param options - Required options object
1046
1105
  * @param options.category - The category of the OCHRE item to fetch
1047
- * @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.
1106
+ * @param options.containedItemCategory - 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.
1048
1107
  * @param options.languages - Language codes to parse. Inline arrays preserve literal types automatically.
1049
1108
  * @param options.fetch - Custom fetch function to use instead of the default fetch
1050
1109
  * @returns An object containing the parsed item
1051
1110
  */
1052
- declare function fetchItem<const TItemCategory extends HierarchyItemCategoryOption<HierarchyDataCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options?: FetchItemBaseOptions<TLanguages> & {
1111
+ declare function fetchItem<const TContainedItemCategory extends ContainedItemCategoryOption<ItemContainerCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options?: FetchItemBaseOptions<TLanguages> & {
1053
1112
  category?: undefined;
1054
- itemCategory?: TItemCategory;
1113
+ containedItemCategory?: TContainedItemCategory;
1055
1114
  }): Promise<{
1056
- item: Item<DataCategory, HierarchyItemCategoryFromOption<DataCategory, TItemCategory>, FetchItemLanguages<TLanguages>>;
1115
+ item: Item<ItemCategory, ContainedItemCategoryFromOption<ItemCategory, TContainedItemCategory>, FetchItemLanguages<TLanguages>>;
1057
1116
  error: null;
1058
1117
  } | {
1059
1118
  item: null;
1060
1119
  error: string;
1061
1120
  }>;
1062
- declare function fetchItem<const TCategory extends HierarchyDataCategory, const TItemCategory extends HierarchyItemCategoryOption<TCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options: FetchItemBaseOptions<TLanguages> & {
1121
+ declare function fetchItem<const TCategory extends ItemContainerCategory, const TContainedItemCategory extends ContainedItemCategoryOption<TCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options: FetchItemBaseOptions<TLanguages> & {
1063
1122
  category: TCategory;
1064
- itemCategory?: TItemCategory;
1123
+ containedItemCategory?: TContainedItemCategory;
1065
1124
  }): Promise<{
1066
- item: Item<TCategory, HierarchyItemCategoryFromOption<TCategory, TItemCategory>, FetchItemLanguages<TLanguages>>;
1125
+ item: Item<TCategory, ContainedItemCategoryFromOption<TCategory, TContainedItemCategory>, FetchItemLanguages<TLanguages>>;
1067
1126
  error: null;
1068
1127
  } | {
1069
1128
  item: null;
1070
1129
  error: string;
1071
1130
  }>;
1072
- declare function fetchItem<const TCategory extends DataCategory, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options: FetchItemBaseOptions<TLanguages> & {
1131
+ declare function fetchItem<const TCategory extends ItemCategory, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(uuid: string, options: FetchItemBaseOptions<TLanguages> & {
1073
1132
  category: TCategory;
1074
- itemCategory?: never;
1133
+ containedItemCategory?: never;
1075
1134
  }): Promise<{
1076
- item: Item<TCategory, HierarchyItemDataCategory<TCategory>, FetchItemLanguages<TLanguages>>;
1135
+ item: Item<TCategory, ContainedItemCategory<TCategory>, FetchItemLanguages<TLanguages>>;
1077
1136
  error: null;
1078
1137
  } | {
1079
1138
  item: null;
@@ -1087,7 +1146,7 @@ type FetchSetItemsBaseOptions<TLanguages extends ReadonlyArray<string> | undefin
1087
1146
  fetch?: FetchFunction$1;
1088
1147
  };
1089
1148
  type FetchSetItemsLanguages<TLanguages extends ReadonlyArray<string> | undefined> = TLanguages extends readonly [] ? ReadonlyArray<string> : TLanguages extends ReadonlyArray<string> ? TLanguages : ReadonlyArray<string>;
1090
- type FetchSetItemsCategory<TItemCategories extends ReadonlyArray<SetItemDataCategory> | undefined> = TItemCategories extends ReadonlyArray<infer U> ? Extract<U, SetItemDataCategory> : SetItemDataCategory;
1149
+ type FetchSetItemsCategory<TContainedItemCategories extends ReadonlyArray<SetItemCategory> | undefined> = TContainedItemCategories extends ReadonlyArray<infer U> ? Extract<U, SetItemCategory> : SetItemCategory;
1091
1150
  /**
1092
1151
  * Fetches and parses Set items from the OCHRE API
1093
1152
  *
@@ -1098,22 +1157,22 @@ type FetchSetItemsCategory<TItemCategories extends ReadonlyArray<SetItemDataCate
1098
1157
  * For propertyValue sorting, dataType is required and the sort key uses the first valid leaf value (value[not(@i)]).
1099
1158
  * @param params.page - The page number (1-indexed)
1100
1159
  * @param params.pageSize - The number of items per page
1101
- * @param itemCategories - The categories of the items to fetch
1160
+ * @param containedItemCategories - The categories of the items to fetch
1102
1161
  * @param options - Options for the fetch
1103
1162
  * @param options.fetch - The fetch function to use
1104
1163
  * @returns The parsed Set items or null if the fetch/parse fails
1105
1164
  */
1106
- declare function fetchSetItems<const TItemCategories extends ReadonlyArray<SetItemDataCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(params: {
1165
+ declare function fetchSetItems<const TContainedItemCategories extends ReadonlyArray<SetItemCategory> | undefined = undefined, const TLanguages extends ReadonlyArray<string> | undefined = undefined>(params: {
1107
1166
  setScopeUuids: Array<string>;
1108
1167
  queries?: Query | null;
1109
1168
  sort?: SetItemsSort;
1110
1169
  page: number;
1111
1170
  pageSize?: number;
1112
- }, itemCategories?: TItemCategories, options?: FetchSetItemsBaseOptions<TLanguages>): Promise<{
1171
+ }, containedItemCategories?: TContainedItemCategories, options?: FetchSetItemsBaseOptions<TLanguages>): Promise<{
1113
1172
  totalCount: number;
1114
1173
  page: number;
1115
1174
  pageSize: number;
1116
- items: Array<SetItem<FetchSetItemsCategory<TItemCategories>, FetchSetItemsLanguages<TLanguages>>>;
1175
+ items: Array<SetItem<FetchSetItemsCategory<TContainedItemCategories>, FetchSetItemsLanguages<TLanguages>>>;
1117
1176
  error: null;
1118
1177
  } | {
1119
1178
  totalCount: null;
@@ -1165,7 +1224,7 @@ declare function fetchSetPropertyValues(params: {
1165
1224
  }>;
1166
1225
  //#endregion
1167
1226
  //#region src/types/website.d.ts
1168
- type WebsitePropertyValueDataType = Exclude<PropertyValueContent<ReadonlyArray<string>>["dataType"], "coordinate">;
1227
+ type WebsitePropertyValueDataType = QueryablePropertyValueDataType;
1169
1228
  /**
1170
1229
  * Represents a context tree level item with a variable and value
1171
1230
  */
@@ -1176,7 +1235,7 @@ type ContextTreeLevelItem = {
1176
1235
  /**
1177
1236
  * Represents a context tree level with a context item
1178
1237
  */
1179
- type ContextTreeLevel<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1238
+ type ContextTreeLevel<T extends LanguageCodes = LanguageCodes> = {
1180
1239
  context: Array<ContextTreeLevelItem>;
1181
1240
  identification: Identification<T>;
1182
1241
  type: string;
@@ -1184,7 +1243,7 @@ type ContextTreeLevel<T extends ReadonlyArray<string> = ReadonlyArray<string>> =
1184
1243
  /**
1185
1244
  * Represents a filter context tree level with a context item
1186
1245
  */
1187
- type ContextTreeFilterLevel<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1246
+ type ContextTreeFilterLevel<T extends LanguageCodes = LanguageCodes> = {
1188
1247
  context: Array<ContextTreeLevelItem>;
1189
1248
  identification: Identification<T>;
1190
1249
  type: string;
@@ -1196,7 +1255,7 @@ type ContextTreeFilterLevel<T extends ReadonlyArray<string> = ReadonlyArray<stri
1196
1255
  /**
1197
1256
  * Represents a context tree with levels grouped by behavior
1198
1257
  */
1199
- type ContextTree<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1258
+ type ContextTree<T extends LanguageCodes = LanguageCodes> = {
1200
1259
  flatten: Array<ContextTreeLevel<T>>;
1201
1260
  suppress: Array<ContextTreeLevel<T>>;
1202
1261
  filter: Array<ContextTreeFilterLevel<T>>;
@@ -1209,7 +1268,7 @@ type ContextTree<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1209
1268
  /**
1210
1269
  * Represents a scope with its UUID, type and identification
1211
1270
  */
1212
- type Scope<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1271
+ type Scope<T extends LanguageCodes = LanguageCodes> = {
1213
1272
  uuid: string;
1214
1273
  type: string;
1215
1274
  identification: Identification<T>;
@@ -1217,7 +1276,7 @@ type Scope<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1217
1276
  /**
1218
1277
  * Represents a stylesheet item with its UUID and category
1219
1278
  */
1220
- type StylesheetCategory = Extract<DataCategory, "propertyVariable" | "propertyValue">;
1279
+ type StylesheetCategory = Extract<ItemCategory, "propertyVariable" | "propertyValue">;
1221
1280
  type StylesheetItem = {
1222
1281
  uuid: string;
1223
1282
  category: "propertyVariable";
@@ -1238,7 +1297,7 @@ type StylesheetItem = {
1238
1297
  mobile: Array<Style>;
1239
1298
  };
1240
1299
  };
1241
- type WebsitePropertyQueryNode<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1300
+ type WebsitePropertyQueryNode<T extends LanguageCodes = LanguageCodes> = {
1242
1301
  target: "property";
1243
1302
  propertyVariable: string;
1244
1303
  dataType: WebsitePropertyValueDataType;
@@ -1246,7 +1305,7 @@ type WebsitePropertyQueryNode<T extends ReadonlyArray<string> = ReadonlyArray<st
1246
1305
  isCaseSensitive: boolean;
1247
1306
  language: T[number];
1248
1307
  };
1249
- type WebsitePropertyQuery<T extends ReadonlyArray<string> = ReadonlyArray<string>> = WebsitePropertyQueryNode<T> | {
1308
+ type WebsitePropertyQuery<T extends LanguageCodes = LanguageCodes> = WebsitePropertyQueryNode<T> | {
1250
1309
  and: Array<WebsitePropertyQuery<T>>;
1251
1310
  } | {
1252
1311
  or: Array<WebsitePropertyQuery<T>>;
@@ -1258,7 +1317,7 @@ type WebsiteType = "traditional" | "digital-collection" | "plum" | "cedar" | "el
1258
1317
  /**
1259
1318
  * Represents a website with its properties and elements
1260
1319
  */
1261
- type Website<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1320
+ type Website<T extends LanguageCodes = LanguageCodes> = {
1262
1321
  uuid: string;
1263
1322
  belongsTo: {
1264
1323
  uuid: string;
@@ -1267,12 +1326,13 @@ type Website<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1267
1326
  metadata: Metadata<T>;
1268
1327
  publicationDateTime: Date | null;
1269
1328
  identification: Identification<T>;
1270
- creators: Array<Person<T, "nested">>;
1329
+ creators: Array<Person<T, "embedded">>;
1271
1330
  license: License | null;
1272
1331
  items: Array<Webpage<T> | WebSegment<T>>;
1273
1332
  properties: {
1274
1333
  type: WebsiteType;
1275
1334
  status: "development" | "preview" | "production";
1335
+ versionLabel: "experimental" | "alpha" | "beta" | "test" | "staging" | "pre-release" | "release";
1276
1336
  privacy: "public" | "password" | "private";
1277
1337
  contact: {
1278
1338
  name: string;
@@ -1342,7 +1402,7 @@ type Website<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1342
1402
  /**
1343
1403
  * Represents a webpage with its title, slug, properties, items and subpages
1344
1404
  */
1345
- type Webpage<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1405
+ type Webpage<T extends LanguageCodes = LanguageCodes> = {
1346
1406
  uuid: string;
1347
1407
  type: "page";
1348
1408
  title: MultilingualString<T>;
@@ -1368,7 +1428,7 @@ type Webpage<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1368
1428
  /**
1369
1429
  * Represents a web segment
1370
1430
  */
1371
- type WebSegment<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1431
+ type WebSegment<T extends LanguageCodes = LanguageCodes> = {
1372
1432
  uuid: string;
1373
1433
  type: "segment";
1374
1434
  title: MultilingualString<T>;
@@ -1379,7 +1439,7 @@ type WebSegment<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1379
1439
  /**
1380
1440
  * Represents a web segment item
1381
1441
  */
1382
- type WebSegmentItem<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1442
+ type WebSegmentItem<T extends LanguageCodes = LanguageCodes> = {
1383
1443
  uuid: string;
1384
1444
  type: "segment-item";
1385
1445
  title: MultilingualString<T>;
@@ -1390,7 +1450,7 @@ type WebSegmentItem<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1390
1450
  /**
1391
1451
  * Represents a title with its label and variant
1392
1452
  */
1393
- type WebTitle<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1453
+ type WebTitle<T extends LanguageCodes = LanguageCodes> = {
1394
1454
  label: MultilingualString<T>;
1395
1455
  variant: "default" | "simple";
1396
1456
  properties: {
@@ -1404,7 +1464,7 @@ type WebTitle<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1404
1464
  /**
1405
1465
  * Base properties for web elements
1406
1466
  */
1407
- type WebElement<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1467
+ type WebElement<T extends LanguageCodes = LanguageCodes> = {
1408
1468
  uuid: string;
1409
1469
  type: "element";
1410
1470
  title: WebTitle<T>;
@@ -1417,7 +1477,7 @@ type WebElement<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1417
1477
  /**
1418
1478
  * Union type of all possible web element components
1419
1479
  */
1420
- type WebElementComponent<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1480
+ type WebElementComponent<T extends LanguageCodes = LanguageCodes> = {
1421
1481
  component: "3d-viewer";
1422
1482
  linkUuid: string;
1423
1483
  fileSize: number | null;
@@ -1446,7 +1506,7 @@ type WebElementComponent<T extends ReadonlyArray<string> = ReadonlyArray<string>
1446
1506
  } | {
1447
1507
  component: "bibliography";
1448
1508
  linkUuids: Array<string>;
1449
- bibliographies: Array<Bibliography<T, "nested">>;
1509
+ bibliographies: Array<Bibliography<T, "embedded">>;
1450
1510
  layout: "long" | "short";
1451
1511
  isSourceDocumentDisplayed: boolean;
1452
1512
  } | {
@@ -1610,10 +1670,17 @@ type WebElementComponent<T extends ReadonlyArray<string> = ReadonlyArray<string>
1610
1670
  linkUuid: string;
1611
1671
  isChaptersDisplayed: boolean;
1612
1672
  };
1673
+ type WebElementComponentName = WebElementComponent["component"];
1674
+ type WebElementComponentOf<U extends WebElementComponentName, T extends LanguageCodes = LanguageCodes> = Extract<WebElementComponent<T>, {
1675
+ component: U;
1676
+ }>;
1677
+ type WebElementOf<U extends WebElementComponentName, T extends LanguageCodes = LanguageCodes> = Extract<WebElement<T>, {
1678
+ component: U;
1679
+ }>;
1613
1680
  /**
1614
1681
  * Represents an image used in web elements
1615
1682
  */
1616
- type WebImage<T extends ReadonlyArray<string> = ReadonlyArray<string>> = {
1683
+ type WebImage<T extends LanguageCodes = LanguageCodes> = {
1617
1684
  uuid: string | null;
1618
1685
  label: MultilingualString<T> | null;
1619
1686
  description: MultilingualString<T> | null;
@@ -1632,7 +1699,7 @@ type WebBlockLayout = "vertical" | "horizontal" | "grid" | "vertical-flex" | "ho
1632
1699
  /**
1633
1700
  * Represents a block of vertical or horizontal content alignment
1634
1701
  */
1635
- type WebBlock<T extends ReadonlyArray<string> = ReadonlyArray<string>, U extends WebBlockLayout = WebBlockLayout> = {
1702
+ type WebBlock<T extends LanguageCodes = LanguageCodes, U extends WebBlockLayout = WebBlockLayout> = {
1636
1703
  uuid: string;
1637
1704
  type: "block";
1638
1705
  title: WebTitle<T>;
@@ -1666,6 +1733,8 @@ type WebBlock<T extends ReadonlyArray<string> = ReadonlyArray<string>, U extends
1666
1733
  mobile: Array<Style>;
1667
1734
  };
1668
1735
  };
1736
+ type WebBlockByLayout<U extends WebBlockLayout = WebBlockLayout, T extends LanguageCodes = LanguageCodes> = WebBlock<T, U>;
1737
+ type AccordionWebBlock<T extends LanguageCodes = LanguageCodes> = WebBlock<T, "accordion">;
1669
1738
  //#endregion
1670
1739
  //#region src/fetchers/website.d.ts
1671
1740
  type FetchFunction = (input: string | URL | globalThis.Request, init?: RequestInit) => Promise<Response>;
@@ -1675,7 +1744,7 @@ type FetchFunction = (input: string | URL | globalThis.Request, init?: RequestIn
1675
1744
  * @param abbreviation - The abbreviation identifier for the website
1676
1745
  * @returns The parsed website configuration or null if the fetch/parse fails
1677
1746
  */
1678
- declare function fetchWebsite<const T extends ReadonlyArray<string> = ReadonlyArray<string>>(abbreviation: string, options?: {
1747
+ declare function fetchWebsite<const T extends LanguageCodes = LanguageCodes>(abbreviation: string, options?: {
1679
1748
  fetch?: FetchFunction;
1680
1749
  languages?: T;
1681
1750
  }): Promise<{
@@ -1694,147 +1763,147 @@ type PropertyOptions = {
1694
1763
  /** Whether to recursively search through nested properties. */includeNestedProperties?: boolean; /** Whether to limit property values to leaf values. */
1695
1764
  limitToLeafPropertyValues?: boolean;
1696
1765
  };
1697
- type PropertyContent<T extends ReadonlyArray<string>> = PropertyValueContent<T>["content"];
1698
- type SearchableProperty<T extends ReadonlyArray<string>> = Property<T> | SingleHierarchyProperty<T> | SimplifiedProperty<T> | SingleHierarchySimplifiedProperty<T>;
1766
+ type PropertyContent<T extends LanguageCodes> = PropertyValueContent<T>["content"];
1767
+ type SearchableProperty<T extends LanguageCodes> = PropertyLike<T>;
1699
1768
  /**
1700
1769
  * Finds a property by its variable UUID in an array of properties.
1701
1770
  *
1702
1771
  * @param properties - Array of properties to search through
1703
- * @param labelUuid - The property variable UUID to search for
1772
+ * @param variableUuid - The property variable UUID to search for
1704
1773
  * @param options - Search options, including whether to include nested properties
1705
1774
  * @returns The matching Property object, or null if not found
1706
1775
  */
1707
- declare function getPropertyByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelUuid: string, options?: PropertyOptions): Property<T> | null;
1708
- declare function getPropertyByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, labelUuid: string, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1709
- declare function getPropertyByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, labelUuid: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
1710
- declare function getPropertyByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, labelUuid: string, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1776
+ declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableUuid: string, options?: PropertyOptions): Property<T> | null;
1777
+ declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableUuid: string, options?: PropertyOptions): SetItemProperty<T> | null;
1778
+ declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableUuid: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
1779
+ declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableUuid: string, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
1711
1780
  /**
1712
1781
  * Retrieves all values for a property with the given variable UUID.
1713
1782
  *
1714
1783
  * @param properties - Array of properties to search through
1715
- * @param labelUuid - The property variable UUID to search for
1784
+ * @param variableUuid - The property variable UUID to search for
1716
1785
  * @param options - Search options, including whether to include nested properties
1717
1786
  * @returns Array of property values, or null if property not found
1718
1787
  */
1719
- declare function getPropertyValuesByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelUuid: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1788
+ declare function getPropertyValuesByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1720
1789
  /**
1721
1790
  * Retrieves all value contents for a property with the given variable UUID.
1722
1791
  *
1723
1792
  * @param properties - Array of properties to search through
1724
- * @param labelUuid - The property variable UUID to search for
1793
+ * @param variableUuid - The property variable UUID to search for
1725
1794
  * @param options - Search options, including whether to include nested properties
1726
1795
  * @returns Array of property value contents, or null if property not found
1727
1796
  */
1728
- declare function getPropertyValueContentsByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelUuid: string, options?: PropertyOptions): Array<PropertyContent<T>> | null;
1797
+ declare function getPropertyValueContentsByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): Array<PropertyContent<T>> | null;
1729
1798
  /**
1730
1799
  * Gets the first value of a property with the given variable UUID.
1731
1800
  *
1732
1801
  * @param properties - Array of properties to search through
1733
- * @param labelUuid - The property variable UUID to search for
1802
+ * @param variableUuid - The property variable UUID to search for
1734
1803
  * @param options - Search options, including whether to include nested properties
1735
1804
  * @returns The first property value, or null if property not found
1736
1805
  */
1737
- declare function getPropertyValueByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelUuid: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1806
+ declare function getPropertyValueByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1738
1807
  /**
1739
1808
  * Gets the first value content of a property with the given variable UUID.
1740
1809
  *
1741
1810
  * @param properties - Array of properties to search through
1742
- * @param labelUuid - The property variable UUID to search for
1811
+ * @param variableUuid - The property variable UUID to search for
1743
1812
  * @param options - Search options, including whether to include nested properties
1744
1813
  * @returns The first property value content, or null if property not found
1745
1814
  */
1746
- declare function getPropertyValueContentByLabelUuid<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelUuid: string, options?: PropertyOptions): PropertyContent<T> | null;
1815
+ declare function getPropertyValueContentByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): PropertyContent<T> | null;
1747
1816
  /**
1748
- * Finds a property by its variable label name in an array of properties.
1817
+ * Finds a property by its variable label in an array of properties.
1749
1818
  *
1750
1819
  * @param properties - Array of properties to search through
1751
- * @param labelName - The property variable label name to search for
1820
+ * @param variableLabel - The property variable label to search for
1752
1821
  * @param options - Search options, including whether to include nested properties
1753
1822
  * @returns The matching Property object, or null if not found
1754
1823
  */
1755
- declare function getPropertyByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, options?: PropertyOptions): Property<T> | null;
1756
- declare function getPropertyByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, labelName: string, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1757
- declare function getPropertyByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, labelName: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
1758
- declare function getPropertyByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, labelName: string, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1824
+ declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, options?: PropertyOptions): Property<T> | null;
1825
+ declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, options?: PropertyOptions): SetItemProperty<T> | null;
1826
+ declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
1827
+ declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
1759
1828
  /**
1760
- * Finds a property by its variable label name and all values.
1829
+ * Finds a property by its variable label and all values.
1761
1830
  *
1762
1831
  * @param properties - Array of properties to search through
1763
- * @param labelName - The property variable label name to search for
1832
+ * @param variableLabel - The property variable label to search for
1764
1833
  * @param values - The property values to search for
1765
1834
  * @param options - Search options, including whether to include nested properties
1766
1835
  * @returns The matching Property object, or null if not found or all values do not match
1767
1836
  */
1768
- declare function getPropertyByLabelNameAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): Property<T> | null;
1769
- declare function getPropertyByLabelNameAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, labelName: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1770
- declare function getPropertyByLabelNameAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, labelName: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1771
- declare function getPropertyByLabelNameAndValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, labelName: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1837
+ declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): Property<T> | null;
1838
+ declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SetItemProperty<T> | null;
1839
+ declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1840
+ declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
1772
1841
  /**
1773
- * Finds a property by its variable label name and all value contents.
1842
+ * Finds a property by its variable label and all value contents.
1774
1843
  *
1775
1844
  * @param properties - Array of properties to search through
1776
- * @param labelName - The property variable label name to search for
1845
+ * @param variableLabel - The property variable label to search for
1777
1846
  * @param valueContents - The value contents to search for
1778
1847
  * @param options - Search options, including whether to include nested properties
1779
1848
  * @returns The matching Property object, or null if not found or all value contents do not match
1780
1849
  */
1781
- declare function getPropertyByLabelNameAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): Property<T> | null;
1782
- declare function getPropertyByLabelNameAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, labelName: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1783
- declare function getPropertyByLabelNameAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, labelName: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1784
- declare function getPropertyByLabelNameAndValueContents<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, labelName: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1850
+ declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): Property<T> | null;
1851
+ declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SetItemProperty<T> | null;
1852
+ declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1853
+ declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
1785
1854
  /**
1786
- * Finds a property by its variable label name and one value.
1855
+ * Finds a property by its variable label and one value.
1787
1856
  *
1788
1857
  * @param properties - Array of properties to search through
1789
- * @param labelName - The property variable label name to search for
1858
+ * @param variableLabel - The property variable label to search for
1790
1859
  * @param value - The property value to search for
1791
1860
  * @param options - Search options, including whether to include nested properties
1792
1861
  * @returns The matching Property object, or null if not found or value does not match
1793
1862
  */
1794
- declare function getPropertyByLabelNameAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, value: PropertyValueContent<T>, options?: PropertyOptions): Property<T> | null;
1795
- declare function getPropertyByLabelNameAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, labelName: string, value: PropertyValueContent<T>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1796
- declare function getPropertyByLabelNameAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, labelName: string, value: PropertyValueContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1797
- declare function getPropertyByLabelNameAndValue<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, labelName: string, value: PropertyValueContent<T>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1863
+ declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): Property<T> | null;
1864
+ declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SetItemProperty<T> | null;
1865
+ declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1866
+ declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
1798
1867
  /**
1799
- * Finds a property by its variable label name and one value content.
1868
+ * Finds a property by its variable label and one value content.
1800
1869
  *
1801
1870
  * @param properties - Array of properties to search through
1802
- * @param labelName - The property variable label name to search for
1871
+ * @param variableLabel - The property variable label to search for
1803
1872
  * @param valueContent - The value content to search for
1804
1873
  * @param options - Search options, including whether to include nested properties
1805
1874
  * @returns The matching Property object, or null if not found or value content does not match
1806
1875
  */
1807
- declare function getPropertyByLabelNameAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, labelName: string, valueContent: PropertyContent<T>, options?: PropertyOptions): Property<T> | null;
1808
- declare function getPropertyByLabelNameAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, labelName: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SingleHierarchyProperty<T> | null;
1809
- declare function getPropertyByLabelNameAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, labelName: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1810
- declare function getPropertyByLabelNameAndValueContent<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, labelName: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SingleHierarchySimplifiedProperty<T> | null;
1876
+ declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): Property<T> | null;
1877
+ declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SetItemProperty<T> | null;
1878
+ declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
1879
+ declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
1811
1880
  /**
1812
- * Retrieves all values for a property with the given variable label name.
1881
+ * Retrieves all values for a property with the given variable label.
1813
1882
  *
1814
1883
  * @param properties - Array of properties to search through
1815
- * @param labelName - The property variable label name to search for
1884
+ * @param variableLabel - The property variable label to search for
1816
1885
  * @param options - Search options, including whether to include nested properties
1817
1886
  * @returns Array of property values, or null if property not found
1818
1887
  */
1819
- declare function getPropertyValuesByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelName: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1888
+ declare function getPropertyValuesByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
1820
1889
  /**
1821
- * Gets the first value of a property with the given variable label name.
1890
+ * Gets the first value of a property with the given variable label.
1822
1891
  *
1823
1892
  * @param properties - Array of properties to search through
1824
- * @param labelName - The property variable label name to search for
1893
+ * @param variableLabel - The property variable label to search for
1825
1894
  * @param options - Search options, including whether to include nested properties
1826
1895
  * @returns The first property value, or null if property not found
1827
1896
  */
1828
- declare function getPropertyValueByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelName: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1897
+ declare function getPropertyValueByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): PropertyValueContent<T> | null;
1829
1898
  /**
1830
- * Gets the first value content of a property with the given variable label name.
1899
+ * Gets the first value content of a property with the given variable label.
1831
1900
  *
1832
1901
  * @param properties - Array of properties to search through
1833
- * @param labelName - The property variable label name to search for
1902
+ * @param variableLabel - The property variable label to search for
1834
1903
  * @param options - Search options, including whether to include nested properties
1835
1904
  * @returns The first property value content, or null if property not found
1836
1905
  */
1837
- declare function getPropertyValueContentByLabelName<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, labelName: string, options?: PropertyOptions): PropertyContent<T> | null;
1906
+ declare function getPropertyValueContentByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): PropertyContent<T> | null;
1838
1907
  /**
1839
1908
  * Gets all unique properties from an array of properties.
1840
1909
  *
@@ -1842,43 +1911,43 @@ declare function getPropertyValueContentByLabelName<T extends ReadonlyArray<stri
1842
1911
  * @param options - Search options, including whether to include nested properties
1843
1912
  * @returns Array of unique properties
1844
1913
  */
1845
- declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<Property<T>>, options?: PropertyOptions): Array<Property<T>>;
1846
- declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchyProperty<T>>, options?: PropertyOptions): Array<SingleHierarchyProperty<T>>;
1847
- declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SimplifiedProperty<T>>, options?: PropertyOptions): Array<SimplifiedProperty<T>>;
1848
- declare function getUniqueProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SingleHierarchySimplifiedProperty<T>>, options?: PropertyOptions): Array<SingleHierarchySimplifiedProperty<T>>;
1914
+ declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, options?: PropertyOptions): Array<Property<T>>;
1915
+ declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, options?: PropertyOptions): Array<SetItemProperty<T>>;
1916
+ declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, options?: PropertyOptions): Array<SimplifiedProperty<T>>;
1917
+ declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, options?: PropertyOptions): Array<SetItemSimplifiedProperty<T>>;
1849
1918
  /**
1850
- * Gets all unique property variable label names from an array of properties.
1919
+ * Gets all unique property variable labels from an array of properties.
1851
1920
  *
1852
1921
  * @param properties - Array of properties to get unique property variable labels from
1853
1922
  * @param options - Search options, including whether to include nested properties
1854
- * @returns Array of unique property variable label names
1923
+ * @returns Array of unique property variable labels
1855
1924
  */
1856
- declare function getUniquePropertyLabelNames<T extends ReadonlyArray<string> = ReadonlyArray<string>>(properties: ReadonlyArray<SearchableProperty<T>>, options?: PropertyOptions): Array<string>;
1925
+ declare function getUniquePropertyVariableLabels<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, options?: PropertyOptions): Array<string>;
1857
1926
  /**
1858
1927
  * Get the leaf property values from an array of property values.
1859
1928
  *
1860
1929
  * @param propertyValues - The array of property values to get the leaf property values from
1861
1930
  * @returns The array of leaf property values
1862
1931
  */
1863
- declare function getLeafPropertyValues<T extends ReadonlyArray<string> = ReadonlyArray<string>>(propertyValues: ReadonlyArray<PropertyValueContent<T>>): Array<PropertyValueContent<T>>;
1932
+ declare function getLeafPropertyValues<T extends LanguageCodes = LanguageCodes>(propertyValues: ReadonlyArray<PropertyValueContent<T>>): Array<PropertyValueContent<T>>;
1864
1933
  /**
1865
- * Filters a property based on a variable label and value criterion.
1934
+ * Filters a property based on a variable label and value content criterion.
1866
1935
  *
1867
1936
  * @param property - The property to filter
1868
1937
  * @param filter - Filter criteria containing variable label and value to match
1869
- * @param filter.labelName - The variable label name to filter by
1938
+ * @param filter.variableLabel - The variable label to filter by
1870
1939
  * @param filter.value - The value to filter by
1871
1940
  * @param options - Search options, including whether to include nested properties
1872
1941
  * @returns True if the property matches the filter criteria, false otherwise
1873
1942
  */
1874
- declare function filterProperties<T extends ReadonlyArray<string> = ReadonlyArray<string>>(property: SearchableProperty<T>, filter: {
1875
- labelName: string;
1943
+ declare function filterProperties<T extends LanguageCodes = LanguageCodes>(property: SearchableProperty<T>, filter: {
1944
+ variableLabel: string;
1876
1945
  value: PropertyValueContent<T>;
1877
1946
  }, options?: PropertyOptions): boolean;
1878
1947
  //#endregion
1879
1948
  //#region src/helpers.d.ts
1880
- type FlattenedItem<U, T extends ReadonlyArray<string>> = Omit<U, "properties"> & {
1881
- properties: Array<SingleHierarchyProperty<T>>;
1949
+ type FlattenedItem<U, T extends LanguageCodes> = Omit<U, "properties"> & {
1950
+ properties: Array<SetItemProperty<T>>;
1882
1951
  };
1883
1952
  /**
1884
1953
  * The default page size to use for fetching paginated items
@@ -1889,6 +1958,6 @@ declare const DEFAULT_PAGE_SIZE = 48;
1889
1958
  * @param item - The item whose properties to flatten
1890
1959
  * @returns The item with the properties flattened
1891
1960
  */
1892
- 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>;
1961
+ declare function flattenItemProperties<U extends ItemCategory = ItemCategory, V extends ContainedItemCategory<U> = ContainedItemCategory<U>, T extends LanguageCodes = LanguageCodes, W extends ItemPayloadKind = "topLevel">(item: Item<U, V, T, W>): FlattenedItem<Item<U, V, T, W>, T>;
1893
1962
  //#endregion
1894
- 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 MultilingualStringEntry, type MultilingualStringInput, type MultilingualStringJSON, 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, getPropertyByLabelName, getPropertyByLabelNameAndValue, getPropertyByLabelNameAndValueContent, getPropertyByLabelNameAndValueContents, getPropertyByLabelNameAndValues, getPropertyByLabelUuid, getPropertyValueByLabelName, getPropertyValueByLabelUuid, getPropertyValueContentByLabelName, getPropertyValueContentByLabelUuid, getPropertyValueContentsByLabelUuid, getPropertyValuesByLabelName, getPropertyValuesByLabelUuid, getUniqueProperties, getUniquePropertyLabelNames, withLanguages };
1963
+ export { AccordionWebBlock, AnyBibliography, AnyConcept, AnyItem, AnyPeriod, AnyPerson, AnyPropertyValue, AnyPropertyVariable, AnyResource, AnySet, AnySpatialUnit, AnyText, AnyTree, BaseItem, BaseItemLink, BelongsTo, Bibliography, BibliographyEntryInfo, BibliographyItemLink, BibliographySourceDocument, Concept, ConceptItemLink, ContainedItemCategory, ContainedItemCategoryFromOption, ContainedItemCategoryOption, Context, ContextItem, ContextItemCategory, ContextNode, ContextTree, ContextTreeFilterLevel, ContextTreeLevel, ContextTreeLevelItem, Coordinates, CoordinatesSource, DEFAULT_PAGE_SIZE, DictionaryUnitItemLink, EmbeddedBibliography, EmbeddedConcept, EmbeddedItem, EmbeddedPeriod, EmbeddedPerson, EmbeddedPropertyValue, EmbeddedPropertyVariable, EmbeddedResource, EmbeddedSet, EmbeddedSpatialUnit, EmbeddedText, EmbeddedTree, Event, Gallery, Heading, HeadingItemCategory, Identification, Image, ImageMap, ImageMapArea, Interpretation, Item, ItemCategory, ItemContainerCategory, ItemLink, ItemLinkCategory, ItemLinks, ItemPayloadKind, ItemProperty, LanguageCodes, License, Metadata, type MultilingualOptions, MultilingualString, type MultilingualStringEntries, type MultilingualStringEntry, type MultilingualStringInput, type MultilingualStringJSON, type MultilingualStringObject, type MultilingualStringText, Note, Observation, Period, PeriodItemLink, Person, PersonItemLink, Property, PropertyLike, PropertyOptions, PropertyValue, PropertyValueContent, PropertyValueDataType, PropertyValueItemLink, PropertyValueQueryItem, PropertyVariable, PropertyVariableItemLink, Query, QueryGroup, QueryLeaf, QueryablePropertyValueDataType, RecursiveItemCategory, Resource, ResourceItemLink, Scope, Section, Set, SetAttributeValueQueryItem, SetBibliography, SetConcept, SetItem, SetItemCategory, SetItemLink, SetItemProperty, SetItemSimplifiedProperty, SetItemsSort, SetItemsSortDirection, SetPeriod, SetResource, SetSpatialUnit, SetTree, SimplifiedProperty, SpatialUnit, SpatialUnitItemLink, Style, StylesheetCategory, StylesheetItem, Text, TextItemLink, TopLevelItem, Tree, TreeItemCategory, TreeItemLink, WebBlock, WebBlockByLayout, WebBlockLayout, WebElement, WebElementComponent, WebElementComponentName, WebElementComponentOf, WebElementOf, 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 };