dragonfly-schema 1.12.1-v8 → 1.12.1-v9

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.
Files changed (44) hide show
  1. package/models/Building.ts +3 -3
  2. package/models/BuildingEnergyPropertiesAbridged.ts +3 -3
  3. package/models/BuildingPropertiesAbridged.ts +3 -3
  4. package/models/BuildingRadiancePropertiesAbridged.ts +3 -3
  5. package/models/ContextShade.ts +3 -3
  6. package/models/ContextShadeEnergyPropertiesAbridged.ts +3 -3
  7. package/models/ContextShadePropertiesAbridged.ts +3 -3
  8. package/models/ContextShadeRadiancePropertiesAbridged.ts +3 -3
  9. package/models/DetailedSkylights.ts +3 -3
  10. package/models/DetailedWindows.ts +3 -3
  11. package/models/ExteriorApertureGridParameter.ts +3 -3
  12. package/models/ExteriorFaceGridParameter.ts +3 -3
  13. package/models/ExtrudedBorder.ts +3 -3
  14. package/models/GriddedSkylightArea.ts +3 -3
  15. package/models/GriddedSkylightRatio.ts +3 -3
  16. package/models/LouversByCount.ts +3 -3
  17. package/models/LouversByDistance.ts +3 -3
  18. package/models/Model.ts +3 -3
  19. package/models/ModelEnergyProperties.ts +3 -3
  20. package/models/ModelProperties.ts +3 -3
  21. package/models/ModelRadianceProperties.ts +3 -3
  22. package/models/Overhang.ts +3 -3
  23. package/models/RectangularWindows.ts +3 -3
  24. package/models/RepeatingWindowRatio.ts +3 -3
  25. package/models/RoofSpecification.ts +3 -3
  26. package/models/Room2D.ts +3 -3
  27. package/models/Room2DEnergyPropertiesAbridged.ts +3 -3
  28. package/models/Room2DPropertiesAbridged.ts +3 -3
  29. package/models/Room2DRadiancePropertiesAbridged.ts +3 -3
  30. package/models/RoomGridParameter.ts +3 -3
  31. package/models/RoomRadialGridParameter.ts +3 -3
  32. package/models/SimpleWindowArea.ts +3 -3
  33. package/models/SimpleWindowRatio.ts +3 -3
  34. package/models/SingleWindow.ts +3 -3
  35. package/models/Story.ts +3 -3
  36. package/models/StoryEnergyPropertiesAbridged.ts +3 -3
  37. package/models/StoryPropertiesAbridged.ts +3 -3
  38. package/models/StoryRadiancePropertiesAbridged.ts +3 -3
  39. package/models/_GridParameterBase.ts +3 -3
  40. package/models/_LouversBase.ts +3 -3
  41. package/models/_OpenAPIGenBaseModel.ts +3 -2
  42. package/models/_WindowParameterBase.ts +3 -3
  43. package/models/index.ts +32 -32
  44. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { BuildingPropertiesAbridged } from "./BuildingPropertiesAbridged";
4
4
  import { IDdBaseModel } from "honeybee-schema";
5
5
  import { RoofSpecification } from "./RoofSpecification";
@@ -83,8 +83,8 @@ export class Building extends IDdBaseModel {
83
83
  data["unique_stories"] = this.unique_stories;
84
84
  data["room_3ds"] = this.room_3ds;
85
85
  data["roof"] = this.roof;
86
- super.toJSON(data);
87
- return data;
86
+ data = super.toJSON(data);
87
+ return instanceToPlain(data);
88
88
  }
89
89
 
90
90
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -50,8 +50,8 @@ export class BuildingEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
50
50
 
51
51
  data["type"] = this.type;
52
52
  data["construction_set"] = this.construction_set;
53
- super.toJSON(data);
54
- return data;
53
+ data = super.toJSON(data);
54
+ return instanceToPlain(data);
55
55
  }
56
56
 
57
57
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { BuildingEnergyPropertiesAbridged } from "./BuildingEnergyPropertiesAbridged";
5
5
  import { BuildingRadiancePropertiesAbridged } from "./BuildingRadiancePropertiesAbridged";
