All files / common client-types.js

100% Statements 30/30
100% Branches 12/12
100% Functions 4/4
100% Lines 30/30

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44    25x 25x   25x 25x 25x 25x 25x 25x 25x 25x 25x     1616x 5000x 1589x     27x   25x   25x 25x 25x 25x 25x 25x 25x 25x 25x     44x 2x   42x 42x   25x  
"use strict";
/*! Copyright (c) 2021 Siemens AG. Licensed under the MIT License. */
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPlainObject = exports.ErrorType = exports.isExtensionTopic = exports.Topic = void 0;
var Topic;
(function (Topic) {
    Topic["Order"] = "order";
    Topic["InstantActions"] = "instantActions";
    Topic["State"] = "state";
    Topic["Visualization"] = "visualization";
    Topic["Connection"] = "connection";
    Topic["Factsheet"] = "factsheet";
    Topic["ZoneSet"] = "zoneSet";
    Topic["Responses"] = "responses";
})(Topic = exports.Topic || (exports.Topic = {}));
function isExtensionTopic(topic) {
    for (const value in Topic) {
        if (Topic[value] === topic) {
            return false;
        }
    }
    return true;
}
exports.isExtensionTopic = isExtensionTopic;
var ErrorType;
(function (ErrorType) {
    ErrorType["Order"] = "orderError";
    ErrorType["OrderUpdate"] = "orderUpdateError";
    ErrorType["OrderNoRoute"] = "noRouteError";
    ErrorType["OrderValidation"] = "validationError";
    ErrorType["OrderAction"] = "orderActionError";
    ErrorType["InstantAction"] = "instantActionError";
    ErrorType["InstantActionValidation"] = "validationError";
    ErrorType["InstantActionNoOrderToCancel"] = "noOrderToCancel";
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
function isPlainObject(value) {
    if (value === null || typeof value !== "object") {
        return false;
    }
    const proto = Object.getPrototypeOf(value);
    return proto === null || proto === Object.prototype;
}
exports.isPlainObject = isPlainObject;