@vepler/sdk 2.6.6 → 2.8.0

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 (224) hide show
  1. package/README.md +7 -0
  2. package/dist/commonjs/funcs/searchSearchSuggest.d.ts +17 -0
  3. package/dist/commonjs/funcs/searchSearchSuggest.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/searchSearchSuggest.js +120 -0
  5. package/dist/commonjs/funcs/searchSearchSuggest.js.map +1 -0
  6. package/dist/commonjs/funcs/systemCheckSearchHealth.d.ts +17 -0
  7. package/dist/commonjs/funcs/systemCheckSearchHealth.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/systemCheckSearchHealth.js +104 -0
  9. package/dist/commonjs/funcs/systemCheckSearchHealth.js.map +1 -0
  10. package/dist/commonjs/lib/config.d.ts +4 -4
  11. package/dist/commonjs/lib/config.js +4 -4
  12. package/dist/commonjs/sdk/models/operations/index.d.ts +1 -0
  13. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  14. package/dist/commonjs/sdk/models/operations/index.js +1 -0
  15. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  16. package/dist/commonjs/sdk/models/operations/searchsuggest.d.ts +136 -0
  17. package/dist/commonjs/sdk/models/operations/searchsuggest.d.ts.map +1 -0
  18. package/dist/commonjs/sdk/models/operations/searchsuggest.js +135 -0
  19. package/dist/commonjs/sdk/models/operations/searchsuggest.js.map +1 -0
  20. package/dist/commonjs/sdk/models/shared/avmpredictrequest.d.ts +13 -3
  21. package/dist/commonjs/sdk/models/shared/avmpredictrequest.d.ts.map +1 -1
  22. package/dist/commonjs/sdk/models/shared/avmpredictrequest.js +11 -1
  23. package/dist/commonjs/sdk/models/shared/avmpredictrequest.js.map +1 -1
  24. package/dist/commonjs/sdk/models/shared/chargeentry.d.ts +1 -1
  25. package/dist/commonjs/sdk/models/shared/chargeentry.d.ts.map +1 -1
  26. package/dist/commonjs/sdk/models/shared/chargeentry.js +1 -1
  27. package/dist/commonjs/sdk/models/shared/chargeentry.js.map +1 -1
  28. package/dist/commonjs/sdk/models/shared/chargehistory.d.ts +1 -1
  29. package/dist/commonjs/sdk/models/shared/chargehistory.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/models/shared/chargehistory.js +1 -1
  31. package/dist/commonjs/sdk/models/shared/chargehistory.js.map +1 -1
  32. package/dist/commonjs/sdk/models/shared/counciltaxbanddetails.d.ts +4 -4
  33. package/dist/commonjs/sdk/models/shared/counciltaxbanddetails.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/models/shared/counciltaxbanddetails.js +4 -4
  35. package/dist/commonjs/sdk/models/shared/counciltaxbanddetails.js.map +1 -1
  36. package/dist/commonjs/sdk/models/shared/epcdata.d.ts +7 -7
  37. package/dist/commonjs/sdk/models/shared/epcdata.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/models/shared/epcdata.js +7 -7
  39. package/dist/commonjs/sdk/models/shared/epcdata.js.map +1 -1
  40. package/dist/commonjs/sdk/models/shared/index.d.ts +3 -0
  41. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/models/shared/index.js +3 -0
  43. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  44. package/dist/commonjs/sdk/models/shared/lease.d.ts +1 -1
  45. package/dist/commonjs/sdk/models/shared/lease.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/models/shared/lease.js +1 -1
  47. package/dist/commonjs/sdk/models/shared/lease.js.map +1 -1
  48. package/dist/commonjs/sdk/models/shared/listing.d.ts +4 -4
  49. package/dist/commonjs/sdk/models/shared/listing.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/models/shared/listing.js +4 -4
  51. package/dist/commonjs/sdk/models/shared/listing.js.map +1 -1
  52. package/dist/commonjs/sdk/models/shared/listingimage.d.ts +1 -1
  53. package/dist/commonjs/sdk/models/shared/listingimage.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/models/shared/listingimage.js +1 -1
  55. package/dist/commonjs/sdk/models/shared/listingimage.js.map +1 -1
  56. package/dist/commonjs/sdk/models/shared/listingpricechange.d.ts +4 -4
  57. package/dist/commonjs/sdk/models/shared/listingpricechange.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/models/shared/listingpricechange.js +4 -5
  59. package/dist/commonjs/sdk/models/shared/listingpricechange.js.map +1 -1
  60. package/dist/commonjs/sdk/models/shared/pricechange.d.ts +4 -4
  61. package/dist/commonjs/sdk/models/shared/pricechange.d.ts.map +1 -1
  62. package/dist/commonjs/sdk/models/shared/pricechange.js +4 -5
  63. package/dist/commonjs/sdk/models/shared/pricechange.js.map +1 -1
  64. package/dist/commonjs/sdk/models/shared/pricingdata.d.ts +1 -1
  65. package/dist/commonjs/sdk/models/shared/pricingdata.d.ts.map +1 -1
  66. package/dist/commonjs/sdk/models/shared/pricingdata.js +1 -1
  67. package/dist/commonjs/sdk/models/shared/pricingdata.js.map +1 -1
  68. package/dist/commonjs/sdk/models/shared/searchhighlight.d.ts +21 -0
  69. package/dist/commonjs/sdk/models/shared/searchhighlight.d.ts.map +1 -0
  70. package/dist/commonjs/sdk/models/shared/searchhighlight.js +52 -0
  71. package/dist/commonjs/sdk/models/shared/searchhighlight.js.map +1 -0
  72. package/dist/commonjs/sdk/models/shared/searchresponse.d.ts +109 -0
  73. package/dist/commonjs/sdk/models/shared/searchresponse.d.ts.map +1 -0
  74. package/dist/commonjs/sdk/models/shared/searchresponse.js +96 -0
  75. package/dist/commonjs/sdk/models/shared/searchresponse.js.map +1 -0
  76. package/dist/commonjs/sdk/models/shared/searchresult.d.ts +106 -0
  77. package/dist/commonjs/sdk/models/shared/searchresult.d.ts.map +1 -0
  78. package/dist/commonjs/sdk/models/shared/searchresult.js +86 -0
  79. package/dist/commonjs/sdk/models/shared/searchresult.js.map +1 -0
  80. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  81. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  82. package/dist/commonjs/sdk/sdk.js +4 -0
  83. package/dist/commonjs/sdk/sdk.js.map +1 -1
  84. package/dist/commonjs/sdk/search.d.ts +12 -0
  85. package/dist/commonjs/sdk/search.d.ts.map +1 -0
  86. package/dist/commonjs/sdk/search.js +22 -0
  87. package/dist/commonjs/sdk/search.js.map +1 -0
  88. package/dist/commonjs/sdk/system.d.ts +7 -0
  89. package/dist/commonjs/sdk/system.d.ts.map +1 -1
  90. package/dist/commonjs/sdk/system.js +10 -0
  91. package/dist/commonjs/sdk/system.js.map +1 -1
  92. package/dist/commonjs/sdk/types/enums.d.ts +10 -6
  93. package/dist/commonjs/sdk/types/enums.d.ts.map +1 -1
  94. package/dist/commonjs/sdk/types/enums.js +76 -2
  95. package/dist/commonjs/sdk/types/enums.js.map +1 -1
  96. package/dist/commonjs/sdk/types/index.d.ts +0 -1
  97. package/dist/commonjs/sdk/types/index.d.ts.map +1 -1
  98. package/dist/commonjs/sdk/types/index.js +1 -3
  99. package/dist/commonjs/sdk/types/index.js.map +1 -1
  100. package/dist/esm/funcs/searchSearchSuggest.d.ts +17 -0
  101. package/dist/esm/funcs/searchSearchSuggest.d.ts.map +1 -0
  102. package/dist/esm/funcs/searchSearchSuggest.js +84 -0
  103. package/dist/esm/funcs/searchSearchSuggest.js.map +1 -0
  104. package/dist/esm/funcs/systemCheckSearchHealth.d.ts +17 -0
  105. package/dist/esm/funcs/systemCheckSearchHealth.d.ts.map +1 -0
  106. package/dist/esm/funcs/systemCheckSearchHealth.js +68 -0
  107. package/dist/esm/funcs/systemCheckSearchHealth.js.map +1 -0
  108. package/dist/esm/lib/config.d.ts +4 -4
  109. package/dist/esm/lib/config.js +4 -4
  110. package/dist/esm/sdk/models/operations/index.d.ts +1 -0
  111. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  112. package/dist/esm/sdk/models/operations/index.js +1 -0
  113. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  114. package/dist/esm/sdk/models/operations/searchsuggest.d.ts +136 -0
  115. package/dist/esm/sdk/models/operations/searchsuggest.d.ts.map +1 -0
  116. package/dist/esm/sdk/models/operations/searchsuggest.js +93 -0
  117. package/dist/esm/sdk/models/operations/searchsuggest.js.map +1 -0
  118. package/dist/esm/sdk/models/shared/avmpredictrequest.d.ts +13 -3
  119. package/dist/esm/sdk/models/shared/avmpredictrequest.d.ts.map +1 -1
  120. package/dist/esm/sdk/models/shared/avmpredictrequest.js +11 -1
  121. package/dist/esm/sdk/models/shared/avmpredictrequest.js.map +1 -1
  122. package/dist/esm/sdk/models/shared/chargeentry.d.ts +1 -1
  123. package/dist/esm/sdk/models/shared/chargeentry.d.ts.map +1 -1
  124. package/dist/esm/sdk/models/shared/chargeentry.js +1 -1
  125. package/dist/esm/sdk/models/shared/chargeentry.js.map +1 -1
  126. package/dist/esm/sdk/models/shared/chargehistory.d.ts +1 -1
  127. package/dist/esm/sdk/models/shared/chargehistory.d.ts.map +1 -1
  128. package/dist/esm/sdk/models/shared/chargehistory.js +1 -1
  129. package/dist/esm/sdk/models/shared/chargehistory.js.map +1 -1
  130. package/dist/esm/sdk/models/shared/counciltaxbanddetails.d.ts +4 -4
  131. package/dist/esm/sdk/models/shared/counciltaxbanddetails.d.ts.map +1 -1
  132. package/dist/esm/sdk/models/shared/counciltaxbanddetails.js +4 -4
  133. package/dist/esm/sdk/models/shared/counciltaxbanddetails.js.map +1 -1
  134. package/dist/esm/sdk/models/shared/epcdata.d.ts +7 -7
  135. package/dist/esm/sdk/models/shared/epcdata.d.ts.map +1 -1
  136. package/dist/esm/sdk/models/shared/epcdata.js +7 -7
  137. package/dist/esm/sdk/models/shared/epcdata.js.map +1 -1
  138. package/dist/esm/sdk/models/shared/index.d.ts +3 -0
  139. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  140. package/dist/esm/sdk/models/shared/index.js +3 -0
  141. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  142. package/dist/esm/sdk/models/shared/lease.d.ts +1 -1
  143. package/dist/esm/sdk/models/shared/lease.d.ts.map +1 -1
  144. package/dist/esm/sdk/models/shared/lease.js +1 -1
  145. package/dist/esm/sdk/models/shared/lease.js.map +1 -1
  146. package/dist/esm/sdk/models/shared/listing.d.ts +4 -4
  147. package/dist/esm/sdk/models/shared/listing.d.ts.map +1 -1
  148. package/dist/esm/sdk/models/shared/listing.js +4 -4
  149. package/dist/esm/sdk/models/shared/listing.js.map +1 -1
  150. package/dist/esm/sdk/models/shared/listingimage.d.ts +1 -1
  151. package/dist/esm/sdk/models/shared/listingimage.d.ts.map +1 -1
  152. package/dist/esm/sdk/models/shared/listingimage.js +1 -1
  153. package/dist/esm/sdk/models/shared/listingimage.js.map +1 -1
  154. package/dist/esm/sdk/models/shared/listingpricechange.d.ts +4 -4
  155. package/dist/esm/sdk/models/shared/listingpricechange.d.ts.map +1 -1
  156. package/dist/esm/sdk/models/shared/listingpricechange.js +4 -5
  157. package/dist/esm/sdk/models/shared/listingpricechange.js.map +1 -1
  158. package/dist/esm/sdk/models/shared/pricechange.d.ts +4 -4
  159. package/dist/esm/sdk/models/shared/pricechange.d.ts.map +1 -1
  160. package/dist/esm/sdk/models/shared/pricechange.js +4 -5
  161. package/dist/esm/sdk/models/shared/pricechange.js.map +1 -1
  162. package/dist/esm/sdk/models/shared/pricingdata.d.ts +1 -1
  163. package/dist/esm/sdk/models/shared/pricingdata.d.ts.map +1 -1
  164. package/dist/esm/sdk/models/shared/pricingdata.js +1 -1
  165. package/dist/esm/sdk/models/shared/pricingdata.js.map +1 -1
  166. package/dist/esm/sdk/models/shared/searchhighlight.d.ts +21 -0
  167. package/dist/esm/sdk/models/shared/searchhighlight.d.ts.map +1 -0
  168. package/dist/esm/sdk/models/shared/searchhighlight.js +15 -0
  169. package/dist/esm/sdk/models/shared/searchhighlight.js.map +1 -0
  170. package/dist/esm/sdk/models/shared/searchresponse.d.ts +109 -0
  171. package/dist/esm/sdk/models/shared/searchresponse.d.ts.map +1 -0
  172. package/dist/esm/sdk/models/shared/searchresponse.js +58 -0
  173. package/dist/esm/sdk/models/shared/searchresponse.js.map +1 -0
  174. package/dist/esm/sdk/models/shared/searchresult.d.ts +106 -0
  175. package/dist/esm/sdk/models/shared/searchresult.d.ts.map +1 -0
  176. package/dist/esm/sdk/models/shared/searchresult.js +48 -0
  177. package/dist/esm/sdk/models/shared/searchresult.js.map +1 -0
  178. package/dist/esm/sdk/sdk.d.ts +3 -0
  179. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  180. package/dist/esm/sdk/sdk.js +4 -0
  181. package/dist/esm/sdk/sdk.js.map +1 -1
  182. package/dist/esm/sdk/search.d.ts +12 -0
  183. package/dist/esm/sdk/search.d.ts.map +1 -0
  184. package/dist/esm/sdk/search.js +18 -0
  185. package/dist/esm/sdk/search.js.map +1 -0
  186. package/dist/esm/sdk/system.d.ts +7 -0
  187. package/dist/esm/sdk/system.d.ts.map +1 -1
  188. package/dist/esm/sdk/system.js +10 -0
  189. package/dist/esm/sdk/system.js.map +1 -1
  190. package/dist/esm/sdk/types/enums.d.ts +10 -6
  191. package/dist/esm/sdk/types/enums.d.ts.map +1 -1
  192. package/dist/esm/sdk/types/enums.js +38 -1
  193. package/dist/esm/sdk/types/enums.js.map +1 -1
  194. package/dist/esm/sdk/types/index.d.ts +0 -1
  195. package/dist/esm/sdk/types/index.d.ts.map +1 -1
  196. package/dist/esm/sdk/types/index.js +0 -1
  197. package/dist/esm/sdk/types/index.js.map +1 -1
  198. package/jsr.json +1 -1
  199. package/package.json +1 -1
  200. package/src/funcs/searchSearchSuggest.ts +167 -0
  201. package/src/funcs/systemCheckSearchHealth.ts +140 -0
  202. package/src/lib/config.ts +4 -4
  203. package/src/sdk/models/operations/index.ts +1 -0
  204. package/src/sdk/models/operations/searchsuggest.ts +276 -0
  205. package/src/sdk/models/shared/avmpredictrequest.ts +13 -3
  206. package/src/sdk/models/shared/chargeentry.ts +2 -2
  207. package/src/sdk/models/shared/chargehistory.ts +2 -2
  208. package/src/sdk/models/shared/counciltaxbanddetails.ts +8 -8
  209. package/src/sdk/models/shared/epcdata.ts +14 -14
  210. package/src/sdk/models/shared/index.ts +3 -0
  211. package/src/sdk/models/shared/lease.ts +2 -2
  212. package/src/sdk/models/shared/listing.ts +8 -8
  213. package/src/sdk/models/shared/listingimage.ts +2 -2
  214. package/src/sdk/models/shared/listingpricechange.ts +10 -9
  215. package/src/sdk/models/shared/pricechange.ts +10 -9
  216. package/src/sdk/models/shared/pricingdata.ts +2 -2
  217. package/src/sdk/models/shared/searchhighlight.ts +44 -0
  218. package/src/sdk/models/shared/searchresponse.ts +161 -0
  219. package/src/sdk/models/shared/searchresult.ts +161 -0
  220. package/src/sdk/sdk.ts +6 -0
  221. package/src/sdk/search.ts +27 -0
  222. package/src/sdk/system.ts +16 -0
  223. package/src/sdk/types/enums.ts +55 -6
  224. package/src/sdk/types/index.ts +0 -1
