@pdtf/schemas 3.0.0-11 → 3.0.0-12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdtf/schemas",
3
- "version": "3.0.0-11",
3
+ "version": "3.0.0-12",
4
4
  "description": "Property Data Trust Framework Schemas and Utilities",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -43,7 +43,7 @@
43
43
  "buildInformation": {
44
44
  "building": { "propertyType": "House", "builtForm": "Detached" },
45
45
  "roomDimensions": {
46
- "hasFloorplan": { "yesNo": "Yes" }
46
+ "hasFloorplan": "Yes"
47
47
  }
48
48
  },
49
49
  "delayFactors": {
@@ -448,8 +448,20 @@
448
448
  "ntsRef": "B1.1.1",
449
449
  "title": "Building informatiom",
450
450
  "type": "object",
451
- "ntsRequired": ["propertyType"],
451
+ "ntsRequired": ["builtForm", "propertyType"],
452
452
  "properties": {
453
+ "builtForm": {
454
+ "ntsRef": "B1.1.2",
455
+ "title": "Built form",
456
+ "type": "string",
457
+ "enum": [
458
+ "Detached",
459
+ "Semi-detached",
460
+ "Terraced",
461
+ "End of terrace",
462
+ "Other"
463
+ ]
464
+ },
453
465
  "propertyType": {
454
466
  "ntsRef": "B1.1.1.1",
455
467
  "title": "Property type",
@@ -486,39 +498,14 @@
486
498
  "properties": {
487
499
  "propertyType": {
488
500
  "enum": ["House", "Bungalow"]
489
- },
490
- "builtForm": {
491
- "ntsRef": "B1.1.2",
492
- "title": "Built form",
493
- "type": "string",
494
- "enum": [
495
- "Detached",
496
- "Semi-detached",
497
- "Terraced",
498
- "End of terrace",
499
- "Other"
500
- ]
501
501
  }
502
- },
503
- "ntsRequired": ["builtForm"]
502
+ }
504
503
  },
505
504
  {
506
505
  "properties": {
507
506
  "propertyType": {
508
507
  "enum": ["Maisonette", "Flat"]
509
508
  },
510
- "builtForm": {
511
- "ntsRef": "B1.1.2",
512
- "title": "Built form",
513
- "type": "string",
514
- "enum": [
515
- "Detached",
516
- "Semi-detached",
517
- "Terraced",
518
- "End of terrace",
519
- "Other"
520
- ]
521
- },
522
509
  "numberOfFloors": {
523
510
  "ntsRef": "B1.1.3",
524
511
  "title": "Number of floors in the building",
@@ -579,7 +566,6 @@
579
566
  }
580
567
  },
581
568
  "ntsRequired": [
582
- "builtForm",
583
569
  "numberOfFloors",
584
570
  "entranceFloor",
585
571
  "hasLift",
@@ -622,111 +608,103 @@
622
608
  "ntsRef": "B2",
623
609
  "title": "Room dimensions",
624
610
  "type": "object",
625
- "baspiRequired": ["hasFloorplan"],
611
+ "ntsRequired": ["hasFloorplan"],
626
612
  "properties": {
627
613
  "hasFloorplan": {
628
614
  "ntsRef": "B2.1",
629
615
  "title": "Is a floorplan available which includes the dimensions of all the rooms?",
630
- "type": "object",
616
+ "type": "string",
617
+ "enum": ["Yes", "No"]
618
+ }
619
+ },
620
+ "discriminator": {
621
+ "propertyName": "hasFloorplan"
622
+ },
623
+ "oneOf": [
624
+ {
631
625
  "properties": {
632
- "yesNo": {
633
- "ntsRef": "B2.1.1",
634
- "type": "string",
635
- "title": "",
636
- "enum": ["Yes", "No"]
626
+ "hasFloorplan": {
627
+ "enum": ["Yes"]
637
628
  }
638
- },
639
- "ntsRequired": ["yesNo"],
640
- "discriminator": {
641
- "propertyName": "yesNo"
642
- },
643
- "oneOf": [
644
- {
645
- "properties": {
646
- "yesNo": {
647
- "enum": ["Yes"]
648
- }
649
- }
629
+ }
630
+ },
631
+ {
632
+ "properties": {
633
+ "hasFloorplan": {
634
+ "enum": ["No"]
650
635
  },
651
- {
652
- "properties": {
653
- "yesNo": {
654
- "enum": ["No"]
655
- },
656
- "rooms": {
657
- "ntsRef": "B2",
658
- "title": "Rooms",
659
- "description": "Please supply dimensions for each of the rooms.",
660
- "type": "array",
661
- "items": {
662
- "type": "object",
663
- "properties": {
664
- "roomName": {
665
- "ntsRef": "B2.1.1",
666
- "type": "string",
667
- "title": "The name of the room",
668
- "minLength": 1
669
- },
670
- "description": {
671
- "ntsRef": "B2.1.2",
672
- "type": "string",
673
- "minLength": 1,
674
- "title": "Description of the room"
675
- },
676
- "length": {
677
- "ntsRef": "B2.1.3",
678
- "type": "number",
679
- "minimum": 0,
680
- "title": "The length of the room"
681
- },
682
- "width": {
683
- "ntsRef": "B2.1.4",
684
- "type": "number",
685
- "minimum": 0,
686
- "title": "The width of the room"
687
- },
688
- "units": {
689
- "ntsRef": "B2.1.5",
690
- "title": "The units which the length and width of the room have been provided in",
691
- "type": "string",
692
- "enum": [
693
- "meters",
694
- "centimetres",
695
- "millimetres",
696
- "feet",
697
- "inches"
698
- ]
699
- },
700
- "dimensionDetails": {
701
- "ntsRef": "B2.6",
702
- "title": "Any additional description or clarification of the room dimensions",
703
- "type": "string",
704
- "minLength": 1
705
- },
706
- "photoUrls": {
707
- "ntsRef": "B2.7",
708
- "title": "The URLs of images which should be associated with this room",
709
- "type": "array",
710
- "items": {
711
- "type": "string",
712
- "format": "uri"
713
- }
714
- }
715
- },
716
- "ntsRequired": [
717
- "roomName",
718
- "length",
719
- "width",
720
- "units"
636
+ "rooms": {
637
+ "ntsRef": "B2.2",
638
+ "title": "Rooms",
639
+ "description": "Please supply dimensions for each of the rooms.",
640
+ "type": "array",
641
+ "items": {
642
+ "type": "object",
643
+ "properties": {
644
+ "roomName": {
645
+ "ntsRef": "B2.2.1",
646
+ "type": "string",
647
+ "title": "The name of the room",
648
+ "minLength": 1
649
+ },
650
+ "description": {
651
+ "ntsRef": "B2.2.2",
652
+ "type": "string",
653
+ "minLength": 1,
654
+ "title": "Description of the room"
655
+ },
656
+ "length": {
657
+ "ntsRef": "B2.2.3",
658
+ "type": "number",
659
+ "minimum": 0,
660
+ "title": "The length of the room"
661
+ },
662
+ "width": {
663
+ "ntsRef": "B2.2.4",
664
+ "type": "number",
665
+ "minimum": 0,
666
+ "title": "The width of the room"
667
+ },
668
+ "units": {
669
+ "ntsRef": "B2.2.5",
670
+ "title": "The units which the length and width of the room have been provided in",
671
+ "type": "string",
672
+ "enum": [
673
+ "meters",
674
+ "centimetres",
675
+ "millimetres",
676
+ "feet",
677
+ "inches"
721
678
  ]
679
+ },
680
+ "dimensionDetails": {
681
+ "ntsRef": "B2.6",
682
+ "title": "Any additional description or clarification of the room dimensions",
683
+ "type": "string",
684
+ "minLength": 1
685
+ },
686
+ "photoUrls": {
687
+ "ntsRef": "B2.7",
688
+ "title": "The URLs of images which should be associated with this room",
689
+ "type": "array",
690
+ "items": {
691
+ "type": "string",
692
+ "format": "uri"
693
+ }
722
694
  }
723
- }
724
- },
725
- "ntsRequired": ["rooms"]
695
+ },
696
+ "ntsRequired": [
697
+ "roomName",
698
+ "length",
699
+ "width",
700
+ "units"
701
+ ]
702
+ }
726
703
  }
727
- ]
704
+ },
705
+ "ntsRequired": ["rooms"]
728
706
  }
729
- }
707
+ ]
730
708
  }
731
709
  }
732
710
  },
@@ -99,15 +99,6 @@
99
99
  ]
100
100
  }
101
101
  },
