@digitalculture/ochre-sdk 0.13.3 → 0.13.4
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 +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -354,7 +354,7 @@ type Concept = {
|
|
|
354
354
|
/**
|
|
355
355
|
* Represents a set that can contain resources, spatial units and concepts
|
|
356
356
|
*/
|
|
357
|
-
type Set<U extends DataCategory> = {
|
|
357
|
+
type Set<U extends DataCategory = DataCategory> = {
|
|
358
358
|
uuid: string;
|
|
359
359
|
category: "set";
|
|
360
360
|
metadata: Metadata | null;
|
|
@@ -368,7 +368,7 @@ type Set<U extends DataCategory> = {
|
|
|
368
368
|
isSuppressingBlanks: boolean;
|
|
369
369
|
description: string;
|
|
370
370
|
creators: Array<Person>;
|
|
371
|
-
items: U extends "resource" ? Array<Resource> : U extends "spatialUnit" ? Array<SpatialUnit> : U extends "concept" ? Array<Concept> : U extends "period" ? Array<Period> : U extends "bibliography" ? Array<Bibliography> : U extends "person" ? Array<Person> : U extends "propertyValue" ? Array<PropertyValue> : U extends "tree" ? Array<Tree<Exclude<DataCategory, "tree">>> : U extends "set" ? Array<Set<DataCategory>> :
|
|
371
|
+
items: [DataCategory] extends [U] ? Array<Item> : U extends "resource" ? Array<Resource> : U extends "spatialUnit" ? Array<SpatialUnit> : U extends "concept" ? Array<Concept> : U extends "period" ? Array<Period> : U extends "bibliography" ? Array<Bibliography> : U extends "person" ? Array<Person> : U extends "propertyValue" ? Array<PropertyValue> : U extends "tree" ? Array<Tree<Exclude<DataCategory, "tree">>> : U extends "set" ? Array<Set<DataCategory>> : Array<Item>;
|
|
372
372
|
};
|
|
373
373
|
/**
|
|
374
374
|
* Represents a bibliography entry with citation and publication information
|
|
@@ -467,7 +467,7 @@ type Property<T extends PropertyValueContentType = PropertyValueContentType> = {
|
|
|
467
467
|
/**
|
|
468
468
|
* Represents a tree structure containing resources, spatial units and concepts
|
|
469
469
|
*/
|
|
470
|
-
type Tree<U extends Exclude<DataCategory, "tree">> = {
|
|
470
|
+
type Tree<U extends Exclude<DataCategory, "tree"> = Exclude<DataCategory, "tree">> = {
|
|
471
471
|
uuid: string;
|
|
472
472
|
category: "tree";
|
|
473
473
|
metadata: Metadata | null;
|
|
@@ -479,7 +479,7 @@ type Tree<U extends Exclude<DataCategory, "tree">> = {
|
|
|
479
479
|
identification: Identification;
|
|
480
480
|
creators: Array<Person>;
|
|
481
481
|
properties: Array<Property>;
|
|
482
|
-
items: U extends "resource" ? Array<Resource> : U extends "spatialUnit" ? Array<SpatialUnit> : U extends "concept" ? Array<Concept> : U extends "period" ? Array<Period> : U extends "bibliography" ? Array<Bibliography> : U extends "person" ? Array<Person> : U extends "propertyValue" ? Array<PropertyValue> : U extends "set" ? Array<Set<DataCategory>> :
|
|
482
|
+
items: [Exclude<DataCategory, "tree">] extends [U] ? Array<Item> : U extends "resource" ? Array<Resource> : U extends "spatialUnit" ? Array<SpatialUnit> : U extends "concept" ? Array<Concept> : U extends "period" ? Array<Period> : U extends "bibliography" ? Array<Bibliography> : U extends "person" ? Array<Person> : U extends "propertyValue" ? Array<PropertyValue> : U extends "set" ? Array<Set<DataCategory>> : Array<Item>;
|
|
483
483
|
};
|
|
484
484
|
/**
|
|
485
485
|
* Represents a gallery with its identification, project identification, resources and max length
|
package/package.json
CHANGED