@@ -0,0 +1,140 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../sdk/models/errors/httpclienterrors.js";
18
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
19
+ import { SDKBaseError } from "../sdk/models/errors/sdkbaseerror.js";
20
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
21
+ import * as shared from "../sdk/models/shared/index.js";
22
+ import { APICall, APIPromise } from "../sdk/types/async.js";
23
+ import { Result } from "../sdk/types/fp.js";
24
+
25
+ /**
26
+ * Search service health check
27
+ *
28
+ * @remarks
29
+ * Check if the search service is operational
30
+ */
31
+ export function systemCheckSearchHealth(
32
+ client: SDKCore,
33
+ options?: RequestOptions,
34
+ ): APIPromise<
35
+ Result<
36
+ shared.HealthResponse,
37
+ | SDKBaseError
38
+ | ResponseValidationError
39
+ | ConnectionError
40
+ | RequestAbortedError
41
+ | RequestTimeoutError
42
+ | InvalidRequestError
43
+ | UnexpectedClientError
44
+ | SDKValidationError
45
+ >
46
+ > {
47
+ return new APIPromise($do(
48
+ client,
49
+ options,
50
+ ));
51
+ }
52
+
53
+ async function $do(
54
+ client: SDKCore,
55
+ options?: RequestOptions,
56
+ ): Promise<
57
+ [
58
+ Result<
59
+ shared.HealthResponse,
60
+ | SDKBaseError
61
+ | ResponseValidationError
62
+ | ConnectionError
63
+ | RequestAbortedError
64
+ | RequestTimeoutError
65
+ | InvalidRequestError
66
+ | UnexpectedClientError
67
+ | SDKValidationError
68
+ >,
69
+ APICall,
70
+ ]
71
+ > {
72
+ const path = pathToFunc("/v1/search/health")();
73
+
74
+ const headers = new Headers(compactMap({
75
+ Accept: "application/json",
76
+ }));
77
+
78
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
79
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
80
+ const requestSecurity = resolveGlobalSecurity(securityInput);
81
+
82
+ const context = {
83
+ options: client._options,
84
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
85
+ operationID: "checkSearchHealth",
86
+ oAuth2Scopes: null,
87
+
88
+ resolvedSecurity: requestSecurity,
89
+
90
+ securitySource: client._options.apiKeyAuth,
91
+ retryConfig: options?.retries
92
+ || client._options.retryConfig
93
+ || { strategy: "none" },
94
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
95
+ };
96
+
97
+ const requestRes = client._createRequest(context, {
98
+ security: requestSecurity,
99
+ method: "GET",
100
+ baseURL: options?.serverURL,
101
+ path: path,
102
+ headers: headers,
103
+ userAgent: client._options.userAgent,
104
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
105
+ }, options);
106
+ if (!requestRes.ok) {
107
+ return [requestRes, { status: "invalid" }];
108
+ }
109
+ const req = requestRes.value;
110
+
111
+ const doResult = await client._do(req, {
112
+ context,
113
+ errorCodes: [],
114
+ retryConfig: context.retryConfig,
115
+ retryCodes: context.retryCodes,
116
+ });
117
+ if (!doResult.ok) {
118
+ return [doResult, { status: "request-error", request: req }];
119
+ }
120
+ const response = doResult.value;
121
+
122
+ const [result] = await M.match<
123
+ shared.HealthResponse,
124
+ | SDKBaseError
125
+ | ResponseValidationError
126
+ | ConnectionError
127
+ | RequestAbortedError
128
+ | RequestTimeoutError
129
+ | InvalidRequestError
130
+ | UnexpectedClientError
131
+ | SDKValidationError
132
+ >(
133
+ M.json(200, shared.HealthResponse$inboundSchema),
134
+ )(response, req);
135
+ if (!result.ok) {
136
+ return [result, { status: "complete", request: req, response }];
137
+ }
138
+
139
+ return [result, { status: "complete", request: req, response }];
140
+ }
package/src/lib/config.ts CHANGED
@@ -60,8 +60,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
60
60
 
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
- openapiDocVersion: "2.6.6",
64
- sdkVersion: "0.6.1",
65
- genVersion: "2.748.0",
66
- userAgent: "speakeasy-sdk/typescript 0.6.1 2.748.0 2.6.6 @vepler/sdk",
63
+ openapiDocVersion: "2.8.0",
64
+ sdkVersion: "0.7.0",
65
+ genVersion: "2.755.9",
66
+ userAgent: "speakeasy-sdk/typescript 0.7.0 2.755.9 2.8.0 @vepler/sdk",
67
67
  } as const;