102
- "buildInformation": {
103
- "properties": {
104
- "roomDimensions": {
105
- "required": [
106
- "hasFloorplan"
107
- ]
108
- }
109
- }
110
- },
111
102
  "delayFactors": {
112
103
  "baspiRef": "A1.2",
113
104
  "required": [
@@ -81,14 +81,8 @@
81
81
  "House",
82
82
  "Bungalow"
83
83
  ]
84
- },
85
- "builtForm": {
86
- "ntsRef": "B1.1.2"
87
84
  }
88
- },
89
- "required": [
90
- "builtForm"
91
- ]
85
+ }
92
86
  },
93
87
  {
94
88
  "properties": {
@@ -98,9 +92,6 @@
98
92
  "Flat"
99
93
  ]
100
94
  },
101
- "builtForm": {
102
- "ntsRef": "B1.1.2"
103
- },
104
95
  "numberOfFloors": {
105
96
  "ntsRef": "B1.1.3"
106
97
  },
@@ -149,7 +140,6 @@
149
140
  }
150
141
  },
151
142
  "required": [
152
- "builtForm",
153
143
  "numberOfFloors",
154
144
  "entranceFloor",
155
145
  "hasLift",
@@ -158,9 +148,13 @@
158
148
  }
159
149
  ],
160
150
  "required": [
151
+ "builtForm",
161
152
  "propertyType"
162
153
  ],
