@vepler/sdk 2.24.2 → 2.28.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 (215) hide show
  1. package/README.md +4 -0
  2. package/dist/commonjs/funcs/avmGetValuationAnalysis.d.ts +18 -0
  3. package/dist/commonjs/funcs/avmGetValuationAnalysis.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/avmGetValuationAnalysis.js +115 -0
  5. package/dist/commonjs/funcs/avmGetValuationAnalysis.js.map +1 -0
  6. package/dist/commonjs/funcs/propertyAggregateProperties.d.ts +18 -0
  7. package/dist/commonjs/funcs/propertyAggregateProperties.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/propertyAggregateProperties.js +117 -0
  9. package/dist/commonjs/funcs/propertyAggregateProperties.js.map +1 -0
  10. package/dist/commonjs/hooks/registration.d.ts +2 -2
  11. package/dist/commonjs/hooks/registration.d.ts.map +1 -1
  12. package/dist/commonjs/hooks/registration.js +1 -2
  13. package/dist/commonjs/hooks/registration.js.map +1 -1
  14. package/dist/commonjs/lib/config.d.ts +3 -3
  15. package/dist/commonjs/lib/config.js +3 -3
  16. package/dist/commonjs/sdk/avm.d.ts +7 -0
  17. package/dist/commonjs/sdk/avm.d.ts.map +1 -1
  18. package/dist/commonjs/sdk/avm.js +10 -0
  19. package/dist/commonjs/sdk/avm.js.map +1 -1
  20. package/dist/commonjs/sdk/models/operations/aggregateproperties.d.ts +108 -0
  21. package/dist/commonjs/sdk/models/operations/aggregateproperties.d.ts.map +1 -0
  22. package/dist/commonjs/sdk/models/operations/aggregateproperties.js +124 -0
  23. package/dist/commonjs/sdk/models/operations/aggregateproperties.js.map +1 -0
  24. package/dist/commonjs/sdk/models/operations/getvaluationanalysis.d.ts +206 -0
  25. package/dist/commonjs/sdk/models/operations/getvaluationanalysis.d.ts.map +1 -0
  26. package/dist/commonjs/sdk/models/operations/getvaluationanalysis.js +197 -0
  27. package/dist/commonjs/sdk/models/operations/getvaluationanalysis.js.map +1 -0
  28. package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
  29. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/models/operations/index.js +2 -0
  31. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/predictpropertyvalue.d.ts +24 -24
  33. package/dist/commonjs/sdk/models/operations/predictpropertyvalue.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/models/operations/predictpropertyvalue.js +25 -26
  35. package/dist/commonjs/sdk/models/operations/predictpropertyvalue.js.map +1 -1
  36. package/dist/commonjs/sdk/models/shared/aggregationinput.d.ts +118 -0
  37. package/dist/commonjs/sdk/models/shared/aggregationinput.d.ts.map +1 -0
  38. package/dist/commonjs/sdk/models/shared/aggregationinput.js +90 -0
  39. package/dist/commonjs/sdk/models/shared/aggregationinput.js.map +1 -0
  40. package/dist/commonjs/sdk/models/shared/analysiscomparable.d.ts +72 -0
  41. package/dist/commonjs/sdk/models/shared/analysiscomparable.d.ts.map +1 -0
  42. package/dist/commonjs/sdk/models/shared/analysiscomparable.js +71 -0
  43. package/dist/commonjs/sdk/models/shared/analysiscomparable.js.map +1 -0
  44. package/dist/commonjs/sdk/models/shared/avmanalysisrequest.d.ts +47 -0
  45. package/dist/commonjs/sdk/models/shared/avmanalysisrequest.d.ts.map +1 -0
  46. package/dist/commonjs/sdk/models/shared/avmanalysisrequest.js +61 -0
  47. package/dist/commonjs/sdk/models/shared/avmanalysisrequest.js.map +1 -0
  48. package/dist/commonjs/sdk/models/shared/avmanalysisresponse.d.ts +234 -0
  49. package/dist/commonjs/sdk/models/shared/avmanalysisresponse.d.ts.map +1 -0
  50. package/dist/commonjs/sdk/models/shared/avmanalysisresponse.js +209 -0
  51. package/dist/commonjs/sdk/models/shared/avmanalysisresponse.js.map +1 -0
  52. package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.d.ts +4 -4
  53. package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.js +6 -4
  55. package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.js.map +1 -1
  56. package/dist/commonjs/sdk/models/shared/council.d.ts +4 -4
  57. package/dist/commonjs/sdk/models/shared/council.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/models/shared/council.js +5 -4
  59. package/dist/commonjs/sdk/models/shared/council.js.map +1 -1
  60. package/dist/commonjs/sdk/models/shared/historicalvaluation.d.ts +42 -0
  61. package/dist/commonjs/sdk/models/shared/historicalvaluation.d.ts.map +1 -0
  62. package/dist/commonjs/sdk/models/shared/historicalvaluation.js +63 -0
  63. package/dist/commonjs/sdk/models/shared/historicalvaluation.js.map +1 -0
  64. package/dist/commonjs/sdk/models/shared/index.d.ts +10 -0
  65. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  66. package/dist/commonjs/sdk/models/shared/index.js +10 -0
  67. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  68. package/dist/commonjs/sdk/models/shared/leafaggregation.d.ts +112 -0
  69. package/dist/commonjs/sdk/models/shared/leafaggregation.d.ts.map +1 -0
  70. package/dist/commonjs/sdk/models/shared/leafaggregation.js +88 -0
  71. package/dist/commonjs/sdk/models/shared/leafaggregation.js.map +1 -0
  72. package/dist/commonjs/sdk/models/shared/nestedaggregation.d.ts +118 -0
  73. package/dist/commonjs/sdk/models/shared/nestedaggregation.d.ts.map +1 -0
  74. package/dist/commonjs/sdk/models/shared/nestedaggregation.js +90 -0
  75. package/dist/commonjs/sdk/models/shared/nestedaggregation.js.map +1 -0
  76. package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.d.ts +28 -0
  77. package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.d.ts.map +1 -0
  78. package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.js +54 -0
  79. package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.js.map +1 -0
  80. package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.d.ts +24 -0
  81. package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.d.ts.map +1 -0
  82. package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.js +53 -0
  83. package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.js.map +1 -0
  84. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.d.ts +4 -4
  85. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.d.ts.map +1 -1
  86. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.js +4 -4
  87. package/dist/commonjs/sdk/models/shared/propertyqueryrequest.js.map +1 -1
  88. package/dist/commonjs/sdk/models/shared/rangedefinition.d.ts +25 -0
  89. package/dist/commonjs/sdk/models/shared/rangedefinition.d.ts.map +1 -0
  90. package/dist/commonjs/sdk/models/shared/rangedefinition.js +51 -0
  91. package/dist/commonjs/sdk/models/shared/rangedefinition.js.map +1 -0
  92. package/dist/commonjs/sdk/property.d.ts +7 -0
  93. package/dist/commonjs/sdk/property.d.ts.map +1 -1
  94. package/dist/commonjs/sdk/property.js +10 -0
  95. package/dist/commonjs/sdk/property.js.map +1 -1
  96. package/dist/esm/funcs/avmGetValuationAnalysis.d.ts +18 -0
  97. package/dist/esm/funcs/avmGetValuationAnalysis.d.ts.map +1 -0
  98. package/dist/esm/funcs/avmGetValuationAnalysis.js +79 -0
  99. package/dist/esm/funcs/avmGetValuationAnalysis.js.map +1 -0
  100. package/dist/esm/funcs/propertyAggregateProperties.d.ts +18 -0
  101. package/dist/esm/funcs/propertyAggregateProperties.d.ts.map +1 -0
  102. package/dist/esm/funcs/propertyAggregateProperties.js +81 -0
  103. package/dist/esm/funcs/propertyAggregateProperties.js.map +1 -0
  104. package/dist/esm/hooks/registration.d.ts +2 -2
  105. package/dist/esm/hooks/registration.d.ts.map +1 -1
  106. package/dist/esm/hooks/registration.js +1 -2
  107. package/dist/esm/hooks/registration.js.map +1 -1
  108. package/dist/esm/lib/config.d.ts +3 -3
  109. package/dist/esm/lib/config.js +3 -3
  110. package/dist/esm/sdk/avm.d.ts +7 -0
  111. package/dist/esm/sdk/avm.d.ts.map +1 -1
  112. package/dist/esm/sdk/avm.js +10 -0
  113. package/dist/esm/sdk/avm.js.map +1 -1
  114. package/dist/esm/sdk/models/operations/aggregateproperties.d.ts +108 -0
  115. package/dist/esm/sdk/models/operations/aggregateproperties.d.ts.map +1 -0
  116. package/dist/esm/sdk/models/operations/aggregateproperties.js +83 -0
  117. package/dist/esm/sdk/models/operations/aggregateproperties.js.map +1 -0
  118. package/dist/esm/sdk/models/operations/getvaluationanalysis.d.ts +206 -0
  119. package/dist/esm/sdk/models/operations/getvaluationanalysis.d.ts.map +1 -0
  120. package/dist/esm/sdk/models/operations/getvaluationanalysis.js +152 -0
  121. package/dist/esm/sdk/models/operations/getvaluationanalysis.js.map +1 -0
  122. package/dist/esm/sdk/models/operations/index.d.ts +2 -0
  123. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  124. package/dist/esm/sdk/models/operations/index.js +2 -0
  125. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  126. package/dist/esm/sdk/models/operations/predictpropertyvalue.d.ts +24 -24
  127. package/dist/esm/sdk/models/operations/predictpropertyvalue.d.ts.map +1 -1
  128. package/dist/esm/sdk/models/operations/predictpropertyvalue.js +21 -22
  129. package/dist/esm/sdk/models/operations/predictpropertyvalue.js.map +1 -1
  130. package/dist/esm/sdk/models/shared/aggregationinput.d.ts +118 -0
  131. package/dist/esm/sdk/models/shared/aggregationinput.d.ts.map +1 -0
  132. package/dist/esm/sdk/models/shared/aggregationinput.js +53 -0
  133. package/dist/esm/sdk/models/shared/aggregationinput.js.map +1 -0
  134. package/dist/esm/sdk/models/shared/analysiscomparable.d.ts +72 -0
  135. package/dist/esm/sdk/models/shared/analysiscomparable.d.ts.map +1 -0
  136. package/dist/esm/sdk/models/shared/analysiscomparable.js +34 -0
  137. package/dist/esm/sdk/models/shared/analysiscomparable.js.map +1 -0
  138. package/dist/esm/sdk/models/shared/avmanalysisrequest.d.ts +47 -0
  139. package/dist/esm/sdk/models/shared/avmanalysisrequest.d.ts.map +1 -0
  140. package/dist/esm/sdk/models/shared/avmanalysisrequest.js +24 -0
  141. package/dist/esm/sdk/models/shared/avmanalysisrequest.js.map +1 -0
  142. package/dist/esm/sdk/models/shared/avmanalysisresponse.d.ts +234 -0
  143. package/dist/esm/sdk/models/shared/avmanalysisresponse.d.ts.map +1 -0
  144. package/dist/esm/sdk/models/shared/avmanalysisresponse.js +159 -0
  145. package/dist/esm/sdk/models/shared/avmanalysisresponse.js.map +1 -0
  146. package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.d.ts +4 -4
  147. package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.d.ts.map +1 -1
  148. package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.js +5 -3
  149. package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.js.map +1 -1
  150. package/dist/esm/sdk/models/shared/council.d.ts +4 -4
  151. package/dist/esm/sdk/models/shared/council.d.ts.map +1 -1
  152. package/dist/esm/sdk/models/shared/council.js +4 -3
  153. package/dist/esm/sdk/models/shared/council.js.map +1 -1
  154. package/dist/esm/sdk/models/shared/historicalvaluation.d.ts +42 -0
  155. package/dist/esm/sdk/models/shared/historicalvaluation.d.ts.map +1 -0
  156. package/dist/esm/sdk/models/shared/historicalvaluation.js +25 -0
  157. package/dist/esm/sdk/models/shared/historicalvaluation.js.map +1 -0
  158. package/dist/esm/sdk/models/shared/index.d.ts +10 -0
  159. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  160. package/dist/esm/sdk/models/shared/index.js +10 -0
  161. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  162. package/dist/esm/sdk/models/shared/leafaggregation.d.ts +112 -0
  163. package/dist/esm/sdk/models/shared/leafaggregation.d.ts.map +1 -0
  164. package/dist/esm/sdk/models/shared/leafaggregation.js +51 -0
  165. package/dist/esm/sdk/models/shared/leafaggregation.js.map +1 -0
  166. package/dist/esm/sdk/models/shared/nestedaggregation.d.ts +118 -0
  167. package/dist/esm/sdk/models/shared/nestedaggregation.d.ts.map +1 -0
  168. package/dist/esm/sdk/models/shared/nestedaggregation.js +53 -0
  169. package/dist/esm/sdk/models/shared/nestedaggregation.js.map +1 -0
  170. package/dist/esm/sdk/models/shared/propertyaggregaterequest.d.ts +28 -0
  171. package/dist/esm/sdk/models/shared/propertyaggregaterequest.d.ts.map +1 -0
  172. package/dist/esm/sdk/models/shared/propertyaggregaterequest.js +17 -0
  173. package/dist/esm/sdk/models/shared/propertyaggregaterequest.js.map +1 -0
  174. package/dist/esm/sdk/models/shared/propertyaggregateresponse.d.ts +24 -0
  175. package/dist/esm/sdk/models/shared/propertyaggregateresponse.d.ts.map +1 -0
  176. package/dist/esm/sdk/models/shared/propertyaggregateresponse.js +16 -0
  177. package/dist/esm/sdk/models/shared/propertyaggregateresponse.js.map +1 -0
  178. package/dist/esm/sdk/models/shared/propertyqueryrequest.d.ts +4 -4
  179. package/dist/esm/sdk/models/shared/propertyqueryrequest.d.ts.map +1 -1
  180. package/dist/esm/sdk/models/shared/propertyqueryrequest.js +3 -3
  181. package/dist/esm/sdk/models/shared/propertyqueryrequest.js.map +1 -1
  182. package/dist/esm/sdk/models/shared/rangedefinition.d.ts +25 -0
  183. package/dist/esm/sdk/models/shared/rangedefinition.d.ts.map +1 -0
  184. package/dist/esm/sdk/models/shared/rangedefinition.js +14 -0
  185. package/dist/esm/sdk/models/shared/rangedefinition.js.map +1 -0
  186. package/dist/esm/sdk/property.d.ts +7 -0
  187. package/dist/esm/sdk/property.d.ts.map +1 -1
  188. package/dist/esm/sdk/property.js +10 -0
  189. package/dist/esm/sdk/property.js.map +1 -1
  190. package/openapi.json +12446 -1
  191. package/package.json +1 -1
  192. package/src/funcs/avmGetValuationAnalysis.ts +163 -0
  193. package/src/funcs/propertyAggregateProperties.ts +164 -0
  194. package/src/hooks/registration.ts +2 -3
  195. package/src/lib/config.ts +3 -3
  196. package/src/sdk/avm.ts +18 -0
  197. package/src/sdk/models/operations/aggregateproperties.ts +237 -0
  198. package/src/sdk/models/operations/getvaluationanalysis.ts +443 -0
  199. package/src/sdk/models/operations/index.ts +2 -0
  200. package/src/sdk/models/operations/predictpropertyvalue.ts +63 -59
  201. package/src/sdk/models/shared/aggregationinput.ts +162 -0
  202. package/src/sdk/models/shared/analysiscomparable.ts +107 -0
  203. package/src/sdk/models/shared/avmanalysisrequest.ts +73 -0
  204. package/src/sdk/models/shared/avmanalysisresponse.ts +519 -0
  205. package/src/sdk/models/shared/avmpredictbylocationrequest.ts +10 -7
  206. package/src/sdk/models/shared/council.ts +6 -7
  207. package/src/sdk/models/shared/historicalvaluation.ts +85 -0
  208. package/src/sdk/models/shared/index.ts +10 -0
  209. package/src/sdk/models/shared/leafaggregation.ts +149 -0
  210. package/src/sdk/models/shared/nestedaggregation.ts +162 -0
  211. package/src/sdk/models/shared/propertyaggregaterequest.ts +61 -0
  212. package/src/sdk/models/shared/propertyaggregateresponse.ts +46 -0
  213. package/src/sdk/models/shared/propertyqueryrequest.ts +9 -7
  214. package/src/sdk/models/shared/rangedefinition.ts +44 -0
  215. package/src/sdk/property.ts +18 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vepler/sdk",
