@vepler/sdk 2.38.2 → 2.39.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 (69) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/sdk/models/shared/aggregationresult.d.ts +3 -1
  4. package/dist/commonjs/sdk/models/shared/aggregationresult.d.ts.map +1 -1
  5. package/dist/commonjs/sdk/models/shared/aggregationresult.js +4 -0
  6. package/dist/commonjs/sdk/models/shared/aggregationresult.js.map +1 -1
  7. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.d.ts +75 -0
  8. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.d.ts.map +1 -0
  9. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.js +93 -0
  10. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.js.map +1 -0
  11. package/dist/commonjs/sdk/models/shared/index.d.ts +2 -0
  12. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  13. package/dist/commonjs/sdk/models/shared/index.js +2 -0
  14. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  15. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.d.ts +15 -0
  16. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.d.ts.map +1 -0
  17. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.js +50 -0
  18. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.js.map +1 -0
  19. package/dist/commonjs/sdk/models/shared/site.d.ts +10 -10
  20. package/dist/commonjs/sdk/models/shared/site.d.ts.map +1 -1
  21. package/dist/commonjs/sdk/models/shared/site.js +6 -6
  22. package/dist/commonjs/sdk/models/shared/site.js.map +1 -1
  23. package/dist/commonjs/sdk/models/shared/sitequerycondition.d.ts +0 -1
  24. package/dist/commonjs/sdk/models/shared/sitequerycondition.d.ts.map +1 -1
  25. package/dist/commonjs/sdk/models/shared/sitequerycondition.js +0 -1
  26. package/dist/commonjs/sdk/models/shared/sitequerycondition.js.map +1 -1
  27. package/dist/commonjs/sdk/models/shared/sitequeryrequest.d.ts +0 -3
  28. package/dist/commonjs/sdk/models/shared/sitequeryrequest.d.ts.map +1 -1
  29. package/dist/commonjs/sdk/models/shared/sitequeryrequest.js +0 -3
  30. package/dist/commonjs/sdk/models/shared/sitequeryrequest.js.map +1 -1
  31. package/dist/esm/lib/config.d.ts +2 -2
  32. package/dist/esm/lib/config.js +2 -2
  33. package/dist/esm/sdk/models/shared/aggregationresult.d.ts +3 -1
  34. package/dist/esm/sdk/models/shared/aggregationresult.d.ts.map +1 -1
  35. package/dist/esm/sdk/models/shared/aggregationresult.js +4 -0
  36. package/dist/esm/sdk/models/shared/aggregationresult.js.map +1 -1
  37. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.d.ts +75 -0
  38. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.d.ts.map +1 -0
  39. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.js +55 -0
  40. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.js.map +1 -0
  41. package/dist/esm/sdk/models/shared/index.d.ts +2 -0
  42. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  43. package/dist/esm/sdk/models/shared/index.js +2 -0
  44. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  45. package/dist/esm/sdk/models/shared/percentilesaggregationresult.d.ts +15 -0
  46. package/dist/esm/sdk/models/shared/percentilesaggregationresult.d.ts.map +1 -0
  47. package/dist/esm/sdk/models/shared/percentilesaggregationresult.js +13 -0
  48. package/dist/esm/sdk/models/shared/percentilesaggregationresult.js.map +1 -0
  49. package/dist/esm/sdk/models/shared/site.d.ts +10 -10
  50. package/dist/esm/sdk/models/shared/site.d.ts.map +1 -1
  51. package/dist/esm/sdk/models/shared/site.js +6 -6
  52. package/dist/esm/sdk/models/shared/site.js.map +1 -1
  53. package/dist/esm/sdk/models/shared/sitequerycondition.d.ts +0 -1
  54. package/dist/esm/sdk/models/shared/sitequerycondition.d.ts.map +1 -1
  55. package/dist/esm/sdk/models/shared/sitequerycondition.js +0 -1
  56. package/dist/esm/sdk/models/shared/sitequerycondition.js.map +1 -1
  57. package/dist/esm/sdk/models/shared/sitequeryrequest.d.ts +0 -3
  58. package/dist/esm/sdk/models/shared/sitequeryrequest.d.ts.map +1 -1
  59. package/dist/esm/sdk/models/shared/sitequeryrequest.js +0 -3
  60. package/dist/esm/sdk/models/shared/sitequeryrequest.js.map +1 -1
  61. package/package.json +1 -1
  62. package/src/lib/config.ts +2 -2
  63. package/src/sdk/models/shared/aggregationresult.ts +12 -0
  64. package/src/sdk/models/shared/extendedstatsaggregationresult.ts +150 -0
  65. package/src/sdk/models/shared/index.ts +2 -0
  66. package/src/sdk/models/shared/percentilesaggregationresult.ts +34 -0
  67. package/src/sdk/models/shared/site.ts +16 -16
  68. package/src/sdk/models/shared/sitequerycondition.ts +0 -1
  69. package/src/sdk/models/shared/sitequeryrequest.ts +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vepler/sdk",
