@vepler/sdk 6.52.0 → 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 +7 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +7 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/site.d.ts +54 -14
- package/dist/commonjs/sdk/models/shared/site.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/site.js +24 -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/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/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 +7 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +7 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/site.d.ts +54 -14
- package/dist/esm/sdk/models/shared/site.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/site.js +23 -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/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/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 +7 -0
- package/src/sdk/models/shared/site.ts +72 -17
- package/src/sdk/models/shared/sitebuilding.ts +288 -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/sitequeryrequest.ts +2 -2
- package/src/sdk/models/shared/sitetags.ts +5 -0
- package/src/sdk/sites.ts +20 -2
|
@@ -83,6 +83,7 @@ export * from "./getschoolbysource.js";
|
|
|
83
83
|
export * from "./getschoolmetrics.js";
|
|
84
84
|
export * from "./getschoolscoverage.js";
|
|
85
85
|
export * from "./getsitebyid.js";
|
|
86
|
+
export * from "./getsiteland.js";
|
|
86
87
|
export * from "./getsitetiles.js";
|
|
87
88
|
export * from "./getsubstationbycode.js";
|
|
88
89
|
export * from "./getsubstationcapacity.js";
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
|
|
7
7
|
export type GetSiteByIdRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Extra fields to return, as one comma-separated string such as "buildings,buildingIds". They are added to the fields the endpoint returns by default. Name `buildings` to get the summary of every building on the title, or `buildingIds` for their identifiers alone.
|
|
10
|
+
*/
|
|
11
|
+
attributes?: string | undefined;
|
|
8
12
|
/**
|
|
9
13
|
* Identifier for a single registered title, made up of the country, the registry and the title number joined by colons.
|
|
10
14
|
*/
|
|
@@ -13,6 +17,7 @@ export type GetSiteByIdRequest = {
|
|
|
13
17
|
|
|
14
18
|
/** @internal */
|
|
15
19
|
export type GetSiteByIdRequest$Outbound = {
|
|
20
|
+
attributes?: string | undefined;
|
|
16
21
|
siteId: string;
|
|
17
22
|
};
|
|
18
23
|
|
|
@@ -22,6 +27,7 @@ export const GetSiteByIdRequest$outboundSchema: z.ZodType<
|
|
|
22
27
|
z.ZodTypeDef,
|
|
23
28
|
GetSiteByIdRequest
|
|
24
29
|
> = z.object({
|
|
30
|
+
attributes: z.string().optional(),
|
|
25
31
|
siteId: z.string(),
|
|
26
32
|
});
|
|
27
33
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type GetSiteLandRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Optional fields to add to each land polygon, as one comma-separated string. The only optional field is `geometry`, the polygon boundary, which is left out by default because of its size.
|
|
10
|
+
*/
|
|
11
|
+
attributes?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum number of land polygons to return. Defaults to 25. Minimum 1, maximum 100.
|
|
14
|
+
*/
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Number of land polygons to skip before the first one returned. Defaults to 0.
|
|
18
|
+
*/
|
|
19
|
+
offset?: number | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Identifier for a single registered title, made up of the country, the registry and the title number joined by colons.
|
|
22
|
+
*/
|
|
23
|
+
siteId: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type GetSiteLandRequest$Outbound = {
|
|
28
|
+
attributes?: string | undefined;
|
|
29
|
+
limit: number;
|
|
30
|
+
offset: number | null;
|
|
31
|
+
siteId: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const GetSiteLandRequest$outboundSchema: z.ZodType<
|
|
36
|
+
GetSiteLandRequest$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
GetSiteLandRequest
|
|
39
|
+
> = z.object({
|
|
40
|
+
attributes: z.string().optional(),
|
|
41
|
+
limit: z.number().int().default(25),
|
|
42
|
+
offset: z.nullable(z.number().int().default(0)),
|
|
43
|
+
siteId: z.string(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function getSiteLandRequestToJSON(
|
|
47
|
+
getSiteLandRequest: GetSiteLandRequest,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
GetSiteLandRequest$outboundSchema.parse(getSiteLandRequest),
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -85,6 +85,7 @@ export * from "./getschoolbyid.js";
|
|
|
85
85
|
export * from "./getschoolbysource.js";
|
|
86
86
|
export * from "./getschoolmetrics.js";
|
|
87
87
|
export * from "./getsitebyid.js";
|
|
88
|
+
export * from "./getsiteland.js";
|
|
88
89
|
export * from "./getsitetiles.js";
|
|
89
90
|
export * from "./getsubstationbycode.js";
|
|
90
91
|
export * from "./getsubstationcapacity.js";
|
|
@@ -253,7 +253,7 @@ export type GeoJSONMultiPolygon = {
|
|
|
253
253
|
/**
|
|
254
254
|
* An area expressed as a GeoJSON Polygon geometry.
|
|
255
255
|
*/
|
|
256
|
-
export type
|
|
256
|
+
export type BuildingGeoJSONPolygon = {
|
|
257
257
|
/**
|
|
258
258
|
* The rings that make up the polygon. The first ring is the outer boundary and any further rings are holes inside it. Each ring needs at least four positions and closes by repeating its first position as the last.
|
|
259
259
|
*/
|
|
@@ -268,7 +268,7 @@ export type GeoJSONPolygon = {
|
|
|
268
268
|
* Outline of the building, as a GeoJSON Polygon or MultiPolygon. Left out of the default attribute set because of its size; request it with `attributes: ["footprint"]`.
|
|
269
269
|
*/
|
|
270
270
|
export type Footprint =
|
|
271
|
-
|
|
|
271
|
+
| BuildingGeoJSONPolygon
|
|
272
272
|
| GeoJSONMultiPolygon
|
|
273
273
|
| discriminatedUnionTypes.Unknown<"type">;
|
|
274
274
|
|
|
@@ -568,7 +568,7 @@ export type Building = {
|
|
|
568
568
|
* Outline of the building, as a GeoJSON Polygon or MultiPolygon. Left out of the default attribute set because of its size; request it with `attributes: ["footprint"]`.
|
|
569
569
|
*/
|
|
570
570
|
footprint?:
|
|
571
|
-
|
|
|
571
|
+
| BuildingGeoJSONPolygon
|
|
572
572
|
| GeoJSONMultiPolygon
|
|
573
573
|
| discriminatedUnionTypes.Unknown<"type">
|
|
574
574
|
| null
|
|
@@ -820,8 +820,8 @@ export function geoJSONMultiPolygonFromJSON(
|
|
|
820
820
|
}
|
|
821
821
|
|
|
822
822
|
/** @internal */
|
|
823
|
-
export const
|
|
824
|
-
|
|
823
|
+
export const BuildingGeoJSONPolygon$inboundSchema: z.ZodType<
|
|
824
|
+
BuildingGeoJSONPolygon,
|
|
825
825
|
z.ZodTypeDef,
|
|
826
826
|
unknown
|
|
827
827
|
> = z.object({
|
|
@@ -829,13 +829,13 @@ export const GeoJSONPolygon$inboundSchema: z.ZodType<
|
|
|
829
829
|
type: z.literal("Polygon"),
|
|
830
830
|
});
|
|
831
831
|
|
|
832
|
-
export function
|
|
832
|
+
export function buildingGeoJSONPolygonFromJSON(
|
|
833
833
|
jsonString: string,
|
|
834
|
-
): SafeParseResult<
|
|
834
|
+
): SafeParseResult<BuildingGeoJSONPolygon, SDKValidationError> {
|
|
835
835
|
return safeParse(
|
|
836
836
|
jsonString,
|
|
837
|
-
(x) =>
|
|
838
|
-
`Failed to parse '
|
|
837
|
+
(x) => BuildingGeoJSONPolygon$inboundSchema.parse(JSON.parse(x)),
|
|
838
|
+
`Failed to parse 'BuildingGeoJSONPolygon' from JSON`,
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
841
|
|
|
@@ -845,7 +845,7 @@ export const Footprint$inboundSchema: z.ZodType<
|
|
|
845
845
|
z.ZodTypeDef,
|
|
846
846
|
unknown
|
|
847
847
|
> = discriminatedUnion("type", {
|
|
848
|
-
Polygon: z.lazy(() =>
|
|
848
|
+
Polygon: z.lazy(() => BuildingGeoJSONPolygon$inboundSchema),
|
|
849
849
|
MultiPolygon: z.lazy(() => GeoJSONMultiPolygon$inboundSchema),
|
|
850
850
|
});
|
|
851
851
|
|
|
@@ -1004,7 +1004,7 @@ export const Building$inboundSchema: z.ZodType<
|
|
|
1004
1004
|
floors: z.nullable(z.number().int()).optional(),
|
|
1005
1005
|
footprint: z.nullable(
|
|
1006
1006
|
discriminatedUnion("type", {
|
|
1007
|
-
Polygon: z.lazy(() =>
|
|
1007
|
+
Polygon: z.lazy(() => BuildingGeoJSONPolygon$inboundSchema),
|
|
1008
1008
|
MultiPolygon: z.lazy(() => GeoJSONMultiPolygon$inboundSchema),
|
|
1009
1009
|
}),
|
|
1010
1010
|
).optional(),
|
|
@@ -389,10 +389,17 @@ export * from "./siteareafilter.js";
|
|
|
389
389
|
export * from "./siteareametrics.js";
|
|
390
390
|
export * from "./sitebatchidsrequest.js";
|
|
391
391
|
export * from "./siteboundingboxareafilter.js";
|
|
392
|
+
export * from "./sitebuilding.js";
|
|
392
393
|
export * from "./sitebuildingcount.js";
|
|
393
394
|
export * from "./sitebuildingprofile.js";
|
|
395
|
+
export * from "./siteconstraintflags.js";
|
|
396
|
+
export * from "./siteconstraintlayer.js";
|
|
397
|
+
export * from "./siteconstraints.js";
|
|
398
|
+
export * from "./siteconstraintunmeasured.js";
|
|
394
399
|
export * from "./sitecontainspointareafilter.js";
|
|
395
400
|
export * from "./sitefilters.js";
|
|
401
|
+
export * from "./sitelandfeature.js";
|
|
402
|
+
export * from "./sitelandlistresponse.js";
|
|
396
403
|
export * from "./sitelandprofile.js";
|
|
397
404
|
export * from "./sitelandshare.js";
|
|
398
405
|
export * from "./siteleafaggregation.js";
|
|
@@ -14,10 +14,15 @@ import {
|
|
|
14
14
|
SiteAreaMetrics,
|
|
15
15
|
SiteAreaMetrics$inboundSchema,
|
|
16
16
|
} from "./siteareametrics.js";
|
|
17
|
+
import { SiteBuilding, SiteBuilding$inboundSchema } from "./sitebuilding.js";
|
|
17
18
|
import {
|
|
18
19
|
SiteBuildingProfile,
|
|
19
20
|
SiteBuildingProfile$inboundSchema,
|
|
20
21
|
} from "./sitebuildingprofile.js";
|
|
22
|
+
import {
|
|
23
|
+
SiteConstraints,
|
|
24
|
+
SiteConstraints$inboundSchema,
|
|
25
|
+
} from "./siteconstraints.js";
|
|
21
26
|
import {
|
|
22
27
|
SiteLandProfile,
|
|
23
28
|
SiteLandProfile$inboundSchema,
|
|
@@ -156,7 +161,20 @@ export const SiteObject = {
|
|
|
156
161
|
export type SiteObject = ClosedEnum<typeof SiteObject>;
|
|
157
162
|
|
|
158
163
|
/**
|
|
159
|
-
*
|
|
164
|
+
* Whether the title appears in HM Land Registry's monthly files of land held by UK and overseas companies. 'company' means it does, and its company proprietors are listed. 'not_in_register' means it does not as of `asOf`, so the title is held by one or more private individuals or by a body those files do not cover. 'not_loaded' means the files had not been loaded when this title was last assessed, so its company ownership is not known.
|
|
165
|
+
*/
|
|
166
|
+
export const Availability = {
|
|
167
|
+
Company: "company",
|
|
168
|
+
NotInRegister: "not_in_register",
|
|
169
|
+
NotLoaded: "not_loaded",
|
|
170
|
+
} as const;
|
|
171
|
+
/**
|
|
172
|
+
* Whether the title appears in HM Land Registry's monthly files of land held by UK and overseas companies. 'company' means it does, and its company proprietors are listed. 'not_in_register' means it does not as of `asOf`, so the title is held by one or more private individuals or by a body those files do not cover. 'not_loaded' means the files had not been loaded when this title was last assessed, so its company ownership is not known.
|
|
173
|
+
*/
|
|
174
|
+
export type Availability = OpenEnum<typeof Availability>;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Broad category the primary proprietor falls into, worked out from its entity type. Null when no proprietor is recorded.
|
|
160
178
|
*/
|
|
161
179
|
export const OwnershipCategory = {
|
|
162
180
|
Company: "company",
|
|
@@ -166,12 +184,12 @@ export const OwnershipCategory = {
|
|
|
166
184
|
Unknown: "unknown",
|
|
167
185
|
} as const;
|
|
168
186
|
/**
|
|
169
|
-
* Broad category the primary proprietor falls into, worked out from its entity type.
|
|
187
|
+
* Broad category the primary proprietor falls into, worked out from its entity type. Null when no proprietor is recorded.
|
|
170
188
|
*/
|
|
171
189
|
export type OwnershipCategory = OpenEnum<typeof OwnershipCategory>;
|
|
172
190
|
|
|
173
191
|
/**
|
|
174
|
-
* Which HM Land Registry record the
|
|
192
|
+
* Which HM Land Registry record the primary proprietor was taken from. Null when no proprietor is recorded.
|
|
175
193
|
*/
|
|
176
194
|
export const SiteSource = {
|
|
177
195
|
Ccod: "ccod",
|
|
@@ -180,14 +198,22 @@ export const SiteSource = {
|
|
|
180
198
|
Manual: "manual",
|
|
181
199
|
} as const;
|
|
182
200
|
/**
|
|
183
|
-
* Which HM Land Registry record the
|
|
201
|
+
* Which HM Land Registry record the primary proprietor was taken from. Null when no proprietor is recorded.
|
|
184
202
|
*/
|
|
185
203
|
export type SiteSource = OpenEnum<typeof SiteSource>;
|
|
186
204
|
|
|
187
205
|
/**
|
|
188
|
-
* Registered ownership of the title. Null when
|
|
206
|
+
* Registered ownership of the title. Null when the title has not been assessed for ownership yet. Requires the `sourceData` permission on the licence, and is left out of the response without it.
|
|
189
207
|
*/
|
|
190
208
|
export type Ownership = {
|
|
209
|
+
/**
|
|
210
|
+
* Month of the company ownership files that `availability` is based on, as YYYY-MM. For 'company', the month of the file the title appears in. For 'not_in_register', the earlier of the company and overseas-company files' months. Null when `availability` is 'not_loaded'.
|
|
211
|
+
*/
|
|
212
|
+
asOf?: string | null | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Whether the title appears in HM Land Registry's monthly files of land held by UK and overseas companies. 'company' means it does, and its company proprietors are listed. 'not_in_register' means it does not as of `asOf`, so the title is held by one or more private individuals or by a body those files do not cover. 'not_loaded' means the files had not been loaded when this title was last assessed, so its company ownership is not known.
|
|
215
|
+
*/
|
|
216
|
+
availability?: Availability | undefined;
|
|
191
217
|
/**
|
|
192
218
|
* Company registration number of the primary proprietor, where it is a company.
|
|
193
219
|
*/
|
|
@@ -201,21 +227,21 @@ export type Ownership = {
|
|
|
201
227
|
*/
|
|
202
228
|
isJointOwnership?: boolean | undefined;
|
|
203
229
|
/**
|
|
204
|
-
* Broad category the primary proprietor falls into, worked out from its entity type.
|
|
230
|
+
* Broad category the primary proprietor falls into, worked out from its entity type. Null when no proprietor is recorded.
|
|
205
231
|
*/
|
|
206
|
-
ownershipCategory?: OwnershipCategory | undefined;
|
|
232
|
+
ownershipCategory?: OwnershipCategory | null | undefined;
|
|
207
233
|
/**
|
|
208
|
-
* Name of the primary proprietor.
|
|
234
|
+
* Name of the primary proprietor. Null when no proprietor is recorded.
|
|
209
235
|
*/
|
|
210
|
-
primaryOwnerName?: string | undefined;
|
|
236
|
+
primaryOwnerName?: string | null | undefined;
|
|
211
237
|
/**
|
|
212
|
-
* Every proprietor recorded on the title, with the primary one first.
|
|
238
|
+
* Every proprietor recorded on the title, with the primary one first. Empty when none is recorded.
|
|
213
239
|
*/
|
|
214
240
|
proprietors?: Array<SiteProprietor> | undefined;
|
|
215
241
|
/**
|
|
216
|
-
* Which HM Land Registry record the
|
|
242
|
+
* Which HM Land Registry record the primary proprietor was taken from. Null when no proprietor is recorded.
|
|
217
243
|
*/
|
|
218
|
-
source?: SiteSource | undefined;
|
|
244
|
+
source?: SiteSource | null | undefined;
|
|
219
245
|
};
|
|
220
246
|
|
|
221
247
|
/**
|
|
@@ -272,6 +298,18 @@ export type Site = {
|
|
|
272
298
|
* 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.
|
|
273
299
|
*/
|
|
274
300
|
buildingProfile?: SiteBuildingProfile | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* The buildings whose footprint intersects the title, each as the summary the buildings endpoints serve for that building, in identifier order. Holds at most the configured cap of buildings; when `buildingsTruncated` is true because the title has more buildings than the cap, the full set is available from the buildings query endpoint filtered by this site identifier. Left out of the default attribute set because of its size; request it with `attributes: ["buildings"]`. Requires the `osNgdAccess` permission on the licence.
|
|
303
|
+
*/
|
|
304
|
+
buildings?: Array<SiteBuilding> | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* Number of buildings whose footprint intersects the title. The same count as `buildingProfile.count`. Requires the `osNgdAccess` permission on the licence.
|
|
307
|
+
*/
|
|
308
|
+
buildingsTotal?: number | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* Whether `buildings` holds fewer buildings than `buildingsTotal`, either because the title has more buildings than the configured cap or because a building has no record on the buildings endpoints yet. Requires the `osNgdAccess` permission on the licence.
|
|
311
|
+
*/
|
|
312
|
+
buildingsTruncated?: boolean | undefined;
|
|
275
313
|
/**
|
|
276
314
|
* Centre point of the title boundary. Present whenever the site has a boundary, unless `centroid` is left out of the requested attributes.
|
|
277
315
|
*/
|
|
@@ -280,6 +318,10 @@ export type Site = {
|
|
|
280
318
|
* HM Land Registry class of title code, which records the quality of the title and the tenure it is held under. Left out of the default attribute set; request it with `attributes: ["classTitleCode"]`.
|
|
281
319
|
*/
|
|
282
320
|
classTitleCode?: ClassTitleCode | null | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* 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.
|
|
323
|
+
*/
|
|
324
|
+
constraints?: SiteConstraints | undefined;
|
|
283
325
|
/**
|
|
284
326
|
* Country the title is registered in, as an ISO 3166-1 alpha-2 code.
|
|
285
327
|
*/
|
|
@@ -309,11 +351,11 @@ export type Site = {
|
|
|
309
351
|
*/
|
|
310
352
|
object?: SiteObject | undefined;
|
|
311
353
|
/**
|
|
312
|
-
* Codes for the designations and hazards recorded against this site, covering flood risk, road and rail noise, radon, landfill proximity and protected-area designations. The set is open rather than fixed: it depends on which area datasets cover the site.
|
|
354
|
+
* Codes for the designations and hazards recorded against this site, covering flood risk, road and rail noise, radon, landfill proximity and protected-area designations. `GREEN_BELT`, `CONSERVATION_AREA`, `SSSI` and `LISTED_BUILDING_CURTILAGE` are present when the matching flag in `constraints.flags` is true; the other codes are read at the centre point of the site. The set is open rather than fixed: it depends on which area datasets cover the site.
|
|
313
355
|
*/
|
|
314
356
|
overlays?: Array<string> | undefined;
|
|
315
357
|
/**
|
|
316
|
-
* Registered ownership of the title. Null when
|
|
358
|
+
* Registered ownership of the title. Null when the title has not been assessed for ownership yet. Requires the `sourceData` permission on the licence, and is left out of the response without it.
|
|
317
359
|
*/
|
|
318
360
|
ownership?: Ownership | null | undefined;
|
|
319
361
|
/**
|
|
@@ -472,6 +514,13 @@ export const LandUse$inboundSchema: z.ZodType<LandUse, z.ZodTypeDef, unknown> =
|
|
|
472
514
|
export const SiteObject$inboundSchema: z.ZodNativeEnum<typeof SiteObject> = z
|
|
473
515
|
.nativeEnum(SiteObject);
|
|
474
516
|
|
|
517
|
+
/** @internal */
|
|
518
|
+
export const Availability$inboundSchema: z.ZodType<
|
|
519
|
+
Availability,
|
|
520
|
+
z.ZodTypeDef,
|
|
521
|
+
unknown
|
|
522
|
+
> = openEnums.inboundSchema(Availability);
|
|
523
|
+
|
|
475
524
|
/** @internal */
|
|
476
525
|
export const OwnershipCategory$inboundSchema: z.ZodType<
|
|
477
526
|
OwnershipCategory,
|
|
@@ -492,13 +541,15 @@ export const Ownership$inboundSchema: z.ZodType<
|
|
|
492
541
|
z.ZodTypeDef,
|
|
493
542
|
unknown
|
|
494
543
|
> = z.object({
|
|
544
|
+
asOf: z.nullable(z.string()).optional(),
|
|
545
|
+
availability: Availability$inboundSchema.optional(),
|
|
495
546
|
companyNumber: z.nullable(z.string()).optional(),
|
|
496
547
|
dateProprietorAdded: z.nullable(z.string()).optional(),
|
|
497
548
|
isJointOwnership: z.boolean().optional(),
|
|
498
|
-
ownershipCategory: OwnershipCategory$inboundSchema.optional(),
|
|
499
|
-
primaryOwnerName: z.string().optional(),
|
|
549
|
+
ownershipCategory: z.nullable(OwnershipCategory$inboundSchema).optional(),
|
|
550
|
+
primaryOwnerName: z.nullable(z.string()).optional(),
|
|
500
551
|
proprietors: z.array(SiteProprietor$inboundSchema).optional(),
|
|
501
|
-
source: SiteSource$inboundSchema.optional(),
|
|
552
|
+
source: z.nullable(SiteSource$inboundSchema).optional(),
|
|
502
553
|
});
|
|
503
554
|
|
|
504
555
|
export function ownershipFromJSON(
|
|
@@ -536,8 +587,12 @@ export const Site$inboundSchema: z.ZodType<Site, z.ZodTypeDef, unknown> = z
|
|
|
536
587
|
}).optional(),
|
|
537
588
|
buildingIds: z.array(z.string()).optional(),
|
|
538
589
|
buildingProfile: SiteBuildingProfile$inboundSchema.optional(),
|
|
590
|
+
buildings: z.array(SiteBuilding$inboundSchema).optional(),
|
|
591
|
+
buildingsTotal: z.number().int().optional(),
|
|
592
|
+
buildingsTruncated: z.boolean().optional(),
|
|
539
593
|
centroid: z.lazy(() => SiteCoordinates$inboundSchema).optional(),
|
|
540
594
|
classTitleCode: z.nullable(ClassTitleCode$inboundSchema).optional(),
|
|
595
|
+
constraints: SiteConstraints$inboundSchema.optional(),
|
|
541
596
|
country: z.string().optional(),
|
|
542
597
|
estateInterestCode: z.nullable(EstateInterestCode$inboundSchema).optional(),
|
|
543
598
|
landProfile: SiteLandProfile$inboundSchema.optional(),
|
|
@@ -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
|
+
}
|