UNPKG

@goteborgco/open-api-js-client

Version:

Official JavaScript client for the Göteborg & Co GraphQL API

28 lines (27 loc) 683 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Taxonomy = void 0; /** * Represents a taxonomy type in the system */ class Taxonomy { constructor(data) { this.name = data.name; this.description = data.description; this.value = data.value; this.types = data.types || []; } /** * Get the list of content types this taxonomy is available for */ getTypes() { return [...this.types]; } /** * Check if this taxonomy is available for a specific content type */ isAvailableFor(type) { return this.types.includes(type); } } exports.Taxonomy = Taxonomy;