3
- "version": "2.38.2",
3
+ "version": "2.39.0",
4
4
  "author": "Vepler Limited",
5
5
  "type": "module",
6
6
  "tshy": {
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.38.2",
63
+ openapiDocVersion: "2.39.0",
64
64
  sdkVersion: "0.10.0",
65
65
  genVersion: "2.836.5",
66
- userAgent: "speakeasy-sdk/typescript 0.10.0 2.836.5 2.38.2 @vepler/sdk",
66
+ userAgent: "speakeasy-sdk/typescript 0.10.0 2.836.5 2.39.0 @vepler/sdk",
67
67
  } as const;
@@ -6,10 +6,18 @@ import * as z from "zod/v3";
6
6
  import { safeParse } from "../../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ ExtendedStatsAggregationResult,
11
+ ExtendedStatsAggregationResult$inboundSchema,
12
+ } from "./extendedstatsaggregationresult.js";
9
13
  import {
10
14
  HistogramAggregationResult,
11
15
  HistogramAggregationResult$inboundSchema,
12
16
  } from "./histogramaggregationresult.js";
17
+ import {
18
+ PercentilesAggregationResult,
19
+ PercentilesAggregationResult$inboundSchema,
20
+ } from "./percentilesaggregationresult.js";
13
21
  import {
14
22
  SingleValueAggregationResult,
15
23
  SingleValueAggregationResult$inboundSchema,
@@ -24,9 +32,11 @@ import {
24
32
  } from "./termsaggregationresult.js";
25
33
 
26
34
  export type AggregationResult =
35
+ | ExtendedStatsAggregationResult
27
36
  | StatsAggregationResult
28
37
  | TermsAggregationResult
29
38
  | HistogramAggregationResult
39
+ | PercentilesAggregationResult
30
40
  | SingleValueAggregationResult;
31
41
 
32
42
  /** @internal */
@@ -35,9 +45,11 @@ export const AggregationResult$inboundSchema: z.ZodType<
35
45
  z.ZodTypeDef,
36
46
  unknown
37
47
  > = z.union([
48
+ ExtendedStatsAggregationResult$inboundSchema,
38
49
  StatsAggregationResult$inboundSchema,
39
50
  TermsAggregationResult$inboundSchema,
40
51
  HistogramAggregationResult$inboundSchema,
52
+ PercentilesAggregationResult$inboundSchema,
41
53
  SingleValueAggregationResult$inboundSchema,
42
54
  ]);
43
55
 
@@ -0,0 +1,150 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Standard deviation bounds (±2σ from mean). Null if count is 0.
13
+ */
14
+ export type StdDeviationBounds = {
15
+ lower: number | null;
16
+ lowerPopulation: number | null;
17
+ lowerSampling: number | null;
18
+ upper: number | null;
19
+ upperPopulation: number | null;
20
+ upperSampling: number | null;
21
+ };
22
+
23
+ export type ExtendedStatsAggregationResult = {
24
+ /**
25
+ * Mean value. Null if count is 0.
26
+ */
27
+ avg: number | null;
28
+ /**
29
+ * Number of documents with a non-null value
30
+ */
31
+ count: number;
32
+ /**
33
+ * Maximum value. Null if count is 0.
34
+ */
35
+ max: number | null;
36
+ /**
37
+ * Minimum value. Null if count is 0.
38
+ */
39
+ min: number | null;
40
+ /**
41
+ * Population standard deviation. Null if count is 0.
42
+ */
43
+ stdDeviation: number | null;
44
+ /**
45
+ * Standard deviation bounds (±2σ from mean). Null if count is 0.
46
+ */
47
+ stdDeviationBounds: StdDeviationBounds | null;
48
+ /**
49
+ * Population standard deviation. Null if count is 0.
50
+ */
51
+ stdDeviationPopulation: number | null;
52
+ /**
53
+ * Sample standard deviation. Null if count < 2.
54
+ */
55
+ stdDeviationSampling: number | null;
56
+ /**
57
+ * Sum of all values. Null if count is 0.
58
+ */
59
+ sum: number | null;
60
+ /**
61
+ * Sum of squared values. Null if count is 0.
62
+ */
63
+ sumOfSquares: number | null;
64
+ /**
65
+ * Population variance. Null if count is 0.
66
+ */
67
+ variance: number | null;
68
+ /**
69
+ * Population variance. Null if count is 0.
70
+ */
71
+ variancePopulation: number | null;
72
+ /**
73
+ * Sample variance (Bessel's correction). Null if count < 2.
74
+ */
75
+ varianceSampling: number | null;
76
+ };
77
+
78
+ /** @internal */
79
+ export const StdDeviationBounds$inboundSchema: z.ZodType<
80
+ StdDeviationBounds,
81
+ z.ZodTypeDef,
82
+ unknown
83
+ > = z.object({
84
+ lower: z.nullable(z.number()),
85
+ lower_population: z.nullable(z.number()),
86
+ lower_sampling: z.nullable(z.number()),
87
+ upper: z.nullable(z.number()),
88
+ upper_population: z.nullable(z.number()),
89
+ upper_sampling: z.nullable(z.number()),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "lower_population": "lowerPopulation",
93
+ "lower_sampling": "lowerSampling",
94
+ "upper_population": "upperPopulation",
95
+ "upper_sampling": "upperSampling",
96
+ });
97
+ });
98
+
99
+ export function stdDeviationBoundsFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<StdDeviationBounds, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => StdDeviationBounds$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'StdDeviationBounds' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const ExtendedStatsAggregationResult$inboundSchema: z.ZodType<
111
+ ExtendedStatsAggregationResult,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ avg: z.nullable(z.number()),
116
+ count: z.number(),
117
+ max: z.nullable(z.number()),
118
+ min: z.nullable(z.number()),
119
+ std_deviation: z.nullable(z.number()),
120
+ std_deviation_bounds: z.nullable(
121
+ z.lazy(() => StdDeviationBounds$inboundSchema),
122
+ ),
123
+ std_deviation_population: z.nullable(z.number()),
124
+ std_deviation_sampling: z.nullable(z.number()),
125
+ sum: z.nullable(z.number()),
126
+ sum_of_squares: z.nullable(z.number()),
127
+ variance: z.nullable(z.number()),
128
+ variance_population: z.nullable(z.number()),
129
+ variance_sampling: z.nullable(z.number()),
130
+ }).transform((v) => {
131
+ return remap$(v, {
132
+ "std_deviation": "stdDeviation",
133
+ "std_deviation_bounds": "stdDeviationBounds",
134
+ "std_deviation_population": "stdDeviationPopulation",
135
+ "std_deviation_sampling": "stdDeviationSampling",
136
+ "sum_of_squares": "sumOfSquares",
137
+ "variance_population": "variancePopulation",
138
+ "variance_sampling": "varianceSampling",
139
+ });
140
+ });
141
+
142
+ export function extendedStatsAggregationResultFromJSON(
143
+ jsonString: string,
144
+ ): SafeParseResult<ExtendedStatsAggregationResult, SDKValidationError> {
145
+ return safeParse(
146
+ jsonString,
147
+ (x) => ExtendedStatsAggregationResult$inboundSchema.parse(JSON.parse(x)),
148
+ `Failed to parse 'ExtendedStatsAggregationResult' from JSON`,
149
+ );
150
+ }
@@ -38,6 +38,7 @@ export * from "./counciltaxbanddetails.js";
38
38
  export * from "./counciltaxdata.js";
