UNPKG

node-hue-api

Version:
19 lines (18 loc) 859 B
import { HueError } from './HueError'; import { KeyValueType } from './commonTypes'; type ResponsePayloads = KeyValueType | KeyValueType[]; /** * Parses a JSON response looking for the errors in the result(s) returned. * @param results The results to look for errors in. * @returns {Array} Of errors found. */ export declare function parseErrors(results: ResponsePayloads): HueError[] | undefined; /** * Parses a JSON response checking for success on all changes. * @param result The JSON object to parse for success messages. * @returns true if all changes were successful. */ export declare function wasSuccessful(result: ResponsePayloads): boolean; export declare function extractUpdatedAttributes(result: ResponsePayloads): KeyValueType; export declare function deprecatedFunction(version: string, func: string, message: string): void; export {};