@kohost/api-client 3.3.17 → 3.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6836,6 +6836,7 @@ var require_discriminator = __commonJS({
6836
6836
  var codegen_1 = require_codegen();
6837
6837
  var types_1 = require_types();
6838
6838
  var compile_1 = require_compile();
6839
+ var ref_error_1 = require_ref_error();
6839
6840
  var util_1 = require_util();
6840
6841
  var error = {
6841
6842
  message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
@@ -6890,9 +6891,12 @@ var require_discriminator = __commonJS({
6890
6891
  for (let i = 0; i < oneOf.length; i++) {
6891
6892
  let sch = oneOf[i];
6892
6893
  if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
6893
- sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);
6894
+ const ref = sch.$ref;
6895
+ sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
6894
6896
  if (sch instanceof compile_1.SchemaEnv)
6895
6897
  sch = sch.schema;
6898
+ if (sch === void 0)
6899
+ throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
6896
6900
  }
6897
6901
  const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
6898
6902
  if (typeof propSch != "object") {
@@ -11320,7 +11324,8 @@ var require_space = __commonJS({
11320
11324
  additionalProperties: false,
11321
11325
  default: {
11322
11326
  active: false,
11323
- allowed: false
11327
+ allowed: false,
11328
+ previousState: null
11324
11329
  },
11325
11330
  properties: {
11326
11331
  active: {
@@ -11334,6 +11339,25 @@ var require_space = __commonJS({
11334
11339
  allowed: {
11335
11340
  type: "boolean",
11336
11341
  default: false
11342
+ },
11343
+ previousState: {
11344
+ type: ["object", "null"],
11345
+ properties: {
11346
+ thermostats: {
11347
+ type: "object",
11348
+ patternProperties: {
11349
+ ".*": {
11350
+ type: "object",
11351
+ properties: {
11352
+ setpoints: {
11353
+ $ref: "thermostat.json#/properties/setpoints"
11354
+ }
11355
+ }
11356
+ }
11357
+ }
11358
+ }
11359
+ },
11360
+ additionalProperties: false
11337
11361
  }
11338
11362
  }
11339
11363
  },