@vepler/sdk 6.50.12 → 6.57.1
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/README.md +424 -416
- package/dist/commonjs/funcs/sitesGet.d.ts +1 -1
- package/dist/commonjs/funcs/sitesGet.js +5 -1
- package/dist/commonjs/funcs/sitesGet.js.map +1 -1
- package/dist/commonjs/funcs/sitesGetLand.d.ts +19 -0
- package/dist/commonjs/funcs/sitesGetLand.d.ts.map +1 -0
- package/dist/commonjs/funcs/sitesGetLand.js +131 -0
- package/dist/commonjs/funcs/sitesGetLand.js.map +1 -0
- package/dist/commonjs/funcs/sitesSearch.d.ts +1 -1
- package/dist/commonjs/funcs/sitesSearch.js +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/sdk/models/errors/getsiteland.d.ts +396 -0
- package/dist/commonjs/sdk/models/errors/getsiteland.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/errors/getsiteland.js +381 -0
- package/dist/commonjs/sdk/models/errors/getsiteland.js.map +1 -0
- package/dist/commonjs/sdk/models/errors/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/errors/index.js +1 -0
- package/dist/commonjs/sdk/models/errors/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/getsitebyid.d.ts +5 -0
- package/dist/commonjs/sdk/models/operations/getsitebyid.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getsitebyid.js +1 -0
- package/dist/commonjs/sdk/models/operations/getsitebyid.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/getsiteland.d.ts +30 -0
- package/dist/commonjs/sdk/models/operations/getsiteland.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/getsiteland.js +52 -0
- package/dist/commonjs/sdk/models/operations/getsiteland.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +1 -0
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/building.d.ts +5 -5
- package/dist/commonjs/sdk/models/shared/building.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/building.js +7 -7
- package/dist/commonjs/sdk/models/shared/building.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.d.ts +11 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +11 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/site.d.ts +68 -14
- package/dist/commonjs/sdk/models/shared/site.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/site.js +29 -6
- package/dist/commonjs/sdk/models/shared/site.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/sitebuilding.d.ts +176 -0
- package/dist/commonjs/sdk/models/shared/sitebuilding.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitebuilding.js +141 -0
- package/dist/commonjs/sdk/models/shared/sitebuilding.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingcount.d.ts +17 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingcount.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingcount.js +51 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingcount.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingprofile.d.ts +94 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingprofile.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingprofile.js +75 -0
- package/dist/commonjs/sdk/models/shared/sitebuildingprofile.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintflags.d.ts +32 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintflags.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintflags.js +54 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintflags.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintlayer.d.ts +45 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintlayer.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintlayer.js +58 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintlayer.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraints.d.ts +31 -0
- package/dist/commonjs/sdk/models/shared/siteconstraints.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraints.js +56 -0
- package/dist/commonjs/sdk/models/shared/siteconstraints.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.d.ts +49 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.js +75 -0
- package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandfeature.d.ts +90 -0
- package/dist/commonjs/sdk/models/shared/sitelandfeature.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandfeature.js +79 -0
- package/dist/commonjs/sdk/models/shared/sitelandfeature.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandlistresponse.d.ts +46 -0
- package/dist/commonjs/sdk/models/shared/sitelandlistresponse.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandlistresponse.js +69 -0
- package/dist/commonjs/sdk/models/shared/sitelandlistresponse.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandprofile.d.ts +74 -0
- package/dist/commonjs/sdk/models/shared/sitelandprofile.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandprofile.js +70 -0
- package/dist/commonjs/sdk/models/shared/sitelandprofile.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandshare.d.ts +25 -0
- package/dist/commonjs/sdk/models/shared/sitelandshare.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitelandshare.js +53 -0
- package/dist/commonjs/sdk/models/shared/sitelandshare.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/sitequeryrequest.d.ts +2 -2
- package/dist/commonjs/sdk/models/shared/sitetags.d.ts +4 -0
- package/dist/commonjs/sdk/models/shared/sitetags.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/sitetags.js +1 -0
- package/dist/commonjs/sdk/models/shared/sitetags.js.map +1 -1
- package/dist/commonjs/sdk/sites.d.ts +9 -2
- package/dist/commonjs/sdk/sites.d.ts.map +1 -1
- package/dist/commonjs/sdk/sites.js +12 -2
- package/dist/commonjs/sdk/sites.js.map +1 -1
- package/dist/esm/funcs/sitesGet.d.ts +1 -1
- package/dist/esm/funcs/sitesGet.js +6 -2
- package/dist/esm/funcs/sitesGet.js.map +1 -1
- package/dist/esm/funcs/sitesGetLand.d.ts +19 -0
- package/dist/esm/funcs/sitesGetLand.d.ts.map +1 -0
- package/dist/esm/funcs/sitesGetLand.js +95 -0
- package/dist/esm/funcs/sitesGetLand.js.map +1 -0
- package/dist/esm/funcs/sitesSearch.d.ts +1 -1
- package/dist/esm/funcs/sitesSearch.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/sdk/models/errors/getsiteland.d.ts +396 -0
- package/dist/esm/sdk/models/errors/getsiteland.d.ts.map +1 -0
- package/dist/esm/sdk/models/errors/getsiteland.js +333 -0
- package/dist/esm/sdk/models/errors/getsiteland.js.map +1 -0
- package/dist/esm/sdk/models/errors/index.d.ts +1 -0
- package/dist/esm/sdk/models/errors/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/errors/index.js +1 -0
- package/dist/esm/sdk/models/errors/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/getsitebyid.d.ts +5 -0
- package/dist/esm/sdk/models/operations/getsitebyid.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getsitebyid.js +1 -0
- package/dist/esm/sdk/models/operations/getsitebyid.js.map +1 -1
- package/dist/esm/sdk/models/operations/getsiteland.d.ts +30 -0
- package/dist/esm/sdk/models/operations/getsiteland.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/getsiteland.js +15 -0
- package/dist/esm/sdk/models/operations/getsiteland.js.map +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +1 -0
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/building.d.ts +5 -5
- package/dist/esm/sdk/models/shared/building.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/building.js +5 -5
- package/dist/esm/sdk/models/shared/building.js.map +1 -1
- package/dist/esm/sdk/models/shared/index.d.ts +11 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +11 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/site.d.ts +68 -14
- package/dist/esm/sdk/models/shared/site.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/site.js +28 -5
- package/dist/esm/sdk/models/shared/site.js.map +1 -1
- package/dist/esm/sdk/models/shared/sitebuilding.d.ts +176 -0
- package/dist/esm/sdk/models/shared/sitebuilding.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitebuilding.js +101 -0
- package/dist/esm/sdk/models/shared/sitebuilding.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitebuildingcount.d.ts +17 -0
- package/dist/esm/sdk/models/shared/sitebuildingcount.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitebuildingcount.js +14 -0
- package/dist/esm/sdk/models/shared/sitebuildingcount.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitebuildingprofile.d.ts +94 -0
- package/dist/esm/sdk/models/shared/sitebuildingprofile.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitebuildingprofile.js +38 -0
- package/dist/esm/sdk/models/shared/sitebuildingprofile.js.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraintflags.d.ts +32 -0
- package/dist/esm/sdk/models/shared/siteconstraintflags.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraintflags.js +17 -0
- package/dist/esm/sdk/models/shared/siteconstraintflags.js.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraintlayer.d.ts +45 -0
- package/dist/esm/sdk/models/shared/siteconstraintlayer.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraintlayer.js +21 -0
- package/dist/esm/sdk/models/shared/siteconstraintlayer.js.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraints.d.ts +31 -0
- package/dist/esm/sdk/models/shared/siteconstraints.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraints.js +19 -0
- package/dist/esm/sdk/models/shared/siteconstraints.js.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraintunmeasured.d.ts +49 -0
- package/dist/esm/sdk/models/shared/siteconstraintunmeasured.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/siteconstraintunmeasured.js +38 -0
- package/dist/esm/sdk/models/shared/siteconstraintunmeasured.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandfeature.d.ts +90 -0
- package/dist/esm/sdk/models/shared/sitelandfeature.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandfeature.js +41 -0
- package/dist/esm/sdk/models/shared/sitelandfeature.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandlistresponse.d.ts +46 -0
- package/dist/esm/sdk/models/shared/sitelandlistresponse.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandlistresponse.js +32 -0
- package/dist/esm/sdk/models/shared/sitelandlistresponse.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandprofile.d.ts +74 -0
- package/dist/esm/sdk/models/shared/sitelandprofile.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandprofile.js +33 -0
- package/dist/esm/sdk/models/shared/sitelandprofile.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandshare.d.ts +25 -0
- package/dist/esm/sdk/models/shared/sitelandshare.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/sitelandshare.js +16 -0
- package/dist/esm/sdk/models/shared/sitelandshare.js.map +1 -0
- package/dist/esm/sdk/models/shared/sitequeryrequest.d.ts +2 -2
- package/dist/esm/sdk/models/shared/sitetags.d.ts +4 -0
- package/dist/esm/sdk/models/shared/sitetags.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/sitetags.js +1 -0
- package/dist/esm/sdk/models/shared/sitetags.js.map +1 -1
- package/dist/esm/sdk/sites.d.ts +9 -2
- package/dist/esm/sdk/sites.d.ts.map +1 -1
- package/dist/esm/sdk/sites.js +12 -2
- package/dist/esm/sdk/sites.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/sitesGet.ts +7 -2
- package/src/funcs/sitesGetLand.ts +213 -0
- package/src/funcs/sitesSearch.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/sdk/models/errors/getsiteland.ts +770 -0
- package/src/sdk/models/errors/index.ts +1 -0
- package/src/sdk/models/operations/getsitebyid.ts +6 -0
- package/src/sdk/models/operations/getsiteland.ts +52 -0
- package/src/sdk/models/operations/index.ts +1 -0
- package/src/sdk/models/shared/building.ts +11 -11
- package/src/sdk/models/shared/index.ts +11 -0
- package/src/sdk/models/shared/site.ts +95 -17
- package/src/sdk/models/shared/sitebuilding.ts +288 -0
- package/src/sdk/models/shared/sitebuildingcount.ts +39 -0
- package/src/sdk/models/shared/sitebuildingprofile.ts +140 -0
- package/src/sdk/models/shared/siteconstraintflags.ts +57 -0
- package/src/sdk/models/shared/siteconstraintlayer.ts +74 -0
- package/src/sdk/models/shared/siteconstraints.ts +64 -0
- package/src/sdk/models/shared/siteconstraintunmeasured.ts +83 -0
- package/src/sdk/models/shared/sitelandfeature.ts +145 -0
- package/src/sdk/models/shared/sitelandlistresponse.ts +86 -0
- package/src/sdk/models/shared/sitelandprofile.ts +110 -0
- package/src/sdk/models/shared/sitelandshare.ts +49 -0
- package/src/sdk/models/shared/sitequeryrequest.ts +2 -2
- package/src/sdk/models/shared/sitetags.ts +5 -0
- package/src/sdk/sites.ts +20 -2
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Counts of the linked addresses, split by classification.
|
|
14
|
+
*/
|
|
15
|
+
export type SiteBuildingAddressCount = {
|
|
16
|
+
/**
|
|
17
|
+
* How many of those locations are classified commercial.
|
|
18
|
+
*/
|
|
19
|
+
commercial?: number | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* How many of those locations fall outside the residential and commercial classes.
|
|
22
|
+
*/
|
|
23
|
+
other?: number | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* How many of those locations are classified residential.
|
|
26
|
+
*/
|
|
27
|
+
residential?: number | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Number of addressable locations linked to this building.
|
|
30
|
+
*/
|
|
31
|
+
total?: number | null | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Period the building was constructed in, as a year range. Each source's own age band is parsed into this shape, so a certificate reading 'England and Wales: 1900-1929' and a survey reading '1870-1918' arrive in the same form.
|
|
36
|
+
*/
|
|
37
|
+
export type SiteBuildingAge = {
|
|
38
|
+
/**
|
|
39
|
+
* Last year of the construction period. Null when the band is open-ended, such as '2007 onwards'.
|
|
40
|
+
*/
|
|
41
|
+
endYear?: number | null | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* True when the certificate gives an exact year of construction rather than a band.
|
|
44
|
+
*/
|
|
45
|
+
isExact?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Midpoint of the construction period, for when a single year is needed.
|
|
48
|
+
*/
|
|
49
|
+
midYear?: number | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* First year of the construction period. Null when the band is open-ended, such as 'before 1900'.
|
|
52
|
+
*/
|
|
53
|
+
startYear?: number | null | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const SiteBuildingDataSources = {
|
|
57
|
+
Paf: "paf",
|
|
58
|
+
Os: "os",
|
|
59
|
+
OsNgd: "os_ngd",
|
|
60
|
+
NgdAddresses: "ngd_addresses",
|
|
61
|
+
Epc: "epc",
|
|
62
|
+
Hmlr: "hmlr",
|
|
63
|
+
Voa: "voa",
|
|
64
|
+
Hmrc: "hmrc",
|
|
65
|
+
HistoricEngland: "historic_england",
|
|
66
|
+
Listing: "listing",
|
|
67
|
+
OpenData: "open_data",
|
|
68
|
+
Council: "council",
|
|
69
|
+
Claim: "claim",
|
|
70
|
+
} as const;
|
|
71
|
+
export type SiteBuildingDataSources = OpenEnum<typeof SiteBuildingDataSources>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* How the external walls are built, using the same vocabulary as the EPC wall construction field.
|
|
75
|
+
*/
|
|
76
|
+
export const SiteBuildingWallConstruction = {
|
|
77
|
+
Cavity: "cavity",
|
|
78
|
+
SolidBrick: "solid_brick",
|
|
79
|
+
TimberFrame: "timber_frame",
|
|
80
|
+
SandstoneOrLimestone: "sandstone_or_limestone",
|
|
81
|
+
Sandstone: "sandstone",
|
|
82
|
+
GraniteOrWhinstone: "granite_or_whinstone",
|
|
83
|
+
Granite: "granite",
|
|
84
|
+
SystemBuilt: "system_built",
|
|
85
|
+
SolidStone: "solid_stone",
|
|
86
|
+
Cob: "cob",
|
|
87
|
+
ParkHome: "park_home",
|
|
88
|
+
Basement: "basement",
|
|
89
|
+
CurtainWall: "curtain_wall",
|
|
90
|
+
} as const;
|
|
91
|
+
/**
|
|
92
|
+
* How the external walls are built, using the same vocabulary as the EPC wall construction field.
|
|
93
|
+
*/
|
|
94
|
+
export type SiteBuildingWallConstruction = OpenEnum<
|
|
95
|
+
typeof SiteBuildingWallConstruction
|
|
96
|
+
>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Construction age and materials, drawn from the building survey data and from EPC assessments.
|
|
100
|
+
*/
|
|
101
|
+
export type SiteBuildingConstruction = {
|
|
102
|
+
/**
|
|
103
|
+
* Period the building was constructed in, as a year range. Each source's own age band is parsed into this shape, so a certificate reading 'England and Wales: 1900-1929' and a survey reading '1870-1918' arrive in the same form.
|
|
104
|
+
*/
|
|
105
|
+
age?: SiteBuildingAge | null | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Data sources that contributed a value to this block.
|
|
108
|
+
*/
|
|
109
|
+
dataSources?: Array<SiteBuildingDataSources> | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Date of the most recent evidence behind the construction values, as an ISO 8601 date.
|
|
112
|
+
*/
|
|
113
|
+
evidenceDate?: string | null | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Wall material in the source's own wording, for display alongside `wallConstruction`.
|
|
116
|
+
*/
|
|
117
|
+
materialDescription?: string | null | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* How the external walls are built, using the same vocabulary as the EPC wall construction field.
|
|
120
|
+
*/
|
|
121
|
+
wallConstruction?: SiteBuildingWallConstruction | null | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Year the building was constructed, where one is recorded.
|
|
124
|
+
*/
|
|
125
|
+
year?: number | null | undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Object type discriminator. Always `building`.
|
|
130
|
+
*/
|
|
131
|
+
export const SiteBuildingObject = {
|
|
132
|
+
Building: "building",
|
|
133
|
+
} as const;
|
|
134
|
+
/**
|
|
135
|
+
* Object type discriminator. Always `building`.
|
|
136
|
+
*/
|
|
137
|
+
export type SiteBuildingObject = ClosedEnum<typeof SiteBuildingObject>;
|
|
138
|
+
|
|
139
|
+
export type SiteBuilding = {
|
|
140
|
+
/**
|
|
141
|
+
* Counts of the linked addresses, split by classification.
|
|
142
|
+
*/
|
|
143
|
+
addressCount?: SiteBuildingAddressCount | null | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Area covered by the building footprint, in square metres. Mirrors `structure.footprintAreaSqm`.
|
|
146
|
+
*/
|
|
147
|
+
areaSqm?: number | null | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Identifier for a single building, made up of the country, the source dataset and that dataset's own identifier, joined by colons.
|
|
150
|
+
*/
|
|
151
|
+
buildingId?: string | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Primary use of the building, in the source's own wording.
|
|
154
|
+
*/
|
|
155
|
+
buildingUse?: string | null | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Construction age and materials, drawn from the building survey data and from EPC assessments.
|
|
158
|
+
*/
|
|
159
|
+
construction?: SiteBuildingConstruction | null | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Number of floors above ground. Mirrors `structure.floors`.
|
|
162
|
+
*/
|
|
163
|
+
floors?: number | null | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Absolute height of the highest point of the building, in metres. Mirrors `structure.heightMax`.
|
|
166
|
+
*/
|
|
167
|
+
heightMax?: number | null | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Object type discriminator. Always `building`.
|
|
170
|
+
*/
|
|
171
|
+
object?: SiteBuildingObject | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const SiteBuildingAddressCount$inboundSchema: z.ZodType<
|
|
176
|
+
SiteBuildingAddressCount,
|
|
177
|
+
z.ZodTypeDef,
|
|
178
|
+
unknown
|
|
179
|
+
> = z.object({
|
|
180
|
+
commercial: z.nullable(z.number().int()).optional(),
|
|
181
|
+
other: z.nullable(z.number().int()).optional(),
|
|
182
|
+
residential: z.nullable(z.number().int()).optional(),
|
|
183
|
+
total: z.nullable(z.number().int()).optional(),
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
export function siteBuildingAddressCountFromJSON(
|
|
187
|
+
jsonString: string,
|
|
188
|
+
): SafeParseResult<SiteBuildingAddressCount, SDKValidationError> {
|
|
189
|
+
return safeParse(
|
|
190
|
+
jsonString,
|
|
191
|
+
(x) => SiteBuildingAddressCount$inboundSchema.parse(JSON.parse(x)),
|
|
192
|
+
`Failed to parse 'SiteBuildingAddressCount' from JSON`,
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const SiteBuildingAge$inboundSchema: z.ZodType<
|
|
198
|
+
SiteBuildingAge,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
unknown
|
|
201
|
+
> = z.object({
|
|
202
|
+
endYear: z.nullable(z.number().int()).optional(),
|
|
203
|
+
isExact: z.boolean().optional(),
|
|
204
|
+
midYear: z.nullable(z.number().int()).optional(),
|
|
205
|
+
startYear: z.nullable(z.number().int()).optional(),
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
export function siteBuildingAgeFromJSON(
|
|
209
|
+
jsonString: string,
|
|
210
|
+
): SafeParseResult<SiteBuildingAge, SDKValidationError> {
|
|
211
|
+
return safeParse(
|
|
212
|
+
jsonString,
|
|
213
|
+
(x) => SiteBuildingAge$inboundSchema.parse(JSON.parse(x)),
|
|
214
|
+
`Failed to parse 'SiteBuildingAge' from JSON`,
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** @internal */
|
|
219
|
+
export const SiteBuildingDataSources$inboundSchema: z.ZodType<
|
|
220
|
+
SiteBuildingDataSources,
|
|
221
|
+
z.ZodTypeDef,
|
|
222
|
+
unknown
|
|
223
|
+
> = openEnums.inboundSchema(SiteBuildingDataSources);
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const SiteBuildingWallConstruction$inboundSchema: z.ZodType<
|
|
227
|
+
SiteBuildingWallConstruction,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
unknown
|
|
230
|
+
> = openEnums.inboundSchema(SiteBuildingWallConstruction);
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const SiteBuildingConstruction$inboundSchema: z.ZodType<
|
|
234
|
+
SiteBuildingConstruction,
|
|
235
|
+
z.ZodTypeDef,
|
|
236
|
+
unknown
|
|
237
|
+
> = z.object({
|
|
238
|
+
age: z.nullable(z.lazy(() => SiteBuildingAge$inboundSchema)).optional(),
|
|
239
|
+
dataSources: z.array(SiteBuildingDataSources$inboundSchema).optional(),
|
|
240
|
+
evidenceDate: z.nullable(z.string()).optional(),
|
|
241
|
+
materialDescription: z.nullable(z.string()).optional(),
|
|
242
|
+
wallConstruction: z.nullable(SiteBuildingWallConstruction$inboundSchema)
|
|
243
|
+
.optional(),
|
|
244
|
+
year: z.nullable(z.number().int()).optional(),
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
export function siteBuildingConstructionFromJSON(
|
|
248
|
+
jsonString: string,
|
|
249
|
+
): SafeParseResult<SiteBuildingConstruction, SDKValidationError> {
|
|
250
|
+
return safeParse(
|
|
251
|
+
jsonString,
|
|
252
|
+
(x) => SiteBuildingConstruction$inboundSchema.parse(JSON.parse(x)),
|
|
253
|
+
`Failed to parse 'SiteBuildingConstruction' from JSON`,
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** @internal */
|
|
258
|
+
export const SiteBuildingObject$inboundSchema: z.ZodNativeEnum<
|
|
259
|
+
typeof SiteBuildingObject
|
|
260
|
+
> = z.nativeEnum(SiteBuildingObject);
|
|
261
|
+
|
|
262
|
+
/** @internal */
|
|
263
|
+
export const SiteBuilding$inboundSchema: z.ZodType<
|
|
264
|
+
SiteBuilding,
|
|
265
|
+
z.ZodTypeDef,
|
|
266
|
+
unknown
|
|
267
|
+
> = z.object({
|
|
268
|
+
addressCount: z.nullable(z.lazy(() => SiteBuildingAddressCount$inboundSchema))
|
|
269
|
+
.optional(),
|
|
270
|
+
areaSqm: z.nullable(z.number()).optional(),
|
|
271
|
+
buildingId: z.string().optional(),
|
|
272
|
+
buildingUse: z.nullable(z.string()).optional(),
|
|
273
|
+
construction: z.nullable(z.lazy(() => SiteBuildingConstruction$inboundSchema))
|
|
274
|
+
.optional(),
|
|
275
|
+
floors: z.nullable(z.number().int()).optional(),
|
|
276
|
+
heightMax: z.nullable(z.number()).optional(),
|
|
277
|
+
object: SiteBuildingObject$inboundSchema.optional(),
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
export function siteBuildingFromJSON(
|
|
281
|
+
jsonString: string,
|
|
282
|
+
): SafeParseResult<SiteBuilding, SDKValidationError> {
|
|
283
|
+
return safeParse(
|
|
284
|
+
jsonString,
|
|
285
|
+
(x) => SiteBuilding$inboundSchema.parse(JSON.parse(x)),
|
|
286
|
+
`Failed to parse 'SiteBuilding' from JSON`,
|
|
287
|
+
);
|
|
288
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type SiteBuildingCount = {
|
|
11
|
+
/**
|
|
12
|
+
* Number of buildings on the title in this class.
|
|
13
|
+
*/
|
|
14
|
+
count?: number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The Ordnance Survey class this count is keyed by, as published.
|
|
17
|
+
*/
|
|
18
|
+
value?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const SiteBuildingCount$inboundSchema: z.ZodType<
|
|
23
|
+
SiteBuildingCount,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
count: z.number().int().optional(),
|
|
28
|
+
value: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function siteBuildingCountFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<SiteBuildingCount, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => SiteBuildingCount$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'SiteBuildingCount' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
SiteBuildingCount,
|
|
12
|
+
SiteBuildingCount$inboundSchema,
|
|
13
|
+
} from "./sitebuildingcount.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Dataset the profile is computed from. Always `os_ngd_building`.
|
|
17
|
+
*/
|
|
18
|
+
export const SiteBuildingProfileSource = {
|
|
19
|
+
OsNgdBuilding: "os_ngd_building",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* Dataset the profile is computed from. Always `os_ngd_building`.
|
|
23
|
+
*/
|
|
24
|
+
export type SiteBuildingProfileSource = ClosedEnum<
|
|
25
|
+
typeof SiteBuildingProfileSource
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The buildings whose footprint intersects the title, measured on the title boundary. Requires the `osNgdAccess` permission on the licence, and is left out of the response without it.
|
|
30
|
+
*/
|
|
31
|
+
export type SiteBuildingProfile = {
|
|
32
|
+
/**
|
|
33
|
+
* Release date of the Ordnance Survey version the profile was computed from, as an ISO 8601 timestamp.
|
|
34
|
+
*/
|
|
35
|
+
asOf?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The buildings on the title by how they connect to neighbouring buildings, such as `Standalone` or `End-Connected`, largest first.
|
|
38
|
+
*/
|
|
39
|
+
connectivity?: Array<SiteBuildingCount> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Number of buildings whose footprint intersects the title. A building on more than one title counts on each.
|
|
42
|
+
*/
|
|
43
|
+
count?: number | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Share of the title area covered by building footprints, from 0 to 100.
|
|
46
|
+
*/
|
|
47
|
+
coveragePct?: number | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Earliest Ordnance Survey construction period band among the buildings with one, as published. Null when none has one.
|
|
50
|
+
*/
|
|
51
|
+
earliestAgeBand?: string | null | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Footprint area of those buildings that lies within the title, in square metres.
|
|
54
|
+
*/
|
|
55
|
+
footprintSqm?: number | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Latest Ordnance Survey construction period band among the buildings with one, as published. Null when none has one.
|
|
58
|
+
*/
|
|
59
|
+
latestAgeBand?: string | null | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Greatest number of floors among the buildings with a recorded floor count. Null when none has one.
|
|
62
|
+
*/
|
|
63
|
+
maxFloors?: number | null | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Greatest height above ground among the buildings with a recorded height, in metres. Null when none has one.
|
|
66
|
+
*/
|
|
67
|
+
maxHeightM?: number | null | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Median number of floors among the buildings with a recorded floor count. Null when none has one.
|
|
70
|
+
*/
|
|
71
|
+
medianFloors?: number | null | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Median height above ground among the buildings with a recorded height, in metres. Null when none has one.
|
|
74
|
+
*/
|
|
75
|
+
medianHeightM?: number | null | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Identifier of that Ordnance Survey release.
|
|
78
|
+
*/
|
|
79
|
+
osVersion?: string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Dataset the profile is computed from. Always `os_ngd_building`.
|
|
82
|
+
*/
|
|
83
|
+
source?: SiteBuildingProfileSource | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* The buildings on the title by Ordnance Survey building use, largest first.
|
|
86
|
+
*/
|
|
87
|
+
uses?: Array<SiteBuildingCount> | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Number of those buildings with a construction period band.
|
|
90
|
+
*/
|
|
91
|
+
withAgeBand?: number | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Number of those buildings with a recorded floor count.
|
|
94
|
+
*/
|
|
95
|
+
withFloors?: number | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Number of those buildings with a recorded height.
|
|
98
|
+
*/
|
|
99
|
+
withHeight?: number | undefined;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const SiteBuildingProfileSource$inboundSchema: z.ZodNativeEnum<
|
|
104
|
+
typeof SiteBuildingProfileSource
|
|
105
|
+
> = z.nativeEnum(SiteBuildingProfileSource);
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const SiteBuildingProfile$inboundSchema: z.ZodType<
|
|
109
|
+
SiteBuildingProfile,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
unknown
|
|
112
|
+
> = z.object({
|
|
113
|
+
asOf: z.string().optional(),
|
|
114
|
+
connectivity: z.array(SiteBuildingCount$inboundSchema).optional(),
|
|
115
|
+
count: z.number().int().optional(),
|
|
116
|
+
coveragePct: z.number().optional(),
|
|
117
|
+
earliestAgeBand: z.nullable(z.string()).optional(),
|
|
118
|
+
footprintSqm: z.number().optional(),
|
|
119
|
+
latestAgeBand: z.nullable(z.string()).optional(),
|
|
120
|
+
maxFloors: z.nullable(z.number().int()).optional(),
|
|
121
|
+
maxHeightM: z.nullable(z.number()).optional(),
|
|
122
|
+
medianFloors: z.nullable(z.number()).optional(),
|
|
123
|
+
medianHeightM: z.nullable(z.number()).optional(),
|
|
124
|
+
osVersion: z.string().optional(),
|
|
125
|
+
source: SiteBuildingProfileSource$inboundSchema.optional(),
|
|
126
|
+
uses: z.array(SiteBuildingCount$inboundSchema).optional(),
|
|
127
|
+
withAgeBand: z.number().int().optional(),
|
|
128
|
+
withFloors: z.number().int().optional(),
|
|
129
|
+
withHeight: z.number().int().optional(),
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
export function siteBuildingProfileFromJSON(
|
|
133
|
+
jsonString: string,
|
|
134
|
+
): SafeParseResult<SiteBuildingProfile, SDKValidationError> {
|
|
135
|
+
return safeParse(
|
|
136
|
+
jsonString,
|
|
137
|
+
(x) => SiteBuildingProfile$inboundSchema.parse(JSON.parse(x)),
|
|
138
|
+
`Failed to parse 'SiteBuildingProfile' from JSON`,
|
|
139
|
+
);
|
|
140
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Yes or no answers for five common constraints. A flag is false only when its layer was measured on the title and covers no more than `flagThresholdPct` of it.
|
|
12
|
+
*/
|
|
13
|
+
export type SiteConstraintFlags = {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the title is on brownfield land. Null when it was not measured.
|
|
16
|
+
*/
|
|
17
|
+
brownfield?: boolean | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* True when a conservation area covers more of the title than `flagThresholdPct`. Null when it was not measured.
|
|
20
|
+
*/
|
|
21
|
+
conservationArea?: boolean | null | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* True when Green Belt covers more of the title than `flagThresholdPct`. Null when it was not measured.
|
|
24
|
+
*/
|
|
25
|
+
greenBelt?: boolean | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* True when the curtilage of a listed building covers more of the title than `flagThresholdPct`. Null otherwise, because curtilage is published for only part of Wales and its absence elsewhere proves nothing.
|
|
28
|
+
*/
|
|
29
|
+
listedBuildingCurtilage?: boolean | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* True when a Site of Special Scientific Interest covers more of the title than `flagThresholdPct`. Null when it was not measured.
|
|
32
|
+
*/
|
|
33
|
+
sssi?: boolean | null | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const SiteConstraintFlags$inboundSchema: z.ZodType<
|
|
38
|
+
SiteConstraintFlags,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.object({
|
|
42
|
+
brownfield: z.nullable(z.boolean()).optional(),
|
|
43
|
+
conservationArea: z.nullable(z.boolean()).optional(),
|
|
44
|
+
greenBelt: z.nullable(z.boolean()).optional(),
|
|
45
|
+
listedBuildingCurtilage: z.nullable(z.boolean()).optional(),
|
|
46
|
+
sssi: z.nullable(z.boolean()).optional(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function siteConstraintFlagsFromJSON(
|
|
50
|
+
jsonString: string,
|
|
51
|
+
): SafeParseResult<SiteConstraintFlags, SDKValidationError> {
|
|
52
|
+
return safeParse(
|
|
53
|
+
jsonString,
|
|
54
|
+
(x) => SiteConstraintFlags$inboundSchema.parse(JSON.parse(x)),
|
|
55
|
+
`Failed to parse 'SiteConstraintFlags' from JSON`,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type SiteConstraintLayer = {
|
|
11
|
+
/**
|
|
12
|
+
* Date the layer's data was retrieved from its publisher, as an ISO 8601 date. Null when no retrieval date is recorded for the layer.
|
|
13
|
+
*/
|
|
14
|
+
asOf?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The layer within its family: a designation type such as `green_belt` or `flood_zone_3`, or a hazard band such as `RADON_HIGH`, `ROAD_NOISE_MED` or `HISTORIC_LANDFILL_DIRECT`.
|
|
17
|
+
*/
|
|
18
|
+
code?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The publisher's edition of the data, as it states it: a date, an atlas version or a mapping year. Null when the publisher states none.
|
|
21
|
+
*/
|
|
22
|
+
edition?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Number of the layer's features that lie on the title. Null for the noise layers, which are mapped as a grid rather than as features.
|
|
25
|
+
*/
|
|
26
|
+
featureCount?: number | null | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Readable name of the layer.
|
|
29
|
+
*/
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Nation the designation was made in, such as `ENG` or `WAL`. Null for the hazard layers, which are not designations.
|
|
33
|
+
*/
|
|
34
|
+
nation?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Share of the title area the layer covers, from 0 to 100. Null when `overlapSqm` is null.
|
|
37
|
+
*/
|
|
38
|
+
overlapPct?: number | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Area of the title the layer covers, in square metres. Overlapping features of one layer count the ground once. Null when the layer's features on the title are points, which have no area.
|
|
41
|
+
*/
|
|
42
|
+
overlapSqm?: number | null | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The dataset the layer comes from: a designation product (`heritage`, `conservation` for nature conservation, `conservation_area` or `land_constraint`) or a hazard (`radon`, `historic_landfill`, `road_noise` or `rail_noise`). The set is open and grows as layers are added.
|
|
45
|
+
*/
|
|
46
|
+
type?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const SiteConstraintLayer$inboundSchema: z.ZodType<
|
|
51
|
+
SiteConstraintLayer,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
asOf: z.nullable(z.string()).optional(),
|
|
56
|
+
code: z.string().optional(),
|
|
57
|
+
edition: z.nullable(z.string()).optional(),
|
|
58
|
+
featureCount: z.nullable(z.number().int()).optional(),
|
|
59
|
+
name: z.string().optional(),
|
|
60
|
+
nation: z.nullable(z.string()).optional(),
|
|
61
|
+
overlapPct: z.nullable(z.number()).optional(),
|
|
62
|
+
overlapSqm: z.nullable(z.number()).optional(),
|
|
63
|
+
type: z.string().optional(),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export function siteConstraintLayerFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<SiteConstraintLayer, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) => SiteConstraintLayer$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
+
`Failed to parse 'SiteConstraintLayer' from JSON`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
SiteConstraintFlags,
|
|
11
|
+
SiteConstraintFlags$inboundSchema,
|
|
12
|
+
} from "./siteconstraintflags.js";
|
|
13
|
+
import {
|
|
14
|
+
SiteConstraintLayer,
|
|
15
|
+
SiteConstraintLayer$inboundSchema,
|
|
16
|
+
} from "./siteconstraintlayer.js";
|
|
17
|
+
import {
|
|
18
|
+
SiteConstraintUnmeasured,
|
|
19
|
+
SiteConstraintUnmeasured$inboundSchema,
|
|
20
|
+
} from "./siteconstraintunmeasured.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Planning designations and environmental hazards measured over the whole title boundary, each with the share of the title it covers. This supersedes `overlays`, which is read at the centre point of the site.
|
|
24
|
+
*/
|
|
25
|
+
export type SiteConstraints = {
|
|
26
|
+
/**
|
|
27
|
+
* Share of the title area, from 0 to 100, a flag's layer must exceed for the flag to be true. It keeps thin slivers where two datasets' boundaries disagree from setting a flag.
|
|
28
|
+
*/
|
|
29
|
+
flagThresholdPct?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Yes or no answers for five common constraints. A flag is false only when its layer was measured on the title and covers no more than `flagThresholdPct` of it.
|
|
32
|
+
*/
|
|
33
|
+
flags?: SiteConstraintFlags | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Every constraint layer with at least one feature on the title, measured over the whole title boundary, sorted by `type` then `code`. A layer absent from the list has no feature on the title in the data held, which is not proof the constraint does not apply: read `flags` and `unmeasured` for whether a layer's data covers the title.
|
|
36
|
+
*/
|
|
37
|
+
layers?: Array<SiteConstraintLayer> | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* One entry for each null flag, saying why it was not measured.
|
|
40
|
+
*/
|
|
41
|
+
unmeasured?: Array<SiteConstraintUnmeasured> | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const SiteConstraints$inboundSchema: z.ZodType<
|
|
46
|
+
SiteConstraints,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
flagThresholdPct: z.number().optional(),
|
|
51
|
+
flags: SiteConstraintFlags$inboundSchema.optional(),
|
|
52
|
+
layers: z.array(SiteConstraintLayer$inboundSchema).optional(),
|
|
53
|
+
unmeasured: z.array(SiteConstraintUnmeasured$inboundSchema).optional(),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function siteConstraintsFromJSON(
|
|
57
|
+
jsonString: string,
|
|
58
|
+
): SafeParseResult<SiteConstraints, SDKValidationError> {
|
|
59
|
+
return safeParse(
|
|
60
|
+
jsonString,
|
|
61
|
+
(x) => SiteConstraints$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'SiteConstraints' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|