From 8faaba03fd3d7fa29ee222e46ac9de0e859211c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 23 Apr 2023 17:35:09 +0200 Subject: [PATCH] fix: update upend_js to include entry provenance and timestamp --- tools/upend_js/index.ts | 4 ++++ tools/upend_js/types.ts | 10 ++++++++++ webui/yarn.lock | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/upend_js/index.ts b/tools/upend_js/index.ts index 9281e94..28dce8a 100644 --- a/tools/upend_js/index.ts +++ b/tools/upend_js/index.ts @@ -98,6 +98,8 @@ export class UpEntry extends UpObject implements IEntry { entity: string; attribute: string; value: IValue; + provenance: string; + timestamp: string; constructor(address: string, entry: IEntry, listing: UpListing) { super(address, listing); @@ -105,6 +107,8 @@ export class UpEntry extends UpObject implements IEntry { this.entity = entry.entity; this.attribute = entry.attribute; this.value = entry.value; + this.provenance = entry.provenance; + this.timestamp = entry.timestamp; } public toString(): string { diff --git a/tools/upend_js/types.ts b/tools/upend_js/types.ts index 1dd2236..8c91a0b 100644 --- a/tools/upend_js/types.ts +++ b/tools/upend_js/types.ts @@ -1,10 +1,20 @@ export type Address = string; export type VALUE_TYPE = "Address" | "String" | "Number" | "Invalid"; +/** + * A single atomic entry in UpEnd. + */ export interface IEntry { + /** The entity this entry annotates. */ entity: Address; + /** The attribute of the relation. */ attribute: string; + /** The value of the attribute. */ value: IValue; + /** The origin or provenance of the data entry (e.g. SYSTEM or USER API...) */ + provenance: string; + /** The timestamp when the data entry was created in RFC 3339 format. */ + timestamp: string; } export type IValue = diff --git a/webui/yarn.lock b/webui/yarn.lock index 76cf305..b429d3d 100644 --- a/webui/yarn.lock +++ b/webui/yarn.lock @@ -12560,8 +12560,8 @@ __metadata: "upend@file:../tools/upend_js::locator=upend-kestrel%40workspace%3A.": version: 0.0.1 - resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=b32491&locator=upend-kestrel%40workspace%3A." - checksum: 4e4e5c0a6498ad2ea8369a91e3c67c160186a96d47073469d61794c3717824198bd2de7851f3e0786833fa5f8c0eb85c65f7d7dc9c0114b9328b2a1060f645b2 + resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=af6a68&locator=upend-kestrel%40workspace%3A." + checksum: b8899b7aa5ba3a398001d0a3ab2d7e3e5d09801da5a1e522787fc609dfe4358fa8aad4323870cb1d59766b69f5b438d26af44ad942fcf5d603653cd272937bbb languageName: node linkType: hard