3
- "version": "2.24.2",
3
+ "version": "2.28.0",
4
4
  "author": "Vepler Limited",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -0,0 +1,163 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../sdk/models/errors/httpclienterrors.js";
20
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
21
+ import { SDKBaseError } from "../sdk/models/errors/sdkbaseerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../sdk/models/operations/index.js";
24
+ import * as shared from "../sdk/models/shared/index.js";
25
+ import { APICall, APIPromise } from "../sdk/types/async.js";
26
+ import { Result } from "../sdk/types/fp.js";
27
+
28
+ /**
29
+ * Get detailed valuation analysis
30
+ *
31
+ * @remarks
32
+ * Get comprehensive valuation analysis for a property including comparable properties, market statistics, confidence metrics, and historical valuations. This endpoint provides detailed insights for property valuation decision-making.
33
+ */
34
+ export function avmGetValuationAnalysis(
35
+ client: SDKCore,
36
+ request: shared.AVMAnalysisRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.GetValuationAnalysisResponse,
41
+ | SDKBaseError
42
+ | ResponseValidationError
43
+ | ConnectionError
44
+ | RequestAbortedError
45
+ | RequestTimeoutError
46
+ | InvalidRequestError
47
+ | UnexpectedClientError
48
+ | SDKValidationError
49
+ >
50
+ > {
51
+ return new APIPromise($do(
52
+ client,
53
+ request,
54
+ options,
55
+ ));
56
+ }
57
+
58
+ async function $do(
59
+ client: SDKCore,
60
+ request: shared.AVMAnalysisRequest,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ operations.GetValuationAnalysisResponse,
66
+ | SDKBaseError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) => shared.AVMAnalysisRequest$outboundSchema.parse(value),
81
+ "Input validation failed",
82
+ );
83
+ if (!parsed.ok) {
84
+ return [parsed, { status: "invalid" }];
85
+ }
86
+ const payload = parsed.value;
87
+ const body = encodeJSON("body", payload, { explode: true });
88
+
89
+ const path = pathToFunc("/v1/avm/analysis")();
90
+
91
+ const headers = new Headers(compactMap({
92
+ "Content-Type": "application/json",
93
+ Accept: "application/json",
94
+ }));
95
+
96
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
97
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
98
+ const requestSecurity = resolveGlobalSecurity(securityInput);
99
+
100
+ const context = {
101
+ options: client._options,
102
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
103
+ operationID: "getValuationAnalysis",
104
+ oAuth2Scopes: null,
105
+
106
+ resolvedSecurity: requestSecurity,
107
+
108
+ securitySource: client._options.apiKeyAuth,
109
+ retryConfig: options?.retries
110
+ || client._options.retryConfig
111
+ || { strategy: "none" },
112
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
113
+ };
114
+
115
+ const requestRes = client._createRequest(context, {
116
+ security: requestSecurity,
117
+ method: "POST",
118
+ baseURL: options?.serverURL,
119
+ path: path,
120
+ headers: headers,
121
+ body: body,
122
+ userAgent: client._options.userAgent,
123
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
124
+ }, options);
125
+ if (!requestRes.ok) {
126
+ return [requestRes, { status: "invalid" }];
127
+ }
128
+ const req = requestRes.value;
129
+
130
+ const doResult = await client._do(req, {
131
+ context,
132
+ errorCodes: [],
133
+ retryConfig: context.retryConfig,
134
+ retryCodes: context.retryCodes,
135
+ });
136
+ if (!doResult.ok) {
137
+ return [doResult, { status: "request-error", request: req }];
138
+ }
139
+ const response = doResult.value;
140
+
141
+ const [result] = await M.match<
142
+ operations.GetValuationAnalysisResponse,
143
+ | SDKBaseError
144
+ | ResponseValidationError
145
+ | ConnectionError
146
+ | RequestAbortedError
147
+ | RequestTimeoutError
148
+ | InvalidRequestError
149
+ | UnexpectedClientError
150
+ | SDKValidationError
151
+ >(
152
+ M.json(200, operations.GetValuationAnalysisResponse$inboundSchema),
153
+ M.json(400, operations.GetValuationAnalysisResponse$inboundSchema),
154
+ M.json(404, operations.GetValuationAnalysisResponse$inboundSchema),
155
+ M.json(422, operations.GetValuationAnalysisResponse$inboundSchema),
156
+ M.json(500, operations.GetValuationAnalysisResponse$inboundSchema),
157
+ )(response, req);
158
+ if (!result.ok) {
159
+ return [result, { status: "complete", request: req, response }];
160
+ }
161
+
162
+ return [result, { status: "complete", request: req, response }];
163
+ }
@@ -0,0 +1,164 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../sdk/models/errors/httpclienterrors.js";
20
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
21
+ import { SDKBaseError } from "../sdk/models/errors/sdkbaseerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../sdk/models/operations/index.js";
24
+ import * as shared from "../sdk/models/shared/index.js";
25
+ import { APICall, APIPromise } from "../sdk/types/async.js";
26
+ import { Result } from "../sdk/types/fp.js";
27
+
28
+ /**
29
+ * Aggregate property statistics within a geographic area
30
+ *
31
+ * @remarks
32
+ * Execute real-time aggregations (counts, averages, distributions) over property data within a specified geographic boundary. Limited to areas ≤500 km² for reliable performance. Returns computed statistics without individual property documents.
33
+ */
34
+ export function propertyAggregateProperties(
35
+ client: SDKCore,
36
+ request?: shared.PropertyAggregateRequest | undefined,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.AggregatePropertiesResponse,
41
+ | SDKBaseError
42
+ | ResponseValidationError
43
+ | ConnectionError
44
+ | RequestAbortedError
45
+ | RequestTimeoutError
46
+ | InvalidRequestError
47
+ | UnexpectedClientError
48
+ | SDKValidationError
49
+ >
50
+ > {
51
+ return new APIPromise($do(
52
+ client,
53
+ request,
54
+ options,
55
+ ));
56
+ }
57
+
58
+ async function $do(
59
+ client: SDKCore,
60
+ request?: shared.PropertyAggregateRequest | undefined,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ operations.AggregatePropertiesResponse,
66
+ | SDKBaseError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) =>
81
+ shared.PropertyAggregateRequest$outboundSchema.optional().parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = payload === undefined
89
+ ? null
90
+ : encodeJSON("body", payload, { explode: true });
91
+
92
+ const path = pathToFunc("/v1/property/aggregate")();
93
+
94
+ const headers = new Headers(compactMap({
95
+ "Content-Type": "application/json",
96
+ Accept: "application/json",
97
+ }));
98
+
99
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
100
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
101
+ const requestSecurity = resolveGlobalSecurity(securityInput);
102
+
103
+ const context = {
104
+ options: client._options,
105
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
106
+ operationID: "aggregateProperties",
107
+ oAuth2Scopes: null,
108
+
109
+ resolvedSecurity: requestSecurity,
110
+
111
+ securitySource: client._options.apiKeyAuth,
112
+ retryConfig: options?.retries
113
+ || client._options.retryConfig
114
+ || { strategy: "none" },
115
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
116
+ };
117
+
118
+ const requestRes = client._createRequest(context, {
119
+ security: requestSecurity,
120
+ method: "POST",
121
+ baseURL: options?.serverURL,
122
+ path: path,
123
+ headers: headers,
124
+ body: body,
125
+ userAgent: client._options.userAgent,
126
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
127
+ }, options);
128
+ if (!requestRes.ok) {
129
+ return [requestRes, { status: "invalid" }];
130
+ }
131
+ const req = requestRes.value;
132
+
133
+ const doResult = await client._do(req, {
134
+ context,
135
+ errorCodes: [],
136
+ retryConfig: context.retryConfig,
137
+ retryCodes: context.retryCodes,
138
+ });
139
+ if (!doResult.ok) {
140
+ return [doResult, { status: "request-error", request: req }];
141
+ }
142
+ const response = doResult.value;
143
+
144
+ const [result] = await M.match<
145
+ operations.AggregatePropertiesResponse,
146
+ | SDKBaseError
147
+ | ResponseValidationError
148
+ | ConnectionError
149
+ | RequestAbortedError
150
+ | RequestTimeoutError
151
+ | InvalidRequestError
152
+ | UnexpectedClientError
153
+ | SDKValidationError
154
+ >(
155
+ M.json(200, operations.AggregatePropertiesResponse$inboundSchema),
156
+ M.json(400, operations.AggregatePropertiesResponse$inboundSchema),
157
+ M.json(500, operations.AggregatePropertiesResponse$inboundSchema),
158
+ )(response, req);
159
+ if (!result.ok) {
160
+ return [result, { status: "complete", request: req, response }];
161
+ }
162
+
163
+ return [result, { status: "complete", request: req, response }];
164
+ }
@@ -1,4 +1,4 @@
1
- import { Hooks } from "./types.js";
1
+ import type { Hooks } from "./types.js";
2
2
 
