@vepler/sdk 2.37.0 → 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 (88) hide show
  1. package/dist/commonjs/hooks/hooks.d.ts.map +1 -1
  2. package/dist/commonjs/hooks/hooks.js +2 -0
  3. package/dist/commonjs/hooks/hooks.js.map +1 -1
  4. package/dist/commonjs/hooks/registration.d.ts +1 -1
  5. package/dist/commonjs/hooks/registration.d.ts.map +1 -1
  6. package/dist/commonjs/hooks/registration.js +23 -4
  7. package/dist/commonjs/hooks/registration.js.map +1 -1
  8. package/dist/commonjs/lib/config.d.ts +4 -4
  9. package/dist/commonjs/lib/config.js +4 -4
  10. package/dist/commonjs/lib/config.js.map +1 -1
  11. package/dist/commonjs/sdk/models/shared/aggregationresult.d.ts +3 -1
  12. package/dist/commonjs/sdk/models/shared/aggregationresult.d.ts.map +1 -1
  13. package/dist/commonjs/sdk/models/shared/aggregationresult.js +4 -0
  14. package/dist/commonjs/sdk/models/shared/aggregationresult.js.map +1 -1
  15. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.d.ts +75 -0
  16. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.d.ts.map +1 -0
  17. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.js +93 -0
  18. package/dist/commonjs/sdk/models/shared/extendedstatsaggregationresult.js.map +1 -0
  19. package/dist/commonjs/sdk/models/shared/index.d.ts +2 -0
  20. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  21. package/dist/commonjs/sdk/models/shared/index.js +2 -0
  22. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  23. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.d.ts +15 -0
  24. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.d.ts.map +1 -0
  25. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.js +50 -0
  26. package/dist/commonjs/sdk/models/shared/percentilesaggregationresult.js.map +1 -0
  27. package/dist/commonjs/sdk/models/shared/site.d.ts +10 -10
  28. package/dist/commonjs/sdk/models/shared/site.d.ts.map +1 -1
  29. package/dist/commonjs/sdk/models/shared/site.js +6 -6
  30. package/dist/commonjs/sdk/models/shared/site.js.map +1 -1
  31. package/dist/commonjs/sdk/models/shared/sitequerycondition.d.ts +0 -1
  32. package/dist/commonjs/sdk/models/shared/sitequerycondition.d.ts.map +1 -1
  33. package/dist/commonjs/sdk/models/shared/sitequerycondition.js +0 -1
  34. package/dist/commonjs/sdk/models/shared/sitequerycondition.js.map +1 -1
  35. package/dist/commonjs/sdk/models/shared/sitequeryrequest.d.ts +0 -3
  36. package/dist/commonjs/sdk/models/shared/sitequeryrequest.d.ts.map +1 -1
  37. package/dist/commonjs/sdk/models/shared/sitequeryrequest.js +0 -3
  38. package/dist/commonjs/sdk/models/shared/sitequeryrequest.js.map +1 -1
  39. package/dist/esm/hooks/hooks.d.ts.map +1 -1
  40. package/dist/esm/hooks/hooks.js +2 -0
  41. package/dist/esm/hooks/hooks.js.map +1 -1
  42. package/dist/esm/hooks/registration.d.ts +1 -1
  43. package/dist/esm/hooks/registration.d.ts.map +1 -1
  44. package/dist/esm/hooks/registration.js +23 -4
  45. package/dist/esm/hooks/registration.js.map +1 -1
  46. package/dist/esm/lib/config.d.ts +4 -4
  47. package/dist/esm/lib/config.js +4 -4
  48. package/dist/esm/lib/config.js.map +1 -1
  49. package/dist/esm/sdk/models/shared/aggregationresult.d.ts +3 -1
  50. package/dist/esm/sdk/models/shared/aggregationresult.d.ts.map +1 -1
  51. package/dist/esm/sdk/models/shared/aggregationresult.js +4 -0
  52. package/dist/esm/sdk/models/shared/aggregationresult.js.map +1 -1
  53. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.d.ts +75 -0
  54. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.d.ts.map +1 -0
  55. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.js +55 -0
  56. package/dist/esm/sdk/models/shared/extendedstatsaggregationresult.js.map +1 -0
  57. package/dist/esm/sdk/models/shared/index.d.ts +2 -0
  58. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  59. package/dist/esm/sdk/models/shared/index.js +2 -0
  60. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  61. package/dist/esm/sdk/models/shared/percentilesaggregationresult.d.ts +15 -0
  62. package/dist/esm/sdk/models/shared/percentilesaggregationresult.d.ts.map +1 -0
  63. package/dist/esm/sdk/models/shared/percentilesaggregationresult.js +13 -0
  64. package/dist/esm/sdk/models/shared/percentilesaggregationresult.js.map +1 -0
  65. package/dist/esm/sdk/models/shared/site.d.ts +10 -10
  66. package/dist/esm/sdk/models/shared/site.d.ts.map +1 -1
  67. package/dist/esm/sdk/models/shared/site.js +6 -6
  68. package/dist/esm/sdk/models/shared/site.js.map +1 -1
  69. package/dist/esm/sdk/models/shared/sitequerycondition.d.ts +0 -1
  70. package/dist/esm/sdk/models/shared/sitequerycondition.d.ts.map +1 -1
  71. package/dist/esm/sdk/models/shared/sitequerycondition.js +0 -1
  72. package/dist/esm/sdk/models/shared/sitequerycondition.js.map +1 -1
  73. package/dist/esm/sdk/models/shared/sitequeryrequest.d.ts +0 -3
  74. package/dist/esm/sdk/models/shared/sitequeryrequest.d.ts.map +1 -1
  75. package/dist/esm/sdk/models/shared/sitequeryrequest.js +0 -3
  76. package/dist/esm/sdk/models/shared/sitequeryrequest.js.map +1 -1
  77. package/jsr.json +1 -1
  78. package/package.json +1 -1
  79. package/src/hooks/hooks.ts +2 -0
  80. package/src/hooks/registration.ts +29 -5
  81. package/src/lib/config.ts +4 -4
  82. package/src/sdk/models/shared/aggregationresult.ts +12 -0
  83. package/src/sdk/models/shared/extendedstatsaggregationresult.ts +150 -0
  84. package/src/sdk/models/shared/index.ts +2 -0
  85. package/src/sdk/models/shared/percentilesaggregationresult.ts +34 -0
  86. package/src/sdk/models/shared/site.ts +16 -16
  87. package/src/sdk/models/shared/sitequerycondition.ts +0 -1
  88. package/src/sdk/models/shared/sitequeryrequest.ts +0 -3
@@ -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