@seta-labs/geo 0.8.0 → 0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @seta-labs/geo
2
2
 
3
+ ## 0.9.0
4
+
5
+ - `territory.raggi(input)`: for each point and municipality (`codComune`), the
6
+ radius that covers the whole municipality from the point: the distance to
7
+ the farthest vertex of its ISTAT boundary, in metres rounded up, from the
8
+ latest edition that has it (a suppressed municipality keeps its last).
9
+ `edizione` and `raggioM` are null when no edition has the municipality. Up
10
+ to 100 points per call; `id` is echoed back.
11
+
3
12
  ## 0.8.0
4
13
 
5
14
  - **Breaking:** `LookupCache` becomes `CachePolicy`, the cache options every
package/dist/index.d.ts CHANGED
@@ -225,6 +225,22 @@ interface paths {
225
225
  patch?: never;
226
226
  trace?: never;
227
227
  };
228
+ '/territory/raggi': {
229
+ parameters: {
230
+ query?: never;
231
+ header?: never;
232
+ path?: never;
233
+ cookie?: never;
234
+ };
235
+ get?: never;
236
+ put?: never;
237
+ post: operations['TerritoryController_raggi'];
238
+ delete?: never;
239
+ options?: never;
240
+ head?: never;
241
+ patch?: never;
242
+ trace?: never;
243
+ };
228
244
  '/cadastre/parcel': {
229
245
  parameters: {
230
246
  query?: never;
@@ -674,6 +690,30 @@ interface components {
674
690
  TerritoryResolveResponseDto: {
675
691
  items: components['schemas']['TerritoryPointResultDto'][];
676
692
  };
693
+ TerritoryRaggioPointDto: {
694
+ id: string;
695
+ /** @description Belfiore code of the municipality (e.g. `D969`). */
696
+ codComune: string;
697
+ lat: number;
698
+ lng: number;
699
+ };
700
+ TerritoryRaggiRequestDto: {
701
+ points: components['schemas']['TerritoryRaggioPointDto'][];
702
+ };
703
+ TerritoryRaggioDto: {
704
+ id: string;
705
+ codComune: string;
706
+ /**
707
+ * Format: date
708
+ * @description Boundary edition.
709
+ */
710
+ edizione: string | null;
711
+ /** @description Metres, rounded up. */
712
+ raggioM: number | null;
713
+ };
714
+ TerritoryRaggiResponseDto: {
715
+ items: components['schemas']['TerritoryRaggioDto'][];
716
+ };
677
717
  CadastreParcelRequestDto: {
678
718
  lat: number;
679
719
  lng: number;
@@ -1173,6 +1213,36 @@ interface operations {
1173
1213
  };
1174
1214
  };
1175
1215
  };
1216
+ TerritoryController_raggi: {
1217
+ parameters: {
1218
+ query?: never;
1219
+ header?: never;
1220
+ path?: never;
1221
+ cookie?: never;
1222
+ };
1223
+ requestBody: {
1224
+ content: {
1225
+ 'application/json': components['schemas']['TerritoryRaggiRequestDto'];
1226
+ };
1227
+ };
1228
+ responses: {
1229
+ 200: {
1230
+ headers: {
1231
+ [name: string]: unknown;
1232
+ };
1233
+ content: {
1234
+ 'application/json': components['schemas']['TerritoryRaggiResponseDto'];
1235
+ };
1236
+ };
1237
+ /** @description Missing or invalid API key. */
1238
+ 401: {
1239
+ headers: {
1240
+ [name: string]: unknown;
1241
+ };
1242
+ content?: never;
1243
+ };
1244
+ };
1245
+ };
1176
1246
  CadastreController_parcel: {
1177
1247
  parameters: {
1178
1248
  query?: never;
@@ -1284,6 +1354,9 @@ type TerritoryStatus = ApiSchemas['TerritoryStatusDto'];
1284
1354
  type TerritoryResolveRequest = ApiSchemas['TerritoryResolveRequestDto'];
1285
1355
  type TerritoryResolveResponse = ApiSchemas['TerritoryResolveResponseDto'];
1286
1356
  type TerritoryPointResult = ApiSchemas['TerritoryPointResultDto'];
1357
+ type TerritoryRaggiRequest = ApiSchemas['TerritoryRaggiRequestDto'];
1358
+ type TerritoryRaggiResponse = ApiSchemas['TerritoryRaggiResponseDto'];
1359
+ type TerritoryRaggio = ApiSchemas['TerritoryRaggioDto'];
1287
1360
  type TerritoryOmi = ApiSchemas['TerritoryOmiDto'];
1288
1361
  type TerritoryComune = ApiSchemas['TerritoryComuneDto'];
1289
1362
  type TerritoryComuneDetail = ApiSchemas['TerritoryComuneDetailDto'];
@@ -1356,6 +1429,7 @@ interface TerritoryClient {
1356
1429
  compravendite(query?: TerritoryCompravenditeQuery, options?: RequestOptions): Promise<TerritoryCompravenditePage>;
1357
1430
  comune(codComune: string, options?: RequestOptions): Promise<TerritoryComuneDetail>;
1358
1431
  resolve(input: TerritoryResolveRequest, options?: RequestOptions): Promise<TerritoryResolveResponse>;
1432
+ raggi(input: TerritoryRaggiRequest, options?: RequestOptions): Promise<TerritoryRaggiResponse>;
1359
1433
  }
1360
1434
  interface GeoClient {
1361
1435
  geocode(input: GeocodeRequest, options?: LookupOptions): Promise<GeocodeResult>;
@@ -1372,4 +1446,4 @@ interface GeoClient {
1372
1446
  declare function createGeoClient(options: GeoClientOptions): GeoClient;
1373
1447
 
1374
1448
  export { ApiError, createGeoClient };
1375
- export type { CachePolicy, CadastreParcelRequest, CadastreParcelResult, CadastreParcelRow, CadastreParcelsPage, CadastreParcelsQuery, GeoAdminArea, GeoClient, GeoClientOptions, GeoStreetMatch, GeocodeBatchRequest, GeocodeBatchResponse, GeocodeRequest, GeocodeResult, LookupOptions, PacingOptions, RequestOptions, ReverseGeocodeRequest, ReverseGeocodeResult, TerritoryClient, TerritoryCompravendita, TerritoryCompravenditePage, TerritoryCompravenditeQuery, TerritoryComune, TerritoryComuneDetail, TerritoryComuneRiga, TerritoryComuniPage, TerritoryComuniQuery, TerritoryDatasets, TerritoryOmi, TerritoryPointResult, TerritoryQuotazione, TerritoryQuotazioniPage, TerritoryQuotazioniQuery, TerritoryResolveRequest, TerritoryResolveResponse, TerritoryStatus, TerritoryTerritorio };
1449
+ export type { CachePolicy, CadastreParcelRequest, CadastreParcelResult, CadastreParcelRow, CadastreParcelsPage, CadastreParcelsQuery, GeoAdminArea, GeoClient, GeoClientOptions, GeoStreetMatch, GeocodeBatchRequest, GeocodeBatchResponse, GeocodeRequest, GeocodeResult, LookupOptions, PacingOptions, RequestOptions, ReverseGeocodeRequest, ReverseGeocodeResult, TerritoryClient, TerritoryCompravendita, TerritoryCompravenditePage, TerritoryCompravenditeQuery, TerritoryComune, TerritoryComuneDetail, TerritoryComuneRiga, TerritoryComuniPage, TerritoryComuniQuery, TerritoryDatasets, TerritoryOmi, TerritoryPointResult, TerritoryQuotazione, TerritoryQuotazioniPage, TerritoryQuotazioniQuery, TerritoryRaggiRequest, TerritoryRaggiResponse, TerritoryRaggio, TerritoryResolveRequest, TerritoryResolveResponse, TerritoryStatus, TerritoryTerritorio };
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ function codeOf(body) {
30
30
  return typeof body.code === "string" ? body.code : void 0;
31
31
  }
32
32
 
33
- // ../../node_modules/.pnpm/@seta-labs+nestjs-cache-control@0.2.1_@nestjs+common@12.1.2_class-transformer@0.5.1_cla_d70e55208c987ac6b22f0eff0ce5869e/node_modules/@seta-labs/nestjs-cache-control/dist/cache-policy.util.js
33
+ // ../../node_modules/.pnpm/@seta-labs+nestjs-cache-control@0.2.1_@nestjs+common@12.3.2_class-transformer@0.5.1_cla_e752cf18c930d1bfb41f37f56b7e15c5/node_modules/@seta-labs/nestjs-cache-control/dist/cache-policy.util.js
34
34
  var MAX_DELTA_SECONDS = 2147483648;
35
35
  function formatCacheControl(policy) {
36
36
  if (!policy)
@@ -177,7 +177,8 @@ function territory(client) {
177
177
  params: { path: { codComune } }
178
178
  })
179
179
  ),
180
- resolve: (input, options) => data(client.POST("/territory/resolve", { ...options, body: input }))
180
+ resolve: (input, options) => data(client.POST("/territory/resolve", { ...options, body: input })),
181
+ raggi: (input, options) => data(client.POST("/territory/raggi", { ...options, body: input }))
181
182
  };
182
183
  }
183
184
  function createGeoClient(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seta-labs/geo",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Typed Fetch client for the Seta Geo HTTP API",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -43,10 +43,10 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@seta-geo/types": "workspace:*",
46
- "@seta-labs/config": "^0.16.1",
46
+ "@seta-labs/config": "^0.16.2",
47
47
  "@seta-labs/nestjs-cache-control": "0.2.1",
48
48
  "tsup": "^9.0.0",
49
49
  "typescript": "^6.0.3",
50
- "vitest": "^5.0.3"
50
+ "vitest": "^5.0.5"
51
51
  }
52
52
  }