UNPKG

@iotile/iotile-cloud

Version:

A typescript library for interfacing with the IOTile Cloud API

33 lines (32 loc) 1.35 kB
import { StreamDelta, DeviceDelta, Device, Stream, Project } from "../models"; import { SerializedDelta } from "../base/model-delta"; import { Category } from "typescript-logging"; export interface SerializedOverlay { [key: string]: { [key: string]: SerializedDelta; }; } export declare class ProjectOverlay { private deltaMap; private deserializerMap; constructor(deltas?: (StreamDelta | DeviceDelta)[]); isEmpty(): boolean; toList(): (StreamDelta | DeviceDelta)[]; merge(overlay: ProjectOverlay): void; affectedStreamModels(): string[]; affectedDeviceModels(): string[]; patchForDevice(device: Device): {}; patchForStream(stream: Stream): {}; deviceModified(deviceSlug: string): boolean; deviceHasDelta(deviceSlug: string, deltaName: string): boolean; variableModified(variableLid: string): boolean; private loadDeserializers; prune(project: Project): void; applyDevice(device: Device, markModified: boolean): void; applyStream(stream: Stream, markModified: boolean): void; addDelta(delta: StreamDelta | DeviceDelta): void; addDeltas(deltas: (StreamDelta | DeviceDelta)[]): void; serialize(): SerializedOverlay; private deserialize; static Deserialize(obj: SerializedOverlay, log?: Category): ProjectOverlay; }