@@ -58,8 +58,8 @@ export class BuildingPropertiesAbridged extends _OpenAPIGenBaseModel {
58
58
  data["type"] = this.type;
59
59
  data["energy"] = this.energy;
60
60
  data["radiance"] = this.radiance;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -48,8 +48,8 @@ export class BuildingRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
48
48
 
49
49
  data["type"] = this.type;
50
50
  data["modifier_set"] = this.modifier_set;
51
- super.toJSON(data);
52
- return data;
51
+ data = super.toJSON(data);
52
+ return instanceToPlain(data);
53
53
  }
54
54
 
55
55
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsDefined, IsInstance, ValidateNested, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { ContextShadePropertiesAbridged } from "./ContextShadePropertiesAbridged";
4
4
  import { Face3D } from "honeybee-schema";
5
5
  import { IDdBaseModel } from "honeybee-schema";
@@ -68,8 +68,8 @@ export class ContextShade extends IDdBaseModel {
68
68
  data["properties"] = this.properties;
69
69
  data["type"] = this.type;
70
70
  data["is_detached"] = this.is_detached;
71
- super.toJSON(data);
72
- return data;
71
+ data = super.toJSON(data);
72
+ return instanceToPlain(data);
73
73
  }
74
74
 
75
75
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -59,8 +59,8 @@ export class ContextShadeEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
59
59
  data["type"] = this.type;
60
60
  data["construction"] = this.construction;
61
61
  data["transmittance_schedule"] = this.transmittance_schedule;
62
- super.toJSON(data);
63
- return data;
62
+ data = super.toJSON(data);
63
+ return instanceToPlain(data);
64
64
  }
65
65
 
66
66
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { ContextShadeEnergyPropertiesAbridged } from "./ContextShadeEnergyPropertiesAbridged";
5
5
  import { ContextShadeRadiancePropertiesAbridged } from "./ContextShadeRadiancePropertiesAbridged";
@@ -58,8 +58,8 @@ export class ContextShadePropertiesAbridged extends _OpenAPIGenBaseModel {
58
58
  data["type"] = this.type;
59
59
  data["energy"] = this.energy;
60
60
  data["radiance"] = this.radiance;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -48,8 +48,8 @@ export class ContextShadeRadiancePropertiesAbridged extends _OpenAPIGenBaseModel
48
48
 
49
49
  data["type"] = this.type;
50
50
  data["modifier"] = this.modifier;
51
- super.toJSON(data);
52
- return data;
51
+ data = super.toJSON(data);
52
+ return instanceToPlain(data);
53
53
  }
54
54
 
55
55
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { IsNestedNumberArray } from "./../helpers/class-validator";
4
4
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
5
5
 
@@ -58,8 +58,8 @@ export class DetailedSkylights extends _OpenAPIGenBaseModel {
58
58
  data["polygons"] = this.polygons;
59
59
  data["type"] = this.type;
60
60
  data["are_doors"] = this.are_doors;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { IsNestedNumberArray } from "./../helpers/class-validator";
4
4
  import { _WindowParameterBase } from "./_WindowParameterBase";
5
5
 
@@ -58,8 +58,8 @@ export class DetailedWindows extends _WindowParameterBase {
58
58
  data["polygons"] = this.polygons;
59
59
  data["type"] = this.type;
60
60
  data["are_doors"] = this.are_doors;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsNumber, IsEnum, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _GridParameterBase } from "./_GridParameterBase";
4
4
  import { ExteriorApertureType } from "./ExteriorApertureType";
5
5
 
@@ -59,8 +59,8 @@ export class ExteriorApertureGridParameter extends _GridParameterBase {
59
59
  data["type"] = this.type;
60
60
  data["offset"] = this.offset;
61
61
  data["aperture_type"] = this.aperture_type;
62
- super.toJSON(data);
63
- return data;
62
+ data = super.toJSON(data);
63
+ return instanceToPlain(data);
64
64
  }
65
65
 
66
66
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsNumber, IsEnum, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _GridParameterBase } from "./_GridParameterBase";
4
4
  import { ExteriorFaceType } from "./ExteriorFaceType";
5
5
 
@@ -67,8 +67,8 @@ export class ExteriorFaceGridParameter extends _GridParameterBase {
67
67
  data["offset"] = this.offset;
68
68
  data["face_type"] = this.face_type;
69
69
  data["punched_geometry"] = this.punched_geometry;
70
- super.toJSON(data);
71
- return data;
70
+ data = super.toJSON(data);
71
+ return instanceToPlain(data);
72
72
  }
