@digitalculture/ochre-sdk 0.6.3 → 0.6.5

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.cjs CHANGED
@@ -843,6 +843,7 @@ function parseLicense(license) {
843
843
  function parsePerson(person) {
844
844
  return {
845
845
  uuid: person.uuid,
846
+ category: "person",
846
847
  publicationDateTime: person.publicationDateTime != null ? new Date(person.publicationDateTime) : null,
847
848
  type: person.type ?? null,
848
849
  date: person.date != null ? new Date(person.date) : null,
@@ -2630,7 +2631,7 @@ async function fetchGallery(uuid, filter, page, perPage) {
2630
2631
  const response = await fetch(
2631
2632
  `https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`
2632
2633
  for $q in input()/ochre[@uuid='${parsedUuid}']
2633
- let $filtered := $q/tree/items/resource[contains(lower-case(identification/label), lower-case('${parsedFilter}'))]
2634
+ let $filtered := $q//items/resource[contains(lower-case(identification/label), lower-case('${parsedFilter}'))]
2634
2635
  let $maxLength := count($filtered)
2635
2636
  return <gallery maxLength='{$maxLength}'>
2636
2637
  {$q/metadata/project}
package/dist/index.d.cts CHANGED
@@ -78,6 +78,7 @@ type License = {
78
78
  */
79
79
  type Person = {
80
80
  uuid: string;
81
+ category: "person";
81
82
  publicationDateTime: Date | null;
82
83
  type: string | null;
83
84
  date: Date | null;
package/dist/index.d.ts CHANGED
@@ -78,6 +78,7 @@ type License = {
78
78
  */
79
79
  type Person = {
80
80
  uuid: string;
81
+ category: "person";
81
82
  publicationDateTime: Date | null;
82
83
  type: string | null;
83
84
  date: Date | null;
package/dist/index.js CHANGED
@@ -769,6 +769,7 @@ function parseLicense(license) {
769
769
  function parsePerson(person) {
770
770
  return {
771
771
  uuid: person.uuid,
772
+ category: "person",
772
773
  publicationDateTime: person.publicationDateTime != null ? new Date(person.publicationDateTime) : null,
773
774
  type: person.type ?? null,
774
775
  date: person.date != null ? new Date(person.date) : null,
@@ -2556,7 +2557,7 @@ async function fetchGallery(uuid, filter, page, perPage) {
2556
2557
  const response = await fetch(
2557
2558
  `https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`
2558
2559
  for $q in input()/ochre[@uuid='${parsedUuid}']
2559
- let $filtered := $q/tree/items/resource[contains(lower-case(identification/label), lower-case('${parsedFilter}'))]
2560
+ let $filtered := $q//items/resource[contains(lower-case(identification/label), lower-case('${parsedFilter}'))]
2560
2561
  let $maxLength := count($filtered)
2561
2562
  return <gallery maxLength='{$maxLength}'>
2562
2563
  {$q/metadata/project}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
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",