@vepler/sdk 2.12.0 → 2.20.2

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 (236) hide show
  1. package/README.md +26 -14
  2. package/dist/commonjs/funcs/councilsGet.d.ts +17 -0
  3. package/dist/commonjs/funcs/councilsGet.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/councilsGet.js +119 -0
  5. package/dist/commonjs/funcs/councilsGet.js.map +1 -0
  6. package/dist/commonjs/funcs/councilsList.d.ts +17 -0
  7. package/dist/commonjs/funcs/councilsList.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/councilsList.js +119 -0
  9. package/dist/commonjs/funcs/councilsList.js.map +1 -0
  10. package/dist/commonjs/funcs/epcGetByLocationId.d.ts +17 -0
  11. package/dist/commonjs/funcs/epcGetByLocationId.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/epcGetByLocationId.js +124 -0
  13. package/dist/commonjs/funcs/epcGetByLocationId.js.map +1 -0
  14. package/dist/commonjs/lib/config.d.ts +4 -4
  15. package/dist/commonjs/lib/config.js +4 -4
  16. package/dist/commonjs/sdk/councils.d.ts +19 -0
  17. package/dist/commonjs/sdk/councils.d.ts.map +1 -0
  18. package/dist/commonjs/sdk/councils.js +32 -0
  19. package/dist/commonjs/sdk/councils.js.map +1 -0
  20. package/dist/commonjs/sdk/epc.d.ts +12 -0
  21. package/dist/commonjs/sdk/epc.d.ts.map +1 -0
  22. package/dist/commonjs/sdk/epc.js +22 -0
  23. package/dist/commonjs/sdk/epc.js.map +1 -0
  24. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.d.ts +19 -0
  25. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.d.ts.map +1 -0
  26. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.js +60 -0
  27. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.js.map +1 -0
  28. package/dist/commonjs/sdk/models/operations/getepcbylocationid.d.ts +562 -0
  29. package/dist/commonjs/sdk/models/operations/getepcbylocationid.d.ts.map +1 -0
  30. package/dist/commonjs/sdk/models/operations/getepcbylocationid.js +276 -0
  31. package/dist/commonjs/sdk/models/operations/getepcbylocationid.js.map +1 -0
  32. package/dist/commonjs/sdk/models/operations/getlistingbyid.d.ts +2 -2
  33. package/dist/commonjs/sdk/models/operations/getlistingbyid.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/models/operations/getlistingsbylocation.d.ts +2 -2
  35. package/dist/commonjs/sdk/models/operations/getlistingsbylocation.d.ts.map +1 -1
  36. package/dist/commonjs/sdk/models/operations/getnearestpoi.d.ts +4 -4
  37. package/dist/commonjs/sdk/models/operations/getnearestpoi.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/models/operations/getnearestpoi.js +6 -6
  39. package/dist/commonjs/sdk/models/operations/getnearestpoi.js.map +1 -1
  40. package/dist/commonjs/sdk/models/operations/index.d.ts +3 -0
  41. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/models/operations/index.js +3 -0
  43. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  44. package/dist/commonjs/sdk/models/operations/listcouncils.d.ts +78 -0
  45. package/dist/commonjs/sdk/models/operations/listcouncils.d.ts.map +1 -0
  46. package/dist/commonjs/sdk/models/operations/listcouncils.js +96 -0
  47. package/dist/commonjs/sdk/models/operations/listcouncils.js.map +1 -0
  48. package/dist/commonjs/sdk/models/operations/querylistings.d.ts +2 -2
  49. package/dist/commonjs/sdk/models/operations/querylistings.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/models/operations/querylistingsbysource.d.ts +2 -2
  51. package/dist/commonjs/sdk/models/operations/querylistingsbysource.d.ts.map +1 -1
  52. package/dist/commonjs/sdk/models/operations/resolveaddress.d.ts +154 -4
  53. package/dist/commonjs/sdk/models/operations/resolveaddress.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/models/operations/resolveaddress.js +83 -2
  55. package/dist/commonjs/sdk/models/operations/resolveaddress.js.map +1 -1
  56. package/dist/commonjs/sdk/models/shared/council.d.ts +131 -0
  57. package/dist/commonjs/sdk/models/shared/council.d.ts.map +1 -0
  58. package/dist/commonjs/sdk/models/shared/council.js +115 -0
  59. package/dist/commonjs/sdk/models/shared/council.js.map +1 -0
  60. package/dist/commonjs/sdk/models/shared/councilbranding.d.ts +32 -0
  61. package/dist/commonjs/sdk/models/shared/councilbranding.d.ts.map +1 -0
  62. package/dist/commonjs/sdk/models/shared/councilbranding.js +65 -0
  63. package/dist/commonjs/sdk/models/shared/councilbranding.js.map +1 -0
  64. package/dist/commonjs/sdk/models/shared/councilcontactdetails.d.ts +47 -0
  65. package/dist/commonjs/sdk/models/shared/councilcontactdetails.d.ts.map +1 -0
  66. package/dist/commonjs/sdk/models/shared/councilcontactdetails.js +79 -0
  67. package/dist/commonjs/sdk/models/shared/councilcontactdetails.js.map +1 -0
  68. package/dist/commonjs/sdk/models/shared/councilerrorresponse.d.ts +29 -0
  69. package/dist/commonjs/sdk/models/shared/councilerrorresponse.d.ts.map +1 -0
  70. package/dist/commonjs/sdk/models/shared/councilerrorresponse.js +70 -0
  71. package/dist/commonjs/sdk/models/shared/councilerrorresponse.js.map +1 -0
  72. package/dist/commonjs/sdk/models/shared/councillistresponse.d.ts +43 -0
  73. package/dist/commonjs/sdk/models/shared/councillistresponse.d.ts.map +1 -0
  74. package/dist/commonjs/sdk/models/shared/councillistresponse.js +69 -0
  75. package/dist/commonjs/sdk/models/shared/councillistresponse.js.map +1 -0
  76. package/dist/commonjs/sdk/models/shared/councilmetadata.d.ts +34 -0
  77. package/dist/commonjs/sdk/models/shared/councilmetadata.d.ts.map +1 -0
  78. package/dist/commonjs/sdk/models/shared/councilmetadata.js +59 -0
  79. package/dist/commonjs/sdk/models/shared/councilmetadata.js.map +1 -0
  80. package/dist/commonjs/sdk/models/shared/councilserviceurls.d.ts +26 -0
  81. package/dist/commonjs/sdk/models/shared/councilserviceurls.d.ts.map +1 -0
  82. package/dist/commonjs/sdk/models/shared/councilserviceurls.js +60 -0
  83. package/dist/commonjs/sdk/models/shared/councilserviceurls.js.map +1 -0
  84. package/dist/commonjs/sdk/models/shared/index.d.ts +7 -0
  85. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  86. package/dist/commonjs/sdk/models/shared/index.js +7 -0
  87. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  88. package/dist/commonjs/sdk/models/shared/listing.d.ts +8 -8
  89. package/dist/commonjs/sdk/models/shared/listing.d.ts.map +1 -1
  90. package/dist/commonjs/sdk/models/shared/listing.js +8 -8
  91. package/dist/commonjs/sdk/models/shared/listing.js.map +1 -1
  92. package/dist/commonjs/sdk/models/shared/propertyaddress.d.ts +1 -1
  93. package/dist/commonjs/sdk/models/shared/propertyaddress.d.ts.map +1 -1
  94. package/dist/commonjs/sdk/models/shared/school.d.ts +8 -8
  95. package/dist/commonjs/sdk/models/shared/school.d.ts.map +1 -1
  96. package/dist/commonjs/sdk/models/shared/school.js +9 -10
  97. package/dist/commonjs/sdk/models/shared/school.js.map +1 -1
  98. package/dist/commonjs/sdk/models/shared/streetdescriptor.d.ts +1 -1
  99. package/dist/commonjs/sdk/models/shared/streetdescriptor.d.ts.map +1 -1
  100. package/dist/commonjs/sdk/sdk.d.ts +6 -0
  101. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  102. package/dist/commonjs/sdk/sdk.js +8 -0
  103. package/dist/commonjs/sdk/sdk.js.map +1 -1
  104. package/dist/esm/funcs/councilsGet.d.ts +17 -0
  105. package/dist/esm/funcs/councilsGet.d.ts.map +1 -0
  106. package/dist/esm/funcs/councilsGet.js +83 -0
  107. package/dist/esm/funcs/councilsGet.js.map +1 -0
  108. package/dist/esm/funcs/councilsList.d.ts +17 -0
  109. package/dist/esm/funcs/councilsList.d.ts.map +1 -0
  110. package/dist/esm/funcs/councilsList.js +83 -0
  111. package/dist/esm/funcs/councilsList.js.map +1 -0
  112. package/dist/esm/funcs/epcGetByLocationId.d.ts +17 -0
  113. package/dist/esm/funcs/epcGetByLocationId.d.ts.map +1 -0
  114. package/dist/esm/funcs/epcGetByLocationId.js +88 -0
  115. package/dist/esm/funcs/epcGetByLocationId.js.map +1 -0
  116. package/dist/esm/lib/config.d.ts +4 -4
  117. package/dist/esm/lib/config.js +4 -4
  118. package/dist/esm/sdk/councils.d.ts +19 -0
  119. package/dist/esm/sdk/councils.d.ts.map +1 -0
  120. package/dist/esm/sdk/councils.js +28 -0
  121. package/dist/esm/sdk/councils.js.map +1 -0
  122. package/dist/esm/sdk/epc.d.ts +12 -0
  123. package/dist/esm/sdk/epc.d.ts.map +1 -0
  124. package/dist/esm/sdk/epc.js +18 -0
  125. package/dist/esm/sdk/epc.js.map +1 -0
  126. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.d.ts +19 -0
  127. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.d.ts.map +1 -0
  128. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.js +22 -0
  129. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.js.map +1 -0
  130. package/dist/esm/sdk/models/operations/getepcbylocationid.d.ts +562 -0
  131. package/dist/esm/sdk/models/operations/getepcbylocationid.d.ts.map +1 -0
  132. package/dist/esm/sdk/models/operations/getepcbylocationid.js +229 -0
  133. package/dist/esm/sdk/models/operations/getepcbylocationid.js.map +1 -0
  134. package/dist/esm/sdk/models/operations/getlistingbyid.d.ts +2 -2
  135. package/dist/esm/sdk/models/operations/getlistingbyid.d.ts.map +1 -1
  136. package/dist/esm/sdk/models/operations/getlistingsbylocation.d.ts +2 -2
  137. package/dist/esm/sdk/models/operations/getlistingsbylocation.d.ts.map +1 -1
  138. package/dist/esm/sdk/models/operations/getnearestpoi.d.ts +4 -4
  139. package/dist/esm/sdk/models/operations/getnearestpoi.d.ts.map +1 -1
  140. package/dist/esm/sdk/models/operations/getnearestpoi.js +4 -4
  141. package/dist/esm/sdk/models/operations/getnearestpoi.js.map +1 -1
  142. package/dist/esm/sdk/models/operations/index.d.ts +3 -0
  143. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  144. package/dist/esm/sdk/models/operations/index.js +3 -0
  145. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  146. package/dist/esm/sdk/models/operations/listcouncils.d.ts +78 -0
  147. package/dist/esm/sdk/models/operations/listcouncils.d.ts.map +1 -0
  148. package/dist/esm/sdk/models/operations/listcouncils.js +58 -0
  149. package/dist/esm/sdk/models/operations/listcouncils.js.map +1 -0
  150. package/dist/esm/sdk/models/operations/querylistings.d.ts +2 -2
  151. package/dist/esm/sdk/models/operations/querylistings.d.ts.map +1 -1
  152. package/dist/esm/sdk/models/operations/querylistingsbysource.d.ts +2 -2
  153. package/dist/esm/sdk/models/operations/querylistingsbysource.d.ts.map +1 -1
  154. package/dist/esm/sdk/models/operations/resolveaddress.d.ts +154 -4
  155. package/dist/esm/sdk/models/operations/resolveaddress.d.ts.map +1 -1
  156. package/dist/esm/sdk/models/operations/resolveaddress.js +79 -1
  157. package/dist/esm/sdk/models/operations/resolveaddress.js.map +1 -1
  158. package/dist/esm/sdk/models/shared/council.d.ts +131 -0
  159. package/dist/esm/sdk/models/shared/council.d.ts.map +1 -0
  160. package/dist/esm/sdk/models/shared/council.js +78 -0
  161. package/dist/esm/sdk/models/shared/council.js.map +1 -0
  162. package/dist/esm/sdk/models/shared/councilbranding.d.ts +32 -0
  163. package/dist/esm/sdk/models/shared/councilbranding.d.ts.map +1 -0
  164. package/dist/esm/sdk/models/shared/councilbranding.js +27 -0
  165. package/dist/esm/sdk/models/shared/councilbranding.js.map +1 -0
  166. package/dist/esm/sdk/models/shared/councilcontactdetails.d.ts +47 -0
  167. package/dist/esm/sdk/models/shared/councilcontactdetails.d.ts.map +1 -0
  168. package/dist/esm/sdk/models/shared/councilcontactdetails.js +40 -0
  169. package/dist/esm/sdk/models/shared/councilcontactdetails.js.map +1 -0
  170. package/dist/esm/sdk/models/shared/councilerrorresponse.d.ts +29 -0
  171. package/dist/esm/sdk/models/shared/councilerrorresponse.d.ts.map +1 -0
  172. package/dist/esm/sdk/models/shared/councilerrorresponse.js +32 -0
  173. package/dist/esm/sdk/models/shared/councilerrorresponse.js.map +1 -0
  174. package/dist/esm/sdk/models/shared/councillistresponse.d.ts +43 -0
  175. package/dist/esm/sdk/models/shared/councillistresponse.d.ts.map +1 -0
  176. package/dist/esm/sdk/models/shared/councillistresponse.js +32 -0
  177. package/dist/esm/sdk/models/shared/councillistresponse.js.map +1 -0
  178. package/dist/esm/sdk/models/shared/councilmetadata.d.ts +34 -0
  179. package/dist/esm/sdk/models/shared/councilmetadata.d.ts.map +1 -0
  180. package/dist/esm/sdk/models/shared/councilmetadata.js +22 -0
  181. package/dist/esm/sdk/models/shared/councilmetadata.js.map +1 -0
  182. package/dist/esm/sdk/models/shared/councilserviceurls.d.ts +26 -0
  183. package/dist/esm/sdk/models/shared/councilserviceurls.d.ts.map +1 -0
  184. package/dist/esm/sdk/models/shared/councilserviceurls.js +23 -0
  185. package/dist/esm/sdk/models/shared/councilserviceurls.js.map +1 -0
  186. package/dist/esm/sdk/models/shared/index.d.ts +7 -0
  187. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  188. package/dist/esm/sdk/models/shared/index.js +7 -0
  189. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  190. package/dist/esm/sdk/models/shared/listing.d.ts +8 -8
  191. package/dist/esm/sdk/models/shared/listing.d.ts.map +1 -1
  192. package/dist/esm/sdk/models/shared/listing.js +7 -7
  193. package/dist/esm/sdk/models/shared/listing.js.map +1 -1
  194. package/dist/esm/sdk/models/shared/propertyaddress.d.ts +1 -1
  195. package/dist/esm/sdk/models/shared/propertyaddress.d.ts.map +1 -1
  196. package/dist/esm/sdk/models/shared/school.d.ts +8 -8
  197. package/dist/esm/sdk/models/shared/school.d.ts.map +1 -1
  198. package/dist/esm/sdk/models/shared/school.js +7 -8
  199. package/dist/esm/sdk/models/shared/school.js.map +1 -1
  200. package/dist/esm/sdk/models/shared/streetdescriptor.d.ts +1 -1
  201. package/dist/esm/sdk/models/shared/streetdescriptor.d.ts.map +1 -1
  202. package/dist/esm/sdk/sdk.d.ts +6 -0
  203. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  204. package/dist/esm/sdk/sdk.js +8 -0
  205. package/dist/esm/sdk/sdk.js.map +1 -1
  206. package/jsr.json +1 -1
  207. package/package.json +1 -1
  208. package/src/funcs/councilsGet.ts +167 -0
  209. package/src/funcs/councilsList.ts +167 -0
  210. package/src/funcs/epcGetByLocationId.ts +172 -0
  211. package/src/lib/config.ts +4 -4
  212. package/src/sdk/councils.ts +45 -0
  213. package/src/sdk/epc.ts +27 -0
  214. package/src/sdk/models/operations/getcouncilbyproviderid.ts +61 -0
  215. package/src/sdk/models/operations/getepcbylocationid.ts +895 -0
  216. package/src/sdk/models/operations/getlistingbyid.ts +2 -2
  217. package/src/sdk/models/operations/getlistingsbylocation.ts +2 -2
  218. package/src/sdk/models/operations/getnearestpoi.ts +9 -9
  219. package/src/sdk/models/operations/index.ts +3 -0
  220. package/src/sdk/models/operations/listcouncils.ts +131 -0
  221. package/src/sdk/models/operations/querylistings.ts +2 -2
  222. package/src/sdk/models/operations/querylistingsbysource.ts +2 -2
  223. package/src/sdk/models/operations/resolveaddress.ts +232 -5
  224. package/src/sdk/models/shared/council.ts +191 -0
  225. package/src/sdk/models/shared/councilbranding.ts +77 -0
  226. package/src/sdk/models/shared/councilcontactdetails.ts +112 -0
  227. package/src/sdk/models/shared/councilerrorresponse.ts +73 -0
  228. package/src/sdk/models/shared/councillistresponse.ts +80 -0
  229. package/src/sdk/models/shared/councilmetadata.ts +64 -0
  230. package/src/sdk/models/shared/councilserviceurls.ts +57 -0
  231. package/src/sdk/models/shared/index.ts +7 -0
  232. package/src/sdk/models/shared/listing.ts +13 -13
  233. package/src/sdk/models/shared/propertyaddress.ts +1 -1
  234. package/src/sdk/models/shared/school.ts +24 -21
  235. package/src/sdk/models/shared/streetdescriptor.ts +1 -1
  236. package/src/sdk/sdk.ts +12 -0
