@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.
- package/README.md +4 -0
- package/dist/commonjs/funcs/avmGetValuationAnalysis.d.ts +18 -0
- package/dist/commonjs/funcs/avmGetValuationAnalysis.d.ts.map +1 -0
- package/dist/commonjs/funcs/avmGetValuationAnalysis.js +115 -0
- package/dist/commonjs/funcs/avmGetValuationAnalysis.js.map +1 -0
- package/dist/commonjs/funcs/propertyAggregateProperties.d.ts +18 -0
- package/dist/commonjs/funcs/propertyAggregateProperties.d.ts.map +1 -0
- package/dist/commonjs/funcs/propertyAggregateProperties.js +117 -0
- package/dist/commonjs/funcs/propertyAggregateProperties.js.map +1 -0
- package/dist/commonjs/hooks/registration.d.ts +2 -2
- package/dist/commonjs/hooks/registration.d.ts.map +1 -1
- package/dist/commonjs/hooks/registration.js +1 -2
- package/dist/commonjs/hooks/registration.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/avm.d.ts +7 -0
- package/dist/commonjs/sdk/avm.d.ts.map +1 -1
- package/dist/commonjs/sdk/avm.js +10 -0
- package/dist/commonjs/sdk/avm.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/aggregateproperties.d.ts +108 -0
- package/dist/commonjs/sdk/models/operations/aggregateproperties.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/aggregateproperties.js +124 -0
- package/dist/commonjs/sdk/models/operations/aggregateproperties.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/getvaluationanalysis.d.ts +206 -0
- package/dist/commonjs/sdk/models/operations/getvaluationanalysis.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/getvaluationanalysis.js +197 -0
- package/dist/commonjs/sdk/models/operations/getvaluationanalysis.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +2 -0
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/predictpropertyvalue.d.ts +24 -24
- package/dist/commonjs/sdk/models/operations/predictpropertyvalue.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/predictpropertyvalue.js +25 -26
- package/dist/commonjs/sdk/models/operations/predictpropertyvalue.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/aggregationinput.d.ts +118 -0
- package/dist/commonjs/sdk/models/shared/aggregationinput.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/aggregationinput.js +90 -0
- package/dist/commonjs/sdk/models/shared/aggregationinput.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/analysiscomparable.d.ts +72 -0
- package/dist/commonjs/sdk/models/shared/analysiscomparable.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/analysiscomparable.js +71 -0
- package/dist/commonjs/sdk/models/shared/analysiscomparable.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisrequest.d.ts +47 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisrequest.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisrequest.js +61 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisrequest.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisresponse.d.ts +234 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisresponse.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisresponse.js +209 -0
- package/dist/commonjs/sdk/models/shared/avmanalysisresponse.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.d.ts +4 -4
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.js +6 -4
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/council.d.ts +4 -4
- package/dist/commonjs/sdk/models/shared/council.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/council.js +5 -4
- package/dist/commonjs/sdk/models/shared/council.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/historicalvaluation.d.ts +42 -0
- package/dist/commonjs/sdk/models/shared/historicalvaluation.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/historicalvaluation.js +63 -0
- package/dist/commonjs/sdk/models/shared/historicalvaluation.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts +10 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +10 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/leafaggregation.d.ts +112 -0
- package/dist/commonjs/sdk/models/shared/leafaggregation.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/leafaggregation.js +88 -0
- package/dist/commonjs/sdk/models/shared/leafaggregation.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregation.d.ts +118 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregation.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregation.js +90 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregation.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.d.ts +28 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.js +54 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregaterequest.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.d.ts +24 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.js +53 -0
- package/dist/commonjs/sdk/models/shared/propertyaggregateresponse.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/propertyqueryrequest.d.ts +4 -4
- package/dist/commonjs/sdk/models/shared/propertyqueryrequest.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/propertyqueryrequest.js +4 -4
- package/dist/commonjs/sdk/models/shared/propertyqueryrequest.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/rangedefinition.d.ts +25 -0
- package/dist/commonjs/sdk/models/shared/rangedefinition.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/rangedefinition.js +51 -0
- package/dist/commonjs/sdk/models/shared/rangedefinition.js.map +1 -0
- package/dist/commonjs/sdk/property.d.ts +7 -0
- package/dist/commonjs/sdk/property.d.ts.map +1 -1
- package/dist/commonjs/sdk/property.js +10 -0
- package/dist/commonjs/sdk/property.js.map +1 -1
- package/dist/esm/funcs/avmGetValuationAnalysis.d.ts +18 -0
- package/dist/esm/funcs/avmGetValuationAnalysis.d.ts.map +1 -0
- package/dist/esm/funcs/avmGetValuationAnalysis.js +79 -0
- package/dist/esm/funcs/avmGetValuationAnalysis.js.map +1 -0
- package/dist/esm/funcs/propertyAggregateProperties.d.ts +18 -0
- package/dist/esm/funcs/propertyAggregateProperties.d.ts.map +1 -0
- package/dist/esm/funcs/propertyAggregateProperties.js +81 -0
- package/dist/esm/funcs/propertyAggregateProperties.js.map +1 -0
- package/dist/esm/hooks/registration.d.ts +2 -2
- package/dist/esm/hooks/registration.d.ts.map +1 -1
- package/dist/esm/hooks/registration.js +1 -2
- package/dist/esm/hooks/registration.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/avm.d.ts +7 -0
- package/dist/esm/sdk/avm.d.ts.map +1 -1
- package/dist/esm/sdk/avm.js +10 -0
- package/dist/esm/sdk/avm.js.map +1 -1
- package/dist/esm/sdk/models/operations/aggregateproperties.d.ts +108 -0
- package/dist/esm/sdk/models/operations/aggregateproperties.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/aggregateproperties.js +83 -0
- package/dist/esm/sdk/models/operations/aggregateproperties.js.map +1 -0
- package/dist/esm/sdk/models/operations/getvaluationanalysis.d.ts +206 -0
- package/dist/esm/sdk/models/operations/getvaluationanalysis.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/getvaluationanalysis.js +152 -0
- package/dist/esm/sdk/models/operations/getvaluationanalysis.js.map +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts +2 -0
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +2 -0
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/predictpropertyvalue.d.ts +24 -24
- package/dist/esm/sdk/models/operations/predictpropertyvalue.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/predictpropertyvalue.js +21 -22
- package/dist/esm/sdk/models/operations/predictpropertyvalue.js.map +1 -1
- package/dist/esm/sdk/models/shared/aggregationinput.d.ts +118 -0
- package/dist/esm/sdk/models/shared/aggregationinput.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/aggregationinput.js +53 -0
- package/dist/esm/sdk/models/shared/aggregationinput.js.map +1 -0
- package/dist/esm/sdk/models/shared/analysiscomparable.d.ts +72 -0
- package/dist/esm/sdk/models/shared/analysiscomparable.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/analysiscomparable.js +34 -0
- package/dist/esm/sdk/models/shared/analysiscomparable.js.map +1 -0
- package/dist/esm/sdk/models/shared/avmanalysisrequest.d.ts +47 -0
- package/dist/esm/sdk/models/shared/avmanalysisrequest.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/avmanalysisrequest.js +24 -0
- package/dist/esm/sdk/models/shared/avmanalysisrequest.js.map +1 -0
- package/dist/esm/sdk/models/shared/avmanalysisresponse.d.ts +234 -0
- package/dist/esm/sdk/models/shared/avmanalysisresponse.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/avmanalysisresponse.js +159 -0
- package/dist/esm/sdk/models/shared/avmanalysisresponse.js.map +1 -0
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.d.ts +4 -4
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.js +5 -3
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.js.map +1 -1
- package/dist/esm/sdk/models/shared/council.d.ts +4 -4
- package/dist/esm/sdk/models/shared/council.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/council.js +4 -3
- package/dist/esm/sdk/models/shared/council.js.map +1 -1
- package/dist/esm/sdk/models/shared/historicalvaluation.d.ts +42 -0
- package/dist/esm/sdk/models/shared/historicalvaluation.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/historicalvaluation.js +25 -0
- package/dist/esm/sdk/models/shared/historicalvaluation.js.map +1 -0
- package/dist/esm/sdk/models/shared/index.d.ts +10 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +10 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/leafaggregation.d.ts +112 -0
- package/dist/esm/sdk/models/shared/leafaggregation.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/leafaggregation.js +51 -0
- package/dist/esm/sdk/models/shared/leafaggregation.js.map +1 -0
- package/dist/esm/sdk/models/shared/nestedaggregation.d.ts +118 -0
- package/dist/esm/sdk/models/shared/nestedaggregation.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/nestedaggregation.js +53 -0
- package/dist/esm/sdk/models/shared/nestedaggregation.js.map +1 -0
- package/dist/esm/sdk/models/shared/propertyaggregaterequest.d.ts +28 -0
- package/dist/esm/sdk/models/shared/propertyaggregaterequest.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/propertyaggregaterequest.js +17 -0
- package/dist/esm/sdk/models/shared/propertyaggregaterequest.js.map +1 -0
- package/dist/esm/sdk/models/shared/propertyaggregateresponse.d.ts +24 -0
- package/dist/esm/sdk/models/shared/propertyaggregateresponse.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/propertyaggregateresponse.js +16 -0
- package/dist/esm/sdk/models/shared/propertyaggregateresponse.js.map +1 -0
- package/dist/esm/sdk/models/shared/propertyqueryrequest.d.ts +4 -4
- package/dist/esm/sdk/models/shared/propertyqueryrequest.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/propertyqueryrequest.js +3 -3
- package/dist/esm/sdk/models/shared/propertyqueryrequest.js.map +1 -1
- package/dist/esm/sdk/models/shared/rangedefinition.d.ts +25 -0
- package/dist/esm/sdk/models/shared/rangedefinition.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/rangedefinition.js +14 -0
- package/dist/esm/sdk/models/shared/rangedefinition.js.map +1 -0
- package/dist/esm/sdk/property.d.ts +7 -0
- package/dist/esm/sdk/property.d.ts.map +1 -1
- package/dist/esm/sdk/property.js +10 -0
- package/dist/esm/sdk/property.js.map +1 -1
- package/openapi.json +12446 -1
- package/package.json +1 -1
- package/src/funcs/avmGetValuationAnalysis.ts +163 -0
- package/src/funcs/propertyAggregateProperties.ts +164 -0
- package/src/hooks/registration.ts +2 -3
- package/src/lib/config.ts +3 -3
- package/src/sdk/avm.ts +18 -0
- package/src/sdk/models/operations/aggregateproperties.ts +237 -0
- package/src/sdk/models/operations/getvaluationanalysis.ts +443 -0
- package/src/sdk/models/operations/index.ts +2 -0
- package/src/sdk/models/operations/predictpropertyvalue.ts +63 -59
- package/src/sdk/models/shared/aggregationinput.ts +162 -0
- package/src/sdk/models/shared/analysiscomparable.ts +107 -0
- package/src/sdk/models/shared/avmanalysisrequest.ts +73 -0
- package/src/sdk/models/shared/avmanalysisresponse.ts +519 -0
- package/src/sdk/models/shared/avmpredictbylocationrequest.ts +10 -7
- package/src/sdk/models/shared/council.ts +6 -7
- package/src/sdk/models/shared/historicalvaluation.ts +85 -0
- package/src/sdk/models/shared/index.ts +10 -0
- package/src/sdk/models/shared/leafaggregation.ts +149 -0
- package/src/sdk/models/shared/nestedaggregation.ts +162 -0
- package/src/sdk/models/shared/propertyaggregaterequest.ts +61 -0
- package/src/sdk/models/shared/propertyaggregateresponse.ts +46 -0
- package/src/sdk/models/shared/propertyqueryrequest.ts +9 -7
- package/src/sdk/models/shared/rangedefinition.ts +44 -0
- package/src/sdk/property.ts +18 -0
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AnalysisComparable,
|
|
12
|
+
AnalysisComparable$inboundSchema,
|
|
13
|
+
} from "./analysiscomparable.js";
|
|
14
|
+
import {
|
|
15
|
+
AVMConfidenceInterval,
|
|
16
|
+
AVMConfidenceInterval$inboundSchema,
|
|
17
|
+
} from "./avmconfidenceinterval.js";
|
|
18
|
+
import {
|
|
19
|
+
HistoricalValuation,
|
|
20
|
+
HistoricalValuation$inboundSchema,
|
|
21
|
+
} from "./historicalvaluation.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Breakdown by quality tier
|
|
25
|
+
*/
|
|
26
|
+
export type TierSummary = {
|
|
27
|
+
acceptable: number;
|
|
28
|
+
excellent: number;
|
|
29
|
+
excluded: number;
|
|
30
|
+
good: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Comparable properties analysis
|
|
35
|
+
*/
|
|
36
|
+
export type Comparables = {
|
|
37
|
+
/**
|
|
38
|
+
* List of comparable properties with tier info
|
|
39
|
+
*/
|
|
40
|
+
list: Array<AnalysisComparable>;
|
|
41
|
+
/**
|
|
42
|
+
* Breakdown by quality tier
|
|
43
|
+
*/
|
|
44
|
+
tierSummary: TierSummary;
|
|
45
|
+
/**
|
|
46
|
+
* Total comparable properties found
|
|
47
|
+
*/
|
|
48
|
+
total: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Detailed confidence metrics
|
|
53
|
+
*/
|
|
54
|
+
export type Confidence = {
|
|
55
|
+
dataQuality?: number | undefined;
|
|
56
|
+
modelAgreement?: number | undefined;
|
|
57
|
+
score?: number | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type Change12Month = {
|
|
61
|
+
amount: number;
|
|
62
|
+
percentage: number;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type Change6Month = {
|
|
66
|
+
amount: number;
|
|
67
|
+
percentage: number;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Trend = {
|
|
71
|
+
Rising: "rising",
|
|
72
|
+
Stable: "stable",
|
|
73
|
+
Falling: "falling",
|
|
74
|
+
} as const;
|
|
75
|
+
export type Trend = ClosedEnum<typeof Trend>;
|
|
76
|
+
|
|
77
|
+
export type Summary = {
|
|
78
|
+
change12Month?: Change12Month | undefined;
|
|
79
|
+
change6Month?: Change6Month | undefined;
|
|
80
|
+
trend: Trend;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Historical valuation data
|
|
85
|
+
*/
|
|
86
|
+
export type History = {
|
|
87
|
+
summary: Summary;
|
|
88
|
+
valuations: Array<HistoricalValuation>;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const Severity = {
|
|
92
|
+
Error: "error",
|
|
93
|
+
Warning: "warning",
|
|
94
|
+
Info: "info",
|
|
95
|
+
} as const;
|
|
96
|
+
export type Severity = ClosedEnum<typeof Severity>;
|
|
97
|
+
|
|
98
|
+
export type Issues = {
|
|
99
|
+
message: string;
|
|
100
|
+
severity: Severity;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Price range of comparables
|
|
105
|
+
*/
|
|
106
|
+
export type PriceRange = {
|
|
107
|
+
max: number;
|
|
108
|
+
min: number;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Market statistics from comparables
|
|
113
|
+
*/
|
|
114
|
+
export type MarketStats = {
|
|
115
|
+
/**
|
|
116
|
+
* Mean price of comparables
|
|
117
|
+
*/
|
|
118
|
+
meanPrice: number;
|
|
119
|
+
/**
|
|
120
|
+
* Median price of comparables
|
|
121
|
+
*/
|
|
122
|
+
medianPrice: number;
|
|
123
|
+
/**
|
|
124
|
+
* Median price per square metre
|
|
125
|
+
*/
|
|
126
|
+
medianPricePerSqm?: number | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Price range of comparables
|
|
129
|
+
*/
|
|
130
|
+
priceRange: PriceRange;
|
|
131
|
+
/**
|
|
132
|
+
* Weighted average price
|
|
133
|
+
*/
|
|
134
|
+
weightedAverage: number;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Subject property characteristics used in valuation
|
|
139
|
+
*/
|
|
140
|
+
export type PropertyFactors = {
|
|
141
|
+
baths?: number | undefined;
|
|
142
|
+
beds?: number | undefined;
|
|
143
|
+
condition?: string | undefined;
|
|
144
|
+
epc?: string | undefined;
|
|
145
|
+
floorArea?: number | undefined;
|
|
146
|
+
propertyType?: string | undefined;
|
|
147
|
+
yearBuilt?: number | undefined;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export type SaleHistory = {
|
|
151
|
+
date: string;
|
|
152
|
+
price: number;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Current valuation result
|
|
157
|
+
*/
|
|
158
|
+
export type Valuation = {
|
|
159
|
+
/**
|
|
160
|
+
* Confidence score (0-1)
|
|
161
|
+
*/
|
|
162
|
+
confidence: number;
|
|
163
|
+
/**
|
|
164
|
+
* 95% confidence interval for the valuation
|
|
165
|
+
*/
|
|
166
|
+
confidenceInterval: AVMConfidenceInterval;
|
|
167
|
+
/**
|
|
168
|
+
* Estimated property value in GBP
|
|
169
|
+
*/
|
|
170
|
+
estimatedPrice: number;
|
|
171
|
+
/**
|
|
172
|
+
* Agreement level between ML models (0-1)
|
|
173
|
+
*/
|
|
174
|
+
modelAgreement?: number | undefined;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Comprehensive AVM analysis response with comparables, market stats, and history
|
|
179
|
+
*/
|
|
180
|
+
export type AVMAnalysisResponse = {
|
|
181
|
+
/**
|
|
182
|
+
* Comparable properties analysis
|
|
183
|
+
*/
|
|
184
|
+
comparables: Comparables;
|
|
185
|
+
/**
|
|
186
|
+
* Detailed confidence metrics
|
|
187
|
+
*/
|
|
188
|
+
confidence: Confidence;
|
|
189
|
+
/**
|
|
190
|
+
* Historical valuation data
|
|
191
|
+
*/
|
|
192
|
+
history?: History | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Data quality issues and warnings
|
|
195
|
+
*/
|
|
196
|
+
issues: Array<Issues>;
|
|
197
|
+
/**
|
|
198
|
+
* Market statistics from comparables
|
|
199
|
+
*/
|
|
200
|
+
marketStats: MarketStats;
|
|
201
|
+
/**
|
|
202
|
+
* Subject property characteristics used in valuation
|
|
203
|
+
*/
|
|
204
|
+
propertyFactors: PropertyFactors;
|
|
205
|
+
/**
|
|
206
|
+
* Subject property sale history
|
|
207
|
+
*/
|
|
208
|
+
saleHistory?: Array<SaleHistory> | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Indicates successful analysis
|
|
211
|
+
*/
|
|
212
|
+
success: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Current valuation result
|
|
215
|
+
*/
|
|
216
|
+
valuation: Valuation;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/** @internal */
|
|
220
|
+
export const TierSummary$inboundSchema: z.ZodType<
|
|
221
|
+
TierSummary,
|
|
222
|
+
z.ZodTypeDef,
|
|
223
|
+
unknown
|
|
224
|
+
> = z.object({
|
|
225
|
+
acceptable: z.number().int(),
|
|
226
|
+
excellent: z.number().int(),
|
|
227
|
+
excluded: z.number().int(),
|
|
228
|
+
good: z.number().int(),
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
export function tierSummaryFromJSON(
|
|
232
|
+
jsonString: string,
|
|
233
|
+
): SafeParseResult<TierSummary, SDKValidationError> {
|
|
234
|
+
return safeParse(
|
|
235
|
+
jsonString,
|
|
236
|
+
(x) => TierSummary$inboundSchema.parse(JSON.parse(x)),
|
|
237
|
+
`Failed to parse 'TierSummary' from JSON`,
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const Comparables$inboundSchema: z.ZodType<
|
|
243
|
+
Comparables,
|
|
244
|
+
z.ZodTypeDef,
|
|
245
|
+
unknown
|
|
246
|
+
> = z.object({
|
|
247
|
+
list: z.array(AnalysisComparable$inboundSchema),
|
|
248
|
+
tierSummary: z.lazy(() => TierSummary$inboundSchema),
|
|
249
|
+
total: z.number().int(),
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export function comparablesFromJSON(
|
|
253
|
+
jsonString: string,
|
|
254
|
+
): SafeParseResult<Comparables, SDKValidationError> {
|
|
255
|
+
return safeParse(
|
|
256
|
+
jsonString,
|
|
257
|
+
(x) => Comparables$inboundSchema.parse(JSON.parse(x)),
|
|
258
|
+
`Failed to parse 'Comparables' from JSON`,
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** @internal */
|
|
263
|
+
export const Confidence$inboundSchema: z.ZodType<
|
|
264
|
+
Confidence,
|
|
265
|
+
z.ZodTypeDef,
|
|
266
|
+
unknown
|
|
267
|
+
> = z.object({
|
|
268
|
+
dataQuality: z.number().optional(),
|
|
269
|
+
modelAgreement: z.number().optional(),
|
|
270
|
+
score: z.number().optional(),
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
export function confidenceFromJSON(
|
|
274
|
+
jsonString: string,
|
|
275
|
+
): SafeParseResult<Confidence, SDKValidationError> {
|
|
276
|
+
return safeParse(
|
|
277
|
+
jsonString,
|
|
278
|
+
(x) => Confidence$inboundSchema.parse(JSON.parse(x)),
|
|
279
|
+
`Failed to parse 'Confidence' from JSON`,
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
export const Change12Month$inboundSchema: z.ZodType<
|
|
285
|
+
Change12Month,
|
|
286
|
+
z.ZodTypeDef,
|
|
287
|
+
unknown
|
|
288
|
+
> = z.object({
|
|
289
|
+
amount: z.number(),
|
|
290
|
+
percentage: z.number(),
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
export function change12MonthFromJSON(
|
|
294
|
+
jsonString: string,
|
|
295
|
+
): SafeParseResult<Change12Month, SDKValidationError> {
|
|
296
|
+
return safeParse(
|
|
297
|
+
jsonString,
|
|
298
|
+
(x) => Change12Month$inboundSchema.parse(JSON.parse(x)),
|
|
299
|
+
`Failed to parse 'Change12Month' from JSON`,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/** @internal */
|
|
304
|
+
export const Change6Month$inboundSchema: z.ZodType<
|
|
305
|
+
Change6Month,
|
|
306
|
+
z.ZodTypeDef,
|
|
307
|
+
unknown
|
|
308
|
+
> = z.object({
|
|
309
|
+
amount: z.number(),
|
|
310
|
+
percentage: z.number(),
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
export function change6MonthFromJSON(
|
|
314
|
+
jsonString: string,
|
|
315
|
+
): SafeParseResult<Change6Month, SDKValidationError> {
|
|
316
|
+
return safeParse(
|
|
317
|
+
jsonString,
|
|
318
|
+
(x) => Change6Month$inboundSchema.parse(JSON.parse(x)),
|
|
319
|
+
`Failed to parse 'Change6Month' from JSON`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const Trend$inboundSchema: z.ZodNativeEnum<typeof Trend> = z.nativeEnum(
|
|
325
|
+
Trend,
|
|
326
|
+
);
|
|
327
|
+
|
|
328
|
+
/** @internal */
|
|
329
|
+
export const Summary$inboundSchema: z.ZodType<Summary, z.ZodTypeDef, unknown> =
|
|
330
|
+
z.object({
|
|
331
|
+
change12Month: z.lazy(() => Change12Month$inboundSchema).optional(),
|
|
332
|
+
change6Month: z.lazy(() => Change6Month$inboundSchema).optional(),
|
|
333
|
+
trend: Trend$inboundSchema,
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
export function summaryFromJSON(
|
|
337
|
+
jsonString: string,
|
|
338
|
+
): SafeParseResult<Summary, SDKValidationError> {
|
|
339
|
+
return safeParse(
|
|
340
|
+
jsonString,
|
|
341
|
+
(x) => Summary$inboundSchema.parse(JSON.parse(x)),
|
|
342
|
+
`Failed to parse 'Summary' from JSON`,
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** @internal */
|
|
347
|
+
export const History$inboundSchema: z.ZodType<History, z.ZodTypeDef, unknown> =
|
|
348
|
+
z.object({
|
|
349
|
+
summary: z.lazy(() => Summary$inboundSchema),
|
|
350
|
+
valuations: z.array(HistoricalValuation$inboundSchema),
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
export function historyFromJSON(
|
|
354
|
+
jsonString: string,
|
|
355
|
+
): SafeParseResult<History, SDKValidationError> {
|
|
356
|
+
return safeParse(
|
|
357
|
+
jsonString,
|
|
358
|
+
(x) => History$inboundSchema.parse(JSON.parse(x)),
|
|
359
|
+
`Failed to parse 'History' from JSON`,
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** @internal */
|
|
364
|
+
export const Severity$inboundSchema: z.ZodNativeEnum<typeof Severity> = z
|
|
365
|
+
.nativeEnum(Severity);
|
|
366
|
+
|
|
367
|
+
/** @internal */
|
|
368
|
+
export const Issues$inboundSchema: z.ZodType<Issues, z.ZodTypeDef, unknown> = z
|
|
369
|
+
.object({
|
|
370
|
+
message: z.string(),
|
|
371
|
+
severity: Severity$inboundSchema,
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
export function issuesFromJSON(
|
|
375
|
+
jsonString: string,
|
|
376
|
+
): SafeParseResult<Issues, SDKValidationError> {
|
|
377
|
+
return safeParse(
|
|
378
|
+
jsonString,
|
|
379
|
+
(x) => Issues$inboundSchema.parse(JSON.parse(x)),
|
|
380
|
+
`Failed to parse 'Issues' from JSON`,
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** @internal */
|
|
385
|
+
export const PriceRange$inboundSchema: z.ZodType<
|
|
386
|
+
PriceRange,
|
|
387
|
+
z.ZodTypeDef,
|
|
388
|
+
unknown
|
|
389
|
+
> = z.object({
|
|
390
|
+
max: z.number(),
|
|
391
|
+
min: z.number(),
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
export function priceRangeFromJSON(
|
|
395
|
+
jsonString: string,
|
|
396
|
+
): SafeParseResult<PriceRange, SDKValidationError> {
|
|
397
|
+
return safeParse(
|
|
398
|
+
jsonString,
|
|
399
|
+
(x) => PriceRange$inboundSchema.parse(JSON.parse(x)),
|
|
400
|
+
`Failed to parse 'PriceRange' from JSON`,
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/** @internal */
|
|
405
|
+
export const MarketStats$inboundSchema: z.ZodType<
|
|
406
|
+
MarketStats,
|
|
407
|
+
z.ZodTypeDef,
|
|
408
|
+
unknown
|
|
409
|
+
> = z.object({
|
|
410
|
+
meanPrice: z.number(),
|
|
411
|
+
medianPrice: z.number(),
|
|
412
|
+
medianPricePerSqm: z.number().optional(),
|
|
413
|
+
priceRange: z.lazy(() => PriceRange$inboundSchema),
|
|
414
|
+
weightedAverage: z.number(),
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
export function marketStatsFromJSON(
|
|
418
|
+
jsonString: string,
|
|
419
|
+
): SafeParseResult<MarketStats, SDKValidationError> {
|
|
420
|
+
return safeParse(
|
|
421
|
+
jsonString,
|
|
422
|
+
(x) => MarketStats$inboundSchema.parse(JSON.parse(x)),
|
|
423
|
+
`Failed to parse 'MarketStats' from JSON`,
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/** @internal */
|
|
428
|
+
export const PropertyFactors$inboundSchema: z.ZodType<
|
|
429
|
+
PropertyFactors,
|
|
430
|
+
z.ZodTypeDef,
|
|
431
|
+
unknown
|
|
432
|
+
> = z.object({
|
|
433
|
+
baths: z.number().int().optional(),
|
|
434
|
+
beds: z.number().int().optional(),
|
|
435
|
+
condition: z.string().optional(),
|
|
436
|
+
epc: z.string().optional(),
|
|
437
|
+
floorArea: z.number().optional(),
|
|
438
|
+
propertyType: z.string().optional(),
|
|
439
|
+
yearBuilt: z.number().int().optional(),
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
export function propertyFactorsFromJSON(
|
|
443
|
+
jsonString: string,
|
|
444
|
+
): SafeParseResult<PropertyFactors, SDKValidationError> {
|
|
445
|
+
return safeParse(
|
|
446
|
+
jsonString,
|
|
447
|
+
(x) => PropertyFactors$inboundSchema.parse(JSON.parse(x)),
|
|
448
|
+
`Failed to parse 'PropertyFactors' from JSON`,
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/** @internal */
|
|
453
|
+
export const SaleHistory$inboundSchema: z.ZodType<
|
|
454
|
+
SaleHistory,
|
|
455
|
+
z.ZodTypeDef,
|
|
456
|
+
unknown
|
|
457
|
+
> = z.object({
|
|
458
|
+
date: z.string(),
|
|
459
|
+
price: z.number(),
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
export function saleHistoryFromJSON(
|
|
463
|
+
jsonString: string,
|
|
464
|
+
): SafeParseResult<SaleHistory, SDKValidationError> {
|
|
465
|
+
return safeParse(
|
|
466
|
+
jsonString,
|
|
467
|
+
(x) => SaleHistory$inboundSchema.parse(JSON.parse(x)),
|
|
468
|
+
`Failed to parse 'SaleHistory' from JSON`,
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/** @internal */
|
|
473
|
+
export const Valuation$inboundSchema: z.ZodType<
|
|
474
|
+
Valuation,
|
|
475
|
+
z.ZodTypeDef,
|
|
476
|
+
unknown
|
|
477
|
+
> = z.object({
|
|
478
|
+
confidence: z.number(),
|
|
479
|
+
confidenceInterval: AVMConfidenceInterval$inboundSchema,
|
|
480
|
+
estimatedPrice: z.number(),
|
|
481
|
+
modelAgreement: z.number().optional(),
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
export function valuationFromJSON(
|
|
485
|
+
jsonString: string,
|
|
486
|
+
): SafeParseResult<Valuation, SDKValidationError> {
|
|
487
|
+
return safeParse(
|
|
488
|
+
jsonString,
|
|
489
|
+
(x) => Valuation$inboundSchema.parse(JSON.parse(x)),
|
|
490
|
+
`Failed to parse 'Valuation' from JSON`,
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/** @internal */
|
|
495
|
+
export const AVMAnalysisResponse$inboundSchema: z.ZodType<
|
|
496
|
+
AVMAnalysisResponse,
|
|
497
|
+
z.ZodTypeDef,
|
|
498
|
+
unknown
|
|
499
|
+
> = z.object({
|
|
500
|
+
comparables: z.lazy(() => Comparables$inboundSchema),
|
|
501
|
+
confidence: z.lazy(() => Confidence$inboundSchema),
|
|
502
|
+
history: z.lazy(() => History$inboundSchema).optional(),
|
|
503
|
+
issues: z.array(z.lazy(() => Issues$inboundSchema)),
|
|
504
|
+
marketStats: z.lazy(() => MarketStats$inboundSchema),
|
|
505
|
+
propertyFactors: z.lazy(() => PropertyFactors$inboundSchema),
|
|
506
|
+
saleHistory: z.array(z.lazy(() => SaleHistory$inboundSchema)).optional(),
|
|
507
|
+
success: z.boolean(),
|
|
508
|
+
valuation: z.lazy(() => Valuation$inboundSchema),
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
export function avmAnalysisResponseFromJSON(
|
|
512
|
+
jsonString: string,
|
|
513
|
+
): SafeParseResult<AVMAnalysisResponse, SDKValidationError> {
|
|
514
|
+
return safeParse(
|
|
515
|
+
jsonString,
|
|
516
|
+
(x) => AVMAnalysisResponse$inboundSchema.parse(JSON.parse(x)),
|
|
517
|
+
`Failed to parse 'AVMAnalysisResponse' from JSON`,
|
|
518
|
+
);
|
|
519
|
+
}
|
|
@@ -66,14 +66,16 @@ export type PropertyType = ClosedEnum<typeof PropertyType>;
|
|
|
66
66
|
/**
|
|
67
67
|
* Type of transaction - sale or rental valuation
|
|
68
68
|
*/
|
|
69
|
-
export const
|
|
69
|
+
export const AVMPredictByLocationRequestTransactionType = {
|
|
70
70
|
Sale: "sale",
|
|
71
71
|
Rent: "rent",
|
|
72
72
|
} as const;
|
|
73
73
|
/**
|
|
74
74
|
* Type of transaction - sale or rental valuation
|
|
75
75
|
*/
|
|
76
|
-
export type
|
|
76
|
+
export type AVMPredictByLocationRequestTransactionType = ClosedEnum<
|
|
77
|
+
typeof AVMPredictByLocationRequestTransactionType
|
|
78
|
+
>;
|
|
77
79
|
|
|
78
80
|
/**
|
|
79
81
|
* Request to predict property value by location ID
|
|
@@ -122,7 +124,7 @@ export type AVMPredictByLocationRequest = {
|
|
|
122
124
|
/**
|
|
123
125
|
* Type of transaction - sale or rental valuation
|
|
124
126
|
*/
|
|
125
|
-
transactionType?:
|
|
127
|
+
transactionType?: AVMPredictByLocationRequestTransactionType | undefined;
|
|
126
128
|
/**
|
|
127
129
|
* Override year the property was built
|
|
128
130
|
*/
|
|
@@ -143,9 +145,9 @@ export const PropertyType$outboundSchema: z.ZodNativeEnum<typeof PropertyType> =
|
|
|
143
145
|
z.nativeEnum(PropertyType);
|
|
144
146
|
|
|
145
147
|
/** @internal */
|
|
146
|
-
export const
|
|
147
|
-
typeof
|
|
148
|
-
|
|
148
|
+
export const AVMPredictByLocationRequestTransactionType$outboundSchema:
|
|
149
|
+
z.ZodNativeEnum<typeof AVMPredictByLocationRequestTransactionType> = z
|
|
150
|
+
.nativeEnum(AVMPredictByLocationRequestTransactionType);
|
|
149
151
|
|
|
150
152
|
/** @internal */
|
|
151
153
|
export type AVMPredictByLocationRequest$Outbound = {
|
|
@@ -179,7 +181,8 @@ export const AVMPredictByLocationRequest$outboundSchema: z.ZodType<
|
|
|
179
181
|
locationId: z.string(),
|
|
180
182
|
propertyType: PropertyType$outboundSchema.optional(),
|
|
181
183
|
ratePrice: z.boolean().optional(),
|
|
182
|
-
transactionType:
|
|
184
|
+
transactionType: AVMPredictByLocationRequestTransactionType$outboundSchema
|
|
185
|
+
.default("sale"),
|
|
183
186
|
yearBuilt: z.number().int().optional(),
|
|
184
187
|
});
|
|
185
188
|
|
|
@@ -64,7 +64,7 @@ export type Status = ClosedEnum<typeof Status>;
|
|
|
64
64
|
/**
|
|
65
65
|
* Council type classification
|
|
66
66
|
*/
|
|
67
|
-
export const
|
|
67
|
+
export const CouncilType = {
|
|
68
68
|
Unitary: "unitary",
|
|
69
69
|
Metropolitan: "metropolitan",
|
|
70
70
|
County: "county",
|
|
@@ -75,7 +75,7 @@ export const Type = {
|
|
|
75
75
|
/**
|
|
76
76
|
* Council type classification
|
|
77
77
|
*/
|
|
78
|
-
export type
|
|
78
|
+
export type CouncilType = ClosedEnum<typeof CouncilType>;
|
|
79
79
|
|
|
80
80
|
export type Council = {
|
|
81
81
|
branding?: CouncilBranding | undefined;
|
|
@@ -129,7 +129,7 @@ export type Council = {
|
|
|
129
129
|
/**
|
|
130
130
|
* Council type classification
|
|
131
131
|
*/
|
|
132
|
-
type:
|
|
132
|
+
type: CouncilType | null;
|
|
133
133
|
/**
|
|
134
134
|
* Last update timestamp in ISO format
|
|
135
135
|
*/
|
|
@@ -153,9 +153,8 @@ export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
|
153
153
|
.nativeEnum(Status);
|
|
154
154
|
|
|
155
155
|
/** @internal */
|
|
156
|
-
export const
|
|
157
|
-
|
|
158
|
-
);
|
|
156
|
+
export const CouncilType$inboundSchema: z.ZodNativeEnum<typeof CouncilType> = z
|
|
157
|
+
.nativeEnum(CouncilType);
|
|
159
158
|
|
|
160
159
|
/** @internal */
|
|
161
160
|
export const Council$inboundSchema: z.ZodType<Council, z.ZodTypeDef, unknown> =
|
|
@@ -175,7 +174,7 @@ export const Council$inboundSchema: z.ZodType<Council, z.ZodTypeDef, unknown> =
|
|
|
175
174
|
providerId: z.nullable(z.string()),
|
|
176
175
|
serviceUrls: CouncilServiceUrls$inboundSchema.optional(),
|
|
177
176
|
status: Status$inboundSchema,
|
|
178
|
-
type: z.nullable(
|
|
177
|
+
type: z.nullable(CouncilType$inboundSchema),
|
|
179
178
|
updatedAt: z.string(),
|
|
180
179
|
verified: z.boolean(),
|
|
181
180
|
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 95% confidence interval
|
|
12
|
+
*/
|
|
13
|
+
export type ConfidenceInterval = {
|
|
14
|
+
lower: number;
|
|
15
|
+
upper: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Point-in-time valuation snapshot
|
|
20
|
+
*/
|
|
21
|
+
export type HistoricalValuation = {
|
|
22
|
+
/**
|
|
23
|
+
* Number of comparables used
|
|
24
|
+
*/
|
|
25
|
+
comparablesCount: number;
|
|
26
|
+
/**
|
|
27
|
+
* Confidence score (0-1)
|
|
28
|
+
*/
|
|
29
|
+
confidence: number;
|
|
30
|
+
/**
|
|
31
|
+
* 95% confidence interval
|
|
32
|
+
*/
|
|
33
|
+
confidenceInterval: ConfidenceInterval;
|
|
34
|
+
/**
|
|
35
|
+
* Valuation date (YYYY-MM-DD)
|
|
36
|
+
*/
|
|
37
|
+
date: string;
|
|
38
|
+
/**
|
|
39
|
+
* Estimated price at this date
|
|
40
|
+
*/
|
|
41
|
+
estimatedPrice: number;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ConfidenceInterval$inboundSchema: z.ZodType<
|
|
46
|
+
ConfidenceInterval,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
lower: z.number(),
|
|
51
|
+
upper: z.number(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function confidenceIntervalFromJSON(
|
|
55
|
+
jsonString: string,
|
|
56
|
+
): SafeParseResult<ConfidenceInterval, SDKValidationError> {
|
|
57
|
+
return safeParse(
|
|
58
|
+
jsonString,
|
|
59
|
+
(x) => ConfidenceInterval$inboundSchema.parse(JSON.parse(x)),
|
|
60
|
+
`Failed to parse 'ConfidenceInterval' from JSON`,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const HistoricalValuation$inboundSchema: z.ZodType<
|
|
66
|
+
HistoricalValuation,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
unknown
|
|
69
|
+
> = z.object({
|
|
70
|
+
comparablesCount: z.number().int(),
|
|
71
|
+
confidence: z.number(),
|
|
72
|
+
confidenceInterval: z.lazy(() => ConfidenceInterval$inboundSchema),
|
|
73
|
+
date: z.string(),
|
|
74
|
+
estimatedPrice: z.number(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export function historicalValuationFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<HistoricalValuation, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => HistoricalValuation$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'HistoricalValuation' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|