15067: Updates the vocabulary model to match the new format.
[arvados-workbench2.git] / src / models / vocabulary.ts
index ea23ad2c79ffc05d56f3e0fa42572a37bc6a38ad..173c8371f3c778a2f42d8febf2685b513c676e49 100644 (file)
@@ -5,18 +5,28 @@
 import { isObject, has, every } from 'lodash/fp';
 
 export interface Vocabulary {
-    strict: boolean;
+    strict_tags: boolean;
     tags: Record<string, Tag>;
 }
 
+export interface Label {
+    lang?: string;
+    label: string;
+}
+
+export interface TagValue {
+    labels: Label[];
+}
+
 export interface Tag {
     strict?: boolean;
-    values?: string[];
+    labels: Label[];
+    values?: Record<string, TagValue>;
 }
 
 const VOCABULARY_VALIDATORS = [
     isObject,
-    has('strict'),
+    has('strict_tags'),
     has('tags'),
 ];