@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.
Files changed (222) hide show
  1. package/README.md +424 -416
  2. package/dist/commonjs/funcs/sitesGet.d.ts +1 -1
  3. package/dist/commonjs/funcs/sitesGet.js +5 -1
  4. package/dist/commonjs/funcs/sitesGet.js.map +1 -1
  5. package/dist/commonjs/funcs/sitesGetLand.d.ts +19 -0
  6. package/dist/commonjs/funcs/sitesGetLand.d.ts.map +1 -0
  7. package/dist/commonjs/funcs/sitesGetLand.js +131 -0
  8. package/dist/commonjs/funcs/sitesGetLand.js.map +1 -0
  9. package/dist/commonjs/funcs/sitesSearch.d.ts +1 -1
  10. package/dist/commonjs/funcs/sitesSearch.js +1 -1
  11. package/dist/commonjs/lib/config.d.ts +3 -3
  12. package/dist/commonjs/lib/config.js +3 -3
  13. package/dist/commonjs/lib/config.js.map +1 -1
  14. package/dist/commonjs/sdk/models/errors/getsiteland.d.ts +396 -0
  15. package/dist/commonjs/sdk/models/errors/getsiteland.d.ts.map +1 -0
  16. package/dist/commonjs/sdk/models/errors/getsiteland.js +381 -0
  17. package/dist/commonjs/sdk/models/errors/getsiteland.js.map +1 -0
  18. package/dist/commonjs/sdk/models/errors/index.d.ts +1 -0
  19. package/dist/commonjs/sdk/models/errors/index.d.ts.map +1 -1
  20. package/dist/commonjs/sdk/models/errors/index.js +1 -0
  21. package/dist/commonjs/sdk/models/errors/index.js.map +1 -1
  22. package/dist/commonjs/sdk/models/operations/getsitebyid.d.ts +5 -0
  23. package/dist/commonjs/sdk/models/operations/getsitebyid.d.ts.map +1 -1
  24. package/dist/commonjs/sdk/models/operations/getsitebyid.js +1 -0
  25. package/dist/commonjs/sdk/models/operations/getsitebyid.js.map +1 -1
  26. package/dist/commonjs/sdk/models/operations/getsiteland.d.ts +30 -0
  27. package/dist/commonjs/sdk/models/operations/getsiteland.d.ts.map +1 -0
  28. package/dist/commonjs/sdk/models/operations/getsiteland.js +52 -0
  29. package/dist/commonjs/sdk/models/operations/getsiteland.js.map +1 -0
  30. package/dist/commonjs/sdk/models/operations/index.d.ts +1 -0
  31. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/index.js +1 -0
  33. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  34. package/dist/commonjs/sdk/models/shared/building.d.ts +5 -5
  35. package/dist/commonjs/sdk/models/shared/building.d.ts.map +1 -1
  36. package/dist/commonjs/sdk/models/shared/building.js +7 -7
  37. package/dist/commonjs/sdk/models/shared/building.js.map +1 -1
  38. package/dist/commonjs/sdk/models/shared/index.d.ts +11 -0
  39. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  40. package/dist/commonjs/sdk/models/shared/index.js +11 -0
  41. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  42. package/dist/commonjs/sdk/models/shared/site.d.ts +68 -14
  43. package/dist/commonjs/sdk/models/shared/site.d.ts.map +1 -1
  44. package/dist/commonjs/sdk/models/shared/site.js +29 -6
  45. package/dist/commonjs/sdk/models/shared/site.js.map +1 -1
  46. package/dist/commonjs/sdk/models/shared/sitebuilding.d.ts +176 -0
  47. package/dist/commonjs/sdk/models/shared/sitebuilding.d.ts.map +1 -0
  48. package/dist/commonjs/sdk/models/shared/sitebuilding.js +141 -0
  49. package/dist/commonjs/sdk/models/shared/sitebuilding.js.map +1 -0
  50. package/dist/commonjs/sdk/models/shared/sitebuildingcount.d.ts +17 -0
  51. package/dist/commonjs/sdk/models/shared/sitebuildingcount.d.ts.map +1 -0
  52. package/dist/commonjs/sdk/models/shared/sitebuildingcount.js +51 -0
  53. package/dist/commonjs/sdk/models/shared/sitebuildingcount.js.map +1 -0
  54. package/dist/commonjs/sdk/models/shared/sitebuildingprofile.d.ts +94 -0
  55. package/dist/commonjs/sdk/models/shared/sitebuildingprofile.d.ts.map +1 -0
  56. package/dist/commonjs/sdk/models/shared/sitebuildingprofile.js +75 -0
  57. package/dist/commonjs/sdk/models/shared/sitebuildingprofile.js.map +1 -0
  58. package/dist/commonjs/sdk/models/shared/siteconstraintflags.d.ts +32 -0
  59. package/dist/commonjs/sdk/models/shared/siteconstraintflags.d.ts.map +1 -0
  60. package/dist/commonjs/sdk/models/shared/siteconstraintflags.js +54 -0
  61. package/dist/commonjs/sdk/models/shared/siteconstraintflags.js.map +1 -0
  62. package/dist/commonjs/sdk/models/shared/siteconstraintlayer.d.ts +45 -0
  63. package/dist/commonjs/sdk/models/shared/siteconstraintlayer.d.ts.map +1 -0
  64. package/dist/commonjs/sdk/models/shared/siteconstraintlayer.js +58 -0
  65. package/dist/commonjs/sdk/models/shared/siteconstraintlayer.js.map +1 -0
  66. package/dist/commonjs/sdk/models/shared/siteconstraints.d.ts +31 -0
  67. package/dist/commonjs/sdk/models/shared/siteconstraints.d.ts.map +1 -0
  68. package/dist/commonjs/sdk/models/shared/siteconstraints.js +56 -0
  69. package/dist/commonjs/sdk/models/shared/siteconstraints.js.map +1 -0
  70. package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.d.ts +49 -0
  71. package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.d.ts.map +1 -0
  72. package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.js +75 -0
  73. package/dist/commonjs/sdk/models/shared/siteconstraintunmeasured.js.map +1 -0
  74. package/dist/commonjs/sdk/models/shared/sitelandfeature.d.ts +90 -0
  75. package/dist/commonjs/sdk/models/shared/sitelandfeature.d.ts.map +1 -0
  76. package/dist/commonjs/sdk/models/shared/sitelandfeature.js +79 -0
  77. package/dist/commonjs/sdk/models/shared/sitelandfeature.js.map +1 -0
  78. package/dist/commonjs/sdk/models/shared/sitelandlistresponse.d.ts +46 -0
  79. package/dist/commonjs/sdk/models/shared/sitelandlistresponse.d.ts.map +1 -0
  80. package/dist/commonjs/sdk/models/shared/sitelandlistresponse.js +69 -0
  81. package/dist/commonjs/sdk/models/shared/sitelandlistresponse.js.map +1 -0
  82. package/dist/commonjs/sdk/models/shared/sitelandprofile.d.ts +74 -0
  83. package/dist/commonjs/sdk/models/shared/sitelandprofile.d.ts.map +1 -0
  84. package/dist/commonjs/sdk/models/shared/sitelandprofile.js +70 -0
  85. package/dist/commonjs/sdk/models/shared/sitelandprofile.js.map +1 -0
  86. package/dist/commonjs/sdk/models/shared/sitelandshare.d.ts +25 -0
  87. package/dist/commonjs/sdk/models/shared/sitelandshare.d.ts.map +1 -0
  88. package/dist/commonjs/sdk/models/shared/sitelandshare.js +53 -0
  89. package/dist/commonjs/sdk/models/shared/sitelandshare.js.map +1 -0
  90. package/dist/commonjs/sdk/models/shared/sitequeryrequest.d.ts +2 -2
  91. package/dist/commonjs/sdk/models/shared/sitetags.d.ts +4 -0
  92. package/dist/commonjs/sdk/models/shared/sitetags.d.ts.map +1 -1
  93. package/dist/commonjs/sdk/models/shared/sitetags.js +1 -0
  94. package/dist/commonjs/sdk/models/shared/sitetags.js.map +1 -1
  95. package/dist/commonjs/sdk/sites.d.ts +9 -2
  96. package/dist/commonjs/sdk/sites.d.ts.map +1 -1
  97. package/dist/commonjs/sdk/sites.js +12 -2
  98. package/dist/commonjs/sdk/sites.js.map +1 -1
  99. package/dist/esm/funcs/sitesGet.d.ts +1 -1
  100. package/dist/esm/funcs/sitesGet.js +6 -2
  101. package/dist/esm/funcs/sitesGet.js.map +1 -1
  102. package/dist/esm/funcs/sitesGetLand.d.ts +19 -0
  103. package/dist/esm/funcs/sitesGetLand.d.ts.map +1 -0
  104. package/dist/esm/funcs/sitesGetLand.js +95 -0
  105. package/dist/esm/funcs/sitesGetLand.js.map +1 -0
  106. package/dist/esm/funcs/sitesSearch.d.ts +1 -1
  107. package/dist/esm/funcs/sitesSearch.js +1 -1
  108. package/dist/esm/lib/config.d.ts +3 -3
  109. package/dist/esm/lib/config.js +3 -3
  110. package/dist/esm/lib/config.js.map +1 -1
  111. package/dist/esm/sdk/models/errors/getsiteland.d.ts +396 -0
  112. package/dist/esm/sdk/models/errors/getsiteland.d.ts.map +1 -0
  113. package/dist/esm/sdk/models/errors/getsiteland.js +333 -0
  114. package/dist/esm/sdk/models/errors/getsiteland.js.map +1 -0
  115. package/dist/esm/sdk/models/errors/index.d.ts +1 -0
  116. package/dist/esm/sdk/models/errors/index.d.ts.map +1 -1
  117. package/dist/esm/sdk/models/errors/index.js +1 -0
  118. package/dist/esm/sdk/models/errors/index.js.map +1 -1
  119. package/dist/esm/sdk/models/operations/getsitebyid.d.ts +5 -0
  120. package/dist/esm/sdk/models/operations/getsitebyid.d.ts.map +1 -1
  121. package/dist/esm/sdk/models/operations/getsitebyid.js +1 -0
  122. package/dist/esm/sdk/models/operations/getsitebyid.js.map +1 -1
  123. package/dist/esm/sdk/models/operations/getsiteland.d.ts +30 -0
  124. package/dist/esm/sdk/models/operations/getsiteland.d.ts.map +1 -0
  125. package/dist/esm/sdk/models/operations/getsiteland.js +15 -0
  126. package/dist/esm/sdk/models/operations/getsiteland.js.map +1 -0
  127. package/dist/esm/sdk/models/operations/index.d.ts +1 -0
  128. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  129. package/dist/esm/sdk/models/operations/index.js +1 -0
  130. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  131. package/dist/esm/sdk/models/shared/building.d.ts +5 -5
  132. package/dist/esm/sdk/models/shared/building.d.ts.map +1 -1
  133. package/dist/esm/sdk/models/shared/building.js +5 -5
  134. package/dist/esm/sdk/models/shared/building.js.map +1 -1
  135. package/dist/esm/sdk/models/shared/index.d.ts +11 -0
  136. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  137. package/dist/esm/sdk/models/shared/index.js +11 -0
  138. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  139. package/dist/esm/sdk/models/shared/site.d.ts +68 -14
  140. package/dist/esm/sdk/models/shared/site.d.ts.map +1 -1
  141. package/dist/esm/sdk/models/shared/site.js +28 -5
  142. package/dist/esm/sdk/models/shared/site.js.map +1 -1
  143. package/dist/esm/sdk/models/shared/sitebuilding.d.ts +176 -0
  144. package/dist/esm/sdk/models/shared/sitebuilding.d.ts.map +1 -0
  145. package/dist/esm/sdk/models/shared/sitebuilding.js +101 -0
  146. package/dist/esm/sdk/models/shared/sitebuilding.js.map +1 -0
  147. package/dist/esm/sdk/models/shared/sitebuildingcount.d.ts +17 -0
  148. package/dist/esm/sdk/models/shared/sitebuildingcount.d.ts.map +1 -0
  149. package/dist/esm/sdk/models/shared/sitebuildingcount.js +14 -0
  150. package/dist/esm/sdk/models/shared/sitebuildingcount.js.map +1 -0
  151. package/dist/esm/sdk/models/shared/sitebuildingprofile.d.ts +94 -0
  152. package/dist/esm/sdk/models/shared/sitebuildingprofile.d.ts.map +1 -0
  153. package/dist/esm/sdk/models/shared/sitebuildingprofile.js +38 -0
  154. package/dist/esm/sdk/models/shared/sitebuildingprofile.js.map +1 -0
  155. package/dist/esm/sdk/models/shared/siteconstraintflags.d.ts +32 -0
  156. package/dist/esm/sdk/models/shared/siteconstraintflags.d.ts.map +1 -0
  157. package/dist/esm/sdk/models/shared/siteconstraintflags.js +17 -0
  158. package/dist/esm/sdk/models/shared/siteconstraintflags.js.map +1 -0
  159. package/dist/esm/sdk/models/shared/siteconstraintlayer.d.ts +45 -0
  160. package/dist/esm/sdk/models/shared/siteconstraintlayer.d.ts.map +1 -0
  161. package/dist/esm/sdk/models/shared/siteconstraintlayer.js +21 -0
  162. package/dist/esm/sdk/models/shared/siteconstraintlayer.js.map +1 -0
  163. package/dist/esm/sdk/models/shared/siteconstraints.d.ts +31 -0
  164. package/dist/esm/sdk/models/shared/siteconstraints.d.ts.map +1 -0
  165. package/dist/esm/sdk/models/shared/siteconstraints.js +19 -0
  166. package/dist/esm/sdk/models/shared/siteconstraints.js.map +1 -0
  167. package/dist/esm/sdk/models/shared/siteconstraintunmeasured.d.ts +49 -0
  168. package/dist/esm/sdk/models/shared/siteconstraintunmeasured.d.ts.map +1 -0
  169. package/dist/esm/sdk/models/shared/siteconstraintunmeasured.js +38 -0
  170. package/dist/esm/sdk/models/shared/siteconstraintunmeasured.js.map +1 -0
  171. package/dist/esm/sdk/models/shared/sitelandfeature.d.ts +90 -0
  172. package/dist/esm/sdk/models/shared/sitelandfeature.d.ts.map +1 -0
  173. package/dist/esm/sdk/models/shared/sitelandfeature.js +41 -0
  174. package/dist/esm/sdk/models/shared/sitelandfeature.js.map +1 -0
  175. package/dist/esm/sdk/models/shared/sitelandlistresponse.d.ts +46 -0
  176. package/dist/esm/sdk/models/shared/sitelandlistresponse.d.ts.map +1 -0
  177. package/dist/esm/sdk/models/shared/sitelandlistresponse.js +32 -0
  178. package/dist/esm/sdk/models/shared/sitelandlistresponse.js.map +1 -0
  179. package/dist/esm/sdk/models/shared/sitelandprofile.d.ts +74 -0
  180. package/dist/esm/sdk/models/shared/sitelandprofile.d.ts.map +1 -0
  181. package/dist/esm/sdk/models/shared/sitelandprofile.js +33 -0
  182. package/dist/esm/sdk/models/shared/sitelandprofile.js.map +1 -0
  183. package/dist/esm/sdk/models/shared/sitelandshare.d.ts +25 -0
  184. package/dist/esm/sdk/models/shared/sitelandshare.d.ts.map +1 -0
  185. package/dist/esm/sdk/models/shared/sitelandshare.js +16 -0
  186. package/dist/esm/sdk/models/shared/sitelandshare.js.map +1 -0
  187. package/dist/esm/sdk/models/shared/sitequeryrequest.d.ts +2 -2
  188. package/dist/esm/sdk/models/shared/sitetags.d.ts +4 -0
  189. package/dist/esm/sdk/models/shared/sitetags.d.ts.map +1 -1
  190. package/dist/esm/sdk/models/shared/sitetags.js +1 -0
  191. package/dist/esm/sdk/models/shared/sitetags.js.map +1 -1
  192. package/dist/esm/sdk/sites.d.ts +9 -2
  193. package/dist/esm/sdk/sites.d.ts.map +1 -1
  194. package/dist/esm/sdk/sites.js +12 -2
  195. package/dist/esm/sdk/sites.js.map +1 -1
  196. package/package.json +1 -1
  197. package/src/funcs/sitesGet.ts +7 -2
  198. package/src/funcs/sitesGetLand.ts +213 -0
  199. package/src/funcs/sitesSearch.ts +1 -1
  200. package/src/lib/config.ts +3 -3
  201. package/src/sdk/models/errors/getsiteland.ts +770 -0
  202. package/src/sdk/models/errors/index.ts +1 -0
  203. package/src/sdk/models/operations/getsitebyid.ts +6 -0
  204. package/src/sdk/models/operations/getsiteland.ts +52 -0
  205. package/src/sdk/models/operations/index.ts +1 -0
  206. package/src/sdk/models/shared/building.ts +11 -11
  207. package/src/sdk/models/shared/index.ts +11 -0
  208. package/src/sdk/models/shared/site.ts +95 -17
  209. package/src/sdk/models/shared/sitebuilding.ts +288 -0
  210. package/src/sdk/models/shared/sitebuildingcount.ts +39 -0
  211. package/src/sdk/models/shared/sitebuildingprofile.ts +140 -0
  212. package/src/sdk/models/shared/siteconstraintflags.ts +57 -0
  213. package/src/sdk/models/shared/siteconstraintlayer.ts +74 -0
  214. package/src/sdk/models/shared/siteconstraints.ts +64 -0
  215. package/src/sdk/models/shared/siteconstraintunmeasured.ts +83 -0
  216. package/src/sdk/models/shared/sitelandfeature.ts +145 -0
  217. package/src/sdk/models/shared/sitelandlistresponse.ts +86 -0
  218. package/src/sdk/models/shared/sitelandprofile.ts +110 -0
  219. package/src/sdk/models/shared/sitelandshare.ts +49 -0
  220. package/src/sdk/models/shared/sitequeryrequest.ts +2 -2
  221. package/src/sdk/models/shared/sitetags.ts +5 -0
  222. package/src/sdk/sites.ts +20 -2
