Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

397 B
Raw Blame
import * as Urls from "metabase/urls";
import { DEPENDENCY_TYPES, type DependencyEntry } from "metabase-types/api";

export function parseDependencyEntry(
  rawId?: string,
  rawType?: string,
): DependencyEntry | undefined {
  const id = Urls.extractEntityId(rawId);
  const type = Urls.parseEnumParam(rawType, DEPENDENCY_TYPES);
  return id != null && type != null ? { id, type } : undefined;
}