@vepler/sdk 1.10.0 → 1.10.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 (242) hide show
  1. package/README.md +7 -0
  2. package/dist/commonjs/funcs/safetyGetV1SafetyCrime.d.ts +17 -0
  3. package/dist/commonjs/funcs/safetyGetV1SafetyCrime.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/safetyGetV1SafetyCrime.js +120 -0
  5. package/dist/commonjs/funcs/safetyGetV1SafetyCrime.js.map +1 -0
  6. package/dist/commonjs/funcs/safetyGetV1SafetyCrimeStats.d.ts +17 -0
  7. package/dist/commonjs/funcs/safetyGetV1SafetyCrimeStats.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/safetyGetV1SafetyCrimeStats.js +120 -0
  9. package/dist/commonjs/funcs/safetyGetV1SafetyCrimeStats.js.map +1 -0
  10. package/dist/commonjs/lib/config.d.ts +3 -3
  11. package/dist/commonjs/lib/config.js +3 -3
  12. package/dist/commonjs/lib/config.js.map +1 -1
  13. package/dist/commonjs/sdk/models/operations/getmetricprofiles.d.ts +15 -15
  14. package/dist/commonjs/sdk/models/operations/getmetricprofiles.d.ts.map +1 -1
  15. package/dist/commonjs/sdk/models/operations/getmetricprofiles.js +18 -19
  16. package/dist/commonjs/sdk/models/operations/getmetricprofiles.js.map +1 -1
  17. package/dist/commonjs/sdk/models/operations/getschoolmetrics.d.ts +30 -30
  18. package/dist/commonjs/sdk/models/operations/getschoolmetrics.d.ts.map +1 -1
  19. package/dist/commonjs/sdk/models/operations/getschoolmetrics.js +35 -36
  20. package/dist/commonjs/sdk/models/operations/getschoolmetrics.js.map +1 -1
  21. package/dist/commonjs/sdk/models/operations/getv1safetycrime.d.ts +309 -0
  22. package/dist/commonjs/sdk/models/operations/getv1safetycrime.d.ts.map +1 -0
  23. package/dist/commonjs/sdk/models/operations/getv1safetycrime.js +352 -0
  24. package/dist/commonjs/sdk/models/operations/getv1safetycrime.js.map +1 -0
  25. package/dist/commonjs/sdk/models/operations/getv1safetycrimestats.d.ts +330 -0
  26. package/dist/commonjs/sdk/models/operations/getv1safetycrimestats.d.ts.map +1 -0
  27. package/dist/commonjs/sdk/models/operations/getv1safetycrimestats.js +366 -0
  28. package/dist/commonjs/sdk/models/operations/getv1safetycrimestats.js.map +1 -0
  29. package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
  30. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  31. package/dist/commonjs/sdk/models/operations/index.js +2 -0
  32. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  33. package/dist/commonjs/sdk/models/shared/index.d.ts +10 -5
  34. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  35. package/dist/commonjs/sdk/models/shared/index.js +10 -5
  36. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  37. package/dist/commonjs/sdk/models/shared/propertyareafilter.d.ts +31 -0
  38. package/dist/commonjs/sdk/models/shared/propertyareafilter.d.ts.map +1 -0
  39. package/dist/commonjs/sdk/models/shared/propertyareafilter.js +85 -0
  40. package/dist/commonjs/sdk/models/shared/propertyareafilter.js.map +1 -0
  41. package/dist/commonjs/sdk/models/shared/propertylocationidareafilter.d.ts +32 -0
  42. package/dist/commonjs/sdk/models/shared/propertylocationidareafilter.d.ts.map +1 -0
  43. package/dist/commonjs/sdk/models/shared/propertylocationidareafilter.js +69 -0
  44. package/dist/commonjs/sdk/models/shared/propertylocationidareafilter.js.map +1 -0
  45. package/dist/commonjs/sdk/models/shared/propertymultipolygonareafilter.d.ts +57 -0
  46. package/dist/commonjs/sdk/models/shared/propertymultipolygonareafilter.d.ts.map +1 -0
  47. package/dist/commonjs/sdk/models/shared/{pointareafilter.js → propertymultipolygonareafilter.js} +20 -22
  48. package/dist/commonjs/sdk/models/shared/propertymultipolygonareafilter.js.map +1 -0
  49. package/dist/commonjs/sdk/models/shared/propertyoutcodeareafilter.d.ts +57 -0
  50. package/dist/commonjs/sdk/models/shared/propertyoutcodeareafilter.d.ts.map +1 -0
  51. package/dist/commonjs/sdk/models/shared/propertyoutcodeareafilter.js +89 -0
  52. package/dist/commonjs/sdk/models/shared/propertyoutcodeareafilter.js.map +1 -0
  53. package/dist/commonjs/sdk/models/shared/propertypointareafilter.d.ts +62 -0
  54. package/dist/commonjs/sdk/models/shared/propertypointareafilter.d.ts.map +1 -0
  55. package/dist/commonjs/sdk/models/shared/propertypointareafilter.js +91 -0
  56. package/dist/commonjs/sdk/models/shared/propertypointareafilter.js.map +1 -0
  57. package/dist/commonjs/sdk/models/shared/propertypolygonareafilter.d.ts +57 -0
  58. package/dist/commonjs/sdk/models/shared/propertypolygonareafilter.d.ts.map +1 -0
  59. package/dist/commonjs/sdk/models/shared/propertypolygonareafilter.js +89 -0
  60. package/dist/commonjs/sdk/models/shared/propertypolygonareafilter.js.map +1 -0
  61. package/dist/commonjs/sdk/models/shared/propertypostcodeareafilter.d.ts +62 -0
  62. package/dist/commonjs/sdk/models/shared/propertypostcodeareafilter.d.ts.map +1 -0
  63. package/dist/commonjs/sdk/models/shared/propertypostcodeareafilter.js +91 -0
  64. package/dist/commonjs/sdk/models/shared/propertypostcodeareafilter.js.map +1 -0
  65. package/dist/commonjs/sdk/models/shared/propertyquerycondition.d.ts +146 -0
  66. package/dist/commonjs/sdk/models/shared/propertyquerycondition.d.ts.map +1 -0
  67. package/dist/commonjs/sdk/models/shared/propertyquerycondition.js +173 -0
  68. package/dist/commonjs/sdk/models/shared/propertyquerycondition.js.map +1 -0
  69. package/dist/commonjs/sdk/models/shared/propertyquerygroup.d.ts +33 -0
  70. package/dist/commonjs/sdk/models/shared/propertyquerygroup.d.ts.map +1 -0
  71. package/dist/commonjs/sdk/models/shared/propertyquerygroup.js +70 -0
  72. package/dist/commonjs/sdk/models/shared/propertyquerygroup.js.map +1 -0
  73. package/dist/commonjs/sdk/models/shared/propertyqueryoperator.d.ts +70 -0
  74. package/dist/commonjs/sdk/models/shared/propertyqueryoperator.d.ts.map +1 -0
  75. package/dist/commonjs/sdk/models/shared/propertyqueryoperator.js +95 -0
  76. package/dist/commonjs/sdk/models/shared/propertyqueryoperator.js.map +1 -0
  77. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.d.ts +27 -80
  78. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.d.ts.map +1 -1
  79. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.js +28 -54
  80. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.js.map +1 -1
  81. package/dist/commonjs/sdk/safety.d.ts +19 -0
  82. package/dist/commonjs/sdk/safety.d.ts.map +1 -0
  83. package/dist/commonjs/sdk/safety.js +32 -0
  84. package/dist/commonjs/sdk/safety.js.map +1 -0
  85. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  86. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  87. package/dist/commonjs/sdk/sdk.js +4 -0
  88. package/dist/commonjs/sdk/sdk.js.map +1 -1
  89. package/dist/esm/funcs/safetyGetV1SafetyCrime.d.ts +17 -0
  90. package/dist/esm/funcs/safetyGetV1SafetyCrime.d.ts.map +1 -0
  91. package/dist/esm/funcs/safetyGetV1SafetyCrime.js +84 -0
  92. package/dist/esm/funcs/safetyGetV1SafetyCrime.js.map +1 -0
  93. package/dist/esm/funcs/safetyGetV1SafetyCrimeStats.d.ts +17 -0
  94. package/dist/esm/funcs/safetyGetV1SafetyCrimeStats.d.ts.map +1 -0
  95. package/dist/esm/funcs/safetyGetV1SafetyCrimeStats.js +84 -0
  96. package/dist/esm/funcs/safetyGetV1SafetyCrimeStats.js.map +1 -0
  97. package/dist/esm/lib/config.d.ts +3 -3
  98. package/dist/esm/lib/config.js +3 -3
  99. package/dist/esm/lib/config.js.map +1 -1
  100. package/dist/esm/sdk/models/operations/getmetricprofiles.d.ts +15 -15
  101. package/dist/esm/sdk/models/operations/getmetricprofiles.d.ts.map +1 -1
  102. package/dist/esm/sdk/models/operations/getmetricprofiles.js +15 -16
  103. package/dist/esm/sdk/models/operations/getmetricprofiles.js.map +1 -1
  104. package/dist/esm/sdk/models/operations/getschoolmetrics.d.ts +30 -30
  105. package/dist/esm/sdk/models/operations/getschoolmetrics.d.ts.map +1 -1
  106. package/dist/esm/sdk/models/operations/getschoolmetrics.js +30 -31
  107. package/dist/esm/sdk/models/operations/getschoolmetrics.js.map +1 -1
  108. package/dist/esm/sdk/models/operations/getv1safetycrime.d.ts +309 -0
  109. package/dist/esm/sdk/models/operations/getv1safetycrime.d.ts.map +1 -0
  110. package/dist/esm/sdk/models/operations/getv1safetycrime.js +296 -0
  111. package/dist/esm/sdk/models/operations/getv1safetycrime.js.map +1 -0
  112. package/dist/esm/sdk/models/operations/getv1safetycrimestats.d.ts +330 -0
  113. package/dist/esm/sdk/models/operations/getv1safetycrimestats.d.ts.map +1 -0
  114. package/dist/esm/sdk/models/operations/getv1safetycrimestats.js +310 -0
  115. package/dist/esm/sdk/models/operations/getv1safetycrimestats.js.map +1 -0
  116. package/dist/esm/sdk/models/operations/index.d.ts +2 -0
  117. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  118. package/dist/esm/sdk/models/operations/index.js +2 -0
  119. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  120. package/dist/esm/sdk/models/shared/index.d.ts +10 -5
  121. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  122. package/dist/esm/sdk/models/shared/index.js +10 -5
  123. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  124. package/dist/esm/sdk/models/shared/propertyareafilter.d.ts +31 -0
  125. package/dist/esm/sdk/models/shared/propertyareafilter.d.ts.map +1 -0
  126. package/dist/esm/sdk/models/shared/propertyareafilter.js +47 -0
  127. package/dist/esm/sdk/models/shared/propertyareafilter.js.map +1 -0
  128. package/dist/esm/sdk/models/shared/propertylocationidareafilter.d.ts +32 -0
  129. package/dist/esm/sdk/models/shared/propertylocationidareafilter.d.ts.map +1 -0
  130. package/dist/esm/sdk/models/shared/propertylocationidareafilter.js +31 -0
  131. package/dist/esm/sdk/models/shared/propertylocationidareafilter.js.map +1 -0
  132. package/dist/esm/sdk/models/shared/propertymultipolygonareafilter.d.ts +57 -0
  133. package/dist/esm/sdk/models/shared/propertymultipolygonareafilter.d.ts.map +1 -0
  134. package/dist/esm/sdk/models/shared/propertymultipolygonareafilter.js +51 -0
  135. package/dist/esm/sdk/models/shared/propertymultipolygonareafilter.js.map +1 -0
  136. package/dist/esm/sdk/models/shared/propertyoutcodeareafilter.d.ts +57 -0
  137. package/dist/esm/sdk/models/shared/propertyoutcodeareafilter.d.ts.map +1 -0
  138. package/dist/esm/sdk/models/shared/propertyoutcodeareafilter.js +51 -0
  139. package/dist/esm/sdk/models/shared/propertyoutcodeareafilter.js.map +1 -0
  140. package/dist/esm/sdk/models/shared/propertypointareafilter.d.ts +62 -0
  141. package/dist/esm/sdk/models/shared/propertypointareafilter.d.ts.map +1 -0
  142. package/dist/esm/sdk/models/shared/propertypointareafilter.js +53 -0
  143. package/dist/esm/sdk/models/shared/propertypointareafilter.js.map +1 -0
  144. package/dist/esm/sdk/models/shared/propertypolygonareafilter.d.ts +57 -0
  145. package/dist/esm/sdk/models/shared/propertypolygonareafilter.d.ts.map +1 -0
  146. package/dist/esm/sdk/models/shared/propertypolygonareafilter.js +51 -0
  147. package/dist/esm/sdk/models/shared/propertypolygonareafilter.js.map +1 -0
  148. package/dist/esm/sdk/models/shared/propertypostcodeareafilter.d.ts +62 -0
  149. package/dist/esm/sdk/models/shared/propertypostcodeareafilter.d.ts.map +1 -0
  150. package/dist/esm/sdk/models/shared/propertypostcodeareafilter.js +53 -0
  151. package/dist/esm/sdk/models/shared/propertypostcodeareafilter.js.map +1 -0
  152. package/dist/esm/sdk/models/shared/propertyquerycondition.d.ts +146 -0
  153. package/dist/esm/sdk/models/shared/propertyquerycondition.d.ts.map +1 -0
  154. package/dist/esm/sdk/models/shared/propertyquerycondition.js +131 -0
  155. package/dist/esm/sdk/models/shared/propertyquerycondition.js.map +1 -0
  156. package/dist/esm/sdk/models/shared/propertyquerygroup.d.ts +33 -0
  157. package/dist/esm/sdk/models/shared/propertyquerygroup.d.ts.map +1 -0
  158. package/dist/esm/sdk/models/shared/propertyquerygroup.js +32 -0
  159. package/dist/esm/sdk/models/shared/propertyquerygroup.js.map +1 -0
  160. package/dist/esm/sdk/models/shared/propertyqueryoperator.d.ts +70 -0
  161. package/dist/esm/sdk/models/shared/propertyqueryoperator.d.ts.map +1 -0
  162. package/dist/esm/sdk/models/shared/propertyqueryoperator.js +57 -0
  163. package/dist/esm/sdk/models/shared/propertyqueryoperator.js.map +1 -0
  164. package/dist/esm/sdk/models/shared/propertyqueryrequest.d.ts +27 -80
  165. package/dist/esm/sdk/models/shared/propertyqueryrequest.d.ts.map +1 -1
  166. package/dist/esm/sdk/models/shared/propertyqueryrequest.js +25 -53
  167. package/dist/esm/sdk/models/shared/propertyqueryrequest.js.map +1 -1
  168. package/dist/esm/sdk/safety.d.ts +19 -0
  169. package/dist/esm/sdk/safety.d.ts.map +1 -0
  170. package/dist/esm/sdk/safety.js +28 -0
  171. package/dist/esm/sdk/safety.js.map +1 -0
  172. package/dist/esm/sdk/sdk.d.ts +3 -0
  173. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  174. package/dist/esm/sdk/sdk.js +4 -0
  175. package/dist/esm/sdk/sdk.js.map +1 -1
  176. package/package.json +1 -1
  177. package/src/funcs/safetyGetV1SafetyCrime.ts +167 -0
  178. package/src/funcs/safetyGetV1SafetyCrimeStats.ts +168 -0
  179. package/src/lib/config.ts +3 -3
  180. package/src/sdk/models/operations/getmetricprofiles.ts +41 -31
  181. package/src/sdk/models/operations/getschoolmetrics.ts +65 -54
  182. package/src/sdk/models/operations/getv1safetycrime.ts +671 -0
  183. package/src/sdk/models/operations/getv1safetycrimestats.ts +733 -0
  184. package/src/sdk/models/operations/index.ts +2 -0
  185. package/src/sdk/models/shared/index.ts +10 -5
  186. package/src/sdk/models/shared/propertyareafilter.ts +120 -0
  187. package/src/sdk/models/shared/propertylocationidareafilter.ts +71 -0
  188. package/src/sdk/models/shared/propertymultipolygonareafilter.ts +101 -0
  189. package/src/sdk/models/shared/propertyoutcodeareafilter.ts +102 -0
  190. package/src/sdk/models/shared/propertypointareafilter.ts +109 -0
  191. package/src/sdk/models/shared/propertypolygonareafilter.ts +102 -0
  192. package/src/sdk/models/shared/propertypostcodeareafilter.ts +109 -0
  193. package/src/sdk/models/shared/propertyquerycondition.ts +238 -0
  194. package/src/sdk/models/shared/propertyquerygroup.ts +75 -0
  195. package/src/sdk/models/shared/propertyqueryoperator.ts +114 -0
  196. package/src/sdk/models/shared/propertyqueryrequest.ts +62 -94
  197. package/src/sdk/safety.ts +45 -0
  198. package/src/sdk/sdk.ts +6 -0
  199. package/dist/commonjs/sdk/models/shared/areafilter.d.ts +0 -40
  200. package/dist/commonjs/sdk/models/shared/areafilter.d.ts.map +0 -1
  201. package/dist/commonjs/sdk/models/shared/areafilter.js +0 -84
  202. package/dist/commonjs/sdk/models/shared/areafilter.js.map +0 -1
  203. package/dist/commonjs/sdk/models/shared/pointareafilter.d.ts +0 -62
  204. package/dist/commonjs/sdk/models/shared/pointareafilter.d.ts.map +0 -1
  205. package/dist/commonjs/sdk/models/shared/pointareafilter.js.map +0 -1
  206. package/dist/commonjs/sdk/models/shared/polygonareafilter.d.ts +0 -57
  207. package/dist/commonjs/sdk/models/shared/polygonareafilter.d.ts.map +0 -1
  208. package/dist/commonjs/sdk/models/shared/polygonareafilter.js +0 -89
  209. package/dist/commonjs/sdk/models/shared/polygonareafilter.js.map +0 -1
  210. package/dist/commonjs/sdk/models/shared/postcodeareafilter.d.ts +0 -62
  211. package/dist/commonjs/sdk/models/shared/postcodeareafilter.d.ts.map +0 -1
  212. package/dist/commonjs/sdk/models/shared/postcodeareafilter.js +0 -91
  213. package/dist/commonjs/sdk/models/shared/postcodeareafilter.js.map +0 -1
  214. package/dist/commonjs/sdk/models/shared/propertyfilters.d.ts +0 -447
  215. package/dist/commonjs/sdk/models/shared/propertyfilters.d.ts.map +0 -1
  216. package/dist/commonjs/sdk/models/shared/propertyfilters.js +0 -299
  217. package/dist/commonjs/sdk/models/shared/propertyfilters.js.map +0 -1
  218. package/dist/esm/sdk/models/shared/areafilter.d.ts +0 -40
  219. package/dist/esm/sdk/models/shared/areafilter.d.ts.map +0 -1
  220. package/dist/esm/sdk/models/shared/areafilter.js +0 -46
  221. package/dist/esm/sdk/models/shared/areafilter.js.map +0 -1
  222. package/dist/esm/sdk/models/shared/pointareafilter.d.ts +0 -62
  223. package/dist/esm/sdk/models/shared/pointareafilter.d.ts.map +0 -1
  224. package/dist/esm/sdk/models/shared/pointareafilter.js +0 -53
  225. package/dist/esm/sdk/models/shared/pointareafilter.js.map +0 -1
  226. package/dist/esm/sdk/models/shared/polygonareafilter.d.ts +0 -57
  227. package/dist/esm/sdk/models/shared/polygonareafilter.d.ts.map +0 -1
  228. package/dist/esm/sdk/models/shared/polygonareafilter.js +0 -51
  229. package/dist/esm/sdk/models/shared/polygonareafilter.js.map +0 -1
  230. package/dist/esm/sdk/models/shared/postcodeareafilter.d.ts +0 -62
  231. package/dist/esm/sdk/models/shared/postcodeareafilter.d.ts.map +0 -1
  232. package/dist/esm/sdk/models/shared/postcodeareafilter.js +0 -53
  233. package/dist/esm/sdk/models/shared/postcodeareafilter.js.map +0 -1
  234. package/dist/esm/sdk/models/shared/propertyfilters.d.ts +0 -447
  235. package/dist/esm/sdk/models/shared/propertyfilters.d.ts.map +0 -1
  236. package/dist/esm/sdk/models/shared/propertyfilters.js +0 -259
  237. package/dist/esm/sdk/models/shared/propertyfilters.js.map +0 -1
  238. package/src/sdk/models/shared/areafilter.ts +0 -106
  239. package/src/sdk/models/shared/pointareafilter.ts +0 -104
  240. package/src/sdk/models/shared/polygonareafilter.ts +0 -100
  241. package/src/sdk/models/shared/postcodeareafilter.ts +0 -107
  242. package/src/sdk/models/shared/propertyfilters.ts +0 -475
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ export const PropertyPostcodeAreaFilterType = {
12
+ Postcode: "postcode",
13
+ } as const;
14
+ export type PropertyPostcodeAreaFilterType = ClosedEnum<
15
+ typeof PropertyPostcodeAreaFilterType
16
+ >;
17
+
18
+ export type PropertyPostcodeAreaFilter = {
19
+ /**
20
+ * Search radius in meters
21
+ */
22
+ radius?: number | undefined;
23
+ type: PropertyPostcodeAreaFilterType;
24
+ /**
25
+ * Full or partial UK postcode
26
+ */
27
+ value: string;
28
+ };
29
+
30
+ /** @internal */
31
+ export const PropertyPostcodeAreaFilterType$inboundSchema: z.ZodNativeEnum<
32
+ typeof PropertyPostcodeAreaFilterType
33
+ > = z.nativeEnum(PropertyPostcodeAreaFilterType);
34
+
35
+ /** @internal */
36
+ export const PropertyPostcodeAreaFilterType$outboundSchema: z.ZodNativeEnum<
37
+ typeof PropertyPostcodeAreaFilterType
38
+ > = PropertyPostcodeAreaFilterType$inboundSchema;
39
+
40
+ /**
41
+ * @internal
42
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
+ */
44
+ export namespace PropertyPostcodeAreaFilterType$ {
45
+ /** @deprecated use `PropertyPostcodeAreaFilterType$inboundSchema` instead. */
46
+ export const inboundSchema = PropertyPostcodeAreaFilterType$inboundSchema;
47
+ /** @deprecated use `PropertyPostcodeAreaFilterType$outboundSchema` instead. */
48
+ export const outboundSchema = PropertyPostcodeAreaFilterType$outboundSchema;
49
+ }
50
+
51
+ /** @internal */
52
+ export const PropertyPostcodeAreaFilter$inboundSchema: z.ZodType<
53
+ PropertyPostcodeAreaFilter,
54
+ z.ZodTypeDef,
55
+ unknown
56
+ > = z.object({
57
+ radius: z.number().optional(),
58
+ type: PropertyPostcodeAreaFilterType$inboundSchema,
59
+ value: z.string(),
60
+ });
61
+
62
+ /** @internal */
63
+ export type PropertyPostcodeAreaFilter$Outbound = {
64
+ radius?: number | undefined;
65
+ type: string;
66
+ value: string;
67
+ };
68
+
69
+ /** @internal */
70
+ export const PropertyPostcodeAreaFilter$outboundSchema: z.ZodType<
71
+ PropertyPostcodeAreaFilter$Outbound,
72
+ z.ZodTypeDef,
73
+ PropertyPostcodeAreaFilter
74
+ > = z.object({
75
+ radius: z.number().optional(),
76
+ type: PropertyPostcodeAreaFilterType$outboundSchema,
77
+ value: z.string(),
78
+ });
79
+
80
+ /**
81
+ * @internal
82
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
+ */
84
+ export namespace PropertyPostcodeAreaFilter$ {
85
+ /** @deprecated use `PropertyPostcodeAreaFilter$inboundSchema` instead. */
86
+ export const inboundSchema = PropertyPostcodeAreaFilter$inboundSchema;
87
+ /** @deprecated use `PropertyPostcodeAreaFilter$outboundSchema` instead. */
88
+ export const outboundSchema = PropertyPostcodeAreaFilter$outboundSchema;
89
+ /** @deprecated use `PropertyPostcodeAreaFilter$Outbound` instead. */
90
+ export type Outbound = PropertyPostcodeAreaFilter$Outbound;
91
+ }
92
+
93
+ export function propertyPostcodeAreaFilterToJSON(
94
+ propertyPostcodeAreaFilter: PropertyPostcodeAreaFilter,
95
+ ): string {
96
+ return JSON.stringify(
97
+ PropertyPostcodeAreaFilter$outboundSchema.parse(propertyPostcodeAreaFilter),
98
+ );
99
+ }
100
+
101
+ export function propertyPostcodeAreaFilterFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<PropertyPostcodeAreaFilter, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => PropertyPostcodeAreaFilter$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'PropertyPostcodeAreaFilter' from JSON`,
108
+ );
109
+ }
@@ -0,0 +1,238 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ * Comparison operator
13
+ */
14
+ export const Comparator = {
15
+ Eq: "eq",
16
+ Ne: "ne",
17
+ Gt: "gt",
18
+ Gte: "gte",
19
+ Lt: "lt",
20
+ Lte: "lte",
21
+ In: "in",
22
+ Nin: "nin",
23
+ Contains: "contains",
24
+ Startswith: "startswith",
25
+ Endswith: "endswith",
26
+ } as const;
27
+ /**
28
+ * Comparison operator
29
+ */
30
+ export type Comparator = ClosedEnum<typeof Comparator>;
31
+
32
+ export type Four = string | number | boolean;
33
+
34
+ /**
35
+ * Value to compare against
36
+ */
37
+ export type Value =
38
+ | string
39
+ | number
40
+ | boolean
41
+ | Array<string | number | boolean>;
42
+
43
+ export type PropertyQueryCondition = {
44
+ /**
45
+ * Comparison operator
46
+ */
47
+ comparator: Comparator;
48
+ /**
49
+ * Field to filter on
50
+ */
51
+ field: string;
52
+ /**
53
+ * Value to compare against
54
+ */
55
+ value: string | number | boolean | Array<string | number | boolean>;
56
+ };
57
+
58
+ /** @internal */
59
+ export const Comparator$inboundSchema: z.ZodNativeEnum<typeof Comparator> = z
60
+ .nativeEnum(Comparator);
61
+
62
+ /** @internal */
63
+ export const Comparator$outboundSchema: z.ZodNativeEnum<typeof Comparator> =
64
+ Comparator$inboundSchema;
65
+
66
+ /**
67
+ * @internal
68
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
69
+ */
70
+ export namespace Comparator$ {
71
+ /** @deprecated use `Comparator$inboundSchema` instead. */
72
+ export const inboundSchema = Comparator$inboundSchema;
73
+ /** @deprecated use `Comparator$outboundSchema` instead. */
74
+ export const outboundSchema = Comparator$outboundSchema;
75
+ }
76
+
77
+ /** @internal */
78
+ export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
79
+ .union([z.string(), z.number(), z.boolean()]);
80
+
81
+ /** @internal */
82
+ export type Four$Outbound = string | number | boolean;
83
+
84
+ /** @internal */
85
+ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
86
+ z.union([z.string(), z.number(), z.boolean()]);
87
+
88
+ /**
89
+ * @internal
90
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
91
+ */
92
+ export namespace Four$ {
93
+ /** @deprecated use `Four$inboundSchema` instead. */
94
+ export const inboundSchema = Four$inboundSchema;
95
+ /** @deprecated use `Four$outboundSchema` instead. */
96
+ export const outboundSchema = Four$outboundSchema;
97
+ /** @deprecated use `Four$Outbound` instead. */
98
+ export type Outbound = Four$Outbound;
99
+ }
100
+
101
+ export function fourToJSON(four: Four): string {
102
+ return JSON.stringify(Four$outboundSchema.parse(four));
103
+ }
104
+
105
+ export function fourFromJSON(
106
+ jsonString: string,
107
+ ): SafeParseResult<Four, SDKValidationError> {
108
+ return safeParse(
109
+ jsonString,
110
+ (x) => Four$inboundSchema.parse(JSON.parse(x)),
111
+ `Failed to parse 'Four' from JSON`,
112
+ );
113
+ }
114
+
115
+ /** @internal */
116
+ export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
117
+ .union([
118
+ z.string(),
119
+ z.number(),
120
+ z.boolean(),
121
+ z.array(z.union([z.string(), z.number(), z.boolean()])),
122
+ ]);
123
+
124
+ /** @internal */
125
+ export type Value$Outbound =
126
+ | string
127
+ | number
128
+ | boolean
129
+ | Array<string | number | boolean>;
130
+
131
+ /** @internal */
132
+ export const Value$outboundSchema: z.ZodType<
133
+ Value$Outbound,
134
+ z.ZodTypeDef,
135
+ Value
136
+ > = z.union([
137
+ z.string(),
138
+ z.number(),
139
+ z.boolean(),
140
+ z.array(z.union([z.string(), z.number(), z.boolean()])),
141
+ ]);
142
+
143
+ /**
144
+ * @internal
145
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
146
+ */
147
+ export namespace Value$ {
148
+ /** @deprecated use `Value$inboundSchema` instead. */
149
+ export const inboundSchema = Value$inboundSchema;
150
+ /** @deprecated use `Value$outboundSchema` instead. */
151
+ export const outboundSchema = Value$outboundSchema;
152
+ /** @deprecated use `Value$Outbound` instead. */
153
+ export type Outbound = Value$Outbound;
154
+ }
155
+
156
+ export function valueToJSON(value: Value): string {
157
+ return JSON.stringify(Value$outboundSchema.parse(value));
158
+ }
159
+
160
+ export function valueFromJSON(
161
+ jsonString: string,
162
+ ): SafeParseResult<Value, SDKValidationError> {
163
+ return safeParse(
164
+ jsonString,
165
+ (x) => Value$inboundSchema.parse(JSON.parse(x)),
166
+ `Failed to parse 'Value' from JSON`,
167
+ );
168
+ }
169
+
170
+ /** @internal */
171
+ export const PropertyQueryCondition$inboundSchema: z.ZodType<
172
+ PropertyQueryCondition,
173
+ z.ZodTypeDef,
174
+ unknown
175
+ > = z.object({
176
+ comparator: Comparator$inboundSchema,
177
+ field: z.string(),
178
+ value: z.union([
179
+ z.string(),
180
+ z.number(),
181
+ z.boolean(),
182
+ z.array(z.union([z.string(), z.number(), z.boolean()])),
183
+ ]),
184
+ });
185
+
186
+ /** @internal */
187
+ export type PropertyQueryCondition$Outbound = {
188
+ comparator: string;
189
+ field: string;
190
+ value: string | number | boolean | Array<string | number | boolean>;
191
+ };
192
+
193
+ /** @internal */
194
+ export const PropertyQueryCondition$outboundSchema: z.ZodType<
195
+ PropertyQueryCondition$Outbound,
196
+ z.ZodTypeDef,
197
+ PropertyQueryCondition
198
+ > = z.object({
199
+ comparator: Comparator$outboundSchema,
200
+ field: z.string(),
201
+ value: z.union([
202
+ z.string(),
203
+ z.number(),
204
+ z.boolean(),
205
+ z.array(z.union([z.string(), z.number(), z.boolean()])),
206
+ ]),
207
+ });
208
+
209
+ /**
210
+ * @internal
211
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
212
+ */
213
+ export namespace PropertyQueryCondition$ {
214
+ /** @deprecated use `PropertyQueryCondition$inboundSchema` instead. */
215
+ export const inboundSchema = PropertyQueryCondition$inboundSchema;
216
+ /** @deprecated use `PropertyQueryCondition$outboundSchema` instead. */
217
+ export const outboundSchema = PropertyQueryCondition$outboundSchema;
218
+ /** @deprecated use `PropertyQueryCondition$Outbound` instead. */
219
+ export type Outbound = PropertyQueryCondition$Outbound;
220
+ }
221
+
222
+ export function propertyQueryConditionToJSON(
223
+ propertyQueryCondition: PropertyQueryCondition,
224
+ ): string {
225
+ return JSON.stringify(
226
+ PropertyQueryCondition$outboundSchema.parse(propertyQueryCondition),
227
+ );
228
+ }
229
+
230
+ export function propertyQueryConditionFromJSON(
231
+ jsonString: string,
232
+ ): SafeParseResult<PropertyQueryCondition, SDKValidationError> {
233
+ return safeParse(
234
+ jsonString,
235
+ (x) => PropertyQueryCondition$inboundSchema.parse(JSON.parse(x)),
236
+ `Failed to parse 'PropertyQueryCondition' from JSON`,
237
+ );
238
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ PropertyQueryCondition,
11
+ PropertyQueryCondition$inboundSchema,
12
+ PropertyQueryCondition$Outbound,
13
+ PropertyQueryCondition$outboundSchema,
14
+ } from "./propertyquerycondition.js";
15
+
16
+ export type PropertyQueryGroup = {
17
+ /**
18
+ * Array of conditions
19
+ */
20
+ conditions: Array<PropertyQueryCondition>;
21
+ };
22
+
23
+ /** @internal */
24
+ export const PropertyQueryGroup$inboundSchema: z.ZodType<
25
+ PropertyQueryGroup,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ conditions: z.array(PropertyQueryCondition$inboundSchema),
30
+ });
31
+
32
+ /** @internal */
33
+ export type PropertyQueryGroup$Outbound = {
34
+ conditions: Array<PropertyQueryCondition$Outbound>;
35
+ };
36
+
37
+ /** @internal */
38
+ export const PropertyQueryGroup$outboundSchema: z.ZodType<
39
+ PropertyQueryGroup$Outbound,
40
+ z.ZodTypeDef,
41
+ PropertyQueryGroup
42
+ > = z.object({
43
+ conditions: z.array(PropertyQueryCondition$outboundSchema),
44
+ });
45
+
46
+ /**
47
+ * @internal
48
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
+ */
50
+ export namespace PropertyQueryGroup$ {
51
+ /** @deprecated use `PropertyQueryGroup$inboundSchema` instead. */
52
+ export const inboundSchema = PropertyQueryGroup$inboundSchema;
53
+ /** @deprecated use `PropertyQueryGroup$outboundSchema` instead. */
54
+ export const outboundSchema = PropertyQueryGroup$outboundSchema;
55
+ /** @deprecated use `PropertyQueryGroup$Outbound` instead. */
56
+ export type Outbound = PropertyQueryGroup$Outbound;
57
+ }
58
+
59
+ export function propertyQueryGroupToJSON(
60
+ propertyQueryGroup: PropertyQueryGroup,
61
+ ): string {
62
+ return JSON.stringify(
63
+ PropertyQueryGroup$outboundSchema.parse(propertyQueryGroup),
64
+ );
65
+ }
66
+
67
+ export function propertyQueryGroupFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<PropertyQueryGroup, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => PropertyQueryGroup$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'PropertyQueryGroup' from JSON`,
74
+ );
75
+ }
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ PropertyQueryGroup,
12
+ PropertyQueryGroup$inboundSchema,
13
+ PropertyQueryGroup$Outbound,
14
+ PropertyQueryGroup$outboundSchema,
15
+ } from "./propertyquerygroup.js";
16
+
17
+ /**
18
+ * Logical operator
19
+ */
20
+ export const Operator = {
21
+ And: "AND",
22
+ Or: "OR",
23
+ } as const;
24
+ /**
25
+ * Logical operator
26
+ */
27
+ export type Operator = ClosedEnum<typeof Operator>;
28
+
29
+ export type PropertyQueryOperator = {
30
+ /**
31
+ * Array of condition groups
32
+ */
33
+ groups: Array<PropertyQueryGroup>;
34
+ /**
35
+ * Logical operator
36
+ */
37
+ operator: Operator;
38
+ };
39
+
40
+ /** @internal */
41
+ export const Operator$inboundSchema: z.ZodNativeEnum<typeof Operator> = z
42
+ .nativeEnum(Operator);
43
+
44
+ /** @internal */
45
+ export const Operator$outboundSchema: z.ZodNativeEnum<typeof Operator> =
46
+ Operator$inboundSchema;
47
+
48
+ /**
49
+ * @internal
50
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
+ */
52
+ export namespace Operator$ {
53
+ /** @deprecated use `Operator$inboundSchema` instead. */
54
+ export const inboundSchema = Operator$inboundSchema;
55
+ /** @deprecated use `Operator$outboundSchema` instead. */
56
+ export const outboundSchema = Operator$outboundSchema;
57
+ }
58
+
59
+ /** @internal */
60
+ export const PropertyQueryOperator$inboundSchema: z.ZodType<
61
+ PropertyQueryOperator,
62
+ z.ZodTypeDef,
63
+ unknown
64
+ > = z.object({
65
+ groups: z.array(PropertyQueryGroup$inboundSchema),
66
+ operator: Operator$inboundSchema,
67
+ });
68
+
69
+ /** @internal */
70
+ export type PropertyQueryOperator$Outbound = {
71
+ groups: Array<PropertyQueryGroup$Outbound>;
72
+ operator: string;
73
+ };
74
+
75
+ /** @internal */
76
+ export const PropertyQueryOperator$outboundSchema: z.ZodType<
77
+ PropertyQueryOperator$Outbound,
78
+ z.ZodTypeDef,
79
+ PropertyQueryOperator
80
+ > = z.object({
81
+ groups: z.array(PropertyQueryGroup$outboundSchema),
82
+ operator: Operator$outboundSchema,
83
+ });
84
+
85
+ /**
86
+ * @internal
87
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
+ */
89
+ export namespace PropertyQueryOperator$ {
90
+ /** @deprecated use `PropertyQueryOperator$inboundSchema` instead. */
91
+ export const inboundSchema = PropertyQueryOperator$inboundSchema;
92
+ /** @deprecated use `PropertyQueryOperator$outboundSchema` instead. */
93
+ export const outboundSchema = PropertyQueryOperator$outboundSchema;
94
+ /** @deprecated use `PropertyQueryOperator$Outbound` instead. */
95
+ export type Outbound = PropertyQueryOperator$Outbound;
96
+ }
97
+
98
+ export function propertyQueryOperatorToJSON(
99
+ propertyQueryOperator: PropertyQueryOperator,
100
+ ): string {
101
+ return JSON.stringify(
102
+ PropertyQueryOperator$outboundSchema.parse(propertyQueryOperator),
103
+ );
104
+ }
105
+
106
+ export function propertyQueryOperatorFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<PropertyQueryOperator, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => PropertyQueryOperator$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'PropertyQueryOperator' from JSON`,
113
+ );
114
+ }