@digitalculture/ochre-sdk 0.14.0 → 0.14.2
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 +5 -3
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -380,6 +380,7 @@ type Bibliography = {
|
|
|
380
380
|
identification: Identification | null;
|
|
381
381
|
projectIdentification: Identification | null;
|
|
382
382
|
context: Context | null;
|
|
383
|
+
image: Image | null;
|
|
383
384
|
citation: {
|
|
384
385
|
details: string | null;
|
|
385
386
|
format: string | null;
|
|
@@ -397,6 +398,8 @@ type Bibliography = {
|
|
|
397
398
|
sourceResources: Array<Pick<Resource, "uuid" | "category" | "publicationDateTime" | "type" | "identification" | "href">>;
|
|
398
399
|
periods: Array<Period>;
|
|
399
400
|
authors: Array<Person>;
|
|
401
|
+
links: Array<Link>;
|
|
402
|
+
reverseLinks: Array<Link>;
|
|
400
403
|
properties: Array<Property>;
|
|
401
404
|
};
|
|
402
405
|
/**
|
|
@@ -473,6 +476,7 @@ type Text = {
|
|
|
473
476
|
copyright: string | null;
|
|
474
477
|
watermark: string | null;
|
|
475
478
|
identification: Identification;
|
|
479
|
+
image: Image | null;
|
|
476
480
|
creators: Array<Person>;
|
|
477
481
|
editors: Array<Person>;
|
|
478
482
|
notes: Array<Note>;
|
|
@@ -492,9 +496,7 @@ type Section = {
|
|
|
492
496
|
variant: "translation" | "phonemic";
|
|
493
497
|
type: string;
|
|
494
498
|
identification: Identification;
|
|
495
|
-
|
|
496
|
-
identification: Identification;
|
|
497
|
-
};
|
|
499
|
+
projectIdentification: Identification | null;
|
|
498
500
|
};
|
|
499
501
|
/**
|
|
500
502
|
* Represents a tree structure containing resources, spatial units and concepts
|
package/dist/index.mjs
CHANGED
|
@@ -1368,6 +1368,7 @@ function parseBibliography(bibliography, metadata) {
|
|
|
1368
1368
|
identification: bibliography.identification ? parseIdentification(bibliography.identification) : null,
|
|
1369
1369
|
projectIdentification: bibliography.project?.identification ? parseIdentification(bibliography.project.identification) : null,
|
|
1370
1370
|
context: bibliography.context ? parseContext(bibliography.context) : null,
|
|
1371
|
+
image: bibliography.image ? parseImage(bibliography.image) : null,
|
|
1371
1372
|
citation: {
|
|
1372
1373
|
details: bibliography.citationDetails ?? null,
|
|
1373
1374
|
format: bibliography.citationFormat ?? null,
|
|
@@ -1385,6 +1386,8 @@ function parseBibliography(bibliography, metadata) {
|
|
|
1385
1386
|
sourceResources,
|
|
1386
1387
|
periods: bibliography.periods ? parsePeriods(Array.isArray(bibliography.periods.period) ? bibliography.periods.period : [bibliography.periods.period]) : [],
|
|
1387
1388
|
authors: bibliography.authors ? parsePersons(Array.isArray(bibliography.authors.person) ? bibliography.authors.person : [bibliography.authors.person]) : [],
|
|
1389
|
+
links: bibliography.links ? parseLinks(Array.isArray(bibliography.links) ? bibliography.links : [bibliography.links]) : [],
|
|
1390
|
+
reverseLinks: bibliography.reverseLinks ? parseLinks(Array.isArray(bibliography.reverseLinks) ? bibliography.reverseLinks : [bibliography.reverseLinks]) : [],
|
|
1388
1391
|
properties: bibliography.properties ? parseProperties(Array.isArray(bibliography.properties.property) ? bibliography.properties.property : [bibliography.properties.property]) : []
|
|
1389
1392
|
};
|
|
1390
1393
|
}
|
|
@@ -1453,6 +1456,7 @@ function parseText(text, metadata) {
|
|
|
1453
1456
|
copyright: "copyright" in text && text.copyright != null ? parseStringContent(text.copyright) : null,
|
|
1454
1457
|
watermark: "watermark" in text && text.watermark != null ? parseStringContent(text.watermark) : null,
|
|
1455
1458
|
identification: parseIdentification(text.identification),
|
|
1459
|
+
image: text.image ? parseImage(text.image) : null,
|
|
1456
1460
|
creators: text.creators ? parsePersons(Array.isArray(text.creators.creator) ? text.creators.creator : [text.creators.creator]) : [],
|
|
1457
1461
|
editors: text.editions ? parsePersons(Array.isArray(text.editions.editor) ? text.editions.editor : [text.editions.editor]) : [],
|
|
1458
1462
|
notes: text.notes ? parseNotes(Array.isArray(text.notes.note) ? text.notes.note : [text.notes.note]) : [],
|
|
@@ -1488,7 +1492,7 @@ function parseSection(section, variant) {
|
|
|
1488
1492
|
variant,
|
|
1489
1493
|
type: section.type,
|
|
1490
1494
|
identification: parseIdentification(section.identification),
|
|
1491
|
-
|
|
1495
|
+
projectIdentification: section.project?.identification ? parseIdentification(section.project.identification) : null
|
|
1492
1496
|
};
|
|
1493
1497
|
}
|
|
1494
1498
|
/**
|
package/package.json
CHANGED