@digitalculture/ochre-sdk 0.14.2 → 0.14.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 CHANGED
@@ -343,6 +343,7 @@ type Concept = {
343
343
  identification: Identification;
344
344
  image: Image | null;
345
345
  description: string | null;
346
+ coordinates: Array<Coordinate>;
346
347
  interpretations: Array<Interpretation>;
347
348
  properties: Array<Property>;
348
349
  bibliographies: Array<Bibliography>;
@@ -413,6 +414,7 @@ type Period = {
413
414
  type: string | null;
414
415
  number: number | null;
415
416
  identification: Identification;
417
+ coordinates: Array<Coordinate>;
416
418
  description: string | null;
417
419
  };
418
420
  /**
@@ -430,6 +432,7 @@ type PropertyValue = {
430
432
  date: string | null;
431
433
  creators: Array<Person>;
432
434
  description: string;
435
+ coordinates: Array<Coordinate>;
433
436
  notes: Array<Note>;
434
437
  links: Array<Link>;
435
438
  };
@@ -481,6 +484,7 @@ type Text = {
481
484
  editors: Array<Person>;
482
485
  notes: Array<Note>;
483
486
  description: string;
487
+ coordinates: Array<Coordinate>;
484
488
  periods: Array<Period>;
485
489
  links: Array<Link>;
486
490
  reverseLinks: Array<Link>;
package/dist/index.mjs CHANGED
@@ -1312,7 +1312,8 @@ function parsePeriod(period, metadata) {
1312
1312
  type: period.type ?? null,
1313
1313
  number: period.n ?? null,
1314
1314
  identification: parseIdentification(period.identification),
1315
- description: period.description ? parseStringContent(period.description) : null
1315
+ description: period.description ? parseStringContent(period.description) : null,
1316
+ coordinates: parseCoordinates(period.coordinates)
1316
1317
  };
1317
1318
  }
1318
1319
  /**
@@ -1421,6 +1422,7 @@ function parsePropertyValue(propertyValue, metadata) {
1421
1422
  date: propertyValue.date ?? null,
1422
1423
  creators: propertyValue.creators ? parsePersons(Array.isArray(propertyValue.creators.creator) ? propertyValue.creators.creator : [propertyValue.creators.creator]) : [],
1423
1424
  description: propertyValue.description ? typeof propertyValue.description === "string" || typeof propertyValue.description === "number" || typeof propertyValue.description === "boolean" ? parseFakeString(propertyValue.description) : parseStringContent(propertyValue.description) : "",
1425
+ coordinates: parseCoordinates(propertyValue.coordinates),
1424
1426
  notes: propertyValue.notes ? parseNotes(Array.isArray(propertyValue.notes.note) ? propertyValue.notes.note : [propertyValue.notes.note]) : [],
1425
1427
  links: propertyValue.links ? parseLinks(Array.isArray(propertyValue.links) ? propertyValue.links : [propertyValue.links]) : []
1426
1428
  };
@@ -1461,6 +1463,7 @@ function parseText(text, metadata) {
1461
1463
  editors: text.editions ? parsePersons(Array.isArray(text.editions.editor) ? text.editions.editor : [text.editions.editor]) : [],
1462
1464
  notes: text.notes ? parseNotes(Array.isArray(text.notes.note) ? text.notes.note : [text.notes.note]) : [],
1463
1465
  description: text.description ? parseStringContent(text.description) : "",
1466
+ coordinates: parseCoordinates(text.coordinates),
1464
1467
  periods: text.periods ? parsePeriods(Array.isArray(text.periods.period) ? text.periods.period : [text.periods.period]) : [],
1465
1468
  links: text.links ? parseLinks(Array.isArray(text.links) ? text.links : [text.links]) : [],
1466
1469
  reverseLinks: text.reverseLinks ? parseLinks(Array.isArray(text.reverseLinks) ? text.reverseLinks : [text.reverseLinks]) : [],
@@ -1764,6 +1767,7 @@ function parseConcept(concept, metadata) {
1764
1767
  identification: parseIdentification(concept.identification),
1765
1768
  image: concept.image ? parseImage(concept.image) : null,
1766
1769
  description: concept.description ? parseStringContent(concept.description) : null,
1770
+ coordinates: parseCoordinates(concept.coordinates),
1767
1771
  interpretations: concept.interpretations ? parseInterpretations(Array.isArray(concept.interpretations.interpretation) ? concept.interpretations.interpretation : [concept.interpretations.interpretation]) : [],
1768
1772
  properties: concept.properties ? parseProperties(Array.isArray(concept.properties.property) ? concept.properties.property : [concept.properties.property]) : [],
1769
1773
  bibliographies: concept.bibliographies ? parseBibliographies(Array.isArray(concept.bibliographies.bibliography) ? concept.bibliographies.bibliography : [concept.bibliographies.bibliography]) : []
@@ -3159,7 +3163,7 @@ const responseItemSchema = z.object({
3159
3163
  category: z.string().optional(),
3160
3164
  type: z.string().optional(),
3161
3165
  dataType: z.string(),
3162
- publicationDateTime: z.iso.datetime().optional(),
3166
+ publicationDateTime: z.string().optional(),
3163
3167
  content: z.string().optional(),
3164
3168
  rawValue: z.string().optional()
3165
3169
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
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",
@@ -40,18 +40,18 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "zod": "^4.1.13"
43
+ "zod": "^4.2.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@antfu/eslint-config": "^6.6.1",
46
+ "@antfu/eslint-config": "^6.7.1",
47
47
  "@types/node": "^24.10.3",
48
48
  "bumpp": "^10.3.2",
49
- "eslint": "^9.39.1",
49
+ "eslint": "^9.39.2",
50
50
  "prettier": "^3.7.4",
51
51
  "terser": "^5.44.1",
52
- "tsdown": "^0.17.2",
52
+ "tsdown": "^0.18.0",
53
53
  "typescript": "^5.9.3",
54
- "vitest": "^4.0.15"
54
+ "vitest": "^4.0.16"
55
55
  },
56
56
  "scripts": {
57
57
  "dev": "tsdown src/index.ts --watch",