@vepler/sdk 2.30.0 → 2.30.4

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 (56) hide show
  1. package/dist/commonjs/funcs/metricsGetMetricValues.js +9 -8
  2. package/dist/commonjs/funcs/metricsGetMetricValues.js.map +1 -1
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/sdk/models/operations/getareasbyfieldandids.d.ts +19 -7
  6. package/dist/commonjs/sdk/models/operations/getareasbyfieldandids.d.ts.map +1 -1
  7. package/dist/commonjs/sdk/models/operations/getareasbyfieldandids.js +5 -2
  8. package/dist/commonjs/sdk/models/operations/getareasbyfieldandids.js.map +1 -1
  9. package/dist/commonjs/sdk/models/operations/getareaswithinradius.d.ts +19 -7
  10. package/dist/commonjs/sdk/models/operations/getareaswithinradius.d.ts.map +1 -1
  11. package/dist/commonjs/sdk/models/operations/getareaswithinradius.js +5 -2
  12. package/dist/commonjs/sdk/models/operations/getareaswithinradius.js.map +1 -1
  13. package/dist/commonjs/sdk/models/operations/getborderingareas.d.ts +38 -14
  14. package/dist/commonjs/sdk/models/operations/getborderingareas.d.ts.map +1 -1
  15. package/dist/commonjs/sdk/models/operations/getborderingareas.js +10 -4
  16. package/dist/commonjs/sdk/models/operations/getborderingareas.js.map +1 -1
  17. package/dist/commonjs/sdk/models/operations/getchildareas.d.ts +38 -14
  18. package/dist/commonjs/sdk/models/operations/getchildareas.d.ts.map +1 -1
  19. package/dist/commonjs/sdk/models/operations/getchildareas.js +10 -4
  20. package/dist/commonjs/sdk/models/operations/getchildareas.js.map +1 -1
  21. package/dist/commonjs/sdk/models/operations/getmetricvalues.d.ts +36 -85
  22. package/dist/commonjs/sdk/models/operations/getmetricvalues.d.ts.map +1 -1
  23. package/dist/commonjs/sdk/models/operations/getmetricvalues.js +12 -70
  24. package/dist/commonjs/sdk/models/operations/getmetricvalues.js.map +1 -1
  25. package/dist/esm/funcs/metricsGetMetricValues.js +9 -8
  26. package/dist/esm/funcs/metricsGetMetricValues.js.map +1 -1
  27. package/dist/esm/lib/config.d.ts +2 -2
  28. package/dist/esm/lib/config.js +2 -2
  29. package/dist/esm/sdk/models/operations/getareasbyfieldandids.d.ts +19 -7
  30. package/dist/esm/sdk/models/operations/getareasbyfieldandids.d.ts.map +1 -1
  31. package/dist/esm/sdk/models/operations/getareasbyfieldandids.js +5 -2
  32. package/dist/esm/sdk/models/operations/getareasbyfieldandids.js.map +1 -1
  33. package/dist/esm/sdk/models/operations/getareaswithinradius.d.ts +19 -7
  34. package/dist/esm/sdk/models/operations/getareaswithinradius.d.ts.map +1 -1
  35. package/dist/esm/sdk/models/operations/getareaswithinradius.js +5 -2
  36. package/dist/esm/sdk/models/operations/getareaswithinradius.js.map +1 -1
  37. package/dist/esm/sdk/models/operations/getborderingareas.d.ts +38 -14
  38. package/dist/esm/sdk/models/operations/getborderingareas.d.ts.map +1 -1
  39. package/dist/esm/sdk/models/operations/getborderingareas.js +10 -4
  40. package/dist/esm/sdk/models/operations/getborderingareas.js.map +1 -1
  41. package/dist/esm/sdk/models/operations/getchildareas.d.ts +38 -14
  42. package/dist/esm/sdk/models/operations/getchildareas.d.ts.map +1 -1
  43. package/dist/esm/sdk/models/operations/getchildareas.js +10 -4
  44. package/dist/esm/sdk/models/operations/getchildareas.js.map +1 -1
  45. package/dist/esm/sdk/models/operations/getmetricvalues.d.ts +36 -85
  46. package/dist/esm/sdk/models/operations/getmetricvalues.d.ts.map +1 -1
  47. package/dist/esm/sdk/models/operations/getmetricvalues.js +11 -69
  48. package/dist/esm/sdk/models/operations/getmetricvalues.js.map +1 -1
  49. package/package.json +1 -1
  50. package/src/funcs/metricsGetMetricValues.ts +9 -8
  51. package/src/lib/config.ts +2 -2
  52. package/src/sdk/models/operations/getareasbyfieldandids.ts +24 -9
  53. package/src/sdk/models/operations/getareaswithinradius.ts +24 -9
  54. package/src/sdk/models/operations/getborderingareas.ts +48 -18
  55. package/src/sdk/models/operations/getchildareas.ts +48 -18
  56. package/src/sdk/models/operations/getmetricvalues.ts +48 -102