73
73
 
74
74
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Extruded borders over all windows in the wall. */
@@ -48,8 +48,8 @@ export class ExtrudedBorder extends _OpenAPIGenBaseModel {
48
48
 
49
49
  data["depth"] = this.depth;
50
50
  data["type"] = this.type;
51
- super.toJSON(data);
52
- return data;
51
+ data = super.toJSON(data);
52
+ return instanceToPlain(data);
53
53
  }
54
54
 
55
55
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { Autocalculate } from "honeybee-schema";
5
5
 
@@ -56,8 +56,8 @@ export class GriddedSkylightArea extends _OpenAPIGenBaseModel {
56
56
  data["skylight_area"] = this.skylight_area;
57
57
  data["type"] = this.type;
58
58
  data["spacing"] = this.spacing;
59
- super.toJSON(data);
60
- return data;
59
+ data = super.toJSON(data);
60
+ return instanceToPlain(data);
61
61
  }
62
62
 
63
63
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { Autocalculate } from "honeybee-schema";
5
5
 
@@ -56,8 +56,8 @@ export class GriddedSkylightRatio extends _OpenAPIGenBaseModel {
56
56
  data["skylight_ratio"] = this.skylight_ratio;
57
57
  data["type"] = this.type;
58
58
  data["spacing"] = this.spacing;
59
- super.toJSON(data);
60
- return data;
59
+ data = super.toJSON(data);
60
+ return instanceToPlain(data);
61
61
  }
62
62
 
63
63
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsInt, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _LouversBase } from "./_LouversBase";
4
4
 
5
5
  /** A specific number of louvered Shades over a wall. */
@@ -48,8 +48,8 @@ export class LouversByCount extends _LouversBase {
48
48
 
49
49
  data["louver_count"] = this.louver_count;
50
50
  data["type"] = this.type;
51
- super.toJSON(data);
52
- return data;
51
+ data = super.toJSON(data);
52
+ return instanceToPlain(data);
53
53
  }
54
54
 
55
55
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _LouversBase } from "./_LouversBase";
4
4
 
5
5
  /** A series of louvered Shades at a given distance between each louver. */
@@ -48,8 +48,8 @@ export class LouversByDistance extends _LouversBase {
48
48
 
49
49
  data["distance"] = this.distance;
50
50
  data["type"] = this.type;
51
- super.toJSON(data);
52
- return data;
51
+ data = super.toJSON(data);
52
+ return instanceToPlain(data);
53
53
  }
54
54
 
