@vepler/sdk 2.8.0 → 2.9.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 +7 -7
- package/dist/commonjs/funcs/avmPredictPropertyValue.d.ts +1 -1
- package/dist/commonjs/funcs/avmPredictPropertyValue.js +1 -1
- package/dist/commonjs/funcs/avmPredictPropertyValueByLocation.d.ts +18 -0
- package/dist/commonjs/funcs/avmPredictPropertyValueByLocation.d.ts.map +1 -0
- package/dist/commonjs/funcs/{epcGetEPC.js → avmPredictPropertyValueByLocation.js} +13 -17
- package/dist/commonjs/funcs/avmPredictPropertyValueByLocation.js.map +1 -0
- package/dist/commonjs/funcs/roaVerifyROA.d.ts +18 -0
- package/dist/commonjs/funcs/roaVerifyROA.d.ts.map +1 -0
- package/dist/commonjs/funcs/{epcGetEPCByPostcode.js → roaVerifyROA.js} +15 -17
- package/dist/commonjs/funcs/roaVerifyROA.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/avm.d.ts +8 -1
- package/dist/commonjs/sdk/avm.d.ts.map +1 -1
- package/dist/commonjs/sdk/avm.js +11 -1
- package/dist/commonjs/sdk/avm.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.d.ts +2 -2
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +2 -2
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/predictpropertyvaluebylocation.d.ts +206 -0
- package/dist/commonjs/sdk/models/operations/predictpropertyvaluebylocation.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/predictpropertyvaluebylocation.js +199 -0
- package/dist/commonjs/sdk/models/operations/predictpropertyvaluebylocation.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/verifyroa.d.ts +9 -0
- package/dist/commonjs/sdk/models/operations/verifyroa.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/verifyroa.js +52 -0
- package/dist/commonjs/sdk/models/operations/verifyroa.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.d.ts +148 -0
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.js +119 -0
- package/dist/commonjs/sdk/models/shared/avmpredictbylocationrequest.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/avmpredictrequest.d.ts +16 -16
- package/dist/commonjs/sdk/models/shared/avmpredictrequest.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/avmpredictrequest.js +13 -14
- package/dist/commonjs/sdk/models/shared/avmpredictrequest.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.d.ts +4 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +4 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/roaerror.d.ts +21 -0
- package/dist/commonjs/sdk/models/shared/roaerror.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/roaerror.js +62 -0
- package/dist/commonjs/sdk/models/shared/roaerror.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/roaverifyrequest.d.ts +36 -0
- package/dist/commonjs/sdk/models/shared/roaverifyrequest.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/roaverifyrequest.js +61 -0
- package/dist/commonjs/sdk/models/shared/roaverifyrequest.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/roaverifyresponse.d.ts +521 -0
- package/dist/commonjs/sdk/models/shared/roaverifyresponse.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/roaverifyresponse.js +457 -0
- package/dist/commonjs/sdk/models/shared/roaverifyresponse.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/searchresponse.d.ts +4 -4
- package/dist/commonjs/sdk/models/shared/searchresponse.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/searchresponse.js +6 -6
- package/dist/commonjs/sdk/models/shared/searchresponse.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/searchresult.d.ts +4 -4
- package/dist/commonjs/sdk/models/shared/searchresult.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/searchresult.js +6 -6
- package/dist/commonjs/sdk/models/shared/searchresult.js.map +1 -1
- package/dist/commonjs/sdk/roa.d.ts +13 -0
- package/dist/commonjs/sdk/roa.d.ts.map +1 -0
- package/dist/commonjs/sdk/roa.js +22 -0
- package/dist/commonjs/sdk/roa.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/types/enums.d.ts +1 -8
- package/dist/commonjs/sdk/types/enums.d.ts.map +1 -1
- package/dist/commonjs/sdk/types/enums.js +3 -21
- package/dist/commonjs/sdk/types/enums.js.map +1 -1
- package/dist/commonjs/sdk/types/index.d.ts +2 -1
- package/dist/commonjs/sdk/types/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/types/index.js +15 -0
- package/dist/commonjs/sdk/types/index.js.map +1 -1
- package/dist/commonjs/sdk/types/unrecognized.d.ts +10 -0
- package/dist/commonjs/sdk/types/unrecognized.d.ts.map +1 -0
- package/dist/commonjs/sdk/types/unrecognized.js +26 -0
- package/dist/commonjs/sdk/types/unrecognized.js.map +1 -0
- package/dist/esm/funcs/avmPredictPropertyValue.d.ts +1 -1
- package/dist/esm/funcs/avmPredictPropertyValue.js +1 -1
- package/dist/esm/funcs/avmPredictPropertyValueByLocation.d.ts +18 -0
- package/dist/esm/funcs/avmPredictPropertyValueByLocation.d.ts.map +1 -0
- package/dist/esm/funcs/{epcGetEPC.js → avmPredictPropertyValueByLocation.js} +13 -17
- package/dist/esm/funcs/avmPredictPropertyValueByLocation.js.map +1 -0
- package/dist/esm/funcs/roaVerifyROA.d.ts +18 -0
- package/dist/esm/funcs/roaVerifyROA.d.ts.map +1 -0
- package/dist/esm/funcs/{epcGetEPCByPostcode.js → roaVerifyROA.js} +15 -17
- package/dist/esm/funcs/roaVerifyROA.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/avm.d.ts +8 -1
- package/dist/esm/sdk/avm.d.ts.map +1 -1
- package/dist/esm/sdk/avm.js +11 -1
- package/dist/esm/sdk/avm.js.map +1 -1
- package/dist/esm/sdk/models/operations/index.d.ts +2 -2
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +2 -2
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/predictpropertyvaluebylocation.d.ts +206 -0
- package/dist/esm/sdk/models/operations/predictpropertyvaluebylocation.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/predictpropertyvaluebylocation.js +154 -0
- package/dist/esm/sdk/models/operations/predictpropertyvaluebylocation.js.map +1 -0
- package/dist/esm/sdk/models/operations/verifyroa.d.ts +9 -0
- package/dist/esm/sdk/models/operations/verifyroa.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/verifyroa.js +15 -0
- package/dist/esm/sdk/models/operations/verifyroa.js.map +1 -0
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.d.ts +148 -0
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.js +82 -0
- package/dist/esm/sdk/models/shared/avmpredictbylocationrequest.js.map +1 -0
- package/dist/esm/sdk/models/shared/avmpredictrequest.d.ts +16 -16
- package/dist/esm/sdk/models/shared/avmpredictrequest.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/avmpredictrequest.js +12 -13
- package/dist/esm/sdk/models/shared/avmpredictrequest.js.map +1 -1
- package/dist/esm/sdk/models/shared/index.d.ts +4 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +4 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/roaerror.d.ts +21 -0
- package/dist/esm/sdk/models/shared/roaerror.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/roaerror.js +24 -0
- package/dist/esm/sdk/models/shared/roaerror.js.map +1 -0
- package/dist/esm/sdk/models/shared/roaverifyrequest.d.ts +36 -0
- package/dist/esm/sdk/models/shared/roaverifyrequest.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/roaverifyrequest.js +24 -0
- package/dist/esm/sdk/models/shared/roaverifyrequest.js.map +1 -0
- package/dist/esm/sdk/models/shared/roaverifyresponse.d.ts +521 -0
- package/dist/esm/sdk/models/shared/roaverifyresponse.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/roaverifyresponse.js +397 -0
- package/dist/esm/sdk/models/shared/roaverifyresponse.js.map +1 -0
- package/dist/esm/sdk/models/shared/searchresponse.d.ts +4 -4
- package/dist/esm/sdk/models/shared/searchresponse.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/searchresponse.js +4 -4
- package/dist/esm/sdk/models/shared/searchresponse.js.map +1 -1
- package/dist/esm/sdk/models/shared/searchresult.d.ts +4 -4
- package/dist/esm/sdk/models/shared/searchresult.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/searchresult.js +4 -4
- package/dist/esm/sdk/models/shared/searchresult.js.map +1 -1
- package/dist/esm/sdk/roa.d.ts +13 -0
- package/dist/esm/sdk/roa.d.ts.map +1 -0
- package/dist/esm/sdk/roa.js +18 -0
- package/dist/esm/sdk/roa.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/types/enums.d.ts +1 -8
- package/dist/esm/sdk/types/enums.d.ts.map +1 -1
- package/dist/esm/sdk/types/enums.js +1 -18
- package/dist/esm/sdk/types/enums.js.map +1 -1
- package/dist/esm/sdk/types/index.d.ts +2 -1
- package/dist/esm/sdk/types/index.d.ts.map +1 -1
- package/dist/esm/sdk/types/index.js +1 -0
- package/dist/esm/sdk/types/index.js.map +1 -1
- package/dist/esm/sdk/types/unrecognized.d.ts +10 -0
- package/dist/esm/sdk/types/unrecognized.d.ts.map +1 -0
- package/dist/esm/sdk/types/unrecognized.js +23 -0
- package/dist/esm/sdk/types/unrecognized.js.map +1 -0
- package/package.json +1 -1
- package/src/funcs/avmPredictPropertyValue.ts +1 -1
- package/src/funcs/{epcGetEPC.ts → avmPredictPropertyValueByLocation.ts} +36 -24
- package/src/funcs/{epcGetEPCByPostcode.ts → roaVerifyROA.ts} +21 -23
- package/src/lib/config.ts +3 -3
- package/src/sdk/avm.ts +19 -1
- package/src/sdk/models/operations/index.ts +2 -2
- package/src/sdk/models/operations/predictpropertyvaluebylocation.ts +479 -0
- package/src/sdk/models/operations/verifyroa.ts +31 -0
- package/src/sdk/models/shared/avmpredictbylocationrequest.ts +194 -0
- package/src/sdk/models/shared/avmpredictrequest.ts +36 -26
- package/src/sdk/models/shared/index.ts +4 -0
- package/src/sdk/models/shared/roaerror.ts +57 -0
- package/src/sdk/models/shared/roaverifyrequest.ts +58 -0
- package/src/sdk/models/shared/roaverifyresponse.ts +1062 -0
- package/src/sdk/models/shared/searchresponse.ts +9 -9
- package/src/sdk/models/shared/searchresult.ts +9 -9
- package/src/sdk/roa.ts +28 -0
- package/src/sdk/sdk.ts +6 -6
- package/src/sdk/types/enums.ts +1 -21
- package/src/sdk/types/index.ts +2 -1
- package/src/sdk/types/unrecognized.ts +27 -0
- package/dist/commonjs/funcs/epcGetEPC.d.ts +0 -17
- package/dist/commonjs/funcs/epcGetEPC.d.ts.map +0 -1
- package/dist/commonjs/funcs/epcGetEPC.js.map +0 -1
- package/dist/commonjs/funcs/epcGetEPCByPostcode.d.ts +0 -17
- package/dist/commonjs/funcs/epcGetEPCByPostcode.d.ts.map +0 -1
- package/dist/commonjs/funcs/epcGetEPCByPostcode.js.map +0 -1
- package/dist/commonjs/sdk/epc.d.ts +0 -19
- package/dist/commonjs/sdk/epc.d.ts.map +0 -1
- package/dist/commonjs/sdk/epc.js +0 -32
- package/dist/commonjs/sdk/epc.js.map +0 -1
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.d.ts +0 -130
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.d.ts.map +0 -1
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.js +0 -140
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.js.map +0 -1
- package/dist/commonjs/sdk/models/operations/getepcbypostcode.d.ts +0 -82
- package/dist/commonjs/sdk/models/operations/getepcbypostcode.d.ts.map +0 -1
- package/dist/commonjs/sdk/models/operations/getepcbypostcode.js +0 -105
- package/dist/commonjs/sdk/models/operations/getepcbypostcode.js.map +0 -1
- package/dist/esm/funcs/epcGetEPC.d.ts +0 -17
- package/dist/esm/funcs/epcGetEPC.d.ts.map +0 -1
- package/dist/esm/funcs/epcGetEPC.js.map +0 -1
- package/dist/esm/funcs/epcGetEPCByPostcode.d.ts +0 -17
- package/dist/esm/funcs/epcGetEPCByPostcode.d.ts.map +0 -1
- package/dist/esm/funcs/epcGetEPCByPostcode.js.map +0 -1
- package/dist/esm/sdk/epc.d.ts +0 -19
- package/dist/esm/sdk/epc.d.ts.map +0 -1
- package/dist/esm/sdk/epc.js +0 -28
- package/dist/esm/sdk/epc.js.map +0 -1
- package/dist/esm/sdk/models/operations/getepcbylocationid.d.ts +0 -130
- package/dist/esm/sdk/models/operations/getepcbylocationid.d.ts.map +0 -1
- package/dist/esm/sdk/models/operations/getepcbylocationid.js +0 -97
- package/dist/esm/sdk/models/operations/getepcbylocationid.js.map +0 -1
- package/dist/esm/sdk/models/operations/getepcbypostcode.d.ts +0 -82
- package/dist/esm/sdk/models/operations/getepcbypostcode.d.ts.map +0 -1
- package/dist/esm/sdk/models/operations/getepcbypostcode.js +0 -64
- package/dist/esm/sdk/models/operations/getepcbypostcode.js.map +0 -1
- package/src/sdk/epc.ts +0 -45
- package/src/sdk/models/operations/getepcbylocationid.ts +0 -291
- package/src/sdk/models/operations/getepcbypostcode.ts +0 -188
|
@@ -0,0 +1,1062 @@
|
|
|
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
|
+
|
|
11
|
+
export type Coordinates = {
|
|
12
|
+
lat: number;
|
|
13
|
+
lon: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Method = {
|
|
17
|
+
ElasticsearchExact: "elasticsearch-exact",
|
|
18
|
+
ElasticsearchPartial: "elasticsearch-partial",
|
|
19
|
+
ElasticsearchFuzzy: "elasticsearch-fuzzy",
|
|
20
|
+
ElasticsearchDirect: "elasticsearch-direct",
|
|
21
|
+
PostcodeFallback: "postcode-fallback",
|
|
22
|
+
SpatialMatch: "spatial-match",
|
|
23
|
+
SpatialNarrative: "spatial-narrative",
|
|
24
|
+
Unmatched: "unmatched",
|
|
25
|
+
} as const;
|
|
26
|
+
export type Method = ClosedEnum<typeof Method>;
|
|
27
|
+
|
|
28
|
+
export type AddressResolution = {
|
|
29
|
+
canonicalAddress?: string | undefined;
|
|
30
|
+
confidence: number;
|
|
31
|
+
coordinates?: Coordinates | undefined;
|
|
32
|
+
input: string;
|
|
33
|
+
matched: boolean;
|
|
34
|
+
method: Method;
|
|
35
|
+
processingSteps?: Array<string> | undefined;
|
|
36
|
+
uprn?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const Severity = {
|
|
40
|
+
Critical: "critical",
|
|
41
|
+
Warning: "warning",
|
|
42
|
+
Info: "info",
|
|
43
|
+
} as const;
|
|
44
|
+
export type Severity = ClosedEnum<typeof Severity>;
|
|
45
|
+
|
|
46
|
+
export type Checks = {
|
|
47
|
+
details: string;
|
|
48
|
+
name: string;
|
|
49
|
+
passed: boolean;
|
|
50
|
+
severity?: Severity | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const RoaVerifyResponseVerdict = {
|
|
54
|
+
Pass: "PASS",
|
|
55
|
+
Warning: "WARNING",
|
|
56
|
+
Fail: "FAIL",
|
|
57
|
+
} as const;
|
|
58
|
+
export type RoaVerifyResponseVerdict = ClosedEnum<
|
|
59
|
+
typeof RoaVerifyResponseVerdict
|
|
60
|
+
>;
|
|
61
|
+
|
|
62
|
+
export type Appropriateness = {
|
|
63
|
+
checks: Array<Checks>;
|
|
64
|
+
score: number;
|
|
65
|
+
summary: string;
|
|
66
|
+
verdict: RoaVerifyResponseVerdict;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type ConcentrationMetrics = {
|
|
70
|
+
averageForPropertyType: number;
|
|
71
|
+
companiesAtBuilding?: number | undefined;
|
|
72
|
+
companiesAtPostcode: number;
|
|
73
|
+
companiesAtUPRN: number;
|
|
74
|
+
percentileRank?: number | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const Impact = {
|
|
78
|
+
None: "none",
|
|
79
|
+
Low: "low",
|
|
80
|
+
Medium: "medium",
|
|
81
|
+
High: "high",
|
|
82
|
+
} as const;
|
|
83
|
+
export type Impact = ClosedEnum<typeof Impact>;
|
|
84
|
+
|
|
85
|
+
export const Risk = {
|
|
86
|
+
None: "none",
|
|
87
|
+
Low: "low",
|
|
88
|
+
Medium: "medium",
|
|
89
|
+
High: "high",
|
|
90
|
+
} as const;
|
|
91
|
+
export type Risk = ClosedEnum<typeof Risk>;
|
|
92
|
+
|
|
93
|
+
export type RoaVerifyResponseValue = number | boolean | string;
|
|
94
|
+
|
|
95
|
+
export type RoaVerifyResponseFeatures = {
|
|
96
|
+
description: string;
|
|
97
|
+
impact?: Impact | undefined;
|
|
98
|
+
name: string;
|
|
99
|
+
risk: Risk;
|
|
100
|
+
threshold?: number | undefined;
|
|
101
|
+
value: number | boolean | string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const RecommendedAction = {
|
|
105
|
+
Approve: "APPROVE",
|
|
106
|
+
Review: "REVIEW",
|
|
107
|
+
Reject: "REJECT",
|
|
108
|
+
} as const;
|
|
109
|
+
export type RecommendedAction = ClosedEnum<typeof RecommendedAction>;
|
|
110
|
+
|
|
111
|
+
export const RiskBand = {
|
|
112
|
+
Low: "LOW",
|
|
113
|
+
Medium: "MEDIUM",
|
|
114
|
+
High: "HIGH",
|
|
115
|
+
Critical: "CRITICAL",
|
|
116
|
+
} as const;
|
|
117
|
+
export type RiskBand = ClosedEnum<typeof RiskBand>;
|
|
118
|
+
|
|
119
|
+
export type FraudRisk = {
|
|
120
|
+
concentrationMetrics: ConcentrationMetrics;
|
|
121
|
+
features: Array<RoaVerifyResponseFeatures>;
|
|
122
|
+
overallScore: number;
|
|
123
|
+
recommendedAction: RecommendedAction;
|
|
124
|
+
riskBand: RiskBand;
|
|
125
|
+
topReasons: Array<string>;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type AddressMatch = {
|
|
129
|
+
/**
|
|
130
|
+
* Confidence score of address match
|
|
131
|
+
*/
|
|
132
|
+
confidence: number;
|
|
133
|
+
/**
|
|
134
|
+
* Details of match or mismatch
|
|
135
|
+
*/
|
|
136
|
+
details: string;
|
|
137
|
+
/**
|
|
138
|
+
* Proprietor address matches registered office address
|
|
139
|
+
*/
|
|
140
|
+
matched: boolean;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Method used for identity verification
|
|
145
|
+
*/
|
|
146
|
+
export const RoaVerifyResponseVerificationMethod = {
|
|
147
|
+
GovUkOneLogin: "gov-uk-one-login",
|
|
148
|
+
Acsp: "acsp",
|
|
149
|
+
NotVerified: "not-verified",
|
|
150
|
+
} as const;
|
|
151
|
+
/**
|
|
152
|
+
* Method used for identity verification
|
|
153
|
+
*/
|
|
154
|
+
export type RoaVerifyResponseVerificationMethod = ClosedEnum<
|
|
155
|
+
typeof RoaVerifyResponseVerificationMethod
|
|
156
|
+
>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The director/PSC submitting the ROA
|
|
160
|
+
*/
|
|
161
|
+
export type FilingOfficer = {
|
|
162
|
+
/**
|
|
163
|
+
* Identity verified through Companies House (GOV.UK One Login or ACSP)
|
|
164
|
+
*/
|
|
165
|
+
companiesHouseVerified: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Whether this person is registered as proprietor on Land Registry title deed
|
|
168
|
+
*/
|
|
169
|
+
isProprietor: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Name of director/PSC filing the ROA or making the submission
|
|
172
|
+
*/
|
|
173
|
+
name: string;
|
|
174
|
+
/**
|
|
175
|
+
* Role in company (e.g., Director, PSC, Secretary)
|
|
176
|
+
*/
|
|
177
|
+
role: string;
|
|
178
|
+
/**
|
|
179
|
+
* Date identity was verified
|
|
180
|
+
*/
|
|
181
|
+
verificationDate?: string | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Method used for identity verification
|
|
184
|
+
*/
|
|
185
|
+
verificationMethod: RoaVerifyResponseVerificationMethod;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export type NameMatch = {
|
|
189
|
+
/**
|
|
190
|
+
* Confidence score of name match
|
|
191
|
+
*/
|
|
192
|
+
confidence: number;
|
|
193
|
+
/**
|
|
194
|
+
* Details of match or mismatch
|
|
195
|
+
*/
|
|
196
|
+
details: string;
|
|
197
|
+
/**
|
|
198
|
+
* Name on title deed matches verified identity
|
|
199
|
+
*/
|
|
200
|
+
matched: boolean;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Method used for identity verification
|
|
205
|
+
*/
|
|
206
|
+
export const VerificationMethod = {
|
|
207
|
+
GovUkOneLogin: "gov-uk-one-login",
|
|
208
|
+
Acsp: "acsp",
|
|
209
|
+
NotVerified: "not-verified",
|
|
210
|
+
} as const;
|
|
211
|
+
/**
|
|
212
|
+
* Method used for identity verification
|
|
213
|
+
*/
|
|
214
|
+
export type VerificationMethod = ClosedEnum<typeof VerificationMethod>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Match between Companies House verified identity and title deed
|
|
218
|
+
*/
|
|
219
|
+
export type IdentityMatch = {
|
|
220
|
+
addressMatch: AddressMatch;
|
|
221
|
+
/**
|
|
222
|
+
* Identity verified through Companies House (GOV.UK One Login or ACSP)
|
|
223
|
+
*/
|
|
224
|
+
companiesHouseVerified: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* The director/PSC submitting the ROA
|
|
227
|
+
*/
|
|
228
|
+
filingOfficer?: FilingOfficer | undefined;
|
|
229
|
+
nameMatch: NameMatch;
|
|
230
|
+
/**
|
|
231
|
+
* Date identity was verified
|
|
232
|
+
*/
|
|
233
|
+
verificationDate?: string | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* Method used for identity verification
|
|
236
|
+
*/
|
|
237
|
+
verificationMethod: VerificationMethod;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export type Proprietors = {
|
|
241
|
+
/**
|
|
242
|
+
* Proprietor address from Title Register
|
|
243
|
+
*/
|
|
244
|
+
address?: string | undefined;
|
|
245
|
+
/**
|
|
246
|
+
* Company registration number if company proprietor
|
|
247
|
+
*/
|
|
248
|
+
companyNumber?: string | undefined;
|
|
249
|
+
/**
|
|
250
|
+
* Date proprietorship registered
|
|
251
|
+
*/
|
|
252
|
+
dateRegistered?: string | undefined;
|
|
253
|
+
/**
|
|
254
|
+
* Registered proprietor name from Title Register
|
|
255
|
+
*/
|
|
256
|
+
name: string;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Type of tenure
|
|
261
|
+
*/
|
|
262
|
+
export const TenureType = {
|
|
263
|
+
Freehold: "freehold",
|
|
264
|
+
Leasehold: "leasehold",
|
|
265
|
+
Unknown: "unknown",
|
|
266
|
+
} as const;
|
|
267
|
+
/**
|
|
268
|
+
* Type of tenure
|
|
269
|
+
*/
|
|
270
|
+
export type TenureType = ClosedEnum<typeof TenureType>;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Status of Land Registry verification
|
|
274
|
+
*/
|
|
275
|
+
export const VerificationStatus = {
|
|
276
|
+
Verified: "verified",
|
|
277
|
+
Partial: "partial",
|
|
278
|
+
NotVerified: "not-verified",
|
|
279
|
+
Unavailable: "unavailable",
|
|
280
|
+
} as const;
|
|
281
|
+
/**
|
|
282
|
+
* Status of Land Registry verification
|
|
283
|
+
*/
|
|
284
|
+
export type VerificationStatus = ClosedEnum<typeof VerificationStatus>;
|
|
285
|
+
|
|
286
|
+
export type LandRegistryVerification = {
|
|
287
|
+
/**
|
|
288
|
+
* Land Registry title deed data available
|
|
289
|
+
*/
|
|
290
|
+
available: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Any flags or concerns from Land Registry check
|
|
293
|
+
*/
|
|
294
|
+
flags?: Array<string> | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* Match between Companies House verified identity and title deed
|
|
297
|
+
*/
|
|
298
|
+
identityMatch?: IdentityMatch | undefined;
|
|
299
|
+
/**
|
|
300
|
+
* Registered proprietors from Title Register
|
|
301
|
+
*/
|
|
302
|
+
proprietors?: Array<Proprietors> | undefined;
|
|
303
|
+
/**
|
|
304
|
+
* Summary of Land Registry verification
|
|
305
|
+
*/
|
|
306
|
+
summary: string;
|
|
307
|
+
/**
|
|
308
|
+
* Type of tenure
|
|
309
|
+
*/
|
|
310
|
+
tenureType?: TenureType | undefined;
|
|
311
|
+
/**
|
|
312
|
+
* HM Land Registry title number
|
|
313
|
+
*/
|
|
314
|
+
titleNumber?: string | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* Overall Land Registry verification score
|
|
317
|
+
*/
|
|
318
|
+
verificationScore: number;
|
|
319
|
+
/**
|
|
320
|
+
* Status of Land Registry verification
|
|
321
|
+
*/
|
|
322
|
+
verificationStatus: VerificationStatus;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
export type DataSources = {
|
|
326
|
+
/**
|
|
327
|
+
* Companies House API was available and used for company data
|
|
328
|
+
*/
|
|
329
|
+
companiesHouse: boolean;
|
|
330
|
+
/**
|
|
331
|
+
* Elasticsearch was used for property characteristics
|
|
332
|
+
*/
|
|
333
|
+
elasticsearch: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* OS NGD API was available and used for property classification
|
|
336
|
+
*/
|
|
337
|
+
osNgd: boolean;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
export type ModelVersions = {
|
|
341
|
+
fraudModel: string;
|
|
342
|
+
rules: string;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* OS NGD building and address data when available
|
|
347
|
+
*/
|
|
348
|
+
export type OsNgdData = {
|
|
349
|
+
/**
|
|
350
|
+
* Number of addresses in building (serviced office indicator)
|
|
351
|
+
*/
|
|
352
|
+
addressCount?: number | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* OS NGD address feature type (Built, Pre-Build, Non-Addressable, etc.)
|
|
355
|
+
*/
|
|
356
|
+
addressType?: string | undefined;
|
|
357
|
+
/**
|
|
358
|
+
* Building age/construction period
|
|
359
|
+
*/
|
|
360
|
+
buildingAge?: string | undefined;
|
|
361
|
+
/**
|
|
362
|
+
* Number of floors in building
|
|
363
|
+
*/
|
|
364
|
+
buildingFloors?: number | undefined;
|
|
365
|
+
/**
|
|
366
|
+
* Building has green roof
|
|
367
|
+
*/
|
|
368
|
+
hasGreenRoof?: boolean | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* Building has solar panels
|
|
371
|
+
*/
|
|
372
|
+
hasSolarPanels?: boolean | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* OS NGD land use classification (Residential, Commercial, Office, etc.)
|
|
375
|
+
*/
|
|
376
|
+
landUse?: string | undefined;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export type Metadata = {
|
|
380
|
+
dataSources: DataSources;
|
|
381
|
+
modelVersions: ModelVersions;
|
|
382
|
+
/**
|
|
383
|
+
* OS NGD building and address data when available
|
|
384
|
+
*/
|
|
385
|
+
osNgdData?: OsNgdData | undefined;
|
|
386
|
+
processingTimeMs: number;
|
|
387
|
+
timestamp: string;
|
|
388
|
+
verificationId?: string | undefined;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export const OwnershipType = {
|
|
392
|
+
Individual: "individual",
|
|
393
|
+
Company: "company",
|
|
394
|
+
Public: "public",
|
|
395
|
+
Unknown: "unknown",
|
|
396
|
+
} as const;
|
|
397
|
+
export type OwnershipType = ClosedEnum<typeof OwnershipType>;
|
|
398
|
+
|
|
399
|
+
export type PropertyData = {
|
|
400
|
+
bathrooms?: number | null | undefined;
|
|
401
|
+
bedrooms?: number | null | undefined;
|
|
402
|
+
buildDate?: string | null | undefined;
|
|
403
|
+
councilTaxBand?: string | null | undefined;
|
|
404
|
+
currentOwner?: string | null | undefined;
|
|
405
|
+
epcRating?: string | null | undefined;
|
|
406
|
+
floorArea?: number | null | undefined;
|
|
407
|
+
ownershipType?: OwnershipType | null | undefined;
|
|
408
|
+
propertyType?: string | null | undefined;
|
|
409
|
+
tenure?: string | null | undefined;
|
|
410
|
+
uprn: string;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
export const Likelihood = {
|
|
414
|
+
Unknown: "UNKNOWN",
|
|
415
|
+
Low: "LOW",
|
|
416
|
+
Medium: "MEDIUM",
|
|
417
|
+
High: "HIGH",
|
|
418
|
+
} as const;
|
|
419
|
+
export type Likelihood = ClosedEnum<typeof Likelihood>;
|
|
420
|
+
|
|
421
|
+
export type Signals = {
|
|
422
|
+
confidence?: number | undefined;
|
|
423
|
+
details: string;
|
|
424
|
+
found: boolean;
|
|
425
|
+
name: string;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
export type RightToUse = {
|
|
429
|
+
confidence: number;
|
|
430
|
+
likelihood: Likelihood;
|
|
431
|
+
reasoning: Array<string>;
|
|
432
|
+
signals: Array<Signals>;
|
|
433
|
+
summary: string;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
export const Decision = {
|
|
437
|
+
Pass: "PASS",
|
|
438
|
+
PassWithFlag: "PASS_WITH_FLAG",
|
|
439
|
+
Fail: "FAIL",
|
|
440
|
+
} as const;
|
|
441
|
+
export type Decision = ClosedEnum<typeof Decision>;
|
|
442
|
+
|
|
443
|
+
export const RoaVerifyResponseRecommendedAction = {
|
|
444
|
+
Approve: "APPROVE",
|
|
445
|
+
ManualReview: "MANUAL_REVIEW",
|
|
446
|
+
Reject: "REJECT",
|
|
447
|
+
} as const;
|
|
448
|
+
export type RoaVerifyResponseRecommendedAction = ClosedEnum<
|
|
449
|
+
typeof RoaVerifyResponseRecommendedAction
|
|
450
|
+
>;
|
|
451
|
+
|
|
452
|
+
export type Verdict = {
|
|
453
|
+
confidence: number;
|
|
454
|
+
criticalIssues?: Array<string> | undefined;
|
|
455
|
+
decision: Decision;
|
|
456
|
+
flags: Array<string>;
|
|
457
|
+
recommendedAction: RoaVerifyResponseRecommendedAction;
|
|
458
|
+
summary: string;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
export type RoaVerifyResponse = {
|
|
462
|
+
addressResolution: AddressResolution;
|
|
463
|
+
appropriateness: Appropriateness;
|
|
464
|
+
fraudRisk: FraudRisk;
|
|
465
|
+
landRegistryVerification: LandRegistryVerification;
|
|
466
|
+
metadata: Metadata;
|
|
467
|
+
propertyData?: PropertyData | undefined;
|
|
468
|
+
rightToUse: RightToUse;
|
|
469
|
+
verdict: Verdict;
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
/** @internal */
|
|
473
|
+
export const Coordinates$inboundSchema: z.ZodType<
|
|
474
|
+
Coordinates,
|
|
475
|
+
z.ZodTypeDef,
|
|
476
|
+
unknown
|
|
477
|
+
> = z.object({
|
|
478
|
+
lat: z.number(),
|
|
479
|
+
lon: z.number(),
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
export function coordinatesFromJSON(
|
|
483
|
+
jsonString: string,
|
|
484
|
+
): SafeParseResult<Coordinates, SDKValidationError> {
|
|
485
|
+
return safeParse(
|
|
486
|
+
jsonString,
|
|
487
|
+
(x) => Coordinates$inboundSchema.parse(JSON.parse(x)),
|
|
488
|
+
`Failed to parse 'Coordinates' from JSON`,
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/** @internal */
|
|
493
|
+
export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
|
|
494
|
+
.nativeEnum(Method);
|
|
495
|
+
|
|
496
|
+
/** @internal */
|
|
497
|
+
export const AddressResolution$inboundSchema: z.ZodType<
|
|
498
|
+
AddressResolution,
|
|
499
|
+
z.ZodTypeDef,
|
|
500
|
+
unknown
|
|
501
|
+
> = z.object({
|
|
502
|
+
canonicalAddress: z.string().optional(),
|
|
503
|
+
confidence: z.number(),
|
|
504
|
+
coordinates: z.lazy(() => Coordinates$inboundSchema).optional(),
|
|
505
|
+
input: z.string(),
|
|
506
|
+
matched: z.boolean(),
|
|
507
|
+
method: Method$inboundSchema,
|
|
508
|
+
processingSteps: z.array(z.string()).optional(),
|
|
509
|
+
uprn: z.string().optional(),
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
export function addressResolutionFromJSON(
|
|
513
|
+
jsonString: string,
|
|
514
|
+
): SafeParseResult<AddressResolution, SDKValidationError> {
|
|
515
|
+
return safeParse(
|
|
516
|
+
jsonString,
|
|
517
|
+
(x) => AddressResolution$inboundSchema.parse(JSON.parse(x)),
|
|
518
|
+
`Failed to parse 'AddressResolution' from JSON`,
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** @internal */
|
|
523
|
+
export const Severity$inboundSchema: z.ZodNativeEnum<typeof Severity> = z
|
|
524
|
+
.nativeEnum(Severity);
|
|
525
|
+
|
|
526
|
+
/** @internal */
|
|
527
|
+
export const Checks$inboundSchema: z.ZodType<Checks, z.ZodTypeDef, unknown> = z
|
|
528
|
+
.object({
|
|
529
|
+
details: z.string(),
|
|
530
|
+
name: z.string(),
|
|
531
|
+
passed: z.boolean(),
|
|
532
|
+
severity: Severity$inboundSchema.default("info"),
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
export function checksFromJSON(
|
|
536
|
+
jsonString: string,
|
|
537
|
+
): SafeParseResult<Checks, SDKValidationError> {
|
|
538
|
+
return safeParse(
|
|
539
|
+
jsonString,
|
|
540
|
+
(x) => Checks$inboundSchema.parse(JSON.parse(x)),
|
|
541
|
+
`Failed to parse 'Checks' from JSON`,
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/** @internal */
|
|
546
|
+
export const RoaVerifyResponseVerdict$inboundSchema: z.ZodNativeEnum<
|
|
547
|
+
typeof RoaVerifyResponseVerdict
|
|
548
|
+
> = z.nativeEnum(RoaVerifyResponseVerdict);
|
|
549
|
+
|
|
550
|
+
/** @internal */
|
|
551
|
+
export const Appropriateness$inboundSchema: z.ZodType<
|
|
552
|
+
Appropriateness,
|
|
553
|
+
z.ZodTypeDef,
|
|
554
|
+
unknown
|
|
555
|
+
> = z.object({
|
|
556
|
+
checks: z.array(z.lazy(() => Checks$inboundSchema)),
|
|
557
|
+
score: z.number(),
|
|
558
|
+
summary: z.string(),
|
|
559
|
+
verdict: RoaVerifyResponseVerdict$inboundSchema,
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
export function appropriatenessFromJSON(
|
|
563
|
+
jsonString: string,
|
|
564
|
+
): SafeParseResult<Appropriateness, SDKValidationError> {
|
|
565
|
+
return safeParse(
|
|
566
|
+
jsonString,
|
|
567
|
+
(x) => Appropriateness$inboundSchema.parse(JSON.parse(x)),
|
|
568
|
+
`Failed to parse 'Appropriateness' from JSON`,
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/** @internal */
|
|
573
|
+
export const ConcentrationMetrics$inboundSchema: z.ZodType<
|
|
574
|
+
ConcentrationMetrics,
|
|
575
|
+
z.ZodTypeDef,
|
|
576
|
+
unknown
|
|
577
|
+
> = z.object({
|
|
578
|
+
averageForPropertyType: z.number(),
|
|
579
|
+
companiesAtBuilding: z.number().optional(),
|
|
580
|
+
companiesAtPostcode: z.number(),
|
|
581
|
+
companiesAtUPRN: z.number(),
|
|
582
|
+
percentileRank: z.number().optional(),
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
export function concentrationMetricsFromJSON(
|
|
586
|
+
jsonString: string,
|
|
587
|
+
): SafeParseResult<ConcentrationMetrics, SDKValidationError> {
|
|
588
|
+
return safeParse(
|
|
589
|
+
jsonString,
|
|
590
|
+
(x) => ConcentrationMetrics$inboundSchema.parse(JSON.parse(x)),
|
|
591
|
+
`Failed to parse 'ConcentrationMetrics' from JSON`,
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/** @internal */
|
|
596
|
+
export const Impact$inboundSchema: z.ZodNativeEnum<typeof Impact> = z
|
|
597
|
+
.nativeEnum(Impact);
|
|
598
|
+
|
|
599
|
+
/** @internal */
|
|
600
|
+
export const Risk$inboundSchema: z.ZodNativeEnum<typeof Risk> = z.nativeEnum(
|
|
601
|
+
Risk,
|
|
602
|
+
);
|
|
603
|
+
|
|
604
|
+
/** @internal */
|
|
605
|
+
export const RoaVerifyResponseValue$inboundSchema: z.ZodType<
|
|
606
|
+
RoaVerifyResponseValue,
|
|
607
|
+
z.ZodTypeDef,
|
|
608
|
+
unknown
|
|
609
|
+
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
610
|
+
|
|
611
|
+
export function roaVerifyResponseValueFromJSON(
|
|
612
|
+
jsonString: string,
|
|
613
|
+
): SafeParseResult<RoaVerifyResponseValue, SDKValidationError> {
|
|
614
|
+
return safeParse(
|
|
615
|
+
jsonString,
|
|
616
|
+
(x) => RoaVerifyResponseValue$inboundSchema.parse(JSON.parse(x)),
|
|
617
|
+
`Failed to parse 'RoaVerifyResponseValue' from JSON`,
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** @internal */
|
|
622
|
+
export const RoaVerifyResponseFeatures$inboundSchema: z.ZodType<
|
|
623
|
+
RoaVerifyResponseFeatures,
|
|
624
|
+
z.ZodTypeDef,
|
|
625
|
+
unknown
|
|
626
|
+
> = z.object({
|
|
627
|
+
description: z.string(),
|
|
628
|
+
impact: Impact$inboundSchema.optional(),
|
|
629
|
+
name: z.string(),
|
|
630
|
+
risk: Risk$inboundSchema,
|
|
631
|
+
threshold: z.number().optional(),
|
|
632
|
+
value: z.union([z.number(), z.boolean(), z.string()]),
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
export function roaVerifyResponseFeaturesFromJSON(
|
|
636
|
+
jsonString: string,
|
|
637
|
+
): SafeParseResult<RoaVerifyResponseFeatures, SDKValidationError> {
|
|
638
|
+
return safeParse(
|
|
639
|
+
jsonString,
|
|
640
|
+
(x) => RoaVerifyResponseFeatures$inboundSchema.parse(JSON.parse(x)),
|
|
641
|
+
`Failed to parse 'RoaVerifyResponseFeatures' from JSON`,
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/** @internal */
|
|
646
|
+
export const RecommendedAction$inboundSchema: z.ZodNativeEnum<
|
|
647
|
+
typeof RecommendedAction
|
|
648
|
+
> = z.nativeEnum(RecommendedAction);
|
|
649
|
+
|
|
650
|
+
/** @internal */
|
|
651
|
+
export const RiskBand$inboundSchema: z.ZodNativeEnum<typeof RiskBand> = z
|
|
652
|
+
.nativeEnum(RiskBand);
|
|
653
|
+
|
|
654
|
+
/** @internal */
|
|
655
|
+
export const FraudRisk$inboundSchema: z.ZodType<
|
|
656
|
+
FraudRisk,
|
|
657
|
+
z.ZodTypeDef,
|
|
658
|
+
unknown
|
|
659
|
+
> = z.object({
|
|
660
|
+
concentrationMetrics: z.lazy(() => ConcentrationMetrics$inboundSchema),
|
|
661
|
+
features: z.array(z.lazy(() => RoaVerifyResponseFeatures$inboundSchema)),
|
|
662
|
+
overallScore: z.number(),
|
|
663
|
+
recommendedAction: RecommendedAction$inboundSchema,
|
|
664
|
+
riskBand: RiskBand$inboundSchema,
|
|
665
|
+
topReasons: z.array(z.string()),
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
export function fraudRiskFromJSON(
|
|
669
|
+
jsonString: string,
|
|
670
|
+
): SafeParseResult<FraudRisk, SDKValidationError> {
|
|
671
|
+
return safeParse(
|
|
672
|
+
jsonString,
|
|
673
|
+
(x) => FraudRisk$inboundSchema.parse(JSON.parse(x)),
|
|
674
|
+
`Failed to parse 'FraudRisk' from JSON`,
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/** @internal */
|
|
679
|
+
export const AddressMatch$inboundSchema: z.ZodType<
|
|
680
|
+
AddressMatch,
|
|
681
|
+
z.ZodTypeDef,
|
|
682
|
+
unknown
|
|
683
|
+
> = z.object({
|
|
684
|
+
confidence: z.number(),
|
|
685
|
+
details: z.string(),
|
|
686
|
+
matched: z.boolean(),
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
export function addressMatchFromJSON(
|
|
690
|
+
jsonString: string,
|
|
691
|
+
): SafeParseResult<AddressMatch, SDKValidationError> {
|
|
692
|
+
return safeParse(
|
|
693
|
+
jsonString,
|
|
694
|
+
(x) => AddressMatch$inboundSchema.parse(JSON.parse(x)),
|
|
695
|
+
`Failed to parse 'AddressMatch' from JSON`,
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/** @internal */
|
|
700
|
+
export const RoaVerifyResponseVerificationMethod$inboundSchema: z.ZodNativeEnum<
|
|
701
|
+
typeof RoaVerifyResponseVerificationMethod
|
|
702
|
+
> = z.nativeEnum(RoaVerifyResponseVerificationMethod);
|
|
703
|
+
|
|
704
|
+
/** @internal */
|
|
705
|
+
export const FilingOfficer$inboundSchema: z.ZodType<
|
|
706
|
+
FilingOfficer,
|
|
707
|
+
z.ZodTypeDef,
|
|
708
|
+
unknown
|
|
709
|
+
> = z.object({
|
|
710
|
+
companiesHouseVerified: z.boolean(),
|
|
711
|
+
isProprietor: z.boolean(),
|
|
712
|
+
name: z.string(),
|
|
713
|
+
role: z.string(),
|
|
714
|
+
verificationDate: z.string().optional(),
|
|
715
|
+
verificationMethod: RoaVerifyResponseVerificationMethod$inboundSchema,
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
export function filingOfficerFromJSON(
|
|
719
|
+
jsonString: string,
|
|
720
|
+
): SafeParseResult<FilingOfficer, SDKValidationError> {
|
|
721
|
+
return safeParse(
|
|
722
|
+
jsonString,
|
|
723
|
+
(x) => FilingOfficer$inboundSchema.parse(JSON.parse(x)),
|
|
724
|
+
`Failed to parse 'FilingOfficer' from JSON`,
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/** @internal */
|
|
729
|
+
export const NameMatch$inboundSchema: z.ZodType<
|
|
730
|
+
NameMatch,
|
|
731
|
+
z.ZodTypeDef,
|
|
732
|
+
unknown
|
|
733
|
+
> = z.object({
|
|
734
|
+
confidence: z.number(),
|
|
735
|
+
details: z.string(),
|
|
736
|
+
matched: z.boolean(),
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
export function nameMatchFromJSON(
|
|
740
|
+
jsonString: string,
|
|
741
|
+
): SafeParseResult<NameMatch, SDKValidationError> {
|
|
742
|
+
return safeParse(
|
|
743
|
+
jsonString,
|
|
744
|
+
(x) => NameMatch$inboundSchema.parse(JSON.parse(x)),
|
|
745
|
+
`Failed to parse 'NameMatch' from JSON`,
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/** @internal */
|
|
750
|
+
export const VerificationMethod$inboundSchema: z.ZodNativeEnum<
|
|
751
|
+
typeof VerificationMethod
|
|
752
|
+
> = z.nativeEnum(VerificationMethod);
|
|
753
|
+
|
|
754
|
+
/** @internal */
|
|
755
|
+
export const IdentityMatch$inboundSchema: z.ZodType<
|
|
756
|
+
IdentityMatch,
|
|
757
|
+
z.ZodTypeDef,
|
|
758
|
+
unknown
|
|
759
|
+
> = z.object({
|
|
760
|
+
addressMatch: z.lazy(() => AddressMatch$inboundSchema),
|
|
761
|
+
companiesHouseVerified: z.boolean(),
|
|
762
|
+
filingOfficer: z.lazy(() => FilingOfficer$inboundSchema).optional(),
|
|
763
|
+
nameMatch: z.lazy(() => NameMatch$inboundSchema),
|
|
764
|
+
verificationDate: z.string().optional(),
|
|
765
|
+
verificationMethod: VerificationMethod$inboundSchema,
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
export function identityMatchFromJSON(
|
|
769
|
+
jsonString: string,
|
|
770
|
+
): SafeParseResult<IdentityMatch, SDKValidationError> {
|
|
771
|
+
return safeParse(
|
|
772
|
+
jsonString,
|
|
773
|
+
(x) => IdentityMatch$inboundSchema.parse(JSON.parse(x)),
|
|
774
|
+
`Failed to parse 'IdentityMatch' from JSON`,
|
|
775
|
+
);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/** @internal */
|
|
779
|
+
export const Proprietors$inboundSchema: z.ZodType<
|
|
780
|
+
Proprietors,
|
|
781
|
+
z.ZodTypeDef,
|
|
782
|
+
unknown
|
|
783
|
+
> = z.object({
|
|
784
|
+
address: z.string().optional(),
|
|
785
|
+
companyNumber: z.string().optional(),
|
|
786
|
+
dateRegistered: z.string().optional(),
|
|
787
|
+
name: z.string(),
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
export function proprietorsFromJSON(
|
|
791
|
+
jsonString: string,
|
|
792
|
+
): SafeParseResult<Proprietors, SDKValidationError> {
|
|
793
|
+
return safeParse(
|
|
794
|
+
jsonString,
|
|
795
|
+
(x) => Proprietors$inboundSchema.parse(JSON.parse(x)),
|
|
796
|
+
`Failed to parse 'Proprietors' from JSON`,
|
|
797
|
+
);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/** @internal */
|
|
801
|
+
export const TenureType$inboundSchema: z.ZodNativeEnum<typeof TenureType> = z
|
|
802
|
+
.nativeEnum(TenureType);
|
|
803
|
+
|
|
804
|
+
/** @internal */
|
|
805
|
+
export const VerificationStatus$inboundSchema: z.ZodNativeEnum<
|
|
806
|
+
typeof VerificationStatus
|
|
807
|
+
> = z.nativeEnum(VerificationStatus);
|
|
808
|
+
|
|
809
|
+
/** @internal */
|
|
810
|
+
export const LandRegistryVerification$inboundSchema: z.ZodType<
|
|
811
|
+
LandRegistryVerification,
|
|
812
|
+
z.ZodTypeDef,
|
|
813
|
+
unknown
|
|
814
|
+
> = z.object({
|
|
815
|
+
available: z.boolean(),
|
|
816
|
+
flags: z.array(z.string()).optional(),
|
|
817
|
+
identityMatch: z.lazy(() => IdentityMatch$inboundSchema).optional(),
|
|
818
|
+
proprietors: z.array(z.lazy(() => Proprietors$inboundSchema)).optional(),
|
|
819
|
+
summary: z.string(),
|
|
820
|
+
tenureType: TenureType$inboundSchema.optional(),
|
|
821
|
+
titleNumber: z.string().optional(),
|
|
822
|
+
verificationScore: z.number(),
|
|
823
|
+
verificationStatus: VerificationStatus$inboundSchema,
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
export function landRegistryVerificationFromJSON(
|
|
827
|
+
jsonString: string,
|
|
828
|
+
): SafeParseResult<LandRegistryVerification, SDKValidationError> {
|
|
829
|
+
return safeParse(
|
|
830
|
+
jsonString,
|
|
831
|
+
(x) => LandRegistryVerification$inboundSchema.parse(JSON.parse(x)),
|
|
832
|
+
`Failed to parse 'LandRegistryVerification' from JSON`,
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/** @internal */
|
|
837
|
+
export const DataSources$inboundSchema: z.ZodType<
|
|
838
|
+
DataSources,
|
|
839
|
+
z.ZodTypeDef,
|
|
840
|
+
unknown
|
|
841
|
+
> = z.object({
|
|
842
|
+
companiesHouse: z.boolean(),
|
|
843
|
+
elasticsearch: z.boolean(),
|
|
844
|
+
osNgd: z.boolean(),
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
export function dataSourcesFromJSON(
|
|
848
|
+
jsonString: string,
|
|
849
|
+
): SafeParseResult<DataSources, SDKValidationError> {
|
|
850
|
+
return safeParse(
|
|
851
|
+
jsonString,
|
|
852
|
+
(x) => DataSources$inboundSchema.parse(JSON.parse(x)),
|
|
853
|
+
`Failed to parse 'DataSources' from JSON`,
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/** @internal */
|
|
858
|
+
export const ModelVersions$inboundSchema: z.ZodType<
|
|
859
|
+
ModelVersions,
|
|
860
|
+
z.ZodTypeDef,
|
|
861
|
+
unknown
|
|
862
|
+
> = z.object({
|
|
863
|
+
fraudModel: z.string(),
|
|
864
|
+
rules: z.string(),
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
export function modelVersionsFromJSON(
|
|
868
|
+
jsonString: string,
|
|
869
|
+
): SafeParseResult<ModelVersions, SDKValidationError> {
|
|
870
|
+
return safeParse(
|
|
871
|
+
jsonString,
|
|
872
|
+
(x) => ModelVersions$inboundSchema.parse(JSON.parse(x)),
|
|
873
|
+
`Failed to parse 'ModelVersions' from JSON`,
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/** @internal */
|
|
878
|
+
export const OsNgdData$inboundSchema: z.ZodType<
|
|
879
|
+
OsNgdData,
|
|
880
|
+
z.ZodTypeDef,
|
|
881
|
+
unknown
|
|
882
|
+
> = z.object({
|
|
883
|
+
addressCount: z.number().optional(),
|
|
884
|
+
addressType: z.string().optional(),
|
|
885
|
+
buildingAge: z.string().optional(),
|
|
886
|
+
buildingFloors: z.number().optional(),
|
|
887
|
+
hasGreenRoof: z.boolean().optional(),
|
|
888
|
+
hasSolarPanels: z.boolean().optional(),
|
|
889
|
+
landUse: z.string().optional(),
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
export function osNgdDataFromJSON(
|
|
893
|
+
jsonString: string,
|
|
894
|
+
): SafeParseResult<OsNgdData, SDKValidationError> {
|
|
895
|
+
return safeParse(
|
|
896
|
+
jsonString,
|
|
897
|
+
(x) => OsNgdData$inboundSchema.parse(JSON.parse(x)),
|
|
898
|
+
`Failed to parse 'OsNgdData' from JSON`,
|
|
899
|
+
);
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/** @internal */
|
|
903
|
+
export const Metadata$inboundSchema: z.ZodType<
|
|
904
|
+
Metadata,
|
|
905
|
+
z.ZodTypeDef,
|
|
906
|
+
unknown
|
|
907
|
+
> = z.object({
|
|
908
|
+
dataSources: z.lazy(() => DataSources$inboundSchema),
|
|
909
|
+
modelVersions: z.lazy(() => ModelVersions$inboundSchema),
|
|
910
|
+
osNgdData: z.lazy(() => OsNgdData$inboundSchema).optional(),
|
|
911
|
+
processingTimeMs: z.number(),
|
|
912
|
+
timestamp: z.string(),
|
|
913
|
+
verificationId: z.string().optional(),
|
|
914
|
+
});
|
|
915
|
+
|
|
916
|
+
export function metadataFromJSON(
|
|
917
|
+
jsonString: string,
|
|
918
|
+
): SafeParseResult<Metadata, SDKValidationError> {
|
|
919
|
+
return safeParse(
|
|
920
|
+
jsonString,
|
|
921
|
+
(x) => Metadata$inboundSchema.parse(JSON.parse(x)),
|
|
922
|
+
`Failed to parse 'Metadata' from JSON`,
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/** @internal */
|
|
927
|
+
export const OwnershipType$inboundSchema: z.ZodNativeEnum<
|
|
928
|
+
typeof OwnershipType
|
|
929
|
+
> = z.nativeEnum(OwnershipType);
|
|
930
|
+
|
|
931
|
+
/** @internal */
|
|
932
|
+
export const PropertyData$inboundSchema: z.ZodType<
|
|
933
|
+
PropertyData,
|
|
934
|
+
z.ZodTypeDef,
|
|
935
|
+
unknown
|
|
936
|
+
> = z.object({
|
|
937
|
+
bathrooms: z.nullable(z.number()).optional(),
|
|
938
|
+
bedrooms: z.nullable(z.number()).optional(),
|
|
939
|
+
buildDate: z.nullable(z.string()).optional(),
|
|
940
|
+
councilTaxBand: z.nullable(z.string()).optional(),
|
|
941
|
+
currentOwner: z.nullable(z.string()).optional(),
|
|
942
|
+
epcRating: z.nullable(z.string()).optional(),
|
|
943
|
+
floorArea: z.nullable(z.number()).optional(),
|
|
944
|
+
ownershipType: z.nullable(OwnershipType$inboundSchema).optional(),
|
|
945
|
+
propertyType: z.nullable(z.string()).optional(),
|
|
946
|
+
tenure: z.nullable(z.string()).optional(),
|
|
947
|
+
uprn: z.string(),
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
export function propertyDataFromJSON(
|
|
951
|
+
jsonString: string,
|
|
952
|
+
): SafeParseResult<PropertyData, SDKValidationError> {
|
|
953
|
+
return safeParse(
|
|
954
|
+
jsonString,
|
|
955
|
+
(x) => PropertyData$inboundSchema.parse(JSON.parse(x)),
|
|
956
|
+
`Failed to parse 'PropertyData' from JSON`,
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
/** @internal */
|
|
961
|
+
export const Likelihood$inboundSchema: z.ZodNativeEnum<typeof Likelihood> = z
|
|
962
|
+
.nativeEnum(Likelihood);
|
|
963
|
+
|
|
964
|
+
/** @internal */
|
|
965
|
+
export const Signals$inboundSchema: z.ZodType<Signals, z.ZodTypeDef, unknown> =
|
|
966
|
+
z.object({
|
|
967
|
+
confidence: z.number().optional(),
|
|
968
|
+
details: z.string(),
|
|
969
|
+
found: z.boolean(),
|
|
970
|
+
name: z.string(),
|
|
971
|
+
});
|
|
972
|
+
|
|
973
|
+
export function signalsFromJSON(
|
|
974
|
+
jsonString: string,
|
|
975
|
+
): SafeParseResult<Signals, SDKValidationError> {
|
|
976
|
+
return safeParse(
|
|
977
|
+
jsonString,
|
|
978
|
+
(x) => Signals$inboundSchema.parse(JSON.parse(x)),
|
|
979
|
+
`Failed to parse 'Signals' from JSON`,
|
|
980
|
+
);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/** @internal */
|
|
984
|
+
export const RightToUse$inboundSchema: z.ZodType<
|
|
985
|
+
RightToUse,
|
|
986
|
+
z.ZodTypeDef,
|
|
987
|
+
unknown
|
|
988
|
+
> = z.object({
|
|
989
|
+
confidence: z.number(),
|
|
990
|
+
likelihood: Likelihood$inboundSchema,
|
|
991
|
+
reasoning: z.array(z.string()),
|
|
992
|
+
signals: z.array(z.lazy(() => Signals$inboundSchema)),
|
|
993
|
+
summary: z.string(),
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
export function rightToUseFromJSON(
|
|
997
|
+
jsonString: string,
|
|
998
|
+
): SafeParseResult<RightToUse, SDKValidationError> {
|
|
999
|
+
return safeParse(
|
|
1000
|
+
jsonString,
|
|
1001
|
+
(x) => RightToUse$inboundSchema.parse(JSON.parse(x)),
|
|
1002
|
+
`Failed to parse 'RightToUse' from JSON`,
|
|
1003
|
+
);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/** @internal */
|
|
1007
|
+
export const Decision$inboundSchema: z.ZodNativeEnum<typeof Decision> = z
|
|
1008
|
+
.nativeEnum(Decision);
|
|
1009
|
+
|
|
1010
|
+
/** @internal */
|
|
1011
|
+
export const RoaVerifyResponseRecommendedAction$inboundSchema: z.ZodNativeEnum<
|
|
1012
|
+
typeof RoaVerifyResponseRecommendedAction
|
|
1013
|
+
> = z.nativeEnum(RoaVerifyResponseRecommendedAction);
|
|
1014
|
+
|
|
1015
|
+
/** @internal */
|
|
1016
|
+
export const Verdict$inboundSchema: z.ZodType<Verdict, z.ZodTypeDef, unknown> =
|
|
1017
|
+
z.object({
|
|
1018
|
+
confidence: z.number(),
|
|
1019
|
+
criticalIssues: z.array(z.string()).optional(),
|
|
1020
|
+
decision: Decision$inboundSchema,
|
|
1021
|
+
flags: z.array(z.string()),
|
|
1022
|
+
recommendedAction: RoaVerifyResponseRecommendedAction$inboundSchema,
|
|
1023
|
+
summary: z.string(),
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
export function verdictFromJSON(
|
|
1027
|
+
jsonString: string,
|
|
1028
|
+
): SafeParseResult<Verdict, SDKValidationError> {
|
|
1029
|
+
return safeParse(
|
|
1030
|
+
jsonString,
|
|
1031
|
+
(x) => Verdict$inboundSchema.parse(JSON.parse(x)),
|
|
1032
|
+
`Failed to parse 'Verdict' from JSON`,
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
/** @internal */
|
|
1037
|
+
export const RoaVerifyResponse$inboundSchema: z.ZodType<
|
|
1038
|
+
RoaVerifyResponse,
|
|
1039
|
+
z.ZodTypeDef,
|
|
1040
|
+
unknown
|
|
1041
|
+
> = z.object({
|
|
1042
|
+
addressResolution: z.lazy(() => AddressResolution$inboundSchema),
|
|
1043
|
+
appropriateness: z.lazy(() => Appropriateness$inboundSchema),
|
|
1044
|
+
fraudRisk: z.lazy(() => FraudRisk$inboundSchema),
|
|
1045
|
+
landRegistryVerification: z.lazy(() =>
|
|
1046
|
+
LandRegistryVerification$inboundSchema
|
|
1047
|
+
),
|
|
1048
|
+
metadata: z.lazy(() => Metadata$inboundSchema),
|
|
1049
|
+
propertyData: z.lazy(() => PropertyData$inboundSchema).optional(),
|
|
1050
|
+
rightToUse: z.lazy(() => RightToUse$inboundSchema),
|
|
1051
|
+
verdict: z.lazy(() => Verdict$inboundSchema),
|
|
1052
|
+
});
|
|
1053
|
+
|
|
1054
|
+
export function roaVerifyResponseFromJSON(
|
|
1055
|
+
jsonString: string,
|
|
1056
|
+
): SafeParseResult<RoaVerifyResponse, SDKValidationError> {
|
|
1057
|
+
return safeParse(
|
|
1058
|
+
jsonString,
|
|
1059
|
+
(x) => RoaVerifyResponse$inboundSchema.parse(JSON.parse(x)),
|
|
1060
|
+
`Failed to parse 'RoaVerifyResponse' from JSON`,
|
|
1061
|
+
);
|
|
1062
|
+
}
|