@seta-labs/geo 0.9.0 → 0.10.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 +8 -0
- package/dist/index.d.ts +66 -1
- package/dist/index.js +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @seta-labs/geo
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
- `territory.perimetri({ lat, lng })`: the OMI zone and the municipality a point
|
|
6
|
+
falls into, each with its perimeter as a GeoJSON MultiPolygon (WGS84,
|
|
7
|
+
simplified to a couple of metres) ready to draw on a map. `zona` and `comune`
|
|
8
|
+
are null when the point is outside every perimeter. Requires Geo service
|
|
9
|
+
`0.14.0`.
|
|
10
|
+
|
|
3
11
|
## 0.9.0
|
|
4
12
|
|
|
5
13
|
- `territory.raggi(input)`: for each point and municipality (`codComune`), the
|
package/dist/index.d.ts
CHANGED
|
@@ -209,6 +209,22 @@ interface paths {
|
|
|
209
209
|
patch?: never;
|
|
210
210
|
trace?: never;
|
|
211
211
|
};
|
|
212
|
+
'/territory/perimetri': {
|
|
213
|
+
parameters: {
|
|
214
|
+
query?: never;
|
|
215
|
+
header?: never;
|
|
216
|
+
path?: never;
|
|
217
|
+
cookie?: never;
|
|
218
|
+
};
|
|
219
|
+
get: operations['TerritoryController_perimetri'];
|
|
220
|
+
put?: never;
|
|
221
|
+
post?: never;
|
|
222
|
+
delete?: never;
|
|
223
|
+
options?: never;
|
|
224
|
+
head?: never;
|
|
225
|
+
patch?: never;
|
|
226
|
+
trace?: never;
|
|
227
|
+
};
|
|
212
228
|
'/territory/resolve': {
|
|
213
229
|
parameters: {
|
|
214
230
|
query?: never;
|
|
@@ -661,6 +677,21 @@ interface components {
|
|
|
661
677
|
zone: components['schemas']['TerritoryZonaQuotazioneDto'][];
|
|
662
678
|
compravendite: components['schemas']['TerritoryCompravenditaAnnoDto'][];
|
|
663
679
|
};
|
|
680
|
+
TerritoryPerimetroDto: {
|
|
681
|
+
codComune: string;
|
|
682
|
+
/** @description Null for a municipality. */
|
|
683
|
+
codZona: string | null;
|
|
684
|
+
/** @description Zone or municipality name. */
|
|
685
|
+
nome: string | null;
|
|
686
|
+
/** @description GeoJSON MultiPolygon in WGS84, simplified to a couple of metres. */
|
|
687
|
+
geometry: {
|
|
688
|
+
[key: string]: unknown;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
TerritoryPerimetriDto: {
|
|
692
|
+
zona: components['schemas']['TerritoryPerimetroDto'] | null;
|
|
693
|
+
comune: components['schemas']['TerritoryPerimetroDto'] | null;
|
|
694
|
+
};
|
|
664
695
|
TerritoryPointDto: {
|
|
665
696
|
id: string;
|
|
666
697
|
lat: number;
|
|
@@ -1183,6 +1214,35 @@ interface operations {
|
|
|
1183
1214
|
};
|
|
1184
1215
|
};
|
|
1185
1216
|
};
|
|
1217
|
+
TerritoryController_perimetri: {
|
|
1218
|
+
parameters: {
|
|
1219
|
+
query: {
|
|
1220
|
+
lat: number;
|
|
1221
|
+
lng: number;
|
|
1222
|
+
};
|
|
1223
|
+
header?: never;
|
|
1224
|
+
path?: never;
|
|
1225
|
+
cookie?: never;
|
|
1226
|
+
};
|
|
1227
|
+
requestBody?: never;
|
|
1228
|
+
responses: {
|
|
1229
|
+
200: {
|
|
1230
|
+
headers: {
|
|
1231
|
+
[name: string]: unknown;
|
|
1232
|
+
};
|
|
1233
|
+
content: {
|
|
1234
|
+
'application/json': components['schemas']['TerritoryPerimetriDto'];
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
/** @description Missing or invalid API key. */
|
|
1238
|
+
401: {
|
|
1239
|
+
headers: {
|
|
1240
|
+
[name: string]: unknown;
|
|
1241
|
+
};
|
|
1242
|
+
content?: never;
|
|
1243
|
+
};
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1186
1246
|
TerritoryController_resolve: {
|
|
1187
1247
|
parameters: {
|
|
1188
1248
|
query?: never;
|
|
@@ -1357,6 +1417,8 @@ type TerritoryPointResult = ApiSchemas['TerritoryPointResultDto'];
|
|
|
1357
1417
|
type TerritoryRaggiRequest = ApiSchemas['TerritoryRaggiRequestDto'];
|
|
1358
1418
|
type TerritoryRaggiResponse = ApiSchemas['TerritoryRaggiResponseDto'];
|
|
1359
1419
|
type TerritoryRaggio = ApiSchemas['TerritoryRaggioDto'];
|
|
1420
|
+
type TerritoryPerimetri = ApiSchemas['TerritoryPerimetriDto'];
|
|
1421
|
+
type TerritoryPerimetro = ApiSchemas['TerritoryPerimetroDto'];
|
|
1360
1422
|
type TerritoryOmi = ApiSchemas['TerritoryOmiDto'];
|
|
1361
1423
|
type TerritoryComune = ApiSchemas['TerritoryComuneDto'];
|
|
1362
1424
|
type TerritoryComuneDetail = ApiSchemas['TerritoryComuneDetailDto'];
|
|
@@ -1394,6 +1456,7 @@ interface PacingOptions {
|
|
|
1394
1456
|
retries?: number;
|
|
1395
1457
|
}
|
|
1396
1458
|
|
|
1459
|
+
type TerritoryPerimetriQuery = ApiPaths['/territory/perimetri']['get']['parameters']['query'];
|
|
1397
1460
|
type TerritoryComuniQuery = NonNullable<ApiPaths['/territory/comuni']['get']['parameters']['query']>;
|
|
1398
1461
|
type TerritoryQuotazioniQuery = NonNullable<ApiPaths['/territory/quotazioni']['get']['parameters']['query']>;
|
|
1399
1462
|
type TerritoryCompravenditeQuery = NonNullable<ApiPaths['/territory/compravendite']['get']['parameters']['query']>;
|
|
@@ -1428,6 +1491,8 @@ interface TerritoryClient {
|
|
|
1428
1491
|
quotazioni(query?: TerritoryQuotazioniQuery, options?: RequestOptions): Promise<TerritoryQuotazioniPage>;
|
|
1429
1492
|
compravendite(query?: TerritoryCompravenditeQuery, options?: RequestOptions): Promise<TerritoryCompravenditePage>;
|
|
1430
1493
|
comune(codComune: string, options?: RequestOptions): Promise<TerritoryComuneDetail>;
|
|
1494
|
+
/** The OMI zone and the municipality a point falls into, each with its GeoJSON perimeter. */
|
|
1495
|
+
perimetri(query: TerritoryPerimetriQuery, options?: RequestOptions): Promise<TerritoryPerimetri>;
|
|
1431
1496
|
resolve(input: TerritoryResolveRequest, options?: RequestOptions): Promise<TerritoryResolveResponse>;
|
|
1432
1497
|
raggi(input: TerritoryRaggiRequest, options?: RequestOptions): Promise<TerritoryRaggiResponse>;
|
|
1433
1498
|
}
|
|
@@ -1446,4 +1511,4 @@ interface GeoClient {
|
|
|
1446
1511
|
declare function createGeoClient(options: GeoClientOptions): GeoClient;
|
|
1447
1512
|
|
|
1448
1513
|
export { ApiError, createGeoClient };
|
|
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 };
|
|
1514
|
+
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, TerritoryPerimetri, TerritoryPerimetriQuery, TerritoryPerimetro, 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.
|
|
33
|
+
// ../../node_modules/.pnpm/@seta-labs+nestjs-cache-control@0.2.1_@nestjs+common@12.4.0_class-transformer@0.5.1_cla_a761c97cc6bb49499ea6356a28f157db/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,6 +177,7 @@ function territory(client) {
|
|
|
177
177
|
params: { path: { codComune } }
|
|
178
178
|
})
|
|
179
179
|
),
|
|
180
|
+
perimetri: (query, options) => data(client.GET("/territory/perimetri", { ...options, params: { query } })),
|
|
180
181
|
resolve: (input, options) => data(client.POST("/territory/resolve", { ...options, body: input })),
|
|
181
182
|
raggi: (input, options) => data(client.POST("/territory/raggi", { ...options, body: input }))
|
|
182
183
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seta-labs/geo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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.
|
|
46
|
+
"@seta-labs/config": "^0.18.0",
|
|
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
|
|
50
|
+
"vitest": "^5.1.0"
|
|
51
51
|
}
|
|
52
52
|
}
|