55
55
  async validate(): Promise<boolean> {
package/models/Model.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsArray, IsEnum, IsNumber, Min, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { Building } from "./Building";
4
4
  import { ContextShade } from "./ContextShade";
5
5
  import { IDdBaseModel } from "honeybee-schema";
@@ -110,8 +110,8 @@ export class Model extends IDdBaseModel {
110
110
  data["units"] = this.units;
111
111
  data["tolerance"] = this.tolerance;
112
112
  data["angle_tolerance"] = this.angle_tolerance;
113
- super.toJSON(data);
114
- return data;
113
+ data = super.toJSON(data);
114
+ return instanceToPlain(data);
115
115
  }
116
116
 
117
117
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { AirBoundaryConstruction } from "honeybee-schema";
5
5
  import { AirBoundaryConstructionAbridged } from "honeybee-schema";
@@ -591,8 +591,8 @@ export class ModelEnergyProperties extends _OpenAPIGenBaseModel {
591
591
  data["program_types"] = this.program_types;
592
592
  data["schedules"] = this.schedules;
593
593
  data["schedule_type_limits"] = this.schedule_type_limits;
594
- super.toJSON(data);
595
- return data;
594
+ data = super.toJSON(data);
595
+ return instanceToPlain(data);
596
596
  }
597
597
 
598
598
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { ModelEnergyProperties } from "./ModelEnergyProperties";
5
5
  import { ModelRadianceProperties } from "./ModelRadianceProperties";
@@ -58,8 +58,8 @@ export class ModelProperties extends _OpenAPIGenBaseModel {
58
58
  data["type"] = this.type;
59
59
  data["energy"] = this.energy;
60
60
  data["radiance"] = this.radiance;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { BSDF } from "honeybee-schema";
5
5
  import { Glass } from "honeybee-schema";
@@ -238,8 +238,8 @@ export class ModelRadianceProperties extends _OpenAPIGenBaseModel {
238
238
  data["global_modifier_set"] = this.global_modifier_set;
239
239
  data["modifier_sets"] = this.modifier_sets;
240
240
  data["modifiers"] = this.modifiers;
241
- super.toJSON(data);
242
- return data;
241
+ data = super.toJSON(data);
242
+ return instanceToPlain(data);
243
243
  }
244
244
 
245
245
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, Min, Max, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** A single overhang over an entire wall. */
@@ -58,8 +58,8 @@ export class Overhang extends _OpenAPIGenBaseModel {
58
58
  data["depth"] = this.depth;
59
59
  data["type"] = this.type;
60
60
  data["angle"] = this.angle;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsDefined, IsNumber, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { IsNestedNumberArray } from "./../helpers/class-validator";
4
4
  import { _WindowParameterBase } from "./_WindowParameterBase";
5
5
 
@@ -74,8 +74,8 @@ export class RectangularWindows extends _WindowParameterBase {
74
74
  data["heights"] = this.heights;
75
75
  data["type"] = this.type;
76
76
  data["are_doors"] = this.are_doors;
77
- super.toJSON(data);
78
- return data;
77
+ data = super.toJSON(data);
78
+ return instanceToPlain(data);
79
79
  }
80
80
 
81
81
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, Min, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _WindowParameterBase } from "./_WindowParameterBase";
4
4
 
5
5
  /** Repeating windows derived from an area ratio with the base wall. */
@@ -79,8 +79,8 @@ export class RepeatingWindowRatio extends _WindowParameterBase {
79
79
  data["horizontal_separation"] = this.horizontal_separation;
80
80
  data["type"] = this.type;
81
81
  data["vertical_separation"] = this.vertical_separation;
82
- super.toJSON(data);
83
- return data;
82
+ data = super.toJSON(data);
83
+ return instanceToPlain(data);
84
84
  }
85
85
 
86
86
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { Face3D } from "honeybee-schema";
5
5
 
@@ -52,8 +52,8 @@ export class RoofSpecification extends _OpenAPIGenBaseModel {
52
52
 
53
53
  data["geometry"] = this.geometry;
54
54
  data["type"] = this.type;
55
- super.toJSON(data);
56
- return data;
55
+ data = super.toJSON(data);
56
+ return instanceToPlain(data);
57
57
  }
58
58
 
59
59
  async validate(): Promise<boolean> {
package/models/Room2D.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsDefined, IsNumber, IsInstance, ValidateNested, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { IsNestedNumberArray } from "./../helpers/class-validator";
4
4
  import { Adiabatic } from "honeybee-schema";
5
5
  import { DetailedSkylights } from "./DetailedSkylights";
@@ -151,8 +151,8 @@ export class Room2D extends IDdBaseModel {
151
151
  data["shading_parameters"] = this.shading_parameters;
152
152
  data["air_boundaries"] = this.air_boundaries;
153
153
  data["skylight_parameters"] = this.skylight_parameters;
154
- super.toJSON(data);
155
- return data;
154
+ data = super.toJSON(data);
155
+ return instanceToPlain(data);
156
156
  }
157
157
 
158
158
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, MinLength, MaxLength, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { ProcessAbridged } from "honeybee-schema";
5
5
  import { VentilationControlAbridged } from "honeybee-schema";
@@ -108,8 +108,8 @@ export class Room2DEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
108
108
  data["window_vent_control"] = this.window_vent_control;
109
109
  data["window_vent_opening"] = this.window_vent_opening;
110
110
  data["process_loads"] = this.process_loads;
111
- super.toJSON(data);
112
- return data;
111
+ data = super.toJSON(data);
112
+ return instanceToPlain(data);
113
113
  }
114
114
 
115
115
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { Room2DEnergyPropertiesAbridged } from "./Room2DEnergyPropertiesAbridged";
5
5
  import { Room2DRadiancePropertiesAbridged } from "./Room2DRadiancePropertiesAbridged";
@@ -58,8 +58,8 @@ export class Room2DPropertiesAbridged extends _OpenAPIGenBaseModel {
58
58
  data["type"] = this.type;
59
59
  data["energy"] = this.energy;
60
60
  data["radiance"] = this.radiance;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { ExteriorApertureGridParameter } from "./ExteriorApertureGridParameter";
5
5
  import { ExteriorFaceGridParameter } from "./ExteriorFaceGridParameter";
@@ -59,8 +59,8 @@ export class Room2DRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
59
59
  data["type"] = this.type;
60
60
  data["modifier_set"] = this.modifier_set;
61
61
  data["grid_parameters"] = this.grid_parameters;
62
- super.toJSON(data);
63
- return data;
62
+ data = super.toJSON(data);
63
+ return instanceToPlain(data);
64
64
  }
65
65
 
66
66
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsNumber, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _GridParameterBase } from "./_GridParameterBase";
4
4
 
5
5
  /** Instructions for a SensorGrid generated from a Room2D's floors. */
@@ -57,8 +57,8 @@ export class RoomGridParameter extends _GridParameterBase {
57
57
  data["type"] = this.type;
58
58
  data["offset"] = this.offset;
59
59
  data["wall_offset"] = this.wall_offset;
60
- super.toJSON(data);
61
- return data;
60
+ data = super.toJSON(data);
61
+ return instanceToPlain(data);
62
62
  }
63
63
 
64
64
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsInt, IsOptional, IsArray, IsNumber, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { Autocalculate } from "honeybee-schema";
4
4
  import { RoomGridParameter } from "./RoomGridParameter";
5
5
 
@@ -65,8 +65,8 @@ export class RoomRadialGridParameter extends RoomGridParameter {
65
65
  data["start_vector"] = this.start_vector;
66
66
  data["mesh_radius"] = this.mesh_radius;
67
67
  data["type"] = this.type;
68
- super.toJSON(data);
69
- return data;
68
+ data = super.toJSON(data);
69
+ return instanceToPlain(data);
70
70
  }
71
71
 
72
72
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _WindowParameterBase } from "./_WindowParameterBase";
4
4
 
