@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
21 lines (20 loc) • 1.16 kB
TypeScript
import { MetricGroup } from "../types/metricGroup.js";
/**
* Returns the objectiveId assigned to the given MetricGroup.
* If classId provided, returns the objective ID assigned to data class with that classId, else fallback to metricGroup objectiveId.
* @param metricGroup the metricGroup to get the objective for
* @param classId the classId to get the objective for
* @returns objectiveId
* @throws if data class does not exist with classId
* @throws if no objectiveId found for metricGroup or its class
*/
export declare const getMetricGroupObjectiveId: (metricGroup: MetricGroup, classId?: string) => string;
/**
* Returns array of objective IDs for the given MetricGroup.
* If at least one class has an objectiveId assigned, then it returns those, missing classes with no objectiveId get the top-level objectiveId
* If no class-level objectives are found, then it returns the top-level objectiveId
* If no objectives are found, returns an empty array
* @param metricGroup the metricGroup to get the objectives for
* @returns array of objectiveIds
*/
export declare const getMetricGroupObjectiveIds: (metricGroup: MetricGroup) => string[];