@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.
package/dist/esm/utils.js CHANGED
@@ -6879,6 +6879,7 @@ var require_discriminator = __commonJS({
6879
6879
  var codegen_1 = require_codegen();
6880
6880
  var types_1 = require_types();
6881
6881
  var compile_1 = require_compile();
6882
+ var ref_error_1 = require_ref_error();
6882
6883
  var util_1 = require_util();
6883
6884
  var error = {
6884
6885
  message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
@@ -6933,9 +6934,12 @@ var require_discriminator = __commonJS({
6933
6934
  for (let i = 0; i < oneOf.length; i++) {
6934
6935
  let sch = oneOf[i];
6935
6936
  if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
6936
- sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);
6937
+ const ref = sch.$ref;
6938
+ sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
6937
6939
  if (sch instanceof compile_1.SchemaEnv)
6938
6940
  sch = sch.schema;
6941
+ if (sch === void 0)
6942
+ throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
6939
6943
  }
6940
6944
  const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
6941
6945
  if (typeof propSch != "object") {
@@ -11377,7 +11381,8 @@ var require_space = __commonJS({
11377
11381
  additionalProperties: false,
11378
11382
  default: {
11379
11383
  active: false,
11380
- allowed: false
11384
+ allowed: false,
11385
+ previousState: null
11381
11386
  },
11382
11387
  properties: {
11383
11388
  active: {
@@ -11391,6 +11396,25 @@ var require_space = __commonJS({
11391
11396
  allowed: {
11392
11397
  type: "boolean",
11393
11398
  default: false
11399
+ },
11400
+ previousState: {
11401
+ type: ["object", "null"],
11402
+ properties: {
11403
+ thermostats: {
11404
+ type: "object",
11405
+ patternProperties: {
11406
+ ".*": {
11407
+ type: "object",
11408
+ properties: {
11409
+ setpoints: {
11410
+ $ref: "thermostat.json#/properties/setpoints"
11411
+ }
11412
+ }
11413
+ }
11414
+ }
11415
+ }
11416
+ },
11417
+ additionalProperties: false
11394
11418
  }
11395
11419
  }
11396
11420
  },