@@ -119,7 +119,7 @@ export type Address = {
119
119
  /**
120
120
  * Country code
121
121
  */
122
- country?: string | undefined;
122
+ country: string;
123
123
  /**
124
124
  * District
125
125
  */
@@ -568,7 +568,7 @@ export type Data = {
568
568
  /**
569
569
  * Currency code
570
570
  */
571
- currency?: string | undefined;
571
+ currency: string;
572
572
  /**
573
573
  * Formatted display address
574
574
  */
@@ -91,7 +91,7 @@ export type GetListingsByLocationAddress = {
91
91
  /**
92
92
  * Country code
93
93
  */
94
- country?: string | undefined;
94
+ country: string;
95
95
  /**
96
96
  * District
97
97
  */
@@ -548,7 +548,7 @@ export type GetListingsByLocationResult = {
548
548
  /**
549
549
  * Currency code
550
550
  */
551
- currency?: string | undefined;
551
+ currency: string;
552
552
  /**
553
553
  * Formatted display address
554
554
  */
@@ -88,7 +88,7 @@ export type GetNearestPOIType = ClosedEnum<typeof GetNearestPOIType>;
88
88
  /**
89
89
  * GeoJSON Point geometry representing the POI location
90
90
  */
91
- export type Location = {
91
+ export type GetNearestPOILocation = {
92
92
  /**
93
93
  * GeoJSON coordinates [longitude, latitude] in WGS84 (EPSG:4326)
94
94
  */
@@ -122,7 +122,7 @@ export type GetNearestPOIResult = {
122
122
  /**
123
123
  * GeoJSON Point geometry representing the POI location
124
124
  */
125
- location: Location;
125
+ location: GetNearestPOILocation;
126
126
  /**
127
127
  * Name of the point of interest
128
128
  */
@@ -292,8 +292,8 @@ export const GetNearestPOIType$inboundSchema: z.ZodNativeEnum<
292
292
  > = z.nativeEnum(GetNearestPOIType);
293
293
 
294
294
  /** @internal */
295
- export const Location$inboundSchema: z.ZodType<
296
- Location,
295
+ export const GetNearestPOILocation$inboundSchema: z.ZodType<
296
+ GetNearestPOILocation,
297
297
  z.ZodTypeDef,
298
298
  unknown
299
299
  > = z.object({
@@ -301,13 +301,13 @@ export const Location$inboundSchema: z.ZodType<
301
301
  type: GetNearestPOIType$inboundSchema,
302
302
  });
303
303
 
304
- export function locationFromJSON(
304
+ export function getNearestPOILocationFromJSON(
305
305
  jsonString: string,
306
- ): SafeParseResult<Location, SDKValidationError> {
306
+ ): SafeParseResult<GetNearestPOILocation, SDKValidationError> {
307
307
  return safeParse(
308
308
  jsonString,
309
- (x) => Location$inboundSchema.parse(JSON.parse(x)),
310
- `Failed to parse 'Location' from JSON`,
309
+ (x) => GetNearestPOILocation$inboundSchema.parse(JSON.parse(x)),
310
+ `Failed to parse 'GetNearestPOILocation' from JSON`,
311
311
  );
312
312
  }
313
313
 
@@ -321,7 +321,7 @@ export const GetNearestPOIResult$inboundSchema: z.ZodType<
321
321
  categoryId: z.string(),
322
322
  distance: z.number().optional(),
323
323
  id: z.number(),
324
- location: z.lazy(() => Location$inboundSchema),
324
+ location: z.lazy(() => GetNearestPOILocation$inboundSchema),
325
325
  name: z.string(),
326
326
  routingDistance: z.number().optional(),
327
327
  routingDuration: z.number().optional(),
@@ -11,6 +11,8 @@ export * from "./getareaswithinradius.js";
11
11
  export * from "./getborderingareas.js";
12
12
  export * from "./getchildareas.js";
13
13
  export * from "./getconnectivityscores.js";
14
+ export * from "./getcouncilbyproviderid.js";
15
+ export * from "./getepcbylocationid.js";
14
16
  export * from "./getlistingbyid.js";
15
17
  export * from "./getlistingbysource.js";
16
18
  export * from "./getlistingsbylocation.js";
@@ -31,6 +33,7 @@ export * from "./getschoolbyurn.js";
31
33
  export * from "./getschoolmetrics.js";
32
34
  export * from "./getv1safetycrime.js";
33
35
  export * from "./getv1safetycrimestats.js";
36
+ export * from "./listcouncils.js";
34
37
  export * from "./listschools.js";
35
38
  export * from "./predictpropertyvalue.js";
36
39
  export * from "./predictpropertyvaluebylocation.js";
@@ -0,0 +1,131 @@
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 * as shared from "../shared/index.js";
11
+
12
+ /**
13
+ * Filter by country code (GB = Great Britain, IE = Ireland)
14
+ */
15
+ export const Country = {
16
+ Gb: "GB",
17
+ Ie: "IE",
18
+ } as const;
19
+ /**
20
+ * Filter by country code (GB = Great Britain, IE = Ireland)
21
+ */
22
+ export type Country = ClosedEnum<typeof Country>;
23
+
24
+ /**
25
+ * Filter by council status
26
+ */
27
+ export const QueryParamStatus = {
28
+ Active: "active",
29
+ Merged: "merged",
30
+ Abolished: "abolished",
31
+ Inactive: "inactive",
32
+ } as const;
33
+ /**
34
+ * Filter by council status
35
+ */
36
+ export type QueryParamStatus = ClosedEnum<typeof QueryParamStatus>;
37
+
38
+ /**
39
+ * Filter by council type
40
+ */
41
+ export const QueryParamType = {
42
+ Unitary: "unitary",
43
+ Metropolitan: "metropolitan",
44
+ County: "county",
45
+ LondonBorough: "london_borough",
46
+ District: "district",
47
+ LocalAuthority: "local_authority",
48
+ } as const;
49
+ /**
50
+ * Filter by council type
51
+ */
52
+ export type QueryParamType = ClosedEnum<typeof QueryParamType>;
53
+
54
+ export type ListCouncilsRequest = {
55
+ /**
56
+ * Filter by country code (GB = Great Britain, IE = Ireland)
57
+ */
58
+ country?: Country | undefined;
59
+ /**
60
+ * Filter by council status
61
+ */
62
+ status?: QueryParamStatus | undefined;
63
+ /**
64
+ * Filter by council type
65
+ */
66
+ type?: QueryParamType | undefined;
67
+ };
68
+
69
+ export type ListCouncilsResponse =
70
+ | shared.CouncilListResponse
71
+ | shared.CouncilErrorResponse;
72
+
73
+ /** @internal */
74
+ export const Country$outboundSchema: z.ZodNativeEnum<typeof Country> = z
75
+ .nativeEnum(Country);
76
+
77
+ /** @internal */
78
+ export const QueryParamStatus$outboundSchema: z.ZodNativeEnum<
79
+ typeof QueryParamStatus
80
+ > = z.nativeEnum(QueryParamStatus);
81
+
82
+ /** @internal */
83
+ export const QueryParamType$outboundSchema: z.ZodNativeEnum<
84
+ typeof QueryParamType
85
+ > = z.nativeEnum(QueryParamType);
86
+
87
+ /** @internal */
88
+ export type ListCouncilsRequest$Outbound = {
89
+ country?: string | undefined;
90
+ status?: string | undefined;
91
+ type?: string | undefined;
92
+ };
93
+
94
+ /** @internal */
95
+ export const ListCouncilsRequest$outboundSchema: z.ZodType<
96
+ ListCouncilsRequest$Outbound,
97
+ z.ZodTypeDef,
98
+ ListCouncilsRequest
99
+ > = z.object({
100
+ country: Country$outboundSchema.optional(),
101
+ status: QueryParamStatus$outboundSchema.optional(),
102
+ type: QueryParamType$outboundSchema.optional(),
103
+ });
104
+
105
+ export function listCouncilsRequestToJSON(
106
+ listCouncilsRequest: ListCouncilsRequest,
107
+ ): string {
108
+ return JSON.stringify(
109
+ ListCouncilsRequest$outboundSchema.parse(listCouncilsRequest),
110
+ );
111
+ }
112
+
113
+ /** @internal */
114
+ export const ListCouncilsResponse$inboundSchema: z.ZodType<
115
+ ListCouncilsResponse,
116
+ z.ZodTypeDef,
117
+ unknown
118
+ > = z.union([
119
+ shared.CouncilListResponse$inboundSchema,
120
+ shared.CouncilErrorResponse$inboundSchema,
121
+ ]);
122
+
123
+ export function listCouncilsResponseFromJSON(
124
+ jsonString: string,
125
+ ): SafeParseResult<ListCouncilsResponse, SDKValidationError> {
126
+ return safeParse(
127
+ jsonString,
128
+ (x) => ListCouncilsResponse$inboundSchema.parse(JSON.parse(x)),
129
+ `Failed to parse 'ListCouncilsResponse' from JSON`,
130
+ );
131
+ }
@@ -184,7 +184,7 @@ export type QueryListingsAddress = {
184
184
  /**
185
185
  * Country code
186
186
  */
187
- country?: string | undefined;
187
+ country: string;
188
188
  /**
189
189
  * District
190
190
  */
@@ -632,7 +632,7 @@ export type QueryListingsResult = {
632
632
  /**
633
633
  * Currency code
634
634
  */
635
- currency?: string | undefined;
635
+ currency: string;
636
636
  /**
637
637
  * Formatted display address
638
638
  */
@@ -126,7 +126,7 @@ export type QueryListingsBySourceAddress = {
126
126
  /**
127
127
  * Country code
128
128
  */
129
- country?: string | undefined;
129
+ country: string;
130
130
  /**
131
131
  * District
132
132
  */
@@ -587,7 +587,7 @@ export type QueryListingsBySourceResult = {
587
587
  /**
588
588
  * Currency code
589
589
  */
590
- currency?: string | undefined;
590
+ currency: string;
591
591
  /**
592
592
  * Formatted display address
593
593
  */
@@ -97,10 +97,122 @@ export type ResolveAddressAddressResponseBody = {
97
97
  success: boolean;
98
98
  };
99
99
 
100
+ /**
101
+ * Confidence zone: H (High, >66%), M (Medium, 50-66%), L (Low, <50%)
102
+ */
103
+ export const ConfidenceZone = {
104
+ H: "H",
105
+ M: "M",
106
+ L: "L",
107
+ } as const;
108
+ /**
109
+ * Confidence zone: H (High, >66%), M (Medium, 50-66%), L (Low, <50%)
110
+ */
111
+ export type ConfidenceZone = ClosedEnum<typeof ConfidenceZone>;
112
+
113
+ /**
114
+ * Recommended action based on match quality
115
+ */
116
+ export const Action = {
117
+ Accept: "accept",
118
+ Review: "review",
119
+ Reject: "reject",
120
+ } as const;
121
+ /**
122
+ * Recommended action based on match quality
123
+ */
124
+ export type Action = ClosedEnum<typeof Action>;
125
+
126
+ /**
127
+ * Individual factors contributing to quality assessment
128
+ */
129
+ export type Factors = {
130
+ /**
131
+ * Significant confidence gap from second result
132
+ */
133
+ hasClearWinner: boolean;
134
+ /**
135
+ * Top result has high absolute confidence
136
+ */
137
+ hasHighConfidence: boolean;
138
+ /**
139
+ * Building number matched exactly (score = 1.0)
140
+ */
141
+ hasPerfectBuildingMatch: boolean;
142
+ /**
143
+ * Only one candidate found
144
+ */
145
+ isSingleResult: boolean;
146
+ };
147
+
148
+ /**
149
+ * Quality grade: A (excellent), B (good), C (acceptable), D (poor), F (fail)
150
+ */
151
+ export const Grade = {
152
+ A: "A",
153
+ B: "B",
154
+ C: "C",
155
+ D: "D",
156
+ F: "F",
157
+ } as const;
158
+ /**
159
+ * Quality grade: A (excellent), B (good), C (acceptable), D (poor), F (fail)
160
+ */
161
+ export type Grade = ClosedEnum<typeof Grade>;
162
+
163
+ /**
164
+ * Smart match quality evaluation (considers building scores, confidence gaps, unambiguity)
165
+ */
166
+ export type MatchQuality = {
167
+ /**
168
+ * Recommended action based on match quality
169
+ */
170
+ action: Action;
171
+ /**
172
+ * Individual factors contributing to quality assessment
173
+ */
174
+ factors: Factors;
175
+ /**
176
+ * Quality grade: A (excellent), B (good), C (acceptable), D (poor), F (fail)
177
+ */
178
+ grade: Grade;
179
+ /**
180
+ * Whether the match is reliable enough for automatic use
181
+ */
182
+ isReliable: boolean;
183
+ /**
184
+ * Human-readable explanation of the quality assessment
185
+ */
186
+ reason: string;
187
+ /**
188
+ * Confidence gap between top 2 results (0-100)
189
+ */
190
+ unambiguityScore: number;
191
+ };
192
+
193
+ /**
194
+ * ONS AIMS Hopper structural scores
195
+ */
196
+ export type HopperComponents = {
197
+ /**
198
+ * Building score (1.0 = exact number match)
199
+ */
200
+ building: number;
201
+ /**
202
+ * Locality score (street, town, postcode)
203
+ */
204
+ locality: number;
205
+ /**
206
+ * Unit score (flat/sub-building)
207
+ */
208
+ unit: number;
209
+ };
210
+
100
211
  /**
101
212
  * Source of the match
102
213
  */
103
214
  export const Source = {
215
+ Elasticsearch: "elasticsearch",
104
216
  ElasticsearchExact: "elasticsearch-exact",
105
217
  ElasticsearchPartial: "elasticsearch-partial",
106
218
  ElasticsearchFuzzy: "elasticsearch-fuzzy",
@@ -122,6 +234,10 @@ export type Matches = {
122
234
  * Match confidence score (0-100)
123
235
  */
124
236
  confidence: number;
237
+ /**
238
+ * ONS AIMS Hopper structural scores
239
+ */
240
+ hopperComponents?: HopperComponents | undefined;
125
241
  /**
126
242
  * Original parsed address fragment
127
243
  */
@@ -200,10 +316,6 @@ export type ResolveAddressMetadata = {
200
316
  * Total execution time in milliseconds
201
317
  */
202
318
  executionTimeMs: number;
203
- /**
204
- * Whether fast-path matching was used
205
- */
206
- fastPath?: boolean | undefined;
207
319
  /**
208
320
  * Detected address pattern type
209
321
  */
@@ -214,6 +326,18 @@ export type ResolveAddressMetadata = {
214
326
  processingSteps?: Array<ProcessingSteps> | undefined;
215
327
  };
216
328
 
329
+ /**
330
+ * Recommendation: A (Accept - safe to auto-accept) or I (Intervention - requires human review)
331
+ */
332
+ export const RecommendationCode = {
333
+ A: "A",
334
+ I: "I",
335
+ } as const;
336
+ /**
337
+ * Recommendation: A (Accept - safe to auto-accept) or I (Intervention - requires human review)
338
+ */
339
+ export type RecommendationCode = ClosedEnum<typeof RecommendationCode>;
340
+
217
341
  /**
218
342
  * Matching results (only present on success)
219
343
  */
@@ -222,6 +346,14 @@ export type Result = {
222
346
  * Overall confidence score of the results
223
347
  */
224
348
  confidence: number;
349
+ /**
350
+ * Confidence zone: H (High, >66%), M (Medium, 50-66%), L (Low, <50%)
351
+ */
352
+ confidenceZone?: ConfidenceZone | undefined;
353
+ /**
354
+ * Smart match quality evaluation (considers building scores, confidence gaps, unambiguity)
355
+ */
356
+ matchQuality?: MatchQuality | undefined;
225
357
  /**
226
358
  * Array of matched addresses
227
359
  */
@@ -230,6 +362,14 @@ export type Result = {
230
362
  * Metadata about the matching process
231
363
  */
232
364
  metadata: ResolveAddressMetadata;
365
+ /**
366
+ * Recommendation: A (Accept - safe to auto-accept) or I (Intervention - requires human review)
367
+ */
368
+ recommendationCode?: RecommendationCode | undefined;
369
+ /**
370
+ * Gap between top-2 match confidences (0-100). Higher values indicate clearer match distinction.
371
+ */
372
+ unambiguityScore?: number | undefined;
233
373
  };
234
374
 
235
375
  /**
@@ -388,6 +528,84 @@ export function resolveAddressAddressResponseBodyFromJSON(
388
528
  );
389
529
  }
390
530
 
531
+ /** @internal */
532
+ export const ConfidenceZone$inboundSchema: z.ZodNativeEnum<
533
+ typeof ConfidenceZone
534
+ > = z.nativeEnum(ConfidenceZone);
535
+
536
+ /** @internal */
537
+ export const Action$inboundSchema: z.ZodNativeEnum<typeof Action> = z
538
+ .nativeEnum(Action);
539
+
540
+ /** @internal */
541
+ export const Factors$inboundSchema: z.ZodType<Factors, z.ZodTypeDef, unknown> =
542
+ z.object({
543
+ hasClearWinner: z.boolean(),
544
+ hasHighConfidence: z.boolean(),
545
+ hasPerfectBuildingMatch: z.boolean(),
546
+ isSingleResult: z.boolean(),
547
+ });
548
+
549
+ export function factorsFromJSON(
550
+ jsonString: string,
551
+ ): SafeParseResult<Factors, SDKValidationError> {
552
+ return safeParse(
553
+ jsonString,
554
+ (x) => Factors$inboundSchema.parse(JSON.parse(x)),
555
+ `Failed to parse 'Factors' from JSON`,
556
+ );
557
+ }
558
+
559
+ /** @internal */
560
+ export const Grade$inboundSchema: z.ZodNativeEnum<typeof Grade> = z.nativeEnum(
561
+ Grade,
562
+ );
563
+
564
+ /** @internal */
565
+ export const MatchQuality$inboundSchema: z.ZodType<
566
+ MatchQuality,
567
+ z.ZodTypeDef,
568
+ unknown
569
+ > = z.object({
570
+ action: Action$inboundSchema,
571
+ factors: z.lazy(() => Factors$inboundSchema),
572
+ grade: Grade$inboundSchema,
573
+ isReliable: z.boolean(),
574
+ reason: z.string(),
575
+ unambiguityScore: z.number(),
576
+ });
577
+
578
+ export function matchQualityFromJSON(
579
+ jsonString: string,
580
+ ): SafeParseResult<MatchQuality, SDKValidationError> {
581
+ return safeParse(
582
+ jsonString,
583
+ (x) => MatchQuality$inboundSchema.parse(JSON.parse(x)),
584
+ `Failed to parse 'MatchQuality' from JSON`,
585
+ );
586
+ }
587
+
588
+ /** @internal */
589
+ export const HopperComponents$inboundSchema: z.ZodType<
590
+ HopperComponents,
591
+ z.ZodTypeDef,
592
+ unknown
593
+ > = z.object({
594
+ building: z.number(),
595
+ locality: z.number(),
596
+ unit: z.number(),
597
+ });
598
+
599
+ export function hopperComponentsFromJSON(
600
+ jsonString: string,
601
+ ): SafeParseResult<HopperComponents, SDKValidationError> {
602
+ return safeParse(
603
+ jsonString,
604
+ (x) => HopperComponents$inboundSchema.parse(JSON.parse(x)),
605
+ `Failed to parse 'HopperComponents' from JSON`,
606
+ );
607
+ }
608
+
391
609
  /** @internal */
392
610
  export const Source$inboundSchema: z.ZodNativeEnum<typeof Source> = z
393
611
  .nativeEnum(Source);
@@ -397,6 +615,7 @@ export const Matches$inboundSchema: z.ZodType<Matches, z.ZodTypeDef, unknown> =
397
615
  z.object({
398
616
  address: z.string(),
399
617
  confidence: z.number(),
618
+ hopperComponents: z.lazy(() => HopperComponents$inboundSchema).optional(),
400
619
  originalAddress: z.string(),
401
620
  source: Source$inboundSchema,
402
621
  uprn: z.string(),
@@ -452,7 +671,6 @@ export const ResolveAddressMetadata$inboundSchema: z.ZodType<
452
671
  > = z.object({
453
672
  addressCount: z.number(),
454
673
  executionTimeMs: z.number(),
455
- fastPath: z.boolean().optional(),
456
674
  pattern: Pattern$inboundSchema,
457
675
  processingSteps: z.array(z.lazy(() => ProcessingSteps$inboundSchema))
458
676
  .optional(),
@@ -468,12 +686,21 @@ export function resolveAddressMetadataFromJSON(
468
686
  );
469
687
  }
470
688
 
689
+ /** @internal */
690
+ export const RecommendationCode$inboundSchema: z.ZodNativeEnum<
691
+ typeof RecommendationCode
692
+ > = z.nativeEnum(RecommendationCode);
693
+
471
694
  /** @internal */
472
695
  export const Result$inboundSchema: z.ZodType<Result, z.ZodTypeDef, unknown> = z
473
696
  .object({
474
697
  confidence: z.number(),
698
+ confidenceZone: ConfidenceZone$inboundSchema.optional(),
699
+ matchQuality: z.lazy(() => MatchQuality$inboundSchema).optional(),
475
700
  matches: z.array(z.lazy(() => Matches$inboundSchema)),
476
701
  metadata: z.lazy(() => ResolveAddressMetadata$inboundSchema),
702
+ recommendationCode: RecommendationCode$inboundSchema.optional(),
703
+ unambiguityScore: z.number().optional(),
477
704
  });
478
705
 
479
706
  export function resultFromJSON(