UNPKG

@iotile/iotile-cloud

Version:

A typescript library for interfacing with the IOTile Cloud API

27 lines (26 loc) 688 B
export declare enum DeltaStatus { Applies = 0, Outdated = 1, Conflicted = 2 } export interface SerializedDelta { guid: string; classname: string; slug: string; args: { [key: string]: any; }; } export declare abstract class ModelDelta<T> { readonly classname: string; readonly id: string; readonly slug: string; constructor(name: string, slug: string, guidString?: string); abstract check(model: T): DeltaStatus; abstract getPatch(model: T): { [key: string]: any; }; abstract apply(model: T): any; protected abstract serializeArguments(): {}; serialize(): SerializedDelta; }