39
39
  export * from "./dateofbirth.js";
40
40
  export * from "./epcdata.js";
41
+ export * from "./extendedstatsaggregationresult.js";
41
42
  export * from "./geographiccontext.js";
42
43
  export * from "./healthresponse.js";
43
44
  export * from "./histogramaggregationresult.js";
@@ -57,6 +58,7 @@ export * from "./officerlistresponse.js";
57
58
  export * from "./officerresponse.js";
58
59
  export * from "./officersummary.js";
59
60
  export * from "./outcodelookupresponse.js";
61
+ export * from "./percentilesaggregationresult.js";
60
62
  export * from "./person.js";
61
63
  export * from "./personcluster.js";
62
64
  export * from "./personclusterresponse.js";
@@ -0,0 +1,34 @@
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
+ export type PercentilesAggregationResult = {
11
+ /**
12
+ * Percentile values keyed by percentile (e.g. '25.0' → 150.5). Null when no documents match.
13
+ */
14
+ values: { [k: string]: number | null };
15
+ };
16
+
17
+ /** @internal */
18
+ export const PercentilesAggregationResult$inboundSchema: z.ZodType<
19
+ PercentilesAggregationResult,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ values: z.record(z.nullable(z.number())),
24
+ });
25
+
26
+ export function percentilesAggregationResultFromJSON(
27
+ jsonString: string,
28
+ ): SafeParseResult<PercentilesAggregationResult, SDKValidationError> {
29
+ return safeParse(
30
+ jsonString,
31
+ (x) => PercentilesAggregationResult$inboundSchema.parse(JSON.parse(x)),
32
+ `Failed to parse 'PercentilesAggregationResult' from JSON`,
33
+ );
34
+ }
@@ -106,23 +106,23 @@ export type Site = {
106
106
  /**
107
107
  * Site boundary geometry in WGS84 (EPSG:4326). GeoJSON Polygon or MultiPolygon with coordinates in [longitude, latitude] order. Excluded from the default attribute set for performance — request explicitly via `attributes: ["boundary"]`.
108
108
  */
109
- boundary: GeoJSONPolygon | GeoJSONMultiPolygon;
109
+ boundary?: GeoJSONPolygon | GeoJSONMultiPolygon | undefined;
110
110
  /**
111
111
  * WGS84 coordinate pair
112
112
  */
113
- centroid: SiteCoordinates;
113
+ centroid?: SiteCoordinates | undefined;
114
114
  /**
115
- * HM Land Registry class of title code. Determines title quality and tenure. Freehold codes: AF (Absolute Freehold), QF (Qualified Freehold), PF (Possessory Freehold), SF (Good Leasehold - Freehold). Leasehold codes: AL (Absolute Leasehold), GL (Good Leasehold), QL (Qualified Leasehold), PL (Possessory Leasehold), SL (Scheme Leasehold). Other codes: CF (Caution Freehold), CL (Caution Leasehold), AR, PR, QR (Rentcharge variants), CN (Caution).
115
+ * HM Land Registry class of title code. Determines title quality and tenure. Freehold codes: AF (Absolute Freehold), QF (Qualified Freehold), PF (Possessory Freehold), SF (Good Leasehold - Freehold). Leasehold codes: AL (Absolute Leasehold), GL (Good Leasehold), QL (Qualified Leasehold), PL (Possessory Leasehold), SL (Scheme Leasehold). Other codes: CF (Caution Freehold), CL (Caution Leasehold), AR, PR, QR (Rentcharge variants), CN (Caution). Not included in the default attribute set — request explicitly via `attributes: ["classTitleCode"]`.
116
116
  */
117
- classTitleCode: string | null;
117
+ classTitleCode?: string | null | undefined;
118
118
  /**
119
119
  * ISO 3166-1 alpha-2 country code
120
120
  */
121
121
  country: string;
122
122
  /**
123
- * HM Land Registry estate interest code. Almost always "EL" (Estate in Land). Does not indicate freehold/leasehold — use `classTitleCode` or `tenureType` instead.
123
+ * HM Land Registry estate interest code. Almost always "EL" (Estate in Land). Does not indicate freehold/leasehold — use `classTitleCode` or `tenureType` instead. Not included in the default attribute set — request explicitly via `attributes: ["estateInterestCode"]`.
124
124
  */
125
- estateInterestCode: string | null;
125
+ estateInterestCode?: string | null | undefined;
126
126
  /**
127
127
  * Land use classifications derived from spatial analysis. Examples: residential, commercial, agricultural, mixed_use, industrial, vacant.
128
128
  */
@@ -132,9 +132,9 @@ export type Site = {
132
132
  */
133
133
  locationCount: number;
134
134
  /**
135
- * UPRNs (Unique Property Reference Numbers) linked to this title via spatial intersection with the Ordnance Survey AddressBase dataset
135
+ * UPRNs (Unique Property Reference Numbers) linked to this title via spatial intersection with the Ordnance Survey AddressBase dataset. Not included in the default attribute set — request explicitly via `attributes: ["locationIds"]`.
136
136
  */
137
- locationIds: Array<string>;
137
+ locationIds?: Array<string> | undefined;
138
138
  /**
139
139
  * Object type identifier
140
140
  */
@@ -148,9 +148,9 @@ export type Site = {
148
148
  */
149
149
  planning: SitePlanningStats | null;
150
150
  /**
151
- * Internal polygon identifiers from the source shapefile. Used for provenance tracking; not typically needed by API consumers.
151
+ * Internal polygon identifiers from the source shapefile. Used for provenance tracking; not typically needed by API consumers. Not included in the default attribute set — request explicitly via `attributes: ["polygonIds"]`.
152
152
  */
153
- polygonIds: Array<number>;
153
+ polygonIds?: Array<number> | undefined;
154
154
  /**
155
155
  * Aggregated statistics for properties linked to this site. Null when no properties are linked (locationCount is 0) or when enrichment has not yet run.
156
156
  */
@@ -300,18 +300,18 @@ export const Site$inboundSchema: z.ZodType<Site, z.ZodTypeDef, unknown> = z
300
300
  boundary: z.union([
301
301
  z.lazy(() => GeoJSONPolygon$inboundSchema),
302
302
  z.lazy(() => GeoJSONMultiPolygon$inboundSchema),
303
- ]),
304
- centroid: z.lazy(() => SiteCoordinates$inboundSchema),
305
- classTitleCode: z.nullable(z.string()),
303
+ ]).optional(),
304
+ centroid: z.lazy(() => SiteCoordinates$inboundSchema).optional(),
305
+ classTitleCode: z.nullable(z.string()).optional(),
306
306
  country: z.string(),
307
- estateInterestCode: z.nullable(z.string()),
307
+ estateInterestCode: z.nullable(z.string()).optional(),
308
308
  landUse: z.array(z.string()),
309
309
  locationCount: z.number(),
310
- locationIds: z.array(z.string()),
310
+ locationIds: z.array(z.string()).optional(),
311
311
  object: SiteObject$inboundSchema,
312
312
  overlays: z.array(z.string()),
313
313
  planning: z.nullable(SitePlanningStats$inboundSchema),
314
- polygonIds: z.array(z.number()),
314
+ polygonIds: z.array(z.number()).optional(),
315
315
  propertyStats: z.nullable(SitePropertyStats$inboundSchema),
316
316
  registeredAt: z.nullable(z.string()),
317
317
  registry: z.string(),
@@ -77,7 +77,6 @@ export const Field = {
77
77
  AreaMetricsProsperityDecile: "areaMetrics.prosperityDecile",
78
78
  RegisteredAt: "registeredAt",
79
79
  UpdatedAt: "updatedAt",
80
- IndexedAt: "indexedAt",
81
80
  } as const;
82
81
  /**
83
82
  * Field to filter on. See the full field list in the schema documentation.
@@ -78,9 +78,6 @@ export const SiteQueryRequestField = {
78
78
  PlanningApprovals: "planning.approvals",
79
79
  RegisteredAt: "registeredAt",
80
80
  UpdatedAt: "updatedAt",
81
- IndexedAt: "indexedAt",
82
- Score: "_score",
83
- Doc: "_doc",
84
81
  } as const;
85
82
  /**
86
83
  * Field to sort by