@@ -0,0 +1,83 @@
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 { OpenEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The flag that is null.
14
+ */
15
+ export const Flag = {
16
+ GreenBelt: "greenBelt",
17
+ ConservationArea: "conservationArea",
18
+ Sssi: "sssi",
19
+ ListedBuildingCurtilage: "listedBuildingCurtilage",
20
+ Brownfield: "brownfield",
21
+ } as const;
22
+ /**
23
+ * The flag that is null.
24
+ */
25
+ export type Flag = OpenEnum<typeof Flag>;
26
+
27
+ /**
28
+ * Why the flag was not measured: `outside_source_coverage` when the title lies outside the nations the data covers, `authority_not_in_source` when the title's planning authority has published no feature to the data, `partial_source_coverage` when the data covers only part of its nation, or `source_not_held` when no data for the layer is held.
29
+ */
30
+ export const SiteConstraintUnmeasuredReason = {
31
+ OutsideSourceCoverage: "outside_source_coverage",
32
+ AuthorityNotInSource: "authority_not_in_source",
33
+ PartialSourceCoverage: "partial_source_coverage",
34
+ SourceNotHeld: "source_not_held",
35
+ } as const;
36
+ /**
37
+ * Why the flag was not measured: `outside_source_coverage` when the title lies outside the nations the data covers, `authority_not_in_source` when the title's planning authority has published no feature to the data, `partial_source_coverage` when the data covers only part of its nation, or `source_not_held` when no data for the layer is held.
38
+ */
39
+ export type SiteConstraintUnmeasuredReason = OpenEnum<
40
+ typeof SiteConstraintUnmeasuredReason
41
+ >;
42
+
43
+ export type SiteConstraintUnmeasured = {
44
+ /**
45
+ * The flag that is null.
46
+ */
47
+ flag?: Flag | undefined;
48
+ /**
49
+ * Why the flag was not measured: `outside_source_coverage` when the title lies outside the nations the data covers, `authority_not_in_source` when the title's planning authority has published no feature to the data, `partial_source_coverage` when the data covers only part of its nation, or `source_not_held` when no data for the layer is held.
50
+ */
51
+ reason?: SiteConstraintUnmeasuredReason | undefined;
52
+ };
53
+
54
+ /** @internal */
55
+ export const Flag$inboundSchema: z.ZodType<Flag, z.ZodTypeDef, unknown> =
56
+ openEnums.inboundSchema(Flag);
57
+
58
+ /** @internal */
59
+ export const SiteConstraintUnmeasuredReason$inboundSchema: z.ZodType<
60
+ SiteConstraintUnmeasuredReason,
61
+ z.ZodTypeDef,
62
+ unknown
63
+ > = openEnums.inboundSchema(SiteConstraintUnmeasuredReason);
64
+
65
+ /** @internal */
66
+ export const SiteConstraintUnmeasured$inboundSchema: z.ZodType<
67
+ SiteConstraintUnmeasured,
68
+ z.ZodTypeDef,
69
+ unknown
70
+ > = z.object({
71
+ flag: Flag$inboundSchema.optional(),
72
+ reason: SiteConstraintUnmeasuredReason$inboundSchema.optional(),
73
+ });
74
+
75
+ export function siteConstraintUnmeasuredFromJSON(
76
+ jsonString: string,
77
+ ): SafeParseResult<SiteConstraintUnmeasured, SDKValidationError> {
78
+ return safeParse(
79
+ jsonString,
80
+ (x) => SiteConstraintUnmeasured$inboundSchema.parse(JSON.parse(x)),
81
+ `Failed to parse 'SiteConstraintUnmeasured' from JSON`,
82
+ );
83
+ }
@@ -0,0 +1,145 @@
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
+
11
+ /**
12
+ * Geometry type discriminator. Always `Polygon`.
13
+ */
14
+ export const SiteLandFeatureType = {
15
+ Polygon: "Polygon",
16
+ } as const;
17
+ /**
18
+ * Geometry type discriminator. Always `Polygon`.
19
+ */
20
+ export type SiteLandFeatureType = ClosedEnum<typeof SiteLandFeatureType>;
21
+
22
+ /**
23
+ * The whole polygon as published, in WGS84 with positions as [longitude, latitude]. It can extend beyond the title boundary; `areaOnTitleSqm` measures only the part within it. Left out by default; request it with `attributes=geometry`.
24
+ */
25
+ export type GeoJSONPolygon = {
26
+ /**
27
+ * 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.
28
+ */
29
+ coordinates: Array<Array<Array<number>>>;
30
+ /**
31
+ * Geometry type discriminator. Always `Polygon`.
32
+ */
33
+ type: SiteLandFeatureType;
34
+ };
35
+
36
+ export type SiteLandFeature = {
37
+ /**
38
+ * Area of the polygon that lies within the title boundary, in square metres, to one decimal place.
39
+ */
40
+ areaOnTitleSqm: number;
41
+ /**
42
+ * Release date of the Ordnance Survey version the polygon was read from, as an ISO 8601 timestamp.
43
+ */
44
+ asOf: string;
45
+ /**
46
+ * Ordnance Survey land cover of the polygon (tier B), as published. The set of values is open.
47
+ */
48
+ cover: string;
49
+ /**
50
+ * Ordnance Survey land cover group the `cover` value belongs to (tier A), as published.
51
+ */
52
+ coverGroup: string;
53
+ /**
54
+ * Ordnance Survey description of the feature, as published.
55
+ */
56
+ description: string;
57
+ /**
58
+ * The whole polygon as published, in WGS84 with positions as [longitude, latitude]. It can extend beyond the title boundary; `areaOnTitleSqm` measures only the part within it. Left out by default; request it with `attributes=geometry`.
59
+ */
60
+ geometry?: GeoJSONPolygon | undefined;
61
+ /**
62
+ * Identifier of the land polygon: `GB:NGD:` followed by its Ordnance Survey feature identifier.
63
+ */
64
+ id: string;
65
+ /**
66
+ * True when Ordnance Survey records the polygon's land cover as obscured.
67
+ */
68
+ isObscured: boolean;
69
+ /**
70
+ * True when Ordnance Survey records the polygon as tidal.
71
+ */
72
+ isTidal: boolean;
73
+ /**
74
+ * Ordnance Survey landform of the polygon, such as a pit or quarry, as published. Null when none is recorded.
75
+ */
76
+ landform: string | null;
77
+ /**
78
+ * Kind of feature. Every item is `land` today, and the set of values is open.
79
+ */
80
+ type: string;
81
+ /**
82
+ * Ordnance Survey land use of the polygon (tier A), as published. The set of values is open.
83
+ */
84
+ use: string;
85
+ /**
86
+ * Ordnance Survey detailed land use of the polygon (tier B), as published. Null when none is recorded.
87
+ */
88
+ useDetail: string | null;
89
+ };
90
+
91
+ /** @internal */
92
+ export const SiteLandFeatureType$inboundSchema: z.ZodNativeEnum<
93
+ typeof SiteLandFeatureType
94
+ > = z.nativeEnum(SiteLandFeatureType);
95
+
96
+ /** @internal */
97
+ export const GeoJSONPolygon$inboundSchema: z.ZodType<
98
+ GeoJSONPolygon,
99
+ z.ZodTypeDef,
100
+ unknown
101
+ > = z.object({
102
+ coordinates: z.array(z.array(z.array(z.number()))),
103
+ type: SiteLandFeatureType$inboundSchema,
104
+ });
105
+
106
+ export function geoJSONPolygonFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<GeoJSONPolygon, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => GeoJSONPolygon$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'GeoJSONPolygon' from JSON`,
113
+ );
114
+ }
115
+
116
+ /** @internal */
117
+ export const SiteLandFeature$inboundSchema: z.ZodType<
118
+ SiteLandFeature,
119
+ z.ZodTypeDef,
120
+ unknown
121
+ > = z.object({
122
+ areaOnTitleSqm: z.number(),
123
+ asOf: z.string(),
124
+ cover: z.string(),
125
+ coverGroup: z.string(),
126
+ description: z.string(),
127
+ geometry: z.lazy(() => GeoJSONPolygon$inboundSchema).optional(),
128
+ id: z.string(),
129
+ isObscured: z.boolean(),
130
+ isTidal: z.boolean(),
131
+ landform: z.nullable(z.string()),
132
+ type: z.string(),
133
+ use: z.string(),
134
+ useDetail: z.nullable(z.string()),
135
+ });
136
+
137
+ export function siteLandFeatureFromJSON(
138
+ jsonString: string,
139
+ ): SafeParseResult<SiteLandFeature, SDKValidationError> {
140
+ return safeParse(
141
+ jsonString,
142
+ (x) => SiteLandFeature$inboundSchema.parse(JSON.parse(x)),
143
+ `Failed to parse 'SiteLandFeature' from JSON`,
144
+ );
145
+ }
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ SiteLandFeature,
13
+ SiteLandFeature$inboundSchema,
14
+ } from "./sitelandfeature.js";
15
+
16
+ /**
17
+ * Object type discriminator. Always `list`.
18
+ */
19
+ export const SiteLandListResponseObject = {
20
+ List: "list",
21
+ } as const;
22
+ /**
23
+ * Object type discriminator. Always `list`.
24
+ */
25
+ export type SiteLandListResponseObject = ClosedEnum<
26
+ typeof SiteLandListResponseObject
27
+ >;
28
+
29
+ /**
30
+ * One page of results, with the metadata needed to fetch the rest.
31
+ */
32
+ export type SiteLandListResponse = {
33
+ /**
34
+ * The items on this page.
35
+ */
36
+ data: Array<SiteLandFeature>;
37
+ /**
38
+ * True when further items exist beyond this page.
39
+ */
40
+ hasMore: boolean;
41
+ /**
42
+ * Object type discriminator. Always `list`.
43
+ */
44
+ object: SiteLandListResponseObject;
45
+ /**
46
+ * Total number of items matching the request across all pages.
47
+ */
48
+ totalCount?: number | undefined;
49
+ /**
50
+ * Path this list was requested from.
51
+ */
52
+ url: string;
53
+ };
54
+
55
+ /** @internal */
56
+ export const SiteLandListResponseObject$inboundSchema: z.ZodNativeEnum<
57
+ typeof SiteLandListResponseObject
58
+ > = z.nativeEnum(SiteLandListResponseObject);
59
+
60
+ /** @internal */
61
+ export const SiteLandListResponse$inboundSchema: z.ZodType<
62
+ SiteLandListResponse,
63
+ z.ZodTypeDef,
64
+ unknown
65
+ > = z.object({
66
+ data: z.array(SiteLandFeature$inboundSchema),
67
+ has_more: z.boolean(),
68
+ object: SiteLandListResponseObject$inboundSchema,
69
+ total_count: z.number().optional(),
70
+ url: z.string(),
71
+ }).transform((v) => {
72
+ return remap$(v, {
73
+ "has_more": "hasMore",
74
+ "total_count": "totalCount",
75
+ });
76
+ });
77
+
78
+ export function siteLandListResponseFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<SiteLandListResponse, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => SiteLandListResponse$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'SiteLandListResponse' from JSON`,
85
+ );
86
+ }
@@ -0,0 +1,110 @@
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 { SiteLandShare, SiteLandShare$inboundSchema } from "./sitelandshare.js";
11
+
12
+ /**
13
+ * Dataset the profile is computed from. Always `os_ngd_land`.
14
+ */
15
+ export const SiteLandProfileSource = {
16
+ OsNgdLand: "os_ngd_land",
17
+ } as const;
18
+ /**
19
+ * Dataset the profile is computed from. Always `os_ngd_land`.
20
+ */
21
+ export type SiteLandProfileSource = ClosedEnum<typeof SiteLandProfileSource>;
22
+
23
+ /**
24
+ * Land cover and use composition of the title, measured on the title boundary. Requires the `osNgdAccess` permission on the licence, and is left out of the response without it.
25
+ */
26
+ export type SiteLandProfile = {
27
+ /**
28
+ * Release date of the Ordnance Survey version the profile was computed from, as an ISO 8601 timestamp.
29
+ */
30
+ asOf?: string | undefined;
31
+ /**
32
+ * The title's land area by Ordnance Survey land cover class, largest first.
33
+ */
34
+ cover?: Array<SiteLandShare> | undefined;
35
+ /**
36
+ * Share of the title area covered by land polygons, from 0 to 100. Building footprints are a separate feature type and are measured in `buildingProfile`, so a built title is rarely fully covered.
37
+ */
38
+ coveredPct?: number | undefined;
39
+ /**
40
+ * Share of the title's land area that is a made surface, from 0 to 100.
41
+ */
42
+ madeSurfacePct?: number | undefined;
43
+ /**
44
+ * Area of the title whose land cover is a made surface, such as paving or hard standing, in square metres. Building footprints are not included.
45
+ */
46
+ madeSurfaceSqm?: number | undefined;
47
+ /**
48
+ * Area of the title whose land cover is recorded as obscured, in square metres.
49
+ */
50
+ obscuredSqm?: number | undefined;
51
+ /**
52
+ * Identifier of that Ordnance Survey release.
53
+ */
54
+ osVersion?: string | undefined;
55
+ /**
56
+ * Number of land polygons that cover part of the title.
57
+ */
58
+ polygonCount?: number | undefined;
59
+ /**
60
+ * Dataset the profile is computed from. Always `os_ngd_land`.
61
+ */
62
+ source?: SiteLandProfileSource | undefined;
63
+ /**
64
+ * Area of the title that is tidal, in square metres.
65
+ */
66
+ tidalSqm?: number | undefined;
67
+ /**
68
+ * Area of the title covered by land polygons, in square metres.
69
+ */
70
+ totalSqm?: number | undefined;
71
+ /**
72
+ * The title's land area by Ordnance Survey land use class, largest first.
73
+ */
74
+ use?: Array<SiteLandShare> | undefined;
75
+ };
76
+
77
+ /** @internal */
78
+ export const SiteLandProfileSource$inboundSchema: z.ZodNativeEnum<
79
+ typeof SiteLandProfileSource
80
+ > = z.nativeEnum(SiteLandProfileSource);
81
+
82
+ /** @internal */
83
+ export const SiteLandProfile$inboundSchema: z.ZodType<
84
+ SiteLandProfile,
85
+ z.ZodTypeDef,
86
+ unknown
87
+ > = z.object({
88
+ asOf: z.string().optional(),
89
+ cover: z.array(SiteLandShare$inboundSchema).optional(),
90
+ coveredPct: z.number().optional(),
91
+ madeSurfacePct: z.number().optional(),
92
+ madeSurfaceSqm: z.number().optional(),
93
+ obscuredSqm: z.number().optional(),
94
+ osVersion: z.string().optional(),
95
+ polygonCount: z.number().int().optional(),
96
+ source: SiteLandProfileSource$inboundSchema.optional(),
97
+ tidalSqm: z.number().optional(),
98
+ totalSqm: z.number().optional(),
99
+ use: z.array(SiteLandShare$inboundSchema).optional(),
100
+ });
101
+
102
+ export function siteLandProfileFromJSON(
103
+ jsonString: string,
104
+ ): SafeParseResult<SiteLandProfile, SDKValidationError> {
105
+ return safeParse(
106
+ jsonString,
107
+ (x) => SiteLandProfile$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'SiteLandProfile' from JSON`,
109
+ );
110
+ }
@@ -0,0 +1,49 @@
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 SiteLandShare = {
11
+ /**
12
+ * Area of the title carrying this class, in square metres.
13
+ */
14
+ areaSqm?: number | undefined;
15
+ /**
16
+ * The broader Ordnance Survey land cover group the class belongs to. Present on cover shares only.
17
+ */
18
+ group?: string | undefined;
19
+ /**
20
+ * Share of the title's land area carrying this class, from 0 to 100.
21
+ */
22
+ pct?: number | undefined;
23
+ /**
24
+ * The Ordnance Survey land cover or land use class this share is keyed by, as published.
25
+ */
26
+ value?: string | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const SiteLandShare$inboundSchema: z.ZodType<
31
+ SiteLandShare,
32
+ z.ZodTypeDef,
33
+ unknown
34
+ > = z.object({
35
+ areaSqm: z.number().optional(),
36
+ group: z.string().optional(),
37
+ pct: z.number().optional(),
38
+ value: z.string().optional(),
39
+ });
40
+
41
+ export function siteLandShareFromJSON(
42
+ jsonString: string,
43
+ ): SafeParseResult<SiteLandShare, SDKValidationError> {
44
+ return safeParse(
45
+ jsonString,
46
+ (x) => SiteLandShare$inboundSchema.parse(JSON.parse(x)),
47
+ `Failed to parse 'SiteLandShare' from JSON`,
48
+ );
49
+ }
@@ -21,7 +21,7 @@ import {
21
21
  } from "./sitequeryoperator.js";
22
22
 
23
23
  /**
24
- * Fields to return, either as an array of names or as one comma-separated string such as "siteId,tenureType,areaSqm". Defaults to a standard set that leaves out the `boundary` geometry; name `boundary` to get site polygons back.
24
+ * Fields to return, either as an array of names or as one comma-separated string such as "siteId,tenureType,areaSqm". Defaults to a standard set that leaves out the `boundary` geometry and the per-building lists; name `boundary` to get site polygons back, `buildings` for the summary of every building on the title, or `buildingIds` for their identifiers alone.
25
25
  */
26
26
  export type SiteQueryRequestAttributes = string | Array<string>;
27
27
 
@@ -149,7 +149,7 @@ export type SiteQueryRequest = {
149
149
  */
150
150
  area?: Array<SiteAreaFilter> | undefined;
151
151
  /**
152
- * Fields to return, either as an array of names or as one comma-separated string such as "siteId,tenureType,areaSqm". Defaults to a standard set that leaves out the `boundary` geometry; name `boundary` to get site polygons back.
152
+ * Fields to return, either as an array of names or as one comma-separated string such as "siteId,tenureType,areaSqm". Defaults to a standard set that leaves out the `boundary` geometry and the per-building lists; name `boundary` to get site polygons back, `buildings` for the summary of every building on the title, or `buildingIds` for their identifiers alone.
153
153
  */
154
154
  attributes?: string | Array<string> | undefined;
155
155
  /**
@@ -15,6 +15,10 @@ export type SiteTags = {
15
15
  * True when the site's land use includes agricultural land.
16
16
  */
17
17
  agricultural?: boolean | undefined;
18
+ /**
19
+ * Whether the title is on brownfield land, the same value as `constraints.flags.brownfield`. Null when brownfield land was not measured on the title; `constraints.unmeasured` says why.
20
+ */
21
+ brownfield?: boolean | null | undefined;
18
22
  /**
19
23
  * True when more than one property is linked to this site.
20
24
  */
@@ -36,6 +40,7 @@ export const SiteTags$inboundSchema: z.ZodType<
36
40
  unknown
37
41
  > = z.object({
38
42
  agricultural: z.boolean().optional(),
43
+ brownfield: z.nullable(z.boolean()).optional(),
39
44
  multipleProperties: z.boolean().optional(),
40
45
  noProperties: z.boolean().optional(),
41
46
  vacant: z.boolean().optional(),
package/src/sdk/sites.ts CHANGED
@@ -7,6 +7,7 @@ import { sitesFindByIds } from "../funcs/sitesFindByIds.js";
7
7
  import { sitesFindByPoint } from "../funcs/sitesFindByPoint.js";
8
8
  import { sitesFindByProperty } from "../funcs/sitesFindByProperty.js";
9
9
  import { sitesGet } from "../funcs/sitesGet.js";
10
+ import { sitesGetLand } from "../funcs/sitesGetLand.js";
10
11
  import { sitesGetProperties } from "../funcs/sitesGetProperties.js";
11
12
  import { sitesGetTiles } from "../funcs/sitesGetTiles.js";
12
13
  import { sitesSearch } from "../funcs/sitesSearch.js";
@@ -88,7 +89,7 @@ export class Sites extends ClientSDK {
88
89
  * Get site by ID
89
90
  *
90
91
  * @remarks
91
- * Retrieve one registered title by its identifier, which joins the country, the registry and the title number with colons, as in `GB:LR:AGL123456`. This endpoint returns every attribute, including the boundary geometry, ownership, property statistics, planning statistics and area metrics.
92
+ * Retrieve one registered title by its identifier, which joins the country, the registry and the title number with colons, as in `GB:LR:AGL123456`. This endpoint returns every attribute, including the boundary geometry, ownership, property statistics, planning statistics and area metrics, except the per-building lists: pass `attributes=buildings` to add the summary of every building on the title, or `attributes=buildingIds` for their identifiers alone.
92
93
  */
93
94
  async get(
94
95
  request: operations.GetSiteByIdRequest,
@@ -101,6 +102,23 @@ export class Sites extends ClientSDK {
101
102
  ));
102
103
  }
103
104
 
105
+ /**
106
+ * Get land polygons in site
107
+ *
108
+ * @remarks
109
+ * List the Ordnance Survey land polygons that cover part of one registered title, each with its land cover, land use, landform and the area of it that lies within the title. This is the per-polygon detail behind the site's `landProfile`, measured on the title boundary in the same way, read from the current Ordnance Survey release rather than from the stored profile. Polygons come back in order of identifier, so `limit` and `offset` page through them. Each polygon appears on exactly one page while the Ordnance Survey release stays the same; a new release published between two page requests can move a polygon across a page boundary. The polygon boundary is left out by default because of its size; pass `attributes=geometry` to get it. Requires the `osNgdAccess` permission on the licence.
110
+ */
111
+ async getLand(
112
+ request: operations.GetSiteLandRequest,
113
+ options?: RequestOptions,
114
+ ): Promise<shared.SiteLandListResponse> {
115
+ return unwrapAsync(sitesGetLand(
116
+ this,
117
+ request,
118
+ options,
119
+ ));
120
+ }
121
+
104
122
  /**
105
123
  * Get properties in site
106
124
  *
@@ -139,7 +157,7 @@ export class Sites extends ClientSDK {
139
157
  * Search sites
140
158
  *
141
159
  * @remarks
142
- * Search registered titles by their attributes, by geographic area, or by both, with sorting and pagination. Area filters accept a polygon, a multi-polygon, a point with a radius, a point the boundary must enclose, or a bounding box; a site matches the area clause if it satisfies any one of the filters supplied, and that has to hold on top of `filters` and `query`. The `boundary` geometry is left out by default because of its size, so pass `attributes: ["boundary"]` to get site polygons back. Up to 1000 sites come back per request, from an offset of at most 100000.
160
+ * Search registered titles by their attributes, by geographic area, or by both, with sorting and pagination. Area filters accept a polygon, a multi-polygon, a point with a radius, a point the boundary must enclose, or a bounding box; a site matches the area clause if it satisfies any one of the filters supplied, and that has to hold on top of `filters` and `query`. The `boundary` geometry is left out by default because of its size, so pass `attributes: ["boundary"]` to get site polygons back; likewise pass `attributes: ["buildings"]` for the summary of every building on each title. Up to 1000 sites come back per request, from an offset of at most 100000.
143
161
  */
144
162
  async search(
145
163
  request?: shared.SiteQueryRequest | undefined,