3
3
  /*
4
4
  * This file is only ever generated once on the first generation and then is free to be modified.
@@ -6,8 +6,7 @@ import { Hooks } from "./types.js";
6
6
  * in this file or in separate files in the hooks folder.
7
7
  */
8
8
 
9
- // @ts-expect-error remove this line when you add your first hook and hooks is used
10
- export function initHooks(hooks: Hooks) {
9
+ export function initHooks(_hooks: Hooks) {
11
10
  // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
12
11
  // with an instance of a hook that implements that specific Hook interface
13
12
  // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
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.24.2",
63
+ openapiDocVersion: "2.28.0",
64
64
  sdkVersion: "0.8.0",
65
- genVersion: "2.795.8",
66
- userAgent: "speakeasy-sdk/typescript 0.8.0 2.795.8 2.24.2 @vepler/sdk",
65
+ genVersion: "2.799.0",
66
+ userAgent: "speakeasy-sdk/typescript 0.8.0 2.799.0 2.28.0 @vepler/sdk",
67
67
  } as const;
package/src/sdk/avm.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { avmGetValuationAnalysis } from "../funcs/avmGetValuationAnalysis.js";
5
6
  import { avmPredictPropertyValue } from "../funcs/avmPredictPropertyValue.js";
6
7
  import { avmPredictPropertyValueByLocation } from "../funcs/avmPredictPropertyValueByLocation.js";
7
8
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
@@ -10,6 +11,23 @@ import * as shared from "./models/shared/index.js";
10
11
  import { unwrapAsync } from "./types/fp.js";
11
12
 
12
13
  export class Avm extends ClientSDK {
14
+ /**
15
+ * Get detailed valuation analysis
16
+ *
17
+ * @remarks
18
+ * Get comprehensive valuation analysis for a property including comparable properties, market statistics, confidence metrics, and historical valuations. This endpoint provides detailed insights for property valuation decision-making.
19
+ */
20
+ async getValuationAnalysis(
21
+ request: shared.AVMAnalysisRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<operations.GetValuationAnalysisResponse> {
24
+ return unwrapAsync(avmGetValuationAnalysis(
25
+ this,
26
+ request,
27
+ options,
28
+ ));
29
+ }
30
+
13
31
  /**
14
32
  * Predict property value
15
33
  *
@@ -0,0 +1,237 @@
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
+ /**
14
+ * Error type category
15
+ */
16
+ export const AggregatePropertiesPropertyType = {
17
+ ApiError: "api_error",
18
+ InvalidRequestError: "invalid_request_error",
19
+ AuthenticationError: "authentication_error",
20
+ RateLimitError: "rate_limit_error",
21
+ } as const;
22
+ /**
23
+ * Error type category
24
+ */
25
+ export type AggregatePropertiesPropertyType = ClosedEnum<
26
+ typeof AggregatePropertiesPropertyType
27
+ >;
28
+
29
+ export type AggregatePropertiesPropertyError = {
30
+ /**
31
+ * Machine-readable error code
32
+ */
33
+ code?: string | undefined;
34
+ /**
35
+ * URL to relevant documentation
36
+ */
37
+ docUrl?: string | undefined;
38
+ /**
39
+ * Human-readable error message
40
+ */
41
+ message: string;
42
+ /**
43
+ * Parameter that caused the error
44
+ */
45
+ param?: string | undefined;
46
+ /**
47
+ * Error type category
48
+ */
49
+ type: AggregatePropertiesPropertyType;
50
+ };
51
+
52
+ /**
53
+ * Error response
54
+ */
55
+ export type AggregatePropertiesPropertyResponseBody = {
56
+ error: AggregatePropertiesPropertyError;
57
+ };
58
+
59
+ /**
60
+ * Error type category
61
+ */
62
+ export const AggregatePropertiesType = {
63
+ ApiError: "api_error",
64
+ InvalidRequestError: "invalid_request_error",
65
+ AuthenticationError: "authentication_error",
66
+ RateLimitError: "rate_limit_error",
67
+ } as const;
68
+ /**
69
+ * Error type category
70
+ */
71
+ export type AggregatePropertiesType = ClosedEnum<
72
+ typeof AggregatePropertiesType
73
+ >;
74
+
75
+ export type AggregatePropertiesError = {
76
+ /**
77
+ * Machine-readable error code
78
+ */
79
+ code?: string | undefined;
80
+ /**
81
+ * URL to relevant documentation
82
+ */
83
+ docUrl?: string | undefined;
84
+ /**
85
+ * Human-readable error message
86
+ */
87
+ message: string;
88
+ /**
89
+ * Parameter that caused the error
90
+ */
91
+ param?: string | undefined;
92
+ /**
93
+ * Error type category
94
+ */
95
+ type: AggregatePropertiesType;
96
+ };
97
+
98
+ /**
99
+ * Error response
100
+ */
101
+ export type AggregatePropertiesResponseBody = {
102
+ error: AggregatePropertiesError;
103
+ };
104
+
105
+ export type AggregatePropertiesResponse =
106
+ | shared.PropertyAggregateResponse
107
+ | AggregatePropertiesResponseBody
108
+ | AggregatePropertiesPropertyResponseBody;
109
+
110
+ /** @internal */
111
+ export const AggregatePropertiesPropertyType$inboundSchema: z.ZodNativeEnum<
112
+ typeof AggregatePropertiesPropertyType
113
+ > = z.nativeEnum(AggregatePropertiesPropertyType);
114
+
115
+ /** @internal */
116
+ export const AggregatePropertiesPropertyError$inboundSchema: z.ZodType<
117
+ AggregatePropertiesPropertyError,
118
+ z.ZodTypeDef,
119
+ unknown
120
+ > = z.object({
121
+ code: z.string().optional(),
122
+ doc_url: z.string().optional(),
123
+ message: z.string(),
124
+ param: z.string().optional(),
125
+ type: AggregatePropertiesPropertyType$inboundSchema,
126
+ }).transform((v) => {
127
+ return remap$(v, {
128
+ "doc_url": "docUrl",
129
+ });
130
+ });
131
+
132
+ export function aggregatePropertiesPropertyErrorFromJSON(
133
+ jsonString: string,
134
+ ): SafeParseResult<AggregatePropertiesPropertyError, SDKValidationError> {
135
+ return safeParse(
136
+ jsonString,
137
+ (x) => AggregatePropertiesPropertyError$inboundSchema.parse(JSON.parse(x)),
138
+ `Failed to parse 'AggregatePropertiesPropertyError' from JSON`,
139
+ );
140
+ }
141
+
142
+ /** @internal */
143
+ export const AggregatePropertiesPropertyResponseBody$inboundSchema: z.ZodType<
144
+ AggregatePropertiesPropertyResponseBody,
145
+ z.ZodTypeDef,
146
+ unknown
147
+ > = z.object({
148
+ error: z.lazy(() => AggregatePropertiesPropertyError$inboundSchema),
149
+ });
150
+
151
+ export function aggregatePropertiesPropertyResponseBodyFromJSON(
152
+ jsonString: string,
153
+ ): SafeParseResult<
154
+ AggregatePropertiesPropertyResponseBody,
155
+ SDKValidationError
156
+ > {
157
+ return safeParse(
158
+ jsonString,
159
+ (x) =>
160
+ AggregatePropertiesPropertyResponseBody$inboundSchema.parse(
161
+ JSON.parse(x),
162
+ ),
163
+ `Failed to parse 'AggregatePropertiesPropertyResponseBody' from JSON`,
164
+ );
165
+ }
166
+
167
+ /** @internal */
168
+ export const AggregatePropertiesType$inboundSchema: z.ZodNativeEnum<
169
+ typeof AggregatePropertiesType
170
+ > = z.nativeEnum(AggregatePropertiesType);
171
+
172
+ /** @internal */
173
+ export const AggregatePropertiesError$inboundSchema: z.ZodType<
174
+ AggregatePropertiesError,
175
+ z.ZodTypeDef,
176
+ unknown
177
+ > = z.object({
178
+ code: z.string().optional(),
179
+ doc_url: z.string().optional(),
180
+ message: z.string(),
181
+ param: z.string().optional(),
182
+ type: AggregatePropertiesType$inboundSchema,
183
+ }).transform((v) => {
184
+ return remap$(v, {
185
+ "doc_url": "docUrl",
186
+ });
187
+ });
188
+
189
+ export function aggregatePropertiesErrorFromJSON(
190
+ jsonString: string,
191
+ ): SafeParseResult<AggregatePropertiesError, SDKValidationError> {
192
+ return safeParse(
193
+ jsonString,
194
+ (x) => AggregatePropertiesError$inboundSchema.parse(JSON.parse(x)),
195
+ `Failed to parse 'AggregatePropertiesError' from JSON`,
196
+ );
197
+ }
198
+
199
+ /** @internal */
200
+ export const AggregatePropertiesResponseBody$inboundSchema: z.ZodType<
201
+ AggregatePropertiesResponseBody,
202
+ z.ZodTypeDef,
203
+ unknown
204
+ > = z.object({
205
+ error: z.lazy(() => AggregatePropertiesError$inboundSchema),
206
+ });
207
+
208
+ export function aggregatePropertiesResponseBodyFromJSON(
209
+ jsonString: string,
210
+ ): SafeParseResult<AggregatePropertiesResponseBody, SDKValidationError> {
211
+ return safeParse(
212
+ jsonString,
213
+ (x) => AggregatePropertiesResponseBody$inboundSchema.parse(JSON.parse(x)),
214
+ `Failed to parse 'AggregatePropertiesResponseBody' from JSON`,
215
+ );
216
+ }
217
+
218
+ /** @internal */
219
+ export const AggregatePropertiesResponse$inboundSchema: z.ZodType<
220
+ AggregatePropertiesResponse,
221
+ z.ZodTypeDef,
222
+ unknown
223
+ > = z.union([
224
+ shared.PropertyAggregateResponse$inboundSchema,
225
+ z.lazy(() => AggregatePropertiesResponseBody$inboundSchema),
226
+ z.lazy(() => AggregatePropertiesPropertyResponseBody$inboundSchema),
227
+ ]);
228
+
229
+ export function aggregatePropertiesResponseFromJSON(
230
+ jsonString: string,
231
+ ): SafeParseResult<AggregatePropertiesResponse, SDKValidationError> {
232
+ return safeParse(
233
+ jsonString,
234
+ (x) => AggregatePropertiesResponse$inboundSchema.parse(JSON.parse(x)),
235
+ `Failed to parse 'AggregatePropertiesResponse' from JSON`,
236
+ );
237
+ }