@iotile/iotile-cloud
Version:
A typescript library for interfacing with the IOTile Cloud API
31 lines (30 loc) • 812 B
TypeScript
import { Unit } from "./unit";
export interface VarTypeDictionary {
[slug: string]: VarType;
}
export interface SchemaKey {
type: string;
units: string;
decimal: number;
label: string;
output_units: any;
}
export interface SchemaKeyDictionary {
[index: string]: SchemaKey;
}
export declare class VarType {
[key: string]: any;
name: string;
slug: string;
rawData: any;
unitFullName: string;
availableInputUnits: Array<Unit>;
availableOutputUnits: Array<Unit>;
schema: SchemaKeyDictionary;
constructor(data?: any);
toJson(): any;
getInputUnitForSlug(slug: string): Unit | null;
getOutputUnitForSlug(slug: string): Unit | null;
getASchemaObj(schemaKey: string): SchemaKey | null;
getOutputUnitsForSchema(schemaKey: string): any;
}