ochre-sdk 0.19.13 → 0.19.14

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
@@ -37,6 +37,7 @@ type Identification = {
37
37
  */
38
38
  type Metadata = {
39
39
  project: {
40
+ uuid: string;
40
41
  identification: Identification & {
41
42
  website: string | null;
42
43
  };
@@ -44,10 +45,12 @@ type Metadata = {
44
45
  page: "item" | "entry" | null;
45
46
  } | null;
46
47
  collection: {
48
+ uuid: string;
47
49
  identification: Identification;
48
50
  page: "item" | "entry";
49
51
  } | null;
50
52
  publication: {
53
+ uuid: string;
51
54
  identification: Identification;
52
55
  page: "item" | "entry";
53
56
  } | null;
@@ -387,6 +390,7 @@ type Concept = {
387
390
  license: License | null;
388
391
  context: Context | null;
389
392
  identification: Identification;
393
+ status: "live" | "pending";
390
394
  image: Image | null;
391
395
  description: string | null;
392
396
  coordinates: Array<Coordinate>;
package/dist/index.mjs CHANGED
@@ -847,21 +847,24 @@ function parseMetadata(metadata) {
847
847
  code: metadata.item.identification.code ?? null
848
848
  };
849
849
  else identification = parseIdentification(metadata.item.identification);
850
- const projectId = metadata.project?.identification ? parseIdentification(metadata.project.identification) : null;
850
+ const projectIdentification = metadata.project?.identification ? parseIdentification(metadata.project.identification) : null;
851
851
  return {
852
- project: projectId ? {
852
+ project: projectIdentification ? {
853
+ uuid: metadata.project?.uuid ?? "",
853
854
  identification: {
854
- ...projectId,
855
+ ...projectIdentification,
855
856
  website: metadata.project?.identification.website ?? null
856
857
  },
857
858
  dateFormat: metadata.project?.dateFormat ?? null,
858
859
  page: metadata.project?.page ?? null
859
860
  } : null,
860
861
  collection: metadata.collection ? {
862
+ uuid: metadata.collection?.uuid ?? "",
861
863
  identification: parseIdentification(metadata.collection.identification),
862
864
  page: metadata.collection.page
863
865
  } : null,
864
866
  publication: metadata.publication ? {
867
+ uuid: metadata.publication?.uuid ?? "",
865
868
  identification: parseIdentification(metadata.publication.identification),
866
869
  page: metadata.publication.page
867
870
  } : null,
@@ -1840,6 +1843,7 @@ function parseConcept(concept, metadata, persistentUrl, belongsTo) {
1840
1843
  license: "availability" in concept && concept.availability ? parseLicense(concept.availability) : null,
1841
1844
  context: "context" in concept && concept.context ? parseContext(concept.context) : null,
1842
1845
  identification: parseIdentification(concept.identification),
1846
+ status: concept.status ?? "pending",
1843
1847
  image: concept.image ? parseImage(concept.image) : null,
1844
1848
  description: concept.description ? parseStringContent(concept.description) : null,
1845
1849
  coordinates: parseCoordinates(concept.coordinates),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "0.19.13",
3
+ "version": "0.19.14",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",