5
5
  /** A single window defined by an absolute area. */
@@ -56,8 +56,8 @@ export class SimpleWindowArea extends _WindowParameterBase {
56
56
  data["window_area"] = this.window_area;
57
57
  data["type"] = this.type;
58
58
  data["rect_split"] = this.rect_split;
59
- super.toJSON(data);
60
- return data;
59
+ data = super.toJSON(data);
60
+ return instanceToPlain(data);
61
61
  }
62
62
 
63
63
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _WindowParameterBase } from "./_WindowParameterBase";
4
4
 
5
5
  /** A single window defined by an area ratio with the base surface. */
@@ -56,8 +56,8 @@ export class SimpleWindowRatio extends _WindowParameterBase {
56
56
  data["window_ratio"] = this.window_ratio;
57
57
  data["type"] = this.type;
58
58
  data["rect_split"] = this.rect_split;
59
- super.toJSON(data);
60
- return data;
59
+ data = super.toJSON(data);
60
+ return instanceToPlain(data);
61
61
  }
62
62
 
63
63
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _WindowParameterBase } from "./_WindowParameterBase";
4
4
 
5
5
  /** A single window in the wall center defined by a width * height. */
@@ -63,8 +63,8 @@ export class SingleWindow extends _WindowParameterBase {
63
63
  data["height"] = this.height;
64
64
  data["type"] = this.type;
65
65
  data["sill_height"] = this.sill_height;
66
- super.toJSON(data);
67
- return data;
66
+ data = super.toJSON(data);
67
+ return instanceToPlain(data);
68
68
  }
69
69
 
