UNPKG

@vertigis/viewer-spec

Version:

VertiGIS Viewer Specification

99 lines (98 loc) 2.91 kB
import type { Command } from "../Command.js"; import { CommandRegistry } from "../CommandRegistry.js"; import type { Operation } from "../Operation.js"; import { OperationRegistry } from "../OperationRegistry.js"; import type { Features, HasFeatures, ModelRef } from "../common.js"; /** * Arguments for various commands that affect a KPI card's features. */ export interface UpdateKpiCardFeaturesArgs extends HasFeatures { /** * The KPI card to update, referenced by KPI card model or its ID. */ kpiCard: ModelRef; } /** * Arguments for the kpi.update-definition command. */ export interface UpdateKpiCardDefinitionArgs { /** * The KPI card model or its ID. */ kpiCard: ModelRef; /** * The stringified Arcade script used to calculate the 'value' token of the * KPI Card. */ valueExpression?: string; /** * The stringified Arcade script used to calculate the 'reference' token of * the KPI card. */ referenceExpression?: string; } /** * The result of the the charts.update-definition operation. */ export interface GetKpiDefinitionResult { /** * The stringified Arcade script used to calculate the 'value' token of the * KPI card. */ valueExpression: string; /** * The stringified Arcade script used to calculate the 'reference' token of * the KPI Card. */ referenceExpression: string; } export declare class KpiCommands extends CommandRegistry { protected readonly _prefix = "kpi"; /** * Displays the KPI card and updates it with provided features. Web only. * * @webOnly */ get display(): Command<Features | UpdateKpiCardFeaturesArgs>; /** * Add one or more features to active KPI cards. Web only. * * @webOnly */ get addFeatures(): Command<Features | UpdateKpiCardFeaturesArgs>; /** * Remove one or more features from active KPI cards. Web only. * * @webOnly */ get removeFeatures(): Command<Features | UpdateKpiCardFeaturesArgs>; /** * Clear features from active KPI cards. Web only. * * @webOnly */ get clear(): Command<ModelRef | void>; /** * Updates the definition of a KPI Card. Web only. * * @webOnly */ get updateDefinition(): Command<UpdateKpiCardDefinitionArgs>; } export declare class KpiOperations extends OperationRegistry { protected readonly _prefix = "kpi"; /** * Returns the current set of features from all active KPI Cards. Web only. * * @webOnly */ get getFeatures(): Operation<ModelRef | void, Features>; /** * Gets the definition of a KPI card that corresponds to the ID or the * instance of the KPI card model that's passed in as an argument. Web * only. * * @webOnly */ get getDefinition(): Operation<ModelRef, GetKpiDefinitionResult>; }