@@ -26,21 +26,33 @@ export type GetChildAreasRequest = {
26
26
 
27
27
  export type GetChildAreasHierarchy = {
28
28
  /**
29
- * Code of the area at this hierarchy level
29
+ * Human-readable category name
30
30
  */
31
- code: string;
31
+ categoryName?: string | undefined;
32
32
  /**
33
- * Hierarchy level (0 = finest granularity like output_area, higher numbers = broader areas like country)
33
+ * Display name for the area
34
34
  */
35
- level: number;
35
+ displayName?: string | undefined;
36
36
  /**
37
- * Name of the area at this hierarchy level
37
+ * Unique identifier/code of the area at this hierarchy level
38
38
  */
39
- name: string;
39
+ entityId: string;
40
+ /**
41
+ * Full name of the entity
42
+ */
43
+ entityName?: string | undefined;
40
44
  /**
41
45
  * Geographic type at this level
42
46
  */
43
- type: string;
47
+ entityType: string;
48
+ /**
49
+ * Hierarchy level (0 = finest granularity like output_area, higher numbers = broader areas like country)
50
+ */
51
+ level: number;
52
+ /**
53
+ * Category name at this hierarchy level
54
+ */
55
+ name: string;
44
56
  };
45
57
 
46
58
  export type GetChildAreasRelationships = {
@@ -176,21 +188,33 @@ export type Children = {
176
188
 
177
189
  export type GetChildAreasAreasHierarchy = {
178
190
  /**
179
- * Code of the area at this hierarchy level
191
+ * Human-readable category name
180
192
  */
181
- code: string;
193
+ categoryName?: string | undefined;
182
194
  /**
183
- * Hierarchy level (0 = finest granularity like output_area, higher numbers = broader areas like country)
195
+ * Display name for the area
184
196
  */
185
- level: number;
197
+ displayName?: string | undefined;
186
198
  /**
187
- * Name of the area at this hierarchy level
199
+ * Unique identifier/code of the area at this hierarchy level
188
200
  */
189
- name: string;
201
+ entityId: string;
202
+ /**
203
+ * Full name of the entity
204
+ */
205
+ entityName?: string | undefined;
190
206
  /**
191
207
  * Geographic type at this level
192
208
  */
193
- type: string;
209
+ entityType: string;
210
+ /**
211
+ * Hierarchy level (0 = finest granularity like output_area, higher numbers = broader areas like country)
212
+ */
213
+ level: number;
214
+ /**
215
+ * Category name at this hierarchy level
216
+ */
217
+ name: string;
194
218
  };
195
219
 
196
220
  export type GetChildAreasAreasRelationships = {
@@ -382,10 +406,13 @@ export const GetChildAreasHierarchy$inboundSchema: z.ZodType<
382
406
  z.ZodTypeDef,
383
407
  unknown
384
408
  > = z.object({
385
- code: z.string(),
409
+ categoryName: z.string().optional(),
410
+ displayName: z.string().optional(),
411
+ entityId: z.string(),
412
+ entityName: z.string().optional(),
413
+ entityType: z.string(),
386
414
  level: z.number(),
387
415
  name: z.string(),
388
- type: z.string(),
389
416
  });
390
417
 
391
418
  export function getChildAreasHierarchyFromJSON(
@@ -466,10 +493,13 @@ export const GetChildAreasAreasHierarchy$inboundSchema: z.ZodType<
466
493
  z.ZodTypeDef,
467
494
  unknown
468
495
  > = z.object({
469
- code: z.string(),
496
+ categoryName: z.string().optional(),
497
+ displayName: z.string().optional(),
498
+ entityId: z.string(),
499
+ entityName: z.string().optional(),
500
+ entityType: z.string(),
470
501
  level: z.number(),
471
502
  name: z.string(),
472
- type: z.string(),
473
503
  });
474
504
 
475
505
  export function getChildAreasAreasHierarchyFromJSON(
@@ -5,88 +5,39 @@
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../../lib/schemas.js";
7
7
  import * as openEnums from "../../types/enums.js";
8
- import { ClosedEnum, OpenEnum } from "../../types/enums.js";
8
+ import { OpenEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- /**
13
- * Layer type - supports postcodes, outcodes (e.g., SW1A), ONS geographies (OA21, LSOA21, LAD), HMLR INSPIRE parcels, EA/NRW/SEPA flood data, environmental designations (Natura 2000, AONB/NSA), heritage assets, and noise mapping data
14
- */
15
- export const GeographicType = {
16
- Postcode: "postcode",
17
- Outcode: "outcode",
18
- UkOutputArea: "uk_output_area",
19
- Lsoa21: "lsoa21",
20
- Ward: "ward",
21
- Parish: "parish",
22
- LocalAuthorityDistrict: "local_authority_district",
23
- County: "county",
24
- Country: "country",
25
- CountyElectoralDivision: "county_electoral_division",
26
- DistrictBoroughUnitary: "district_borough_unitary",
27
- DistrictBoroughUnitaryWard: "district_borough_unitary_ward",
28
- LocalPlanningAuthority: "local_planning_authority",
29
- CeremonialCountiesRegion: "ceremonial_counties_region",
30
- EnglishRegion: "english_region",
31
- CountryRegion: "country_region",
32
- UnitaryElectoralDivision: "unitary_electoral_division",
33
- Province: "province",
34
- ElectoralDivision: "electoral_division",
35
- GreaterLondonConstituency: "greater_london_constituency",
36
- ScotlandAndWalesConstituency: "scotland_and_wales_constituency",
37
- ScotlandAndWalesRegion: "scotland_and_wales_region",
38
- WestminsterConstituency: "westminster_constituency",
39
- Building: "building",
40
- BuiltUpArea250: "built_up_area_250",
41
- GreenBelt: "green_belt",
42
- CommonLand: "common_land",
43
- ParcelsGb: "parcels_gb",
44
- FloodRisk: "flood_risk",
45
- Ramsar: "ramsar",
46
- Natura2000: "natura_2000",
47
- Aonb: "aonb",
48
- AreaNaturalBeauty: "area_natural_beauty",
49
- NationalScenicArea: "national_scenic_area",
50
- SpecialAreaConservation: "special_area_conservation",
51
- SpecialProtectionArea: "special_protection_area",
52
- AncientWoodland: "ancient_woodland",
53
- NativeWoodlandSurvey: "native_woodland_survey",
54
- PriorityHabitats: "priority_habitats",
55
- ProtectedWoodlands: "protected_woodlands",
56
- ProtectedWoodland: "protected_woodland",
57
- ProtectedScenicLandscapes: "protected_scenic_landscapes",
58
- WorldHeritageSite: "world_heritage_site",
59
- ScheduledMonument: "scheduled_monument",
60
- Battlefield: "battlefield",
61
- ProtectedWreckSite: "protected_wreck_site",
62
- HistoricLandfillSite: "historic_landfill_site",
63
- RadonLevel: "radon_level",
64
- BrownfieldLand: "brownfield_land",
65
- NoiseRailLden: "noise_rail_lden",
66
- NoiseRoadLden: "noise_road_lden",
67
- NoiseIndustryLden: "noise_industry_lden",
68
- } as const;
69
- /**
70
- * Layer type - supports postcodes, outcodes (e.g., SW1A), ONS geographies (OA21, LSOA21, LAD), HMLR INSPIRE parcels, EA/NRW/SEPA flood data, environmental designations (Natura 2000, AONB/NSA), heritage assets, and noise mapping data
71
- */
72
- export type GeographicType = ClosedEnum<typeof GeographicType>;
73
-
74
12
  export type GetMetricValuesRequest = {
75
13
  category?: string | undefined;
76
- endPeriod?: string | undefined;
77
- geographicCode?: string | undefined;
14
+ endMonth?: number | null | undefined;
15
+ endYear?: number | null | undefined;
16
+ /**
17
+ * Geographic entity IDs (comma-separated)
18
+ */
19
+ geographicEntityIds?: string | undefined;
78
20
  /**
79
- * Layer type identifier. Includes postcodes, outcodes, ONS statistical geographies, HM Land Registry INSPIRE polygons, Environment Agency flood zones, Natural England/NatureScot environmental designations, Historic England heritage assets, and DEFRA END Directive noise mapping.
21
+ * Geographic entity types to filter by (comma-separated)
80
22
  */
81
- geographicType?: GeographicType | undefined;
82
- includeGeographyDetails?: string | undefined;
83
- includeMetricDetails?: string | undefined;
23
+ geographicEntityTypes?: string | undefined;
24
+ /**
25
+ * Include geographic entity information in response
26
+ */
27
+ includeGeographicEntity?: string | undefined;
28
+ /**
29
+ * Include metric metadata in response
30
+ */
31
+ includeMetric?: string | undefined;
84
32
  limit?: string | undefined;
85
- metricId?: string | undefined;
33
+ /**
34
+ * Metric identifiers to retrieve (comma-separated)
35
+ */
36
+ metricIds?: string | undefined;
86
37
  metricName?: string | undefined;
87
38
  offset?: string | undefined;
88
- period?: string | undefined;
89
- startPeriod?: string | undefined;
39
+ startMonth?: number | null | undefined;
40
+ startYear?: number | null | undefined;
90
41
  };
91
42
 
92
43
  export type Pagination = {
@@ -99,7 +50,7 @@ export type Pagination = {
99
50
  /**
100
51
  * Layer type - supports postcodes, outcodes (e.g., SW1A), ONS geographies (OA21, LSOA21, LAD), HMLR INSPIRE parcels, EA/NRW/SEPA flood data, environmental designations (Natura 2000, AONB/NSA), heritage assets, and noise mapping data
101
52
  */
102
- export const GetMetricValuesGeographicType = {
53
+ export const GeographicType = {
103
54
  Postcode: "postcode",
104
55
  Outcode: "outcode",
105
56
  UkOutputArea: "uk_output_area",
@@ -156,9 +107,7 @@ export const GetMetricValuesGeographicType = {
156
107
  /**
157
108
  * Layer type - supports postcodes, outcodes (e.g., SW1A), ONS geographies (OA21, LSOA21, LAD), HMLR INSPIRE parcels, EA/NRW/SEPA flood data, environmental designations (Natura 2000, AONB/NSA), heritage assets, and noise mapping data
158
109
  */
159
- export type GetMetricValuesGeographicType = OpenEnum<
160
- typeof GetMetricValuesGeographicType
161
- >;
110
+ export type GeographicType = OpenEnum<typeof GeographicType>;
162
111
 
163
112
  /**
164
113
  * Layer type - supports postcodes, outcodes (e.g., SW1A), ONS geographies (OA21, LSOA21, LAD), HMLR INSPIRE parcels, EA/NRW/SEPA flood data, environmental designations (Natura 2000, AONB/NSA), heritage assets, and noise mapping data
@@ -273,7 +222,7 @@ export type GetMetricValuesResult = {
273
222
  /**
274
223
  * Layer type - supports postcodes, outcodes (e.g., SW1A), ONS geographies (OA21, LSOA21, LAD), HMLR INSPIRE parcels, EA/NRW/SEPA flood data, environmental designations (Natura 2000, AONB/NSA), heritage assets, and noise mapping data
275
224
  */
276
- geographicType: GetMetricValuesGeographicType;
225
+ geographicType: GeographicType;
277
226
  geography?: Geography | undefined;
278
227
  id: number;
279
228
  metadata?: { [k: string]: any | null } | null | undefined;
@@ -300,25 +249,21 @@ export type GetMetricValuesResponseBody = {
300
249
  success: boolean;
301
250
  };
302
251
 
303
- /** @internal */
304
- export const GeographicType$outboundSchema: z.ZodNativeEnum<
305
- typeof GeographicType
306
- > = z.nativeEnum(GeographicType);
307
-
308
252
  /** @internal */
309
253
  export type GetMetricValuesRequest$Outbound = {
310
254
  category?: string | undefined;
311
- endPeriod?: string | undefined;
312
- geographicCode?: string | undefined;
313
- geographicType?: string | undefined;
314
- includeGeographyDetails?: string | undefined;
315
- includeMetricDetails?: string | undefined;
255
+ endMonth?: number | null | undefined;
256
+ endYear?: number | null | undefined;
257
+ geographicEntityIds?: string | undefined;
258
+ geographicEntityTypes?: string | undefined;
259
+ includeGeographicEntity?: string | undefined;
260
+ includeMetric?: string | undefined;
316
261
  limit: string;
317
- metricId?: string | undefined;
262
+ metricIds?: string | undefined;
318
263
  metricName?: string | undefined;
319
264
  offset: string;
320
- period?: string | undefined;
321
- startPeriod?: string | undefined;
265
+ startMonth?: number | null | undefined;
266
+ startYear?: number | null | undefined;
322
267
  };
323
268
 
324
269
  /** @internal */
@@ -328,17 +273,18 @@ export const GetMetricValuesRequest$outboundSchema: z.ZodType<
328
273
  GetMetricValuesRequest
329
274
  > = z.object({
330
275
  category: z.string().optional(),
331
- endPeriod: z.string().optional(),
332
- geographicCode: z.string().optional(),
333
- geographicType: GeographicType$outboundSchema.optional(),
334
- includeGeographyDetails: z.string().optional(),
335
- includeMetricDetails: z.string().optional(),
276
+ endMonth: z.nullable(z.number()).optional(),
277
+ endYear: z.nullable(z.number()).optional(),
278
+ geographicEntityIds: z.string().optional(),
279
+ geographicEntityTypes: z.string().optional(),
280
+ includeGeographicEntity: z.string().optional(),
281
+ includeMetric: z.string().optional(),
336
282
  limit: z.string().default("100"),
337
- metricId: z.string().optional(),
283
+ metricIds: z.string().optional(),
338
284
  metricName: z.string().optional(),
339
285
  offset: z.string().default("0"),
340
- period: z.string().optional(),
341
- startPeriod: z.string().optional(),
286
+ startMonth: z.nullable(z.number()).optional(),
287
+ startYear: z.nullable(z.number()).optional(),
342
288
  });
343
289
 
344
290
  export function getMetricValuesRequestToJSON(
@@ -372,11 +318,11 @@ export function paginationFromJSON(
372
318
  }
373
319
 
374
320
  /** @internal */
375
- export const GetMetricValuesGeographicType$inboundSchema: z.ZodType<
376
- GetMetricValuesGeographicType,
321
+ export const GeographicType$inboundSchema: z.ZodType<
322
+ GeographicType,
377
323
  z.ZodTypeDef,
378
324
  unknown
379
- > = openEnums.inboundSchema(GetMetricValuesGeographicType);
325
+ > = openEnums.inboundSchema(GeographicType);
380
326
 
381
327
  /** @internal */
382
328
  export const GetMetricValuesType$inboundSchema: z.ZodType<
@@ -454,7 +400,7 @@ export const GetMetricValuesResult$inboundSchema: z.ZodType<
454
400
  confidence: z.nullable(z.number()),
455
401
  createdAt: z.string(),
456
402
  geographicCode: z.string(),
457
- geographicType: GetMetricValuesGeographicType$inboundSchema,
403
+ geographicType: GeographicType$inboundSchema,
458
404
  geography: z.lazy(() => Geography$inboundSchema).optional(),
459
405
  id: z.number(),
460
406
  metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),