@@ -43,3 +43,4 @@ export * from "./searchproperties.js";
43
43
  export * from "./searchschoolsnearby.js";
44
44
  export * from "./searchschoolswithin.js";
45
45
  export * from "./searchstreets.js";
46
+ export * from "./searchsuggest.js";
@@ -0,0 +1,276 @@
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 * as shared from "../shared/index.js";
12
+
13
+ export type SearchSuggestRequest = {
14
+ /**
15
+ * Maximum number of results (1-100)
16
+ */
17
+ limit?: string | undefined;
18
+ /**
19
+ * Number of results to skip for pagination
20
+ */
21
+ offset?: string | undefined;
22
+ /**
23
+ * Search query
24
+ */
25
+ q: string;
26
+ /**
27
+ * Filter results to specific search source (address or location)
28
+ */
29
+ source?: string | undefined;
30
+ };
31
+
32
+ /**
33
+ * Error type category
34
+ */
35
+ export const SearchSuggestSearchType = {
36
+ ApiError: "api_error",
37
+ InvalidRequestError: "invalid_request_error",
38
+ AuthenticationError: "authentication_error",
39
+ RateLimitError: "rate_limit_error",
40
+ } as const;
41
+ /**
42
+ * Error type category
43
+ */
44
+ export type SearchSuggestSearchType = ClosedEnum<
45
+ typeof SearchSuggestSearchType
46
+ >;
47
+
48
+ export type SearchSuggestSearchError = {
49
+ /**
50
+ * Machine-readable error code
51
+ */
52
+ code?: string | undefined;
53
+ /**
54
+ * URL to relevant documentation
55
+ */
56
+ docUrl?: string | undefined;
57
+ /**
58
+ * Human-readable error message
59
+ */
60
+ message: string;
61
+ /**
62
+ * Parameter that caused the error
63
+ */
64
+ param?: string | undefined;
65
+ /**
66
+ * Error type category
67
+ */
68
+ type: SearchSuggestSearchType;
69
+ };
70
+
71
+ /**
72
+ * Error response
73
+ */
74
+ export type SearchSuggestSearchResponseBody = {
75
+ error: SearchSuggestSearchError;
76
+ };
77
+
78
+ /**
79
+ * Error type category
80
+ */
81
+ export const SearchSuggestType = {
82
+ ApiError: "api_error",
83
+ InvalidRequestError: "invalid_request_error",
84
+ AuthenticationError: "authentication_error",
85
+ RateLimitError: "rate_limit_error",
86
+ } as const;
87
+ /**
88
+ * Error type category
89
+ */
90
+ export type SearchSuggestType = ClosedEnum<typeof SearchSuggestType>;
91
+
92
+ export type SearchSuggestError = {
93
+ /**
94
+ * Machine-readable error code
95
+ */
96
+ code?: string | undefined;
97
+ /**
98
+ * URL to relevant documentation
99
+ */
100
+ docUrl?: string | undefined;
101
+ /**
102
+ * Human-readable error message
103
+ */
104
+ message: string;
105
+ /**
106
+ * Parameter that caused the error
107
+ */
108
+ param?: string | undefined;
109
+ /**
110
+ * Error type category
111
+ */
112
+ type: SearchSuggestType;
113
+ };
114
+
115
+ /**
116
+ * Error response
117
+ */
118
+ export type SearchSuggestResponseBody = {
119
+ error: SearchSuggestError;
120
+ };
121
+
122
+ export type SearchSuggestResponse =
123
+ | shared.SearchResponse
124
+ | SearchSuggestResponseBody
125
+ | SearchSuggestSearchResponseBody;
126
+
127
+ /** @internal */
128
+ export type SearchSuggestRequest$Outbound = {
129
+ limit?: string | undefined;
130
+ offset?: string | undefined;
131
+ q: string;
132
+ source?: string | undefined;
133
+ };
134
+
135
+ /** @internal */
136
+ export const SearchSuggestRequest$outboundSchema: z.ZodType<
137
+ SearchSuggestRequest$Outbound,
138
+ z.ZodTypeDef,
139
+ SearchSuggestRequest
140
+ > = z.object({
141
+ limit: z.string().optional(),
142
+ offset: z.string().optional(),
143
+ q: z.string(),
144
+ source: z.string().optional(),
145
+ });
146
+
147
+ export function searchSuggestRequestToJSON(
148
+ searchSuggestRequest: SearchSuggestRequest,
149
+ ): string {
150
+ return JSON.stringify(
151
+ SearchSuggestRequest$outboundSchema.parse(searchSuggestRequest),
152
+ );
153
+ }
154
+
155
+ /** @internal */
156
+ export const SearchSuggestSearchType$inboundSchema: z.ZodNativeEnum<
157
+ typeof SearchSuggestSearchType
158
+ > = z.nativeEnum(SearchSuggestSearchType);
159
+
160
+ /** @internal */
161
+ export const SearchSuggestSearchError$inboundSchema: z.ZodType<
162
+ SearchSuggestSearchError,
163
+ z.ZodTypeDef,
164
+ unknown
165
+ > = z.object({
166
+ code: z.string().optional(),
167
+ doc_url: z.string().optional(),
168
+ message: z.string(),
169
+ param: z.string().optional(),
170
+ type: SearchSuggestSearchType$inboundSchema,
171
+ }).transform((v) => {
172
+ return remap$(v, {
173
+ "doc_url": "docUrl",
174
+ });
175
+ });
176
+
177
+ export function searchSuggestSearchErrorFromJSON(
178
+ jsonString: string,
179
+ ): SafeParseResult<SearchSuggestSearchError, SDKValidationError> {
180
+ return safeParse(
181
+ jsonString,
182
+ (x) => SearchSuggestSearchError$inboundSchema.parse(JSON.parse(x)),
183
+ `Failed to parse 'SearchSuggestSearchError' from JSON`,
184
+ );
185
+ }
186
+
187
+ /** @internal */
188
+ export const SearchSuggestSearchResponseBody$inboundSchema: z.ZodType<
189
+ SearchSuggestSearchResponseBody,
190
+ z.ZodTypeDef,
191
+ unknown
192
+ > = z.object({
193
+ error: z.lazy(() => SearchSuggestSearchError$inboundSchema),
194
+ });
195
+
196
+ export function searchSuggestSearchResponseBodyFromJSON(
197
+ jsonString: string,
198
+ ): SafeParseResult<SearchSuggestSearchResponseBody, SDKValidationError> {
199
+ return safeParse(
200
+ jsonString,
201
+ (x) => SearchSuggestSearchResponseBody$inboundSchema.parse(JSON.parse(x)),
202
+ `Failed to parse 'SearchSuggestSearchResponseBody' from JSON`,
203
+ );
204
+ }
205
+
206
+ /** @internal */
207
+ export const SearchSuggestType$inboundSchema: z.ZodNativeEnum<
208
+ typeof SearchSuggestType
209
+ > = z.nativeEnum(SearchSuggestType);
210
+
211
+ /** @internal */
212
+ export const SearchSuggestError$inboundSchema: z.ZodType<
213
+ SearchSuggestError,
214
+ z.ZodTypeDef,
215
+ unknown
216
+ > = z.object({
217
+ code: z.string().optional(),
218
+ doc_url: z.string().optional(),
219
+ message: z.string(),
220
+ param: z.string().optional(),
221
+ type: SearchSuggestType$inboundSchema,
222
+ }).transform((v) => {
223
+ return remap$(v, {
224
+ "doc_url": "docUrl",
225
+ });
226
+ });
227
+
228
+ export function searchSuggestErrorFromJSON(
229
+ jsonString: string,
230
+ ): SafeParseResult<SearchSuggestError, SDKValidationError> {
231
+ return safeParse(
232
+ jsonString,
233
+ (x) => SearchSuggestError$inboundSchema.parse(JSON.parse(x)),
234
+ `Failed to parse 'SearchSuggestError' from JSON`,
235
+ );
236
+ }
237
+
238
+ /** @internal */
239
+ export const SearchSuggestResponseBody$inboundSchema: z.ZodType<
240
+ SearchSuggestResponseBody,
241
+ z.ZodTypeDef,
242
+ unknown
243
+ > = z.object({
244
+ error: z.lazy(() => SearchSuggestError$inboundSchema),
245
+ });
246
+
247
+ export function searchSuggestResponseBodyFromJSON(
248
+ jsonString: string,
249
+ ): SafeParseResult<SearchSuggestResponseBody, SDKValidationError> {
250
+ return safeParse(
251
+ jsonString,
252
+ (x) => SearchSuggestResponseBody$inboundSchema.parse(JSON.parse(x)),
253
+ `Failed to parse 'SearchSuggestResponseBody' from JSON`,
254
+ );
255
+ }
256
+
257
+ /** @internal */
258
+ export const SearchSuggestResponse$inboundSchema: z.ZodType<
259
+ SearchSuggestResponse,
260
+ z.ZodTypeDef,
261
+ unknown
262
+ > = z.union([
263
+ shared.SearchResponse$inboundSchema,
264
+ z.lazy(() => SearchSuggestResponseBody$inboundSchema),
265
+ z.lazy(() => SearchSuggestSearchResponseBody$inboundSchema),
266
+ ]);
267
+
268
+ export function searchSuggestResponseFromJSON(
269
+ jsonString: string,
270
+ ): SafeParseResult<SearchSuggestResponse, SDKValidationError> {
271
+ return safeParse(
272
+ jsonString,
273
+ (x) => SearchSuggestResponse$inboundSchema.parse(JSON.parse(x)),
274
+ `Failed to parse 'SearchSuggestResponse' from JSON`,
275
+ );
276
+ }
@@ -38,7 +38,7 @@ export const Epc = {
38
38
  export type Epc = ClosedEnum<typeof Epc>;
39
39
 
40
40
  /**
41
- * Type of property
41
+ * Type of property. Additional types (maisonette, cottage, etc.) are automatically mapped to core ML model types for prediction.
42
42
  */
43
43
  export const PropertyType = {
44
44
  Detached: "detached",
@@ -46,10 +46,20 @@ export const PropertyType = {
46
46
  Terraced: "terraced",
47
47
  Flat: "flat",
48
48
  Bungalow: "bungalow",
49
+ Maisonette: "maisonette",
50
+ Cottage: "cottage",
51
+ Chalet: "chalet",
52
+ Lodge: "lodge",
53
+ CharacterProperty: "characterProperty",
54
+ MobileHome: "mobileHome",
55
+ Retirement: "retirement",
56
+ BlockOfFlats: "blockOfFlats",
57
+ Farmhouse: "farmhouse",
58
+ Unknown: "unknown",
49
59
  Other: "other",
50
60
  } as const;
51
61
  /**
52
- * Type of property
62
+ * Type of property. Additional types (maisonette, cottage, etc.) are automatically mapped to core ML model types for prediction.
53
63
  */
54
64
  export type PropertyType = ClosedEnum<typeof PropertyType>;
55
65
 
@@ -107,7 +117,7 @@ export type AVMPredictRequest = {
107
117
  */
108
118
  postcode?: string | undefined;
109
119
  /**
110
- * Type of property
120
+ * Type of property. Additional types (maisonette, cottage, etc.) are automatically mapped to core ML model types for prediction.
111
121
  */
112
122
  propertyType: PropertyType;
113
123
  /**
@@ -12,7 +12,7 @@ export type ChargeEntry = {
12
12
  * Confidence score (0-100)
13
13
  */
14
14
  confidence?: number | undefined;
15
- currency?: string | undefined;
15
+ currency?: string | null | undefined;
16
16
  /**
17
17
  * Whether this value is an outlier
18
18
  */
@@ -42,7 +42,7 @@ export const ChargeEntry$inboundSchema: z.ZodType<
42
42
  unknown
43
43
  > = z.object({
44
44
  confidence: z.number().optional(),
45
- currency: z.string().optional(),
45
+ currency: z.nullable(z.string()).optional(),
46
46
  isOutlier: z.boolean().optional(),
47
47
  recordedDate: z.string().datetime({ offset: true }).transform(v =>
48
48
  new Date(v)
@@ -13,7 +13,7 @@ export type ChargeHistory = {
13
13
  * Overall confidence in current value
14
14
  */
15
15
  confidence?: number | undefined;
16
- currency?: string | undefined;
16
+ currency?: string | null | undefined;
17
17
  current?: number | null | undefined;
18
18
  /**
19
19
  * Historical charge records
@@ -32,7 +32,7 @@ export const ChargeHistory$inboundSchema: z.ZodType<
32
32
  unknown
33
33
  > = z.object({
34
34
  confidence: z.number().optional(),
35
- currency: z.string().optional(),
35
+ currency: z.nullable(z.string()).optional(),
36
36
  current: z.nullable(z.number()).optional(),
37
37
  entries: z.array(ChargeEntry$inboundSchema).optional(),
38
38
  lastUpdated: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -8,11 +8,11 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type CouncilTaxBandDetails = {
11
- annualAmount?: number | undefined;
12
- effectiveFrom?: string | undefined;
11
+ annualAmount?: number | null | undefined;
12
+ effectiveFrom?: string | null | undefined;
13
13
  effectiveTo?: string | null | undefined;
14
- id?: number | undefined;
15
- taxYear?: string | undefined;
14
+ id?: number | null | undefined;
15
+ taxYear?: string | null | undefined;
16
16
  };
17
17
 
18
18
  /** @internal */
@@ -21,11 +21,11 @@ export const CouncilTaxBandDetails$inboundSchema: z.ZodType<
21
21
  z.ZodTypeDef,
22
22
  unknown
23
23
  > = z.object({
24
- annualAmount: z.number().optional(),
25
- effectiveFrom: z.string().optional(),
24
+ annualAmount: z.nullable(z.number()).optional(),
25
+ effectiveFrom: z.nullable(z.string()).optional(),
26
26
  effectiveTo: z.nullable(z.string()).optional(),
27
- id: z.number().optional(),
28
- taxYear: z.string().optional(),
27
+ id: z.nullable(z.number()).optional(),
28
+ taxYear: z.nullable(z.string()).optional(),
29
29
  });
30
30
 
31
31
  export function councilTaxBandDetailsFromJSON(
@@ -31,14 +31,14 @@ export const PotentialEnergyRating = {
31
31
  export type PotentialEnergyRating = ClosedEnum<typeof PotentialEnergyRating>;
32
32
 
33
33
  export type EPCData = {
34
- currentEnergyEfficiency?: number | undefined;
34
+ currentEnergyEfficiency?: number | null | undefined;
35
35
  currentEnergyRating?: CurrentEnergyRating | undefined;
36
- heatingCostCurrent?: number | undefined;
37
- heatingCostPotential?: number | undefined;
38
- hotWaterCostCurrent?: number | undefined;
39
- hotWaterCostPotential?: number | undefined;
40
- mainHeatingControls?: string | undefined;
41
- potentialEnergyEfficiency?: number | undefined;
36
+ heatingCostCurrent?: number | null | undefined;
37
+ heatingCostPotential?: number | null | undefined;
38
+ hotWaterCostCurrent?: number | null | undefined;
39
+ hotWaterCostPotential?: number | null | undefined;
40
+ mainHeatingControls?: string | null | undefined;
41
+ potentialEnergyEfficiency?: number | null | undefined;
42
42
  potentialEnergyRating?: PotentialEnergyRating | undefined;
43
43
  };
44
44
 
@@ -55,14 +55,14 @@ export const PotentialEnergyRating$inboundSchema: z.ZodNativeEnum<
55
55
  /** @internal */
56
56
  export const EPCData$inboundSchema: z.ZodType<EPCData, z.ZodTypeDef, unknown> =
57
57
  z.object({
58
- currentEnergyEfficiency: z.number().optional(),
58
+ currentEnergyEfficiency: z.nullable(z.number()).optional(),
59
59
  currentEnergyRating: CurrentEnergyRating$inboundSchema.optional(),
60
- heatingCostCurrent: z.number().optional(),
61
- heatingCostPotential: z.number().optional(),
62
- hotWaterCostCurrent: z.number().optional(),
63
- hotWaterCostPotential: z.number().optional(),
64
- mainHeatingControls: z.string().optional(),
65
- potentialEnergyEfficiency: z.number().optional(),
60
+ heatingCostCurrent: z.nullable(z.number()).optional(),
61
+ heatingCostPotential: z.nullable(z.number()).optional(),
62
+ hotWaterCostCurrent: z.nullable(z.number()).optional(),
63
+ hotWaterCostPotential: z.nullable(z.number()).optional(),
64
+ mainHeatingControls: z.nullable(z.string()).optional(),
65
+ potentialEnergyEfficiency: z.nullable(z.number()).optional(),
66
66
  potentialEnergyRating: PotentialEnergyRating$inboundSchema.optional(),
67
67
  });
68
68
 
@@ -46,6 +46,9 @@ export * from "./refurbishmentdata.js";
46
46
  export * from "./roomdetails.js";
47
47
  export * from "./salerecord.js";
48
48
  export * from "./school.js";
49
+ export * from "./searchhighlight.js";
50
+ export * from "./searchresponse.js";
51
+ export * from "./searchresult.js";
49
52
  export * from "./security.js";
50
53
  export * from "./streetdescriptor.js";
51
54
  export * from "./streetdetails.js";
@@ -11,7 +11,7 @@ export type Lease = {
11
11
  alienationClause?: boolean | undefined;
12
12
  dateOfLease?: string | null | undefined;
13
13
  expiryDate?: string | null | undefined;
14
- leaseType?: string | undefined;
14
+ leaseType?: string | null | undefined;
15
15
  };
16
16
 
17
17
  /** @internal */
@@ -20,7 +20,7 @@ export const Lease$inboundSchema: z.ZodType<Lease, z.ZodTypeDef, unknown> = z
20
20
  alienationClause: z.boolean().optional(),
21
21
  dateOfLease: z.nullable(z.string()).optional(),
22
22
  expiryDate: z.nullable(z.string()).optional(),
23
- leaseType: z.string().optional(),
23
+ leaseType: z.nullable(z.string()).optional(),
24
24
  });
25
25
 
26
26
  export function leaseFromJSON(
@@ -48,7 +48,7 @@ export type Pricing = {
48
48
  /**
49
49
  * Currency code
50
50
  */
51
- currency?: string | undefined;
51
+ currency?: string | null | undefined;
52
52
  /**
53
53
  * Estimated price in pence
54
54
  */
@@ -56,7 +56,7 @@ export type Pricing = {
56
56
  /**
57
57
  * Listed price in pence
58
58
  */
59
- price?: number | undefined;
59
+ price?: number | null | undefined;
60
60
  };
61
61
 
62
62
  /**
@@ -66,11 +66,11 @@ export type Seller = {
66
66
  /**
67
67
  * Property Agent Identifier (PAID)
68
68
  */
69
- paid?: string | undefined;
69
+ paid?: string | null | undefined;
70
70
  /**
71
71
  * Seller/agent name
72
72
  */
73
- name?: string | undefined;
73
+ name?: string | null | undefined;
74
74
  };
75
75
 
76
76
  /**
@@ -195,9 +195,9 @@ export function featuresFromJSON(
195
195
  /** @internal */
196
196
  export const Pricing$inboundSchema: z.ZodType<Pricing, z.ZodTypeDef, unknown> =
197
197
  z.object({
198
- currency: z.string().optional(),
198
+ currency: z.nullable(z.string()).optional(),
199
199
  estimated: z.nullable(z.number()).optional(),
200
- price: z.number().optional(),
200
+ price: z.nullable(z.number()).optional(),
201
201
  });
202
202
 
203
203
  export function pricingFromJSON(
@@ -213,8 +213,8 @@ export function pricingFromJSON(
213
213
  /** @internal */
214
214
  export const Seller$inboundSchema: z.ZodType<Seller, z.ZodTypeDef, unknown> = z
215
215
  .object({
216
- PAID: z.string().optional(),
217
- name: z.string().optional(),
216
+ PAID: z.nullable(z.string()).optional(),
217
+ name: z.nullable(z.string()).optional(),
218
218
  }).transform((v) => {
219
219
  return remap$(v, {
220
220
  "PAID": "paid",
@@ -11,7 +11,7 @@ export type ListingImage = {
11
11
  /**
12
12
  * Image URL
13
13
  */
14
- url?: string | undefined;
14
+ url?: string | null | undefined;
15
15
  };
16
16
 
17
17
  /** @internal */
@@ -20,7 +20,7 @@ export const ListingImage$inboundSchema: z.ZodType<
20
20
  z.ZodTypeDef,
21
21
  unknown
22
22
  > = z.object({
23
- url: z.string().optional(),
23
+ url: z.nullable(z.string()).optional(),
24
24
  });
25
25
 
26
26
  export function listingImageFromJSON(