@dnv-plant/typescriptpws 1.0.16 → 1.0.18-alpha.1805813

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.
@@ -1,7 +1,7 @@
1
1
  /***********************************************************************
2
2
  * This file has been auto-generated by a code generation tool.
3
- * Version: 1.0.16
4
- * Date/time: 07 Feb 2025 13:02:17
3
+ * Version: 1.0.18
4
+ * Date/time: 18 Feb 2025 14:37:50
5
5
  * Template: templates/typescriptpws/entityschemas.razor.
6
6
  ***********************************************************************/
7
7
 
@@ -31,9 +31,7 @@ const propertiesToIgnore = [
31
31
  ];
32
32
 
33
33
  // Convert array to regex pattern
34
- const ignoredPropertiesRegex = new RegExp(
35
- `^(${propertiesToIgnore.join("|")})$`
36
- );
34
+ const ignoredPropertiesRegex = new RegExp(`^(${propertiesToIgnore.join("|")})$`);
37
35
 
38
36
  export interface LocalPositionSchemaData {
39
37
  x: number;
@@ -49,7 +47,7 @@ export interface LocalPositionSchemaData {
49
47
  */
50
48
  export class LocalPositionSchema {
51
49
  schema: Joi.ObjectSchema;
52
- propertyTypes: Record<string, any>;
50
+ propertyTypes: Record<string, unknown>;
53
51
 
54
52
  constructor() {
55
53
  this.schema = Joi.object({
@@ -59,12 +57,7 @@ export class LocalPositionSchema {
59
57
  })
60
58
  .pattern(
61
59
  ignoredPropertiesRegex,
62
- Joi.alternatives().try(
63
- Joi.string(),
64
- Joi.number(),
65
- Joi.date(),
66
- Joi.any()
67
- )
60
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
68
61
  )
69
62
  .unknown(false);
70
63
 
@@ -78,15 +71,17 @@ export class LocalPositionSchema {
78
71
  validate(data: LocalPositionSchemaData): Entities.LocalPosition {
79
72
  const { error, value } = this.schema.validate(data, { abortEarly: false });
80
73
  if (error) {
81
- throw new Error(
82
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
83
- );
74
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
84
75
  }
85
76
  return this.makeEntity(value);
86
77
  }
87
78
 
88
79
  makeEntity(data: LocalPositionSchemaData): Entities.LocalPosition {
89
- return new Entities.LocalPosition(data.x, data.y, data.z);
80
+ return new Entities.LocalPosition(
81
+ data.x,
82
+ data.y,
83
+ data.z
84
+ );
90
85
  }
91
86
  }
92
87
 
@@ -102,7 +97,7 @@ export interface AssetSchemaData {
102
97
  */
103
98
  export class AssetSchema {
104
99
  schema: Joi.ObjectSchema;
105
- propertyTypes: Record<string, any>;
100
+ propertyTypes: Record<string, unknown>;
106
101
 
107
102
  constructor() {
108
103
  this.schema = Joi.object({
@@ -110,12 +105,7 @@ export class AssetSchema {
110
105
  })
111
106
  .pattern(
112
107
  ignoredPropertiesRegex,
113
- Joi.alternatives().try(
114
- Joi.string(),
115
- Joi.number(),
116
- Joi.date(),
117
- Joi.any()
118
- )
108
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
119
109
  )
120
110
  .unknown(false);
121
111
 
@@ -127,15 +117,15 @@ export class AssetSchema {
127
117
  validate(data: AssetSchemaData): Entities.Asset {
128
118
  const { error, value } = this.schema.validate(data, { abortEarly: false });
129
119
  if (error) {
130
- throw new Error(
131
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
132
- );
120
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
133
121
  }
134
122
  return this.makeEntity(value);
135
123
  }
136
124
 
137
125
  makeEntity(data: AssetSchemaData): Entities.Asset {
138
- return new Entities.Asset(data.location);
126
+ return new Entities.Asset(
127
+ data.location
128
+ );
139
129
  }
140
130
  }
141
131
 
@@ -152,7 +142,7 @@ export interface MaterialComponentSchemaData {
152
142
  */
153
143
  export class MaterialComponentSchema {
154
144
  schema: Joi.ObjectSchema;
155
- propertyTypes: Record<string, any>;
145
+ propertyTypes: Record<string, unknown>;
156
146
 
157
147
  constructor() {
158
148
  this.schema = Joi.object({
@@ -161,12 +151,7 @@ export class MaterialComponentSchema {
161
151
  })
162
152
  .pattern(
163
153
  ignoredPropertiesRegex,
164
- Joi.alternatives().try(
165
- Joi.string(),
166
- Joi.number(),
167
- Joi.date(),
168
- Joi.any()
169
- )
154
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
170
155
  )
171
156
  .unknown(false);
172
157
 
@@ -179,15 +164,16 @@ export class MaterialComponentSchema {
179
164
  validate(data: MaterialComponentSchemaData): Entities.MaterialComponent {
180
165
  const { error, value } = this.schema.validate(data, { abortEarly: false });
181
166
  if (error) {
182
- throw new Error(
183
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
184
- );
167
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
185
168
  }
186
169
  return this.makeEntity(value);
187
170
  }
188
171
 
189
172
  makeEntity(data: MaterialComponentSchemaData): Entities.MaterialComponent {
190
- return new Entities.MaterialComponent(data.name, data.moleFraction);
173
+ return new Entities.MaterialComponent(
174
+ data.name,
175
+ data.moleFraction
176
+ );
191
177
  }
192
178
  }
193
179
 
@@ -206,27 +192,18 @@ export interface MaterialSchemaData {
206
192
  */
207
193
  export class MaterialSchema {
208
194
  schema: Joi.ObjectSchema;
209
- propertyTypes: Record<string, any>;
195
+ propertyTypes: Record<string, unknown>;
210
196
 
211
197
  constructor() {
212
198
  this.schema = Joi.object({
213
199
  name: Joi.string().allow(""),
214
- components: Joi.array()
215
- .items(new MaterialComponentSchema().schema)
216
- .allow(null),
200
+ components: Joi.array().items(new MaterialComponentSchema().schema).allow(null),
217
201
  componentCount: Joi.number().integer(),
218
- propertyTemplate: Joi.string().valid(
219
- ...Object.values(Enums.PropertyTemplate)
220
- ),
202
+ propertyTemplate: Joi.string().valid(...Object.values(Enums.PropertyTemplate)),
221
203
  })
222
204
  .pattern(
223
205
  ignoredPropertiesRegex,
224
- Joi.alternatives().try(
225
- Joi.string(),
226
- Joi.number(),
227
- Joi.date(),
228
- Joi.any()
229
- )
206
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
230
207
  )
231
208
  .unknown(false);
232
209
 
@@ -241,9 +218,7 @@ export class MaterialSchema {
241
218
  validate(data: MaterialSchemaData): Entities.Material {
242
219
  const { error, value } = this.schema.validate(data, { abortEarly: false });
243
220
  if (error) {
244
- throw new Error(
245
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
246
- );
221
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
247
222
  }
248
223
  return this.makeEntity(value);
249
224
  }
@@ -274,7 +249,7 @@ export interface StateSchemaData {
274
249
  */
275
250
  export class StateSchema {
276
251
  schema: Joi.ObjectSchema;
277
- propertyTypes: Record<string, any>;
252
+ propertyTypes: Record<string, unknown>;
278
253
 
279
254
  constructor() {
280
255
  this.schema = Joi.object({
@@ -282,18 +257,11 @@ export class StateSchema {
282
257
  temperature: Joi.number().unsafe(),
283
258
  liquidFraction: Joi.number().unsafe(),
284
259
  flashFlag: Joi.string().valid(...Object.values(Enums.FluidSpec)),
285
- mixtureModelling: Joi.string().valid(
286
- ...Object.values(Enums.MixtureModelling)
287
- ),
260
+ mixtureModelling: Joi.string().valid(...Object.values(Enums.MixtureModelling)),
288
261
  })
289
262
  .pattern(
290
263
  ignoredPropertiesRegex,
291
- Joi.alternatives().try(
292
- Joi.string(),
293
- Joi.number(),
294
- Joi.date(),
295
- Joi.any()
296
- )
264
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
297
265
  )
298
266
  .unknown(false);
299
267
 
@@ -309,9 +277,7 @@ export class StateSchema {
309
277
  validate(data: StateSchemaData): Entities.State {
310
278
  const { error, value } = this.schema.validate(data, { abortEarly: false });
311
279
  if (error) {
312
- throw new Error(
313
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
314
- );
280
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
315
281
  }
316
282
  return this.makeEntity(value);
317
283
  }
@@ -344,7 +310,7 @@ export interface AtmosphericStorageTankSchemaData {
344
310
  */
345
311
  export class AtmosphericStorageTankSchema {
346
312
  schema: Joi.ObjectSchema;
347
- propertyTypes: Record<string, any>;
313
+ propertyTypes: Record<string, unknown>;
348
314
 
349
315
  constructor() {
350
316
  this.schema = Joi.object({
@@ -357,12 +323,7 @@ export class AtmosphericStorageTankSchema {
357
323
  })
358
324
  .pattern(
359
325
  ignoredPropertiesRegex,
360
- Joi.alternatives().try(
361
- Joi.string(),
362
- Joi.number(),
363
- Joi.date(),
364
- Joi.any()
365
- )
326
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
366
327
  )
367
328
  .unknown(false);
368
329
 
@@ -376,21 +337,15 @@ export class AtmosphericStorageTankSchema {
376
337
  };
377
338
  }
378
339
 
379
- validate(
380
- data: AtmosphericStorageTankSchemaData
381
- ): Entities.AtmosphericStorageTank {
340
+ validate(data: AtmosphericStorageTankSchemaData): Entities.AtmosphericStorageTank {
382
341
  const { error, value } = this.schema.validate(data, { abortEarly: false });
383
342
  if (error) {
384
- throw new Error(
385
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
386
- );
343
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
387
344
  }
388
345
  return this.makeEntity(value);
389
346
  }
390
347
 
391
- makeEntity(
392
- data: AtmosphericStorageTankSchemaData
393
- ): Entities.AtmosphericStorageTank {
348
+ makeEntity(data: AtmosphericStorageTankSchemaData): Entities.AtmosphericStorageTank {
394
349
  return new Entities.AtmosphericStorageTank(
395
350
  data.location,
396
351
  data.state,
@@ -416,7 +371,7 @@ export interface BundSchemaData {
416
371
  */
417
372
  export class BundSchema {
418
373
  schema: Joi.ObjectSchema;
419
- propertyTypes: Record<string, any>;
374
+ propertyTypes: Record<string, unknown>;
420
375
 
421
376
  constructor() {
422
377
  this.schema = Joi.object({
@@ -426,12 +381,7 @@ export class BundSchema {
426
381
  })
427
382
  .pattern(
428
383
  ignoredPropertiesRegex,
429
- Joi.alternatives().try(
430
- Joi.string(),
431
- Joi.number(),
432
- Joi.date(),
433
- Joi.any()
434
- )
384
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
435
385
  )
436
386
  .unknown(false);
437
387
 
@@ -445,9 +395,7 @@ export class BundSchema {
445
395
  validate(data: BundSchemaData): Entities.Bund {
446
396
  const { error, value } = this.schema.validate(data, { abortEarly: false });
447
397
  if (error) {
448
- throw new Error(
449
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
450
- );
398
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
451
399
  }
452
400
  return this.makeEntity(value);
453
401
  }
@@ -471,18 +419,13 @@ export interface ScenarioSchemaData {}
471
419
  */
472
420
  export class ScenarioSchema {
473
421
  schema: Joi.ObjectSchema;
474
- propertyTypes: Record<string, any>;
422
+ propertyTypes: Record<string, unknown>;
475
423
 
476
424
  constructor() {
477
425
  this.schema = Joi.object()
478
426
  .pattern(
479
427
  ignoredPropertiesRegex,
480
- Joi.alternatives().try(
481
- Joi.string(),
482
- Joi.number(),
483
- Joi.date(),
484
- Joi.any()
485
- )
428
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
486
429
  )
487
430
  .unknown(false);
488
431
 
@@ -492,9 +435,7 @@ export class ScenarioSchema {
492
435
  validate(data: ScenarioSchemaData): Entities.Scenario {
493
436
  const { error } = this.schema.validate(data, { abortEarly: false });
494
437
  if (error) {
495
- throw new Error(
496
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
497
- );
438
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
498
439
  }
499
440
  return this.makeEntity();
500
441
  }
@@ -514,18 +455,13 @@ export interface InstantaneousSchemaData {}
514
455
  */
515
456
  export class InstantaneousSchema {
516
457
  schema: Joi.ObjectSchema;
517
- propertyTypes: Record<string, any>;
458
+ propertyTypes: Record<string, unknown>;
518
459
 
519
460
  constructor() {
520
461
  this.schema = Joi.object()
521
462
  .pattern(
522
463
  ignoredPropertiesRegex,
523
- Joi.alternatives().try(
524
- Joi.string(),
525
- Joi.number(),
526
- Joi.date(),
527
- Joi.any()
528
- )
464
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
529
465
  )
530
466
  .unknown(false);
531
467
 
@@ -535,9 +471,7 @@ export class InstantaneousSchema {
535
471
  validate(data: InstantaneousSchemaData): Entities.Instantaneous {
536
472
  const { error } = this.schema.validate(data, { abortEarly: false });
537
473
  if (error) {
538
- throw new Error(
539
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
540
- );
474
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
541
475
  }
542
476
  return this.makeEntity();
543
477
  }
@@ -557,18 +491,13 @@ export interface CatastrophicRuptureSchemaData {}
557
491
  */
558
492
  export class CatastrophicRuptureSchema {
559
493
  schema: Joi.ObjectSchema;
560
- propertyTypes: Record<string, any>;
494
+ propertyTypes: Record<string, unknown>;
561
495
 
562
496
  constructor() {
563
497
  this.schema = Joi.object()
564
498
  .pattern(
565
499
  ignoredPropertiesRegex,
566
- Joi.alternatives().try(
567
- Joi.string(),
568
- Joi.number(),
569
- Joi.date(),
570
- Joi.any()
571
- )
500
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
572
501
  )
573
502
  .unknown(false);
574
503
 
@@ -578,9 +507,7 @@ export class CatastrophicRuptureSchema {
578
507
  validate(data: CatastrophicRuptureSchemaData): Entities.CatastrophicRupture {
579
508
  const { error } = this.schema.validate(data, { abortEarly: false });
580
509
  if (error) {
581
- throw new Error(
582
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
583
- );
510
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
584
511
  }
585
512
  return this.makeEntity();
586
513
  }
@@ -603,7 +530,7 @@ export interface ConcentrationRecordSchemaData {
603
530
  */
604
531
  export class ConcentrationRecordSchema {
605
532
  schema: Joi.ObjectSchema;
606
- propertyTypes: Record<string, any>;
533
+ propertyTypes: Record<string, unknown>;
607
534
 
608
535
  constructor() {
609
536
  this.schema = Joi.object({
@@ -612,12 +539,7 @@ export class ConcentrationRecordSchema {
612
539
  })
613
540
  .pattern(
614
541
  ignoredPropertiesRegex,
615
- Joi.alternatives().try(
616
- Joi.string(),
617
- Joi.number(),
618
- Joi.date(),
619
- Joi.any()
620
- )
542
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
621
543
  )
622
544
  .unknown(false);
623
545
 
@@ -630,17 +552,16 @@ export class ConcentrationRecordSchema {
630
552
  validate(data: ConcentrationRecordSchemaData): Entities.ConcentrationRecord {
631
553
  const { error, value } = this.schema.validate(data, { abortEarly: false });
632
554
  if (error) {
633
- throw new Error(
634
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
635
- );
555
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
636
556
  }
637
557
  return this.makeEntity(value);
638
558
  }
639
559
 
640
- makeEntity(
641
- data: ConcentrationRecordSchemaData
642
- ): Entities.ConcentrationRecord {
643
- return new Entities.ConcentrationRecord(data.concentration, data.position);
560
+ makeEntity(data: ConcentrationRecordSchemaData): Entities.ConcentrationRecord {
561
+ return new Entities.ConcentrationRecord(
562
+ data.concentration,
563
+ data.position
564
+ );
644
565
  }
645
566
  }
646
567
 
@@ -658,7 +579,7 @@ export interface ConstantMaterialResultSchemaData {
658
579
  */
659
580
  export class ConstantMaterialResultSchema {
660
581
  schema: Joi.ObjectSchema;
661
- propertyTypes: Record<string, any>;
582
+ propertyTypes: Record<string, unknown>;
662
583
 
663
584
  constructor() {
664
585
  this.schema = Joi.object({
@@ -668,12 +589,7 @@ export class ConstantMaterialResultSchema {
668
589
  })
669
590
  .pattern(
670
591
  ignoredPropertiesRegex,
671
- Joi.alternatives().try(
672
- Joi.string(),
673
- Joi.number(),
674
- Joi.date(),
675
- Joi.any()
676
- )
592
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
677
593
  )
678
594
  .unknown(false);
679
595
 
@@ -684,21 +600,15 @@ export class ConstantMaterialResultSchema {
684
600
  };
685
601
  }
686
602
 
687
- validate(
688
- data: ConstantMaterialResultSchemaData
689
- ): Entities.ConstantMaterialResult {
603
+ validate(data: ConstantMaterialResultSchemaData): Entities.ConstantMaterialResult {
690
604
  const { error, value } = this.schema.validate(data, { abortEarly: false });
691
605
  if (error) {
692
- throw new Error(
693
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
694
- );
606
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
695
607
  }
696
608
  return this.makeEntity(value);
697
609
  }
698
610
 
699
- makeEntity(
700
- data: ConstantMaterialResultSchemaData
701
- ): Entities.ConstantMaterialResult {
611
+ makeEntity(data: ConstantMaterialResultSchemaData): Entities.ConstantMaterialResult {
702
612
  return new Entities.ConstantMaterialResult(
703
613
  data.criticalPressure,
704
614
  data.criticalTemperature,
@@ -719,22 +629,15 @@ export interface DischargeParametersSchemaData {
719
629
  */
720
630
  export class DischargeParametersSchema {
721
631
  schema: Joi.ObjectSchema;
722
- propertyTypes: Record<string, any>;
632
+ propertyTypes: Record<string, unknown>;
723
633
 
724
634
  constructor() {
725
635
  this.schema = Joi.object({
726
- flashAtOrifice: Joi.string().valid(
727
- ...Object.values(Enums.FlashAtOrifice)
728
- ),
636
+ flashAtOrifice: Joi.string().valid(...Object.values(Enums.FlashAtOrifice)),
729
637
  })
730
638
  .pattern(
731
639
  ignoredPropertiesRegex,
732
- Joi.alternatives().try(
733
- Joi.string(),
734
- Joi.number(),
735
- Joi.date(),
736
- Joi.any()
737
- )
640
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
738
641
  )
739
642
  .unknown(false);
740
643
 
@@ -746,17 +649,15 @@ export class DischargeParametersSchema {
746
649
  validate(data: DischargeParametersSchemaData): Entities.DischargeParameters {
747
650
  const { error, value } = this.schema.validate(data, { abortEarly: false });
748
651
  if (error) {
749
- throw new Error(
750
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
751
- );
652
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
752
653
  }
753
654
  return this.makeEntity(value);
754
655
  }
755
656
 
756
- makeEntity(
757
- data: DischargeParametersSchemaData
758
- ): Entities.DischargeParameters {
759
- return new Entities.DischargeParameters(data.flashAtOrifice);
657
+ makeEntity(data: DischargeParametersSchemaData): Entities.DischargeParameters {
658
+ return new Entities.DischargeParameters(
659
+ data.flashAtOrifice
660
+ );
760
661
  }
761
662
  }
762
663
 
@@ -780,7 +681,7 @@ export interface DischargeRecordSchemaData {
780
681
  */
781
682
  export class DischargeRecordSchema {
782
683
  schema: Joi.ObjectSchema;
783
- propertyTypes: Record<string, any>;
684
+ propertyTypes: Record<string, unknown>;
784
685
 
785
686
  constructor() {
786
687
  this.schema = Joi.object({
@@ -796,12 +697,7 @@ export class DischargeRecordSchema {
796
697
  })
797
698
  .pattern(
798
699
  ignoredPropertiesRegex,
799
- Joi.alternatives().try(
800
- Joi.string(),
801
- Joi.number(),
802
- Joi.date(),
803
- Joi.any()
804
- )
700
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
805
701
  )
806
702
  .unknown(false);
807
703
 
@@ -821,9 +717,7 @@ export class DischargeRecordSchema {
821
717
  validate(data: DischargeRecordSchemaData): Entities.DischargeRecord {
822
718
  const { error, value } = this.schema.validate(data, { abortEarly: false });
823
719
  if (error) {
824
- throw new Error(
825
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
826
- );
720
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
827
721
  }
828
722
  return this.makeEntity(value);
829
723
  }
@@ -861,7 +755,7 @@ export interface DischargeResultSchemaData {
861
755
  */
862
756
  export class DischargeResultSchema {
863
757
  schema: Joi.ObjectSchema;
864
- propertyTypes: Record<string, any>;
758
+ propertyTypes: Record<string, unknown>;
865
759
 
866
760
  constructor() {
867
761
  this.schema = Joi.object({
@@ -875,12 +769,7 @@ export class DischargeResultSchema {
875
769
  })
876
770
  .pattern(
877
771
  ignoredPropertiesRegex,
878
- Joi.alternatives().try(
879
- Joi.string(),
880
- Joi.number(),
881
- Joi.date(),
882
- Joi.any()
883
- )
772
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
884
773
  )
885
774
  .unknown(false);
886
775
 
@@ -898,9 +787,7 @@ export class DischargeResultSchema {
898
787
  validate(data: DischargeResultSchemaData): Entities.DischargeResult {
899
788
  const { error, value } = this.schema.validate(data, { abortEarly: false });
900
789
  if (error) {
901
- throw new Error(
902
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
903
- );
790
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
904
791
  }
905
792
  return this.makeEntity(value);
906
793
  }
@@ -940,7 +827,7 @@ export interface DispersionOutputConfigSchemaData {
940
827
  */
941
828
  export class DispersionOutputConfigSchema {
942
829
  schema: Joi.ObjectSchema;
943
- propertyTypes: Record<string, any>;
830
+ propertyTypes: Record<string, unknown>;
944
831
 
945
832
  constructor() {
946
833
  this.schema = Joi.object({
@@ -948,9 +835,7 @@ export class DispersionOutputConfigSchema {
948
835
  time: Joi.number().unsafe(),
949
836
  resolution: Joi.string().valid(...Object.values(Enums.Resolution)),
950
837
  elevation: Joi.number().unsafe(),
951
- specialConcentration: Joi.string().valid(
952
- ...Object.values(Enums.SpecialConcentration)
953
- ),
838
+ specialConcentration: Joi.string().valid(...Object.values(Enums.SpecialConcentration)),
954
839
  concentration: Joi.number().unsafe(),
955
840
  crosswindDistance: Joi.number().unsafe(),
956
841
  contourType: Joi.string().valid(...Object.values(Enums.ContourType)),
@@ -960,12 +845,7 @@ export class DispersionOutputConfigSchema {
960
845
  })
961
846
  .pattern(
962
847
  ignoredPropertiesRegex,
963
- Joi.alternatives().try(
964
- Joi.string(),
965
- Joi.number(),
966
- Joi.date(),
967
- Joi.any()
968
- )
848
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
969
849
  )
970
850
  .unknown(false);
971
851
 
@@ -984,21 +864,15 @@ export class DispersionOutputConfigSchema {
984
864
  };
985
865
  }
986
866
 
987
- validate(
988
- data: DispersionOutputConfigSchemaData
989
- ): Entities.DispersionOutputConfig {
867
+ validate(data: DispersionOutputConfigSchemaData): Entities.DispersionOutputConfig {
990
868
  const { error, value } = this.schema.validate(data, { abortEarly: false });
991
869
  if (error) {
992
- throw new Error(
993
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
994
- );
870
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
995
871
  }
996
872
  return this.makeEntity(value);
997
873
  }
998
874
 
999
- makeEntity(
1000
- data: DispersionOutputConfigSchemaData
1001
- ): Entities.DispersionOutputConfig {
875
+ makeEntity(data: DispersionOutputConfigSchemaData): Entities.DispersionOutputConfig {
1002
876
  return new Entities.DispersionOutputConfig(
1003
877
  data.downwindDistance,
1004
878
  data.time,
@@ -1036,14 +910,12 @@ export interface DispersionParametersSchemaData {
1036
910
  */
1037
911
  export class DispersionParametersSchema {
1038
912
  schema: Joi.ObjectSchema;
1039
- propertyTypes: Record<string, any>;
913
+ propertyTypes: Record<string, unknown>;
1040
914
 
1041
915
  constructor() {
1042
916
  this.schema = Joi.object({
1043
917
  relativeTolerance: Joi.number().unsafe(),
1044
- rainoutThermoFlag: Joi.string().valid(
1045
- ...Object.values(Enums.RainoutThermoFlag)
1046
- ),
918
+ rainoutThermoFlag: Joi.string().valid(...Object.values(Enums.RainoutThermoFlag)),
1047
919
  fixedStepSize: Joi.number().unsafe(),
1048
920
  outputStepMultiplier: Joi.number().unsafe(),
1049
921
  maxDispersionDistance: Joi.number().unsafe(),
@@ -1055,12 +927,7 @@ export class DispersionParametersSchema {
1055
927
  })
1056
928
  .pattern(
1057
929
  ignoredPropertiesRegex,
1058
- Joi.alternatives().try(
1059
- Joi.string(),
1060
- Joi.number(),
1061
- Joi.date(),
1062
- Joi.any()
1063
- )
930
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1064
931
  )
1065
932
  .unknown(false);
1066
933
 
@@ -1078,21 +945,15 @@ export class DispersionParametersSchema {
1078
945
  };
1079
946
  }
1080
947
 
1081
- validate(
1082
- data: DispersionParametersSchemaData
1083
- ): Entities.DispersionParameters {
948
+ validate(data: DispersionParametersSchemaData): Entities.DispersionParameters {
1084
949
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1085
950
  if (error) {
1086
- throw new Error(
1087
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1088
- );
951
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1089
952
  }
1090
953
  return this.makeEntity(value);
1091
954
  }
1092
955
 
1093
- makeEntity(
1094
- data: DispersionParametersSchemaData
1095
- ): Entities.DispersionParameters {
956
+ makeEntity(data: DispersionParametersSchemaData): Entities.DispersionParameters {
1096
957
  return new Entities.DispersionParameters(
1097
958
  data.relativeTolerance,
1098
959
  data.rainoutThermoFlag,
@@ -1148,7 +1009,7 @@ export interface DispersionRecordSchemaData {
1148
1009
  */
1149
1010
  export class DispersionRecordSchema {
1150
1011
  schema: Joi.ObjectSchema;
1151
- propertyTypes: Record<string, any>;
1012
+ propertyTypes: Record<string, unknown>;
1152
1013
 
1153
1014
  constructor() {
1154
1015
  this.schema = Joi.object({
@@ -1184,12 +1045,7 @@ export class DispersionRecordSchema {
1184
1045
  })
1185
1046
  .pattern(
1186
1047
  ignoredPropertiesRegex,
1187
- Joi.alternatives().try(
1188
- Joi.string(),
1189
- Joi.number(),
1190
- Joi.date(),
1191
- Joi.any()
1192
- )
1048
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1193
1049
  )
1194
1050
  .unknown(false);
1195
1051
 
@@ -1229,9 +1085,7 @@ export class DispersionRecordSchema {
1229
1085
  validate(data: DispersionRecordSchemaData): Entities.DispersionRecord {
1230
1086
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1231
1087
  if (error) {
1232
- throw new Error(
1233
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1234
- );
1088
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1235
1089
  }
1236
1090
  return this.makeEntity(value);
1237
1091
  }
@@ -1284,7 +1138,7 @@ export interface ExplosionConfinedVolumeSchemaData {
1284
1138
  */
1285
1139
  export class ExplosionConfinedVolumeSchema {
1286
1140
  schema: Joi.ObjectSchema;
1287
- propertyTypes: Record<string, any>;
1141
+ propertyTypes: Record<string, unknown>;
1288
1142
 
1289
1143
  constructor() {
1290
1144
  this.schema = Joi.object({
@@ -1293,12 +1147,7 @@ export class ExplosionConfinedVolumeSchema {
1293
1147
  })
1294
1148
  .pattern(
1295
1149
  ignoredPropertiesRegex,
1296
- Joi.alternatives().try(
1297
- Joi.string(),
1298
- Joi.number(),
1299
- Joi.date(),
1300
- Joi.any()
1301
- )
1150
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1302
1151
  )
1303
1152
  .unknown(false);
1304
1153
 
@@ -1308,21 +1157,15 @@ export class ExplosionConfinedVolumeSchema {
1308
1157
  };
1309
1158
  }
1310
1159
 
1311
- validate(
1312
- data: ExplosionConfinedVolumeSchemaData
1313
- ): Entities.ExplosionConfinedVolume {
1160
+ validate(data: ExplosionConfinedVolumeSchemaData): Entities.ExplosionConfinedVolume {
1314
1161
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1315
1162
  if (error) {
1316
- throw new Error(
1317
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1318
- );
1163
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1319
1164
  }
1320
1165
  return this.makeEntity(value);
1321
1166
  }
1322
1167
 
1323
- makeEntity(
1324
- data: ExplosionConfinedVolumeSchemaData
1325
- ): Entities.ExplosionConfinedVolume {
1168
+ makeEntity(data: ExplosionConfinedVolumeSchemaData): Entities.ExplosionConfinedVolume {
1326
1169
  return new Entities.ExplosionConfinedVolume(
1327
1170
  data.confinedStrength,
1328
1171
  data.confinedVolume
@@ -1343,23 +1186,16 @@ export interface ExplosionOutputConfigSchemaData {
1343
1186
  */
1344
1187
  export class ExplosionOutputConfigSchema {
1345
1188
  schema: Joi.ObjectSchema;
1346
- propertyTypes: Record<string, any>;
1189
+ propertyTypes: Record<string, unknown>;
1347
1190
 
1348
1191
  constructor() {
1349
1192
  this.schema = Joi.object({
1350
1193
  overpressureLevel: Joi.number().unsafe(),
1351
- meConfinedMethod: Joi.string().valid(
1352
- ...Object.values(Enums.MEConfinedMethod)
1353
- ),
1194
+ meConfinedMethod: Joi.string().valid(...Object.values(Enums.MEConfinedMethod)),
1354
1195
  })
1355
1196
  .pattern(
1356
1197
  ignoredPropertiesRegex,
1357
- Joi.alternatives().try(
1358
- Joi.string(),
1359
- Joi.number(),
1360
- Joi.date(),
1361
- Joi.any()
1362
- )
1198
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1363
1199
  )
1364
1200
  .unknown(false);
1365
1201
 
@@ -1369,21 +1205,15 @@ export class ExplosionOutputConfigSchema {
1369
1205
  };
1370
1206
  }
1371
1207
 
1372
- validate(
1373
- data: ExplosionOutputConfigSchemaData
1374
- ): Entities.ExplosionOutputConfig {
1208
+ validate(data: ExplosionOutputConfigSchemaData): Entities.ExplosionOutputConfig {
1375
1209
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1376
1210
  if (error) {
1377
- throw new Error(
1378
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1379
- );
1211
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1380
1212
  }
1381
1213
  return this.makeEntity(value);
1382
1214
  }
1383
1215
 
1384
- makeEntity(
1385
- data: ExplosionOutputConfigSchemaData
1386
- ): Entities.ExplosionOutputConfig {
1216
+ makeEntity(data: ExplosionOutputConfigSchemaData): Entities.ExplosionOutputConfig {
1387
1217
  return new Entities.ExplosionOutputConfig(
1388
1218
  data.overpressureLevel,
1389
1219
  data.meConfinedMethod
@@ -1408,7 +1238,7 @@ export interface ExplosionOverpressureResultSchemaData {
1408
1238
  */
1409
1239
  export class ExplosionOverpressureResultSchema {
1410
1240
  schema: Joi.ObjectSchema;
1411
- propertyTypes: Record<string, any>;
1241
+ propertyTypes: Record<string, unknown>;
1412
1242
 
1413
1243
  constructor() {
1414
1244
  this.schema = Joi.object({
@@ -1421,12 +1251,7 @@ export class ExplosionOverpressureResultSchema {
1421
1251
  })
1422
1252
  .pattern(
1423
1253
  ignoredPropertiesRegex,
1424
- Joi.alternatives().try(
1425
- Joi.string(),
1426
- Joi.number(),
1427
- Joi.date(),
1428
- Joi.any()
1429
- )
1254
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1430
1255
  )
1431
1256
  .unknown(false);
1432
1257
 
@@ -1440,21 +1265,15 @@ export class ExplosionOverpressureResultSchema {
1440
1265
  };
1441
1266
  }
1442
1267
 
1443
- validate(
1444
- data: ExplosionOverpressureResultSchemaData
1445
- ): Entities.ExplosionOverpressureResult {
1268
+ validate(data: ExplosionOverpressureResultSchemaData): Entities.ExplosionOverpressureResult {
1446
1269
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1447
1270
  if (error) {
1448
- throw new Error(
1449
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1450
- );
1271
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1451
1272
  }
1452
1273
  return this.makeEntity(value);
1453
1274
  }
1454
1275
 
1455
- makeEntity(
1456
- data: ExplosionOverpressureResultSchemaData
1457
- ): Entities.ExplosionOverpressureResult {
1276
+ makeEntity(data: ExplosionOverpressureResultSchemaData): Entities.ExplosionOverpressureResult {
1458
1277
  return new Entities.ExplosionOverpressureResult(
1459
1278
  data.overpressure,
1460
1279
  data.explosionCentre,
@@ -1478,7 +1297,7 @@ export interface ExplosionParametersSchemaData {
1478
1297
  */
1479
1298
  export class ExplosionParametersSchema {
1480
1299
  schema: Joi.ObjectSchema;
1481
- propertyTypes: Record<string, any>;
1300
+ propertyTypes: Record<string, unknown>;
1482
1301
 
1483
1302
  constructor() {
1484
1303
  this.schema = Joi.object({
@@ -1486,12 +1305,7 @@ export class ExplosionParametersSchema {
1486
1305
  })
1487
1306
  .pattern(
1488
1307
  ignoredPropertiesRegex,
1489
- Joi.alternatives().try(
1490
- Joi.string(),
1491
- Joi.number(),
1492
- Joi.date(),
1493
- Joi.any()
1494
- )
1308
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1495
1309
  )
1496
1310
  .unknown(false);
1497
1311
 
@@ -1503,17 +1317,15 @@ export class ExplosionParametersSchema {
1503
1317
  validate(data: ExplosionParametersSchemaData): Entities.ExplosionParameters {
1504
1318
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1505
1319
  if (error) {
1506
- throw new Error(
1507
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1508
- );
1320
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1509
1321
  }
1510
1322
  return this.makeEntity(value);
1511
1323
  }
1512
1324
 
1513
- makeEntity(
1514
- data: ExplosionParametersSchemaData
1515
- ): Entities.ExplosionParameters {
1516
- return new Entities.ExplosionParameters(data.explosionUniformStrength);
1325
+ makeEntity(data: ExplosionParametersSchemaData): Entities.ExplosionParameters {
1326
+ return new Entities.ExplosionParameters(
1327
+ data.explosionUniformStrength
1328
+ );
1517
1329
  }
1518
1330
  }
1519
1331
 
@@ -1532,7 +1344,7 @@ export interface FlameRecordSchemaData {
1532
1344
  */
1533
1345
  export class FlameRecordSchema {
1534
1346
  schema: Joi.ObjectSchema;
1535
- propertyTypes: Record<string, any>;
1347
+ propertyTypes: Record<string, unknown>;
1536
1348
 
1537
1349
  constructor() {
1538
1350
  this.schema = Joi.object({
@@ -1543,12 +1355,7 @@ export class FlameRecordSchema {
1543
1355
  })
1544
1356
  .pattern(
1545
1357
  ignoredPropertiesRegex,
1546
- Joi.alternatives().try(
1547
- Joi.string(),
1548
- Joi.number(),
1549
- Joi.date(),
1550
- Joi.any()
1551
- )
1358
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1552
1359
  )
1553
1360
  .unknown(false);
1554
1361
 
@@ -1563,9 +1370,7 @@ export class FlameRecordSchema {
1563
1370
  validate(data: FlameRecordSchemaData): Entities.FlameRecord {
1564
1371
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1565
1372
  if (error) {
1566
- throw new Error(
1567
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1568
- );
1373
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1569
1374
  }
1570
1375
  return this.makeEntity(value);
1571
1376
  }
@@ -1596,7 +1401,7 @@ export interface FlameResultSchemaData {
1596
1401
  */
1597
1402
  export class FlameResultSchema {
1598
1403
  schema: Joi.ObjectSchema;
1599
- propertyTypes: Record<string, any>;
1404
+ propertyTypes: Record<string, unknown>;
1600
1405
 
1601
1406
  constructor() {
1602
1407
  this.schema = Joi.object({
@@ -1608,12 +1413,7 @@ export class FlameResultSchema {
1608
1413
  })
1609
1414
  .pattern(
1610
1415
  ignoredPropertiesRegex,
1611
- Joi.alternatives().try(
1612
- Joi.string(),
1613
- Joi.number(),
1614
- Joi.date(),
1615
- Joi.any()
1616
- )
1416
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1617
1417
  )
1618
1418
  .unknown(false);
1619
1419
 
@@ -1629,9 +1429,7 @@ export class FlameResultSchema {
1629
1429
  validate(data: FlameResultSchemaData): Entities.FlameResult {
1630
1430
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1631
1431
  if (error) {
1632
- throw new Error(
1633
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1634
- );
1432
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1635
1433
  }
1636
1434
  return this.makeEntity(value);
1637
1435
  }
@@ -1660,7 +1458,7 @@ export interface TransectSchemaData {
1660
1458
  */
1661
1459
  export class TransectSchema {
1662
1460
  schema: Joi.ObjectSchema;
1663
- propertyTypes: Record<string, any>;
1461
+ propertyTypes: Record<string, unknown>;
1664
1462
 
1665
1463
  constructor() {
1666
1464
  this.schema = Joi.object({
@@ -1669,12 +1467,7 @@ export class TransectSchema {
1669
1467
  })
1670
1468
  .pattern(
1671
1469
  ignoredPropertiesRegex,
1672
- Joi.alternatives().try(
1673
- Joi.string(),
1674
- Joi.number(),
1675
- Joi.date(),
1676
- Joi.any()
1677
- )
1470
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1678
1471
  )
1679
1472
  .unknown(false);
1680
1473
 
@@ -1687,9 +1480,7 @@ export class TransectSchema {
1687
1480
  validate(data: TransectSchemaData): Entities.Transect {
1688
1481
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1689
1482
  if (error) {
1690
- throw new Error(
1691
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1692
- );
1483
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1693
1484
  }
1694
1485
  return this.makeEntity(value);
1695
1486
  }
@@ -1723,7 +1514,7 @@ export interface FlammableOutputConfigSchemaData {
1723
1514
  */
1724
1515
  export class FlammableOutputConfigSchema {
1725
1516
  schema: Joi.ObjectSchema;
1726
- propertyTypes: Record<string, any>;
1517
+ propertyTypes: Record<string, unknown>;
1727
1518
 
1728
1519
  constructor() {
1729
1520
  this.schema = Joi.object({
@@ -1732,9 +1523,7 @@ export class FlammableOutputConfigSchema {
1732
1523
  radiationType: Joi.string().valid(...Object.values(Enums.RadiationType)),
1733
1524
  contourType: Joi.string().valid(...Object.values(Enums.ContourType)),
1734
1525
  radiationLevel: Joi.number().unsafe(),
1735
- radiationResolution: Joi.string().valid(
1736
- ...Object.values(Enums.Resolution)
1737
- ),
1526
+ radiationResolution: Joi.string().valid(...Object.values(Enums.Resolution)),
1738
1527
  fixedOrientation: Joi.number().integer(),
1739
1528
  orientation: Joi.number().unsafe(),
1740
1529
  fixedInclination: Joi.number().integer(),
@@ -1742,12 +1531,7 @@ export class FlammableOutputConfigSchema {
1742
1531
  })
1743
1532
  .pattern(
1744
1533
  ignoredPropertiesRegex,
1745
- Joi.alternatives().try(
1746
- Joi.string(),
1747
- Joi.number(),
1748
- Joi.date(),
1749
- Joi.any()
1750
- )
1534
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1751
1535
  )
1752
1536
  .unknown(false);
1753
1537
 
@@ -1765,21 +1549,15 @@ export class FlammableOutputConfigSchema {
1765
1549
  };
1766
1550
  }
1767
1551
 
1768
- validate(
1769
- data: FlammableOutputConfigSchemaData
1770
- ): Entities.FlammableOutputConfig {
1552
+ validate(data: FlammableOutputConfigSchemaData): Entities.FlammableOutputConfig {
1771
1553
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1772
1554
  if (error) {
1773
- throw new Error(
1774
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1775
- );
1555
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1776
1556
  }
1777
1557
  return this.makeEntity(value);
1778
1558
  }
1779
1559
 
1780
- makeEntity(
1781
- data: FlammableOutputConfigSchemaData
1782
- ): Entities.FlammableOutputConfig {
1560
+ makeEntity(data: FlammableOutputConfigSchemaData): Entities.FlammableOutputConfig {
1783
1561
  return new Entities.FlammableOutputConfig(
1784
1562
  data.position,
1785
1563
  data.transect,
@@ -1812,7 +1590,7 @@ export interface FlammableParametersSchemaData {
1812
1590
  */
1813
1591
  export class FlammableParametersSchema {
1814
1592
  schema: Joi.ObjectSchema;
1815
- propertyTypes: Record<string, any>;
1593
+ propertyTypes: Record<string, unknown>;
1816
1594
 
1817
1595
  constructor() {
1818
1596
  this.schema = Joi.object({
@@ -1825,12 +1603,7 @@ export class FlammableParametersSchema {
1825
1603
  })
1826
1604
  .pattern(
1827
1605
  ignoredPropertiesRegex,
1828
- Joi.alternatives().try(
1829
- Joi.string(),
1830
- Joi.number(),
1831
- Joi.date(),
1832
- Joi.any()
1833
- )
1606
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1834
1607
  )
1835
1608
  .unknown(false);
1836
1609
 
@@ -1847,16 +1620,12 @@ export class FlammableParametersSchema {
1847
1620
  validate(data: FlammableParametersSchemaData): Entities.FlammableParameters {
1848
1621
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1849
1622
  if (error) {
1850
- throw new Error(
1851
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1852
- );
1623
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1853
1624
  }
1854
1625
  return this.makeEntity(value);
1855
1626
  }
1856
1627
 
1857
- makeEntity(
1858
- data: FlammableParametersSchemaData
1859
- ): Entities.FlammableParameters {
1628
+ makeEntity(data: FlammableParametersSchemaData): Entities.FlammableParameters {
1860
1629
  return new Entities.FlammableParameters(
1861
1630
  data.maxExposureDuration,
1862
1631
  data.radiationRelativeTolerance,
@@ -1895,7 +1664,7 @@ export interface FlashResultSchemaData {
1895
1664
  */
1896
1665
  export class FlashResultSchema {
1897
1666
  schema: Joi.ObjectSchema;
1898
- propertyTypes: Record<string, any>;
1667
+ propertyTypes: Record<string, unknown>;
1899
1668
 
1900
1669
  constructor() {
1901
1670
  this.schema = Joi.object({
@@ -1918,12 +1687,7 @@ export class FlashResultSchema {
1918
1687
  })
1919
1688
  .pattern(
1920
1689
  ignoredPropertiesRegex,
1921
- Joi.alternatives().try(
1922
- Joi.string(),
1923
- Joi.number(),
1924
- Joi.date(),
1925
- Joi.any()
1926
- )
1690
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
1927
1691
  )
1928
1692
  .unknown(false);
1929
1693
 
@@ -1950,9 +1714,7 @@ export class FlashResultSchema {
1950
1714
  validate(data: FlashResultSchemaData): Entities.FlashResult {
1951
1715
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1952
1716
  if (error) {
1953
- throw new Error(
1954
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
1955
- );
1717
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1956
1718
  }
1957
1719
  return this.makeEntity(value);
1958
1720
  }
@@ -1992,23 +1754,16 @@ export interface ReleaseOverTimeSchemaData {
1992
1754
  */
1993
1755
  export class ReleaseOverTimeSchema {
1994
1756
  schema: Joi.ObjectSchema;
1995
- propertyTypes: Record<string, any>;
1757
+ propertyTypes: Record<string, unknown>;
1996
1758
 
1997
1759
  constructor() {
1998
1760
  this.schema = Joi.object({
1999
1761
  releaseAngle: Joi.number().unsafe(),
2000
- timeVaryingOption: Joi.string().valid(
2001
- ...Object.values(Enums.TimeVaryingOption)
2002
- ),
1762
+ timeVaryingOption: Joi.string().valid(...Object.values(Enums.TimeVaryingOption)),
2003
1763
  })
2004
1764
  .pattern(
2005
1765
  ignoredPropertiesRegex,
2006
- Joi.alternatives().try(
2007
- Joi.string(),
2008
- Joi.number(),
2009
- Joi.date(),
2010
- Joi.any()
2011
- )
1766
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2012
1767
  )
2013
1768
  .unknown(false);
2014
1769
 
@@ -2021,9 +1776,7 @@ export class ReleaseOverTimeSchema {
2021
1776
  validate(data: ReleaseOverTimeSchemaData): Entities.ReleaseOverTime {
2022
1777
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2023
1778
  if (error) {
2024
- throw new Error(
2025
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2026
- );
1779
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2027
1780
  }
2028
1781
  return this.makeEntity(value);
2029
1782
  }
@@ -2052,26 +1805,19 @@ export interface LeakSchemaData {
2052
1805
  */
2053
1806
  export class LeakSchema {
2054
1807
  schema: Joi.ObjectSchema;
2055
- propertyTypes: Record<string, any>;
1808
+ propertyTypes: Record<string, unknown>;
2056
1809
 
2057
1810
  constructor() {
2058
1811
  this.schema = Joi.object({
2059
1812
  holeDiameter: Joi.number().unsafe(),
2060
1813
  releaseAngle: Joi.number().unsafe(),
2061
- timeVaryingOption: Joi.string().valid(
2062
- ...Object.values(Enums.TimeVaryingOption)
2063
- ),
1814
+ timeVaryingOption: Joi.string().valid(...Object.values(Enums.TimeVaryingOption)),
2064
1815
  holeHeightFraction: Joi.number().unsafe(),
2065
1816
  releaseElevation: Joi.number().unsafe(),
2066
1817
  })
2067
1818
  .pattern(
2068
1819
  ignoredPropertiesRegex,
2069
- Joi.alternatives().try(
2070
- Joi.string(),
2071
- Joi.number(),
2072
- Joi.date(),
2073
- Joi.any()
2074
- )
1820
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2075
1821
  )
2076
1822
  .unknown(false);
2077
1823
 
@@ -2087,9 +1833,7 @@ export class LeakSchema {
2087
1833
  validate(data: LeakSchemaData): Entities.Leak {
2088
1834
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2089
1835
  if (error) {
2090
- throw new Error(
2091
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2092
- );
1836
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2093
1837
  }
2094
1838
  return this.makeEntity(value);
2095
1839
  }
@@ -2122,27 +1866,20 @@ export interface LineRuptureSchemaData {
2122
1866
  */
2123
1867
  export class LineRuptureSchema {
2124
1868
  schema: Joi.ObjectSchema;
2125
- propertyTypes: Record<string, any>;
1869
+ propertyTypes: Record<string, unknown>;
2126
1870
 
2127
1871
  constructor() {
2128
1872
  this.schema = Joi.object({
2129
1873
  pipeDiameter: Joi.number().unsafe(),
2130
1874
  pipeLength: Joi.number().unsafe(),
2131
1875
  releaseAngle: Joi.number().unsafe(),
2132
- timeVaryingOption: Joi.string().valid(
2133
- ...Object.values(Enums.TimeVaryingOption)
2134
- ),
1876
+ timeVaryingOption: Joi.string().valid(...Object.values(Enums.TimeVaryingOption)),
2135
1877
  pipeRoughness: Joi.number().unsafe(),
2136
1878
  pipeHeightFraction: Joi.number().unsafe(),
2137
1879
  })
2138
1880
  .pattern(
2139
1881
  ignoredPropertiesRegex,
2140
- Joi.alternatives().try(
2141
- Joi.string(),
2142
- Joi.number(),
2143
- Joi.date(),
2144
- Joi.any()
2145
- )
1882
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2146
1883
  )
2147
1884
  .unknown(false);
2148
1885
 
@@ -2159,9 +1896,7 @@ export class LineRuptureSchema {
2159
1896
  validate(data: LineRuptureSchemaData): Entities.LineRupture {
2160
1897
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2161
1898
  if (error) {
2162
- throw new Error(
2163
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2164
- );
1899
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2165
1900
  }
2166
1901
  return this.makeEntity(value);
2167
1902
  }
@@ -2196,28 +1931,21 @@ export interface MaterialComponentDataItemSchemaData {
2196
1931
  */
2197
1932
  export class MaterialComponentDataItemSchema {
2198
1933
  schema: Joi.ObjectSchema;
2199
- propertyTypes: Record<string, any>;
1934
+ propertyTypes: Record<string, unknown>;
2200
1935
 
2201
1936
  constructor() {
2202
1937
  this.schema = Joi.object({
2203
1938
  description: Joi.string().allow(""),
2204
1939
  equationNumber: Joi.number().integer(),
2205
1940
  equationString: Joi.string().allow(""),
2206
- equationCoefficients: Joi.array()
2207
- .items(Joi.number().unsafe())
2208
- .allow(null),
1941
+ equationCoefficients: Joi.array().items(Joi.number().unsafe()).allow(null),
2209
1942
  calculationLimits: Joi.array().items(Joi.number().unsafe()).allow(null),
2210
1943
  supercriticalExtrapolation: Joi.number().unsafe(),
2211
1944
  fractionTc: Joi.number().unsafe(),
2212
1945
  })
2213
1946
  .pattern(
2214
1947
  ignoredPropertiesRegex,
2215
- Joi.alternatives().try(
2216
- Joi.string(),
2217
- Joi.number(),
2218
- Joi.date(),
2219
- Joi.any()
2220
- )
1948
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2221
1949
  )
2222
1950
  .unknown(false);
2223
1951
 
@@ -2232,21 +1960,15 @@ export class MaterialComponentDataItemSchema {
2232
1960
  };
2233
1961
  }
2234
1962
 
2235
- validate(
2236
- data: MaterialComponentDataItemSchemaData
2237
- ): Entities.MaterialComponentDataItem {
1963
+ validate(data: MaterialComponentDataItemSchemaData): Entities.MaterialComponentDataItem {
2238
1964
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2239
1965
  if (error) {
2240
- throw new Error(
2241
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2242
- );
1966
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2243
1967
  }
2244
1968
  return this.makeEntity(value);
2245
1969
  }
2246
1970
 
2247
- makeEntity(
2248
- data: MaterialComponentDataItemSchemaData
2249
- ): Entities.MaterialComponentDataItem {
1971
+ makeEntity(data: MaterialComponentDataItemSchemaData): Entities.MaterialComponentDataItem {
2250
1972
  return new Entities.MaterialComponentDataItem(
2251
1973
  data.description,
2252
1974
  data.equationNumber,
@@ -2275,26 +1997,19 @@ export interface MaterialComponentDataSchemaData {
2275
1997
  */
2276
1998
  export class MaterialComponentDataSchema {
2277
1999
  schema: Joi.ObjectSchema;
2278
- propertyTypes: Record<string, any>;
2000
+ propertyTypes: Record<string, unknown>;
2279
2001
 
2280
2002
  constructor() {
2281
2003
  this.schema = Joi.object({
2282
2004
  name: Joi.string().allow(""),
2283
2005
  dipprVersion: Joi.number().integer(),
2284
2006
  casId: Joi.number().integer(),
2285
- dataItem: Joi.array()
2286
- .items(new MaterialComponentDataItemSchema().schema)
2287
- .allow(null),
2007
+ dataItem: Joi.array().items(new MaterialComponentDataItemSchema().schema).allow(null),
2288
2008
  nonStandard: Joi.boolean(),
2289
2009
  })
2290
2010
  .pattern(
2291
2011
  ignoredPropertiesRegex,
2292
- Joi.alternatives().try(
2293
- Joi.string(),
2294
- Joi.number(),
2295
- Joi.date(),
2296
- Joi.any()
2297
- )
2012
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2298
2013
  )
2299
2014
  .unknown(false);
2300
2015
 
@@ -2307,21 +2022,15 @@ export class MaterialComponentDataSchema {
2307
2022
  };
2308
2023
  }
2309
2024
 
2310
- validate(
2311
- data: MaterialComponentDataSchemaData
2312
- ): Entities.MaterialComponentData {
2025
+ validate(data: MaterialComponentDataSchemaData): Entities.MaterialComponentData {
2313
2026
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2314
2027
  if (error) {
2315
- throw new Error(
2316
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2317
- );
2028
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2318
2029
  }
2319
2030
  return this.makeEntity(value);
2320
2031
  }
2321
2032
 
2322
- makeEntity(
2323
- data: MaterialComponentDataSchemaData
2324
- ): Entities.MaterialComponentData {
2033
+ makeEntity(data: MaterialComponentDataSchemaData): Entities.MaterialComponentData {
2325
2034
  return new Entities.MaterialComponentData(
2326
2035
  data.name,
2327
2036
  data.dipprVersion,
@@ -2359,7 +2068,7 @@ export interface MixtureConstantPropertiesResultSchemaData {
2359
2068
  */
2360
2069
  export class MixtureConstantPropertiesResultSchema {
2361
2070
  schema: Joi.ObjectSchema;
2362
- propertyTypes: Record<string, any>;
2071
+ propertyTypes: Record<string, unknown>;
2363
2072
 
2364
2073
  constructor() {
2365
2074
  this.schema = Joi.object({
@@ -2377,21 +2086,12 @@ export class MixtureConstantPropertiesResultSchema {
2377
2086
  dewPoint: Joi.number().unsafe(),
2378
2087
  emissivePowerLengthScale: Joi.number().unsafe(),
2379
2088
  laminarBurningVelocity: Joi.number().unsafe(),
2380
- flammableToxicFlag: Joi.string().valid(
2381
- ...Object.values(Enums.FlammableToxic)
2382
- ),
2383
- luminousSmokyFlame: Joi.string().valid(
2384
- ...Object.values(Enums.LuminousSmokyFlame)
2385
- ),
2089
+ flammableToxicFlag: Joi.string().valid(...Object.values(Enums.FlammableToxic)),
2090
+ luminousSmokyFlame: Joi.string().valid(...Object.values(Enums.LuminousSmokyFlame)),
2386
2091
  })
2387
2092
  .pattern(
2388
2093
  ignoredPropertiesRegex,
2389
- Joi.alternatives().try(
2390
- Joi.string(),
2391
- Joi.number(),
2392
- Joi.date(),
2393
- Joi.any()
2394
- )
2094
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2395
2095
  )
2396
2096
  .unknown(false);
2397
2097
 
@@ -2415,21 +2115,15 @@ export class MixtureConstantPropertiesResultSchema {
2415
2115
  };
2416
2116
  }
2417
2117
 
2418
- validate(
2419
- data: MixtureConstantPropertiesResultSchemaData
2420
- ): Entities.MixtureConstantPropertiesResult {
2118
+ validate(data: MixtureConstantPropertiesResultSchemaData): Entities.MixtureConstantPropertiesResult {
2421
2119
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2422
2120
  if (error) {
2423
- throw new Error(
2424
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2425
- );
2121
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2426
2122
  }
2427
2123
  return this.makeEntity(value);
2428
2124
  }
2429
2125
 
2430
- makeEntity(
2431
- data: MixtureConstantPropertiesResultSchemaData
2432
- ): Entities.MixtureConstantPropertiesResult {
2126
+ makeEntity(data: MixtureConstantPropertiesResultSchemaData): Entities.MixtureConstantPropertiesResult {
2433
2127
  return new Entities.MixtureConstantPropertiesResult(
2434
2128
  data.lowerFlammabilityLimit,
2435
2129
  data.upperFlammabilityLimit,
@@ -2470,7 +2164,7 @@ export interface PipeSchemaData {
2470
2164
  */
2471
2165
  export class PipeSchema {
2472
2166
  schema: Joi.ObjectSchema;
2473
- propertyTypes: Record<string, any>;
2167
+ propertyTypes: Record<string, unknown>;
2474
2168
 
2475
2169
  constructor() {
2476
2170
  this.schema = Joi.object({
@@ -2485,12 +2179,7 @@ export class PipeSchema {
2485
2179
  })
2486
2180
  .pattern(
2487
2181
  ignoredPropertiesRegex,
2488
- Joi.alternatives().try(
2489
- Joi.string(),
2490
- Joi.number(),
2491
- Joi.date(),
2492
- Joi.any()
2493
- )
2182
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2494
2183
  )
2495
2184
  .unknown(false);
2496
2185
 
@@ -2509,9 +2198,7 @@ export class PipeSchema {
2509
2198
  validate(data: PipeSchemaData): Entities.Pipe {
2510
2199
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2511
2200
  if (error) {
2512
- throw new Error(
2513
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2514
- );
2201
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2515
2202
  }
2516
2203
  return this.makeEntity(value);
2517
2204
  }
@@ -2545,25 +2232,18 @@ export interface PipeBreachSchemaData {
2545
2232
  */
2546
2233
  export class PipeBreachSchema {
2547
2234
  schema: Joi.ObjectSchema;
2548
- propertyTypes: Record<string, any>;
2235
+ propertyTypes: Record<string, unknown>;
2549
2236
 
2550
2237
  constructor() {
2551
2238
  this.schema = Joi.object({
2552
2239
  distanceDownstream: Joi.number().unsafe(),
2553
2240
  releaseAngle: Joi.number().unsafe(),
2554
- timeVaryingOption: Joi.string().valid(
2555
- ...Object.values(Enums.TimeVaryingOption)
2556
- ),
2241
+ timeVaryingOption: Joi.string().valid(...Object.values(Enums.TimeVaryingOption)),
2557
2242
  relativeAperture: Joi.number().unsafe(),
2558
2243
  })
2559
2244
  .pattern(
2560
2245
  ignoredPropertiesRegex,
2561
- Joi.alternatives().try(
2562
- Joi.string(),
2563
- Joi.number(),
2564
- Joi.date(),
2565
- Joi.any()
2566
- )
2246
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2567
2247
  )
2568
2248
  .unknown(false);
2569
2249
 
@@ -2578,9 +2258,7 @@ export class PipeBreachSchema {
2578
2258
  validate(data: PipeBreachSchemaData): Entities.PipeBreach {
2579
2259
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2580
2260
  if (error) {
2581
- throw new Error(
2582
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2583
- );
2261
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2584
2262
  }
2585
2263
  return this.makeEntity(value);
2586
2264
  }
@@ -2612,7 +2290,7 @@ export interface PoolFireFlameResultSchemaData {
2612
2290
  */
2613
2291
  export class PoolFireFlameResultSchema {
2614
2292
  schema: Joi.ObjectSchema;
2615
- propertyTypes: Record<string, any>;
2293
+ propertyTypes: Record<string, unknown>;
2616
2294
 
2617
2295
  constructor() {
2618
2296
  this.schema = Joi.object({
@@ -2625,12 +2303,7 @@ export class PoolFireFlameResultSchema {
2625
2303
  })
2626
2304
  .pattern(
2627
2305
  ignoredPropertiesRegex,
2628
- Joi.alternatives().try(
2629
- Joi.string(),
2630
- Joi.number(),
2631
- Joi.date(),
2632
- Joi.any()
2633
- )
2306
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2634
2307
  )
2635
2308
  .unknown(false);
2636
2309
 
@@ -2647,16 +2320,12 @@ export class PoolFireFlameResultSchema {
2647
2320
  validate(data: PoolFireFlameResultSchemaData): Entities.PoolFireFlameResult {
2648
2321
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2649
2322
  if (error) {
2650
- throw new Error(
2651
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2652
- );
2323
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2653
2324
  }
2654
2325
  return this.makeEntity(value);
2655
2326
  }
2656
2327
 
2657
- makeEntity(
2658
- data: PoolFireFlameResultSchemaData
2659
- ): Entities.PoolFireFlameResult {
2328
+ makeEntity(data: PoolFireFlameResultSchemaData): Entities.PoolFireFlameResult {
2660
2329
  return new Entities.PoolFireFlameResult(
2661
2330
  data.time,
2662
2331
  data.surfaceEmissivePower,
@@ -2692,7 +2361,7 @@ export interface PoolRecordSchemaData {
2692
2361
  */
2693
2362
  export class PoolRecordSchema {
2694
2363
  schema: Joi.ObjectSchema;
2695
- propertyTypes: Record<string, any>;
2364
+ propertyTypes: Record<string, unknown>;
2696
2365
 
2697
2366
  constructor() {
2698
2367
  this.schema = Joi.object({
@@ -2712,12 +2381,7 @@ export class PoolRecordSchema {
2712
2381
  })
2713
2382
  .pattern(
2714
2383
  ignoredPropertiesRegex,
2715
- Joi.alternatives().try(
2716
- Joi.string(),
2717
- Joi.number(),
2718
- Joi.date(),
2719
- Joi.any()
2720
- )
2384
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2721
2385
  )
2722
2386
  .unknown(false);
2723
2387
 
@@ -2741,9 +2405,7 @@ export class PoolRecordSchema {
2741
2405
  validate(data: PoolRecordSchemaData): Entities.PoolRecord {
2742
2406
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2743
2407
  if (error) {
2744
- throw new Error(
2745
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2746
- );
2408
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2747
2409
  }
2748
2410
  return this.makeEntity(value);
2749
2411
  }
@@ -2781,7 +2443,7 @@ export interface PoolVapourisationParametersSchemaData {
2781
2443
  */
2782
2444
  export class PoolVapourisationParametersSchema {
2783
2445
  schema: Joi.ObjectSchema;
2784
- propertyTypes: Record<string, any>;
2446
+ propertyTypes: Record<string, unknown>;
2785
2447
 
2786
2448
  constructor() {
2787
2449
  this.schema = Joi.object({
@@ -2791,12 +2453,7 @@ export class PoolVapourisationParametersSchema {
2791
2453
  })
2792
2454
  .pattern(
2793
2455
  ignoredPropertiesRegex,
2794
- Joi.alternatives().try(
2795
- Joi.string(),
2796
- Joi.number(),
2797
- Joi.date(),
2798
- Joi.any()
2799
- )
2456
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2800
2457
  )
2801
2458
  .unknown(false);
2802
2459
 
@@ -2807,21 +2464,15 @@ export class PoolVapourisationParametersSchema {
2807
2464
  };
2808
2465
  }
2809
2466
 
2810
- validate(
2811
- data: PoolVapourisationParametersSchemaData
2812
- ): Entities.PoolVapourisationParameters {
2467
+ validate(data: PoolVapourisationParametersSchemaData): Entities.PoolVapourisationParameters {
2813
2468
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2814
2469
  if (error) {
2815
- throw new Error(
2816
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2817
- );
2470
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2818
2471
  }
2819
2472
  return this.makeEntity(value);
2820
2473
  }
2821
2474
 
2822
- makeEntity(
2823
- data: PoolVapourisationParametersSchemaData
2824
- ): Entities.PoolVapourisationParameters {
2475
+ makeEntity(data: PoolVapourisationParametersSchemaData): Entities.PoolVapourisationParameters {
2825
2476
  return new Entities.PoolVapourisationParameters(
2826
2477
  data.toxicsCutoffRate,
2827
2478
  data.flammableCutoffRate,
@@ -2844,7 +2495,7 @@ export interface RadiationRecordSchemaData {
2844
2495
  */
2845
2496
  export class RadiationRecordSchema {
2846
2497
  schema: Joi.ObjectSchema;
2847
- propertyTypes: Record<string, any>;
2498
+ propertyTypes: Record<string, unknown>;
2848
2499
 
2849
2500
  constructor() {
2850
2501
  this.schema = Joi.object({
@@ -2854,12 +2505,7 @@ export class RadiationRecordSchema {
2854
2505
  })
2855
2506
  .pattern(
2856
2507
  ignoredPropertiesRegex,
2857
- Joi.alternatives().try(
2858
- Joi.string(),
2859
- Joi.number(),
2860
- Joi.date(),
2861
- Joi.any()
2862
- )
2508
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2863
2509
  )
2864
2510
  .unknown(false);
2865
2511
 
@@ -2873,9 +2519,7 @@ export class RadiationRecordSchema {
2873
2519
  validate(data: RadiationRecordSchemaData): Entities.RadiationRecord {
2874
2520
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2875
2521
  if (error) {
2876
- throw new Error(
2877
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2878
- );
2522
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2879
2523
  }
2880
2524
  return this.makeEntity(value);
2881
2525
  }
@@ -2907,7 +2551,7 @@ export interface ReliefValveSchemaData {
2907
2551
  */
2908
2552
  export class ReliefValveSchema {
2909
2553
  schema: Joi.ObjectSchema;
2910
- propertyTypes: Record<string, any>;
2554
+ propertyTypes: Record<string, unknown>;
2911
2555
 
2912
2556
  constructor() {
2913
2557
  this.schema = Joi.object({
@@ -2915,20 +2559,13 @@ export class ReliefValveSchema {
2915
2559
  pipeDiameter: Joi.number().unsafe(),
2916
2560
  pipeLength: Joi.number().unsafe(),
2917
2561
  releaseAngle: Joi.number().unsafe(),
2918
- timeVaryingOption: Joi.string().valid(
2919
- ...Object.values(Enums.TimeVaryingOption)
2920
- ),
2562
+ timeVaryingOption: Joi.string().valid(...Object.values(Enums.TimeVaryingOption)),
2921
2563
  pipeRoughness: Joi.number().unsafe(),
2922
2564
  pipeHeightFraction: Joi.number().unsafe(),
2923
2565
  })
2924
2566
  .pattern(
2925
2567
  ignoredPropertiesRegex,
2926
- Joi.alternatives().try(
2927
- Joi.string(),
2928
- Joi.number(),
2929
- Joi.date(),
2930
- Joi.any()
2931
- )
2568
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
2932
2569
  )
2933
2570
  .unknown(false);
2934
2571
 
@@ -2946,9 +2583,7 @@ export class ReliefValveSchema {
2946
2583
  validate(data: ReliefValveSchemaData): Entities.ReliefValve {
2947
2584
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2948
2585
  if (error) {
2949
- throw new Error(
2950
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
2951
- );
2586
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2952
2587
  }
2953
2588
  return this.makeEntity(value);
2954
2589
  }
@@ -2984,7 +2619,7 @@ export interface ScalarUdmOutputsSchemaData {
2984
2619
  */
2985
2620
  export class ScalarUdmOutputsSchema {
2986
2621
  schema: Joi.ObjectSchema;
2987
- propertyTypes: Record<string, any>;
2622
+ propertyTypes: Record<string, unknown>;
2988
2623
 
2989
2624
  constructor() {
2990
2625
  this.schema = Joi.object({
@@ -2998,12 +2633,7 @@ export class ScalarUdmOutputsSchema {
2998
2633
  })
2999
2634
  .pattern(
3000
2635
  ignoredPropertiesRegex,
3001
- Joi.alternatives().try(
3002
- Joi.string(),
3003
- Joi.number(),
3004
- Joi.date(),
3005
- Joi.any()
3006
- )
2636
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3007
2637
  )
3008
2638
  .unknown(false);
3009
2639
 
@@ -3021,9 +2651,7 @@ export class ScalarUdmOutputsSchema {
3021
2651
  validate(data: ScalarUdmOutputsSchemaData): Entities.ScalarUdmOutputs {
3022
2652
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3023
2653
  if (error) {
3024
- throw new Error(
3025
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3026
- );
2654
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3027
2655
  }
3028
2656
  return this.makeEntity(value);
3029
2657
  }
@@ -3058,27 +2686,20 @@ export interface ShortPipeRuptureSchemaData {
3058
2686
  */
3059
2687
  export class ShortPipeRuptureSchema {
3060
2688
  schema: Joi.ObjectSchema;
3061
- propertyTypes: Record<string, any>;
2689
+ propertyTypes: Record<string, unknown>;
3062
2690
 
3063
2691
  constructor() {
3064
2692
  this.schema = Joi.object({
3065
2693
  pipeLength: Joi.number().unsafe(),
3066
2694
  pipeDiameter: Joi.number().unsafe(),
3067
2695
  releaseAngle: Joi.number().unsafe(),
3068
- timeVaryingOption: Joi.string().valid(
3069
- ...Object.values(Enums.TimeVaryingOption)
3070
- ),
2696
+ timeVaryingOption: Joi.string().valid(...Object.values(Enums.TimeVaryingOption)),
3071
2697
  pipeRoughness: Joi.number().unsafe(),
3072
2698
  pipeHeightFraction: Joi.number().unsafe(),
3073
2699
  })
3074
2700
  .pattern(
3075
2701
  ignoredPropertiesRegex,
3076
- Joi.alternatives().try(
3077
- Joi.string(),
3078
- Joi.number(),
3079
- Joi.date(),
3080
- Joi.any()
3081
- )
2702
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3082
2703
  )
3083
2704
  .unknown(false);
3084
2705
 
@@ -3095,9 +2716,7 @@ export class ShortPipeRuptureSchema {
3095
2716
  validate(data: ShortPipeRuptureSchemaData): Entities.ShortPipeRupture {
3096
2717
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3097
2718
  if (error) {
3098
- throw new Error(
3099
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3100
- );
2719
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3101
2720
  }
3102
2721
  return this.makeEntity(value);
3103
2722
  }
@@ -3127,7 +2746,7 @@ export interface StructureSchemaData {
3127
2746
  */
3128
2747
  export class StructureSchema {
3129
2748
  schema: Joi.ObjectSchema;
3130
- propertyTypes: Record<string, any>;
2749
+ propertyTypes: Record<string, unknown>;
3131
2750
 
3132
2751
  constructor() {
3133
2752
  this.schema = Joi.object({
@@ -3136,12 +2755,7 @@ export class StructureSchema {
3136
2755
  })
3137
2756
  .pattern(
3138
2757
  ignoredPropertiesRegex,
3139
- Joi.alternatives().try(
3140
- Joi.string(),
3141
- Joi.number(),
3142
- Joi.date(),
3143
- Joi.any()
3144
- )
2758
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3145
2759
  )
3146
2760
  .unknown(false);
3147
2761
 
@@ -3154,15 +2768,16 @@ export class StructureSchema {
3154
2768
  validate(data: StructureSchemaData): Entities.Structure {
3155
2769
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3156
2770
  if (error) {
3157
- throw new Error(
3158
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3159
- );
2771
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3160
2772
  }
3161
2773
  return this.makeEntity(value);
3162
2774
  }
3163
2775
 
3164
2776
  makeEntity(data: StructureSchemaData): Entities.Structure {
3165
- return new Entities.Structure(data.explosionConfinedVolume, data.location);
2777
+ return new Entities.Structure(
2778
+ data.explosionConfinedVolume,
2779
+ data.location
2780
+ );
3166
2781
  }
3167
2782
  }
3168
2783
 
@@ -3181,25 +2796,18 @@ export interface SubstrateSchemaData {
3181
2796
  */
3182
2797
  export class SubstrateSchema {
3183
2798
  schema: Joi.ObjectSchema;
3184
- propertyTypes: Record<string, any>;
2799
+ propertyTypes: Record<string, unknown>;
3185
2800
 
3186
2801
  constructor() {
3187
2802
  this.schema = Joi.object({
3188
2803
  bund: new BundSchema().schema,
3189
2804
  surfaceRoughness: Joi.number().unsafe(),
3190
2805
  surfaceType: Joi.string().valid(...Object.values(Enums.SurfaceType)),
3191
- poolSurfaceType: Joi.string().valid(
3192
- ...Object.values(Enums.PoolSurfaceType)
3193
- ),
2806
+ poolSurfaceType: Joi.string().valid(...Object.values(Enums.PoolSurfaceType)),
3194
2807
  })
3195
2808
  .pattern(
3196
2809
  ignoredPropertiesRegex,
3197
- Joi.alternatives().try(
3198
- Joi.string(),
3199
- Joi.number(),
3200
- Joi.date(),
3201
- Joi.any()
3202
- )
2810
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3203
2811
  )
3204
2812
  .unknown(false);
3205
2813
 
@@ -3214,9 +2822,7 @@ export class SubstrateSchema {
3214
2822
  validate(data: SubstrateSchemaData): Entities.Substrate {
3215
2823
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3216
2824
  if (error) {
3217
- throw new Error(
3218
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3219
- );
2825
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3220
2826
  }
3221
2827
  return this.makeEntity(value);
3222
2828
  }
@@ -3245,24 +2851,17 @@ export interface ToxicRecordSchemaData {
3245
2851
  */
3246
2852
  export class ToxicRecordSchema {
3247
2853
  schema: Joi.ObjectSchema;
3248
- propertyTypes: Record<string, any>;
2854
+ propertyTypes: Record<string, unknown>;
3249
2855
 
3250
2856
  constructor() {
3251
2857
  this.schema = Joi.object({
3252
2858
  position: new LocalPositionSchema().schema,
3253
2859
  toxicResult: Joi.number().unsafe(),
3254
- toxicResultType: Joi.string().valid(
3255
- ...Object.values(Enums.ToxicResultType)
3256
- ),
2860
+ toxicResultType: Joi.string().valid(...Object.values(Enums.ToxicResultType)),
3257
2861
  })
3258
2862
  .pattern(
3259
2863
  ignoredPropertiesRegex,
3260
- Joi.alternatives().try(
3261
- Joi.string(),
3262
- Joi.number(),
3263
- Joi.date(),
3264
- Joi.any()
3265
- )
2864
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3266
2865
  )
3267
2866
  .unknown(false);
3268
2867
 
@@ -3276,9 +2875,7 @@ export class ToxicRecordSchema {
3276
2875
  validate(data: ToxicRecordSchemaData): Entities.ToxicRecord {
3277
2876
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3278
2877
  if (error) {
3279
- throw new Error(
3280
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3281
- );
2878
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3282
2879
  }
3283
2880
  return this.makeEntity(value);
3284
2881
  }
@@ -3313,7 +2910,7 @@ export interface VesselSchemaData {
3313
2910
  */
3314
2911
  export class VesselSchema {
3315
2912
  schema: Joi.ObjectSchema;
3316
- propertyTypes: Record<string, any>;
2913
+ propertyTypes: Record<string, unknown>;
3317
2914
 
3318
2915
  constructor() {
3319
2916
  this.schema = Joi.object({
@@ -3325,19 +2922,12 @@ export class VesselSchema {
3325
2922
  length: Joi.number().unsafe(),
3326
2923
  width: Joi.number().unsafe(),
3327
2924
  shape: Joi.string().valid(...Object.values(Enums.VesselShape)),
3328
- vesselConditions: Joi.string().valid(
3329
- ...Object.values(Enums.VesselConditions)
3330
- ),
2925
+ vesselConditions: Joi.string().valid(...Object.values(Enums.VesselConditions)),
3331
2926
  liquidFillFractionByVolume: Joi.number().unsafe(),
3332
2927
  })
3333
2928
  .pattern(
3334
2929
  ignoredPropertiesRegex,
3335
- Joi.alternatives().try(
3336
- Joi.string(),
3337
- Joi.number(),
3338
- Joi.date(),
3339
- Joi.any()
3340
- )
2930
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3341
2931
  )
3342
2932
  .unknown(false);
3343
2933
 
@@ -3358,9 +2948,7 @@ export class VesselSchema {
3358
2948
  validate(data: VesselSchemaData): Entities.Vessel {
3359
2949
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3360
2950
  if (error) {
3361
- throw new Error(
3362
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3363
- );
2951
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3364
2952
  }
3365
2953
  return this.makeEntity(value);
3366
2954
  }
@@ -3398,7 +2986,7 @@ export interface VesselLeakMaxFlammableCloudResultsSchemaData {
3398
2986
  */
3399
2987
  export class VesselLeakMaxFlammableCloudResultsSchema {
3400
2988
  schema: Joi.ObjectSchema;
3401
- propertyTypes: Record<string, any>;
2989
+ propertyTypes: Record<string, unknown>;
3402
2990
 
3403
2991
  constructor() {
3404
2992
  this.schema = Joi.object({
@@ -3411,12 +2999,7 @@ export class VesselLeakMaxFlammableCloudResultsSchema {
3411
2999
  })
3412
3000
  .pattern(
3413
3001
  ignoredPropertiesRegex,
3414
- Joi.alternatives().try(
3415
- Joi.string(),
3416
- Joi.number(),
3417
- Joi.date(),
3418
- Joi.any()
3419
- )
3002
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3420
3003
  )
3421
3004
  .unknown(false);
3422
3005
 
@@ -3430,21 +3013,15 @@ export class VesselLeakMaxFlammableCloudResultsSchema {
3430
3013
  };
3431
3014
  }
3432
3015
 
3433
- validate(
3434
- data: VesselLeakMaxFlammableCloudResultsSchemaData
3435
- ): Entities.VesselLeakMaxFlammableCloudResults {
3016
+ validate(data: VesselLeakMaxFlammableCloudResultsSchemaData): Entities.VesselLeakMaxFlammableCloudResults {
3436
3017
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3437
3018
  if (error) {
3438
- throw new Error(
3439
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3440
- );
3019
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3441
3020
  }
3442
3021
  return this.makeEntity(value);
3443
3022
  }
3444
3023
 
3445
- makeEntity(
3446
- data: VesselLeakMaxFlammableCloudResultsSchemaData
3447
- ): Entities.VesselLeakMaxFlammableCloudResults {
3024
+ makeEntity(data: VesselLeakMaxFlammableCloudResultsSchemaData): Entities.VesselLeakMaxFlammableCloudResults {
3448
3025
  return new Entities.VesselLeakMaxFlammableCloudResults(
3449
3026
  data.dischargeRate,
3450
3027
  data.expandedTemperature,
@@ -3471,7 +3048,7 @@ export interface VesselSphereSchemaData {
3471
3048
  */
3472
3049
  export class VesselSphereSchema {
3473
3050
  schema: Joi.ObjectSchema;
3474
- propertyTypes: Record<string, any>;
3051
+ propertyTypes: Record<string, unknown>;
3475
3052
 
3476
3053
  constructor() {
3477
3054
  this.schema = Joi.object({
@@ -3482,12 +3059,7 @@ export class VesselSphereSchema {
3482
3059
  })
3483
3060
  .pattern(
3484
3061
  ignoredPropertiesRegex,
3485
- Joi.alternatives().try(
3486
- Joi.string(),
3487
- Joi.number(),
3488
- Joi.date(),
3489
- Joi.any()
3490
- )
3062
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3491
3063
  )
3492
3064
  .unknown(false);
3493
3065
 
@@ -3502,9 +3074,7 @@ export class VesselSphereSchema {
3502
3074
  validate(data: VesselSphereSchemaData): Entities.VesselSphere {
3503
3075
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3504
3076
  if (error) {
3505
- throw new Error(
3506
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3507
- );
3077
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3508
3078
  }
3509
3079
  return this.makeEntity(value);
3510
3080
  }
@@ -3536,14 +3106,12 @@ export interface WeatherSchemaData {
3536
3106
  */
3537
3107
  export class WeatherSchema {
3538
3108
  schema: Joi.ObjectSchema;
3539
- propertyTypes: Record<string, any>;
3109
+ propertyTypes: Record<string, unknown>;
3540
3110
 
3541
3111
  constructor() {
3542
3112
  this.schema = Joi.object({
3543
3113
  windSpeed: Joi.number().unsafe(),
3544
- stabilityClass: Joi.string().valid(
3545
- ...Object.values(Enums.AtmosphericStabilityClass)
3546
- ),
3114
+ stabilityClass: Joi.string().valid(...Object.values(Enums.AtmosphericStabilityClass)),
3547
3115
  temperature: Joi.number().unsafe(),
3548
3116
  relativeHumidity: Joi.number().unsafe(),
3549
3117
  mixingLayerHeight: Joi.number().unsafe(),
@@ -3551,12 +3119,7 @@ export class WeatherSchema {
3551
3119
  })
3552
3120
  .pattern(
3553
3121
  ignoredPropertiesRegex,
3554
- Joi.alternatives().try(
3555
- Joi.string(),
3556
- Joi.number(),
3557
- Joi.date(),
3558
- Joi.any()
3559
- )
3122
+ Joi.alternatives().try(Joi.string(), Joi.number(), Joi.date(), Joi.any())
3560
3123
  )
3561
3124
  .unknown(false);
3562
3125
 
@@ -3573,9 +3136,7 @@ export class WeatherSchema {
3573
3136
  validate(data: WeatherSchemaData): Entities.Weather {
3574
3137
  const { error, value } = this.schema.validate(data, { abortEarly: false });
3575
3138
  if (error) {
3576
- throw new Error(
3577
- `Validation error: ${error.details.map((x) => x.message).join(", ")}`
3578
- );
3139
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
3579
3140
  }
3580
3141
  return this.makeEntity(value);
3581
3142
  }