70
70
  async validate(): Promise<boolean> {
package/models/Story.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IsArray, IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsInt, Min, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { Autocalculate } from "honeybee-schema";
4
4
  import { IDdBaseModel } from "honeybee-schema";
5
5
  import { RoofSpecification } from "./RoofSpecification";
@@ -96,8 +96,8 @@ export class Story extends IDdBaseModel {
96
96
  data["floor_height"] = this.floor_height;
97
97
  data["multiplier"] = this.multiplier;
98
98
  data["roof"] = this.roof;
99
- super.toJSON(data);
100
- return data;
99
+ data = super.toJSON(data);
100
+ return instanceToPlain(data);
101
101
  }
102
102
 
103
103
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -50,8 +50,8 @@ export class StoryEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
50
50
 
51
51
  data["type"] = this.type;
52
52
  data["construction_set"] = this.construction_set;
53
- super.toJSON(data);
54
- return data;
53
+ data = super.toJSON(data);
54
+ return instanceToPlain(data);
55
55
  }
56
56
 
57
57
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
  import { StoryEnergyPropertiesAbridged } from "./StoryEnergyPropertiesAbridged";
5
5
  import { StoryRadiancePropertiesAbridged } from "./StoryRadiancePropertiesAbridged";
@@ -58,8 +58,8 @@ export class StoryPropertiesAbridged extends _OpenAPIGenBaseModel {
58
58
  data["type"] = this.type;
59
59
  data["energy"] = this.energy;
60
60
  data["radiance"] = this.radiance;
61
- super.toJSON(data);
62
- return data;
61
+ data = super.toJSON(data);
62
+ return instanceToPlain(data);
63
63
  }
64
64
 
65
65
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -48,8 +48,8 @@ export class StoryRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
48
48
 
49
49
  data["type"] = this.type;
50
50
  data["modifier_set"] = this.modifier_set;
51
- super.toJSON(data);
52
- return data;
51
+ data = super.toJSON(data);
52
+ return instanceToPlain(data);
53
53
  }
54
54
 
55
55
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsBoolean, IsOptional, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base object for all GridParameters. */
@@ -56,8 +56,8 @@ export class _GridParameterBase extends _OpenAPIGenBaseModel {
56
56
  data["dimension"] = this.dimension;
57
57
  data["include_mesh"] = this.include_mesh;
58
58
  data["type"] = this.type;
59
- super.toJSON(data);
60
- return data;
59
+ data = super.toJSON(data);
60
+ return instanceToPlain(data);
61
61
  }
62
62
 
63
63
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsNumber, IsDefined, IsOptional, Min, Max, IsArray, IsBoolean, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for for a series of louvered shades over a wall. */
@@ -84,8 +84,8 @@ export class _LouversBase extends _OpenAPIGenBaseModel {
84
84
  data["contour_vector"] = this.contour_vector;
85
85
  data["flip_start_side"] = this.flip_start_side;
86
86
  data["type"] = this.type;
87
- super.toJSON(data);
88
- return data;
87
+ data = super.toJSON(data);
88
+ return instanceToPlain(data);
89
89
  }
90
90
 
91
91
  async validate(): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
 
4
4
  export abstract class _OpenAPIGenBaseModel {
5
5
  @IsString()
@@ -31,7 +31,8 @@ export abstract class _OpenAPIGenBaseModel {
31
31
  }
32
32
 
33
33
  data["type"] = this.type;
34
- return data;
34
+ return Object.fromEntries(
35
+ Object.entries(data).filter(([_, v]) => v !== undefined));
35
36
  }
36
37
 
37
38
  }
