ochre-sdk 1.3.1 → 1.3.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.
|
@@ -4,7 +4,7 @@ import { FetchBaseOptions, FetchLanguages } from "../../parsers/helpers.mjs";
|
|
|
4
4
|
/**
|
|
5
5
|
* Fetches the location of every Set item that matches a query, without paging
|
|
6
6
|
*
|
|
7
|
-
* Each item carries only its identification, its coordinates and the values of
|
|
7
|
+
* Each item carries only its identification, its publication date, its coordinates and the values of
|
|
8
8
|
* the requested property variables (inherited values included), which is what a
|
|
9
9
|
* map needs to draw and colour every match while a list pages through the same
|
|
10
10
|
* query with {@link fetchSetItems}.
|
|
@@ -24,6 +24,7 @@ async function fetchSetItemLocations(parameters, options) {
|
|
|
24
24
|
return <items totalCount="{count(${items})}">{
|
|
25
25
|
for $item in ${items}
|
|
26
26
|
return <itemLocation uuid="{$item/@uuid}" category="{local-name($item)}">{
|
|
27
|
+
$item/@publicationDateTime,
|
|
27
28
|
$item/identification,
|
|
28
29
|
$item/coordinates,
|
|
29
30
|
for $value in $item//properties//property[label/@uuid = $propertyVariableUuids]/value[@uuid]
|
|
@@ -57,6 +58,7 @@ async function fetchSetItemLocations(parameters, options) {
|
|
|
57
58
|
itemsByUuid.set(itemLocation.uuid, {
|
|
58
59
|
uuid: itemLocation.uuid,
|
|
59
60
|
category,
|
|
61
|
+
publicationDateTime: itemLocation.publicationDateTime ?? null,
|
|
60
62
|
identification: parseIdentification(itemLocation.identification, { languages }),
|
|
61
63
|
coordinates: parseCoordinates(itemLocation.coordinates, { languages }),
|
|
62
64
|
propertyValues
|
package/dist/types/index.d.mts
CHANGED
|
@@ -571,6 +571,7 @@ export type SetItem<U extends SetItemCategory = SetItemCategory, T extends Langu
|
|
|
571
571
|
export type SetItemLocation<T extends LanguageCodes = LanguageCodes> = {
|
|
572
572
|
uuid: string;
|
|
573
573
|
category: SetItemCategory;
|
|
574
|
+
publicationDateTime: Date | null;
|
|
574
575
|
identification: Identification<T>;
|
|
575
576
|
coordinates: Array<Coordinates<T>>;
|
|
576
577
|
propertyValues: Array<{
|
package/dist/xml/schemas.d.mts
CHANGED
|
@@ -4119,6 +4119,7 @@ export declare const XMLSetItemLocationsData: v.ObjectSchema<{
|
|
|
4119
4119
|
readonly itemLocation: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
4120
4120
|
readonly uuid: v.StringSchema<"XMLSetItemLocation: uuid is string and required">;
|
|
4121
4121
|
readonly category: v.StringSchema<"XMLSetItemLocation: category is string and required">;
|
|
4122
|
+
readonly publicationDateTime: v.OptionalSchema<v.GenericSchema<unknown, Date>, undefined>;
|
|
4122
4123
|
readonly identification: v.ObjectSchema<{
|
|
4123
4124
|
readonly label: v.UnionSchema<[v.ObjectSchema<{
|
|
4124
4125
|
readonly content: v.ArraySchema<v.ObjectSchema<{
|
package/dist/xml/schemas.mjs
CHANGED
|
@@ -931,6 +931,7 @@ const XMLSetItemsData = v.object({ result: v.object({ ochre: v.object({ items: X
|
|
|
931
931
|
const XMLSetItemLocation = v.object({
|
|
932
932
|
uuid: v.string("XMLSetItemLocation: uuid is string and required"),
|
|
933
933
|
category: v.string("XMLSetItemLocation: category is string and required"),
|
|
934
|
+
publicationDateTime: v.optional(customDateTime("XMLSetItemLocation: publicationDateTime is not a valid datetime")),
|
|
934
935
|
identification: XMLIdentification,
|
|
935
936
|
coordinates: v.optional(XMLCoordinates),
|
|
936
937
|
value: v.optional(v.array(v.intersect([v.object({
|
package/dist/xml/types.d.mts
CHANGED