1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { isObject, has, every } from 'lodash/fp';
7 export interface Vocabulary {
9 tags: Record<string, Tag>;
12 export interface Label {
17 export interface TagValue {
21 export interface Tag {
24 values?: Record<string, TagValue>;
27 const VOCABULARY_VALIDATORS = [
33 export const isVocabulary = (value: any) =>
34 every(validator => validator(value), VOCABULARY_VALIDATORS);