@@ -1,5 +1,5 @@
1
1
  import { IsOptional, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2
- import { Type, plainToClass } from 'class-transformer';
2
+ import { Type, plainToClass, instanceToPlain } from 'class-transformer';
3
3
  import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
4
4
 
5
5
  /** Base class for all window parameters. */
@@ -47,8 +47,8 @@ export class _WindowParameterBase extends _OpenAPIGenBaseModel {
47
47
 
48
48
  data["user_data"] = this.user_data;
49
49
  data["type"] = this.type;
50
- super.toJSON(data);
51
- return data;
50
+ data = super.toJSON(data);
51
+ return instanceToPlain(data);
52
52
  }
53
53
 
54
54
  async validate(): Promise<boolean> {
package/models/index.ts CHANGED
@@ -1,46 +1,46 @@
1
1
  // Auto-generated
2
2
 
3
- export * from "./Model";
4
- export * from "./Room2DRadiancePropertiesAbridged";
5
- export * from "./LouversByDistance";
3
+ export * from "./DetailedWindows";
4
+ export * from "./SingleWindow";
5
+ export * from "./RectangularWindows";
6
+ export * from "./BuildingRadiancePropertiesAbridged";
6
7
  export * from "./_OpenAPIGenBaseModel";
7
- export * from "./Room2D";
8
- export * from "./RoomRadialGridParameter";
9
- export * from "./ContextShadeEnergyPropertiesAbridged";
10
- export * from "./ContextShadeRadiancePropertiesAbridged";
11
- export * from "./GriddedSkylightArea";
8
+ export * from "./StoryEnergyPropertiesAbridged";
12
9
  export * from "./_WindowParameterBase";
13
- export * from "./Overhang";
14
- export * from "./BuildingRadiancePropertiesAbridged";
15
- export * from "./StoryPropertiesAbridged";
16
- export * from "./ModelRadianceProperties";
17
10
  export * from "./RepeatingWindowRatio";
18
- export * from "./ContextShade";
19
- export * from "./StoryEnergyPropertiesAbridged";
20
- export * from "./RectangularWindows";
11
+ export * from "./GriddedSkylightArea";
12
+ export * from "./Room2D";
21
13
  export * from "./Story";
22
- export * from "./ExteriorApertureGridParameter";
23
- export * from "./Room2DPropertiesAbridged";
24
- export * from "./SimpleWindowRatio";
25
- export * from "./_LouversBase";
26
- export * from "./BuildingPropertiesAbridged";
27
- export * from "./ModelProperties";
28
- export * from "./ExteriorFaceType";
29
- export * from "./DetailedSkylights";
30
- export * from "./ExteriorApertureType";
31
- export * from "./RoofSpecification";
32
14
  export * from "./ContextShadePropertiesAbridged";
33
15
  export * from "./Building";
16
+ export * from "./ModelProperties";
17
+ export * from "./Room2DRadiancePropertiesAbridged";
18
+ export * from "./LouversByDistance";
19
+ export * from "./ModelRadianceProperties";
20
+ export * from "./LouversByCount";
34
21
  export * from "./_GridParameterBase";
35
- export * from "./Room2DEnergyPropertiesAbridged";
36
- export * from "./ExteriorFaceGridParameter";
37
- export * from "./SingleWindow";
38
22
  export * from "./ExtrudedBorder";
39
23
  export * from "./SimpleWindowArea";
40
24
  export * from "./GriddedSkylightRatio";
41
- export * from "./LouversByCount";
42
- export * from "./ModelEnergyProperties";
43
- export * from "./DetailedWindows";
44
- export * from "./RoomGridParameter";
25
+ export * from "./Overhang";
26
+ export * from "./ExteriorApertureGridParameter";
27
+ export * from "./_LouversBase";
28
+ export * from "./RoofSpecification";
45
29
  export * from "./StoryRadiancePropertiesAbridged";
30
+ export * from "./Room2DPropertiesAbridged";
31
+ export * from "./SimpleWindowRatio";
32
+ export * from "./ContextShadeRadiancePropertiesAbridged";
33
+ export * from "./Model";
34
+ export * from "./StoryPropertiesAbridged";
35
+ export * from "./ModelEnergyProperties";
36
+ export * from "./ContextShade";
37
+ export * from "./ExteriorFaceGridParameter";
38
+ export * from "./ExteriorApertureType";
39
+ export * from "./BuildingPropertiesAbridged";
40
+ export * from "./ContextShadeEnergyPropertiesAbridged";
41
+ export * from "./RoomRadialGridParameter";
46
42
  export * from "./BuildingEnergyPropertiesAbridged";
43
+ export * from "./ExteriorFaceType";
44
+ export * from "./RoomGridParameter";
45
+ export * from "./Room2DEnergyPropertiesAbridged";
46
+ export * from "./DetailedSkylights";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dragonfly-schema",
3
3
  "license": "MIT",
4
- "version": "1.12.1-v8",
4
+ "version": "1.12.1-v9",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsc && vite build",
@@ -23,6 +23,6 @@
23
23
  "class-validator": "^0.14.1",
24
24
  "reflect-metadata": "^0.2.2",
25
25
  "class-transformer": "^0.5.1",
26
- "honeybee-schema": "^1.58.3-v13"
26
+ "honeybee-schema": "latest"
27
27
  }
28
28
  }