163
154
  "properties": {
155
+ "builtForm": {
156
+ "ntsRef": "B1.1.2"
157
+ },
164
158
  "propertyType": {
165
159
  "ntsRef": "B1.1.1.1"
166
160
  }
@@ -168,77 +162,72 @@
168
162
  },
169
163
  "roomDimensions": {
170
164
  "ntsRef": "B2",
171
- "properties": {
172
- "hasFloorplan": {
173
- "ntsRef": "B2.1",
174
- "discriminator": {
175
- "propertyName": "yesNo"
176
- },
177
- "oneOf": [
178
- {
179
- "properties": {
180
- "yesNo": {
181
- "enum": [
182
- "Yes"
183
- ]
184
- }
185
- }
165
+ "discriminator": {
166
+ "propertyName": "hasFloorplan"
167
+ },
168
+ "oneOf": [
169
+ {
170
+ "properties": {
171
+ "hasFloorplan": {
172
+ "enum": [
173
+ "Yes"
174
+ ]
175
+ }
176
+ }
177
+ },
178
+ {
179
+ "properties": {
180
+ "hasFloorplan": {
181
+ "enum": [
182
+ "No"
183
+ ]
186
184
  },
187
- {
188
- "properties": {
189
- "yesNo": {
190
- "enum": [
191
- "No"
192
- ]
193
- },
194
- "rooms": {
195
- "ntsRef": "B2",
196
- "items": {
197
- "required": [
198
- "roomName",
199
- "length",
200
- "width",
201
- "units"
202
- ],
203
- "properties": {
204
- "roomName": {
205
- "ntsRef": "B2.1.1"
206
- },
207
- "description": {
208
- "ntsRef": "B2.1.2"
209
- },
210
- "length": {
211
- "ntsRef": "B2.1.3"
212
- },
213
- "width": {
214
- "ntsRef": "B2.1.4"
215
- },
216
- "units": {
217
- "ntsRef": "B2.1.5"
218
- },
219
- "dimensionDetails": {
220
- "ntsRef": "B2.6"
221
- },
222
- "photoUrls": {
223
- "ntsRef": "B2.7"
224
- }
225
- }
185
+ "rooms": {
186
+ "ntsRef": "B2.2",
187
+ "items": {
188
+ "required": [
189
+ "roomName",
190
+ "length",
191
+ "width",
192
+ "units"
193
+ ],
194
+ "properties": {
195
+ "roomName": {
196
+ "ntsRef": "B2.2.1"
197
+ },
198
+ "description": {
199
+ "ntsRef": "B2.2.2"
200
+ },
201
+ "length": {
202
+ "ntsRef": "B2.2.3"
203
+ },
204
+ "width": {
205
+ "ntsRef": "B2.2.4"
206
+ },
207
+ "units": {
208
+ "ntsRef": "B2.2.5"
209
+ },
210
+ "dimensionDetails": {
211
+ "ntsRef": "B2.6"
212
+ },
213
+ "photoUrls": {
214
+ "ntsRef": "B2.7"
226
215
  }
227
216
  }
228
- },
229
- "required": [
230
- "rooms"
231
- ]
217
+ }
232
218
  }
233
- ],
219
+ },
234
220
  "required": [
235
- "yesNo"
236
- ],
237
- "properties": {
238
- "yesNo": {
239
- "ntsRef": "B2.1.1"
240
- }
241
- }
221
+ "rooms"
222
+ ]
223
+ }
224
+ ],
225
+ "required": [
226
+ "hasFloorplan"
227
+ ],
228
+ "properties": {
229
+ "hasFloorplan": {
230
+ "ntsRef": "B2.1"
242
231
  }
243
232
  }
244
233
  }
@@ -342,6 +342,17 @@
342
342
  "title": "Building informatiom",
343
343
  "type": "object",
344
344
  "properties": {
345
+ "builtForm": {
346
+ "title": "Built form",
347
+ "type": "string",
348
+ "enum": [
349
+ "Detached",
350
+ "Semi-detached",
351
+ "Terraced",
352
+ "End of terrace",
353
+ "Other"
354
+ ]
355
+ },
345
356
  "propertyType": {
346
357
  "title": "Property type",
347
358
  "type": "string",
@@ -377,17 +388,6 @@
377
388
  "House",
378
389
  "Bungalow"
379
390
  ]
380
- },
381
- "builtForm": {
382
- "title": "Built form",
383
- "type": "string",
384
- "enum": [
385
- "Detached",
386
- "Semi-detached",
387
- "Terraced",
388
- "End of terrace",
389
- "Other"
390
- ]
391
391
  }
392
392
  }
393
393
  },
@@ -399,17 +399,6 @@
399
399
  "Flat"
400
400
  ]
401
401
  },
402
- "builtForm": {
403
- "title": "Built form",
404
- "type": "string",
405
- "enum": [
406
- "Detached",
407
- "Semi-detached",
408
- "Terraced",
409
- "End of terrace",
410
- "Other"
411
- ]
412
- },
413
402
  "numberOfFloors": {
414
403
  "title": "Number of floors in the building",
415
404
  "type": "integer"
@@ -516,93 +505,87 @@
516
505
  "properties": {
517
506
  "hasFloorplan": {
518
507
  "title": "Is a floorplan available which includes the dimensions of all the rooms?",
519
- "type": "object",
508
+ "type": "string",
509
+ "enum": [
510
+ "Yes",
511
+ "No"
512
+ ]
513
+ }
514
+ },
515
+ "oneOf": [
516
+ {
520
517
  "properties": {
521
- "yesNo": {
522
- "type": "string",
523
- "title": "",
518
+ "hasFloorplan": {
524
519
  "enum": [
525
- "Yes",
526
- "No"
520
+ "Yes"
527
521
  ]
528
522
  }
529
- },
530
- "oneOf": [
531
- {
532
- "properties": {
533
- "yesNo": {
534
- "enum": [
535
- "Yes"
536
- ]
537
- }
538
- }
523
+ }
524
+ },
525
+ {
526
+ "properties": {
527
+ "hasFloorplan": {
528
+ "enum": [
529
+ "No"
530
+ ]
539
531
  },
540
- {
541
- "properties": {
542
- "yesNo": {
543
- "enum": [
544
- "No"
545
- ]
546
- },
547
- "rooms": {
548
- "title": "Rooms",
549
- "description": "Please supply dimensions for each of the rooms.",
550
- "type": "array",
551
- "items": {
552
- "type": "object",
553
- "properties": {
554
- "roomName": {
555
- "type": "string",
556
- "title": "The name of the room",
557
- "minLength": 1
558
- },
559
- "description": {
560
- "type": "string",
561
- "minLength": 1,
562
- "title": "Description of the room"
563
- },
564
- "length": {
565
- "type": "number",
566
- "minimum": 0,
567
- "title": "The length of the room"
568
- },
569
- "width": {
570
- "type": "number",
571
- "minimum": 0,
572
- "title": "The width of the room"
573
- },
574
- "units": {
575
- "title": "The units which the length and width of the room have been provided in",
576
- "type": "string",
577
- "enum": [
578
- "meters",
579
- "centimetres",
580
- "millimetres",
581
- "feet",
582
- "inches"
583
- ]
584
- },
585
- "dimensionDetails": {
586
- "title": "Any additional description or clarification of the room dimensions",
587
- "type": "string",
588
- "minLength": 1
589
- },
590
- "photoUrls": {
591
- "title": "The URLs of images which should be associated with this room",
592
- "type": "array",
593
- "items": {
594
- "type": "string",
595
- "format": "uri"
596
- }
597
- }
532
+ "rooms": {
533
+ "title": "Rooms",
534
+ "description": "Please supply dimensions for each of the rooms.",
535
+ "type": "array",
536
+ "items": {
537
+ "type": "object",
538
+ "properties": {
539
+ "roomName": {
540
+ "type": "string",
541
+ "title": "The name of the room",
542
+ "minLength": 1
543
+ },
544
+ "description": {
545
+ "type": "string",
546
+ "minLength": 1,
547
+ "title": "Description of the room"
548
+ },
549
+ "length": {
550
+ "type": "number",
551
+ "minimum": 0,
552
+ "title": "The length of the room"
553
+ },
554
+ "width": {
555
+ "type": "number",
556
+ "minimum": 0,
557
+ "title": "The width of the room"
558
+ },
559
+ "units": {
560
+ "title": "The units which the length and width of the room have been provided in",
561
+ "type": "string",
562
+ "enum": [
563
+ "meters",
564
+ "centimetres",
565
+ "millimetres",
566
+ "feet",
567
+ "inches"
568
+ ]
569
+ },
570
+ "dimensionDetails": {
571
+ "title": "Any additional description or clarification of the room dimensions",
572
+ "type": "string",
573
+ "minLength": 1
574
+ },
575
+ "photoUrls": {
576
+ "title": "The URLs of images which should be associated with this room",
577
+ "type": "array",
578
+ "items": {
579
+ "type": "string",
580
+ "format": "uri"
598
581
  }
599
582
  }
600
583
  }
601
584
  }
602
585
  }
603
- ]
586
+ }
604
587
  }
605
- }
588
+ ]
606
589
  }
607
590
  }
608
591
  },
@@ -69,9 +69,9 @@
69
69
  },
70
70
  "buildInformation": {
71
71
  "building": {
72
+ "builtForm": {},
72
73
  "propertyType": {},
73
74
  "otherType": {},
74
- "builtForm": {},
75
75
  "numberOfFloors": {},
76
76
  "entranceFloor": {},
77
77
  "hasLift": {},
@@ -89,16 +89,14 @@
89
89
  "yesNo": {}
90
90
  },
91
91
  "roomDimensions": {
92
- "hasFloorplan": {
93
- "yesNo": {},
94
- "rooms": {
95
- "roomName": {},
96
- "length": {},
97
- "width": {},
98
- "units": {},
99
- "dimensionDetails": {},
100
- "photoUrls": {}
101
- }
92
+ "hasFloorplan": {},
93
+ "rooms": {
94
+ "roomName": {},
95
+ "length": {},
96
+ "width": {},
97
+ "units": {},
98
+ "dimensionDetails": {},
99
+ "photoUrls": {}
102
100
  }
103
101
  }
104
102
  },