@seta-labs/geo 0.3.0 → 0.5.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 +19 -0
- package/README.md +1 -0
- package/dist/index.d.ts +117 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @seta-labs/geo
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
- `comuni(query?)` takes `storici`: with `true` the list also returns the
|
|
6
|
+
municipalities suppressed since 1991; without it only the current ones.
|
|
7
|
+
- `TerritoryComune` (the list rows and the `comune` block of
|
|
8
|
+
`comune(codComune)`) gains `costituitoIl` and `soppressoIl` (`YYYY-MM-DD`,
|
|
9
|
+
or null) and `codComuneSuccessore`, the municipality it merged into.
|
|
10
|
+
- Names, provinces and regions follow the ISTAT list of current
|
|
11
|
+
municipalities: `Cardedu`, `OG`, `Sardegna` where the OMI registry had
|
|
12
|
+
`CARDEDU`, `NU`, `SARDEGNA`.
|
|
13
|
+
|
|
14
|
+
## 0.4.0
|
|
15
|
+
|
|
16
|
+
- New `cadastreParcels(query?)` on `GET /cadastre/parcels`: the stored
|
|
17
|
+
cadastral answers, newest first, filtered by `codComune`, `foglio`,
|
|
18
|
+
`particella` and `tipologia` (exact match), paginated with `page` and
|
|
19
|
+
`pageSize`. A read of the store: it never asks the cadastral map.
|
|
20
|
+
- New types `CadastreParcelsQuery`, `CadastreParcelsPage` and `CadastreParcelRow`.
|
|
21
|
+
|
|
3
22
|
## 0.3.0
|
|
4
23
|
|
|
5
24
|
- `geocode`, `geocodeBatch`, `reverseGeocode` and `cadastreParcel` take
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ retain their own concurrency and retry policy.
|
|
|
50
50
|
| `geocodeBatch` | `GeocodeBatchRequest` |
|
|
51
51
|
| `reverseGeocode` | `ReverseGeocodeRequest` |
|
|
52
52
|
| `cadastreParcel` | `CadastreParcelRequest` |
|
|
53
|
+
| `cadastreParcels` | optional `CadastreParcelsQuery` |
|
|
53
54
|
| `territory.status`, `territory.datasets` | options only |
|
|
54
55
|
| `territory.comuni` | optional `TerritoryComuniQuery` |
|
|
55
56
|
| `territory.quotazioni` | optional `TerritoryQuotazioniQuery` |
|
package/dist/index.d.ts
CHANGED
|
@@ -127,6 +127,22 @@ interface paths {
|
|
|
127
127
|
patch?: never;
|
|
128
128
|
trace?: never;
|
|
129
129
|
};
|
|
130
|
+
'/cadastre/parcels': {
|
|
131
|
+
parameters: {
|
|
132
|
+
query?: never;
|
|
133
|
+
header?: never;
|
|
134
|
+
path?: never;
|
|
135
|
+
cookie?: never;
|
|
136
|
+
};
|
|
137
|
+
get: operations['CadastreController_listParcels'];
|
|
138
|
+
put?: never;
|
|
139
|
+
post?: never;
|
|
140
|
+
delete?: never;
|
|
141
|
+
options?: never;
|
|
142
|
+
head?: never;
|
|
143
|
+
patch?: never;
|
|
144
|
+
trace?: never;
|
|
145
|
+
};
|
|
130
146
|
'/territory/status': {
|
|
131
147
|
parameters: {
|
|
132
148
|
query?: never;
|
|
@@ -439,6 +455,39 @@ interface components {
|
|
|
439
455
|
/** @description True when the answer came from the cache, no map call. */
|
|
440
456
|
cached: boolean;
|
|
441
457
|
};
|
|
458
|
+
CadastreParcelRowDto: {
|
|
459
|
+
/** @description Canonical cache key: "lat,lng" rounded to 5 decimals. */
|
|
460
|
+
query: string;
|
|
461
|
+
lat: number;
|
|
462
|
+
lng: number;
|
|
463
|
+
/** @example PARTICELLA */
|
|
464
|
+
tipologia: string;
|
|
465
|
+
/** @example B885 */
|
|
466
|
+
codComune: string | null;
|
|
467
|
+
/** @description Municipality name; null when the code is not in the registry. */
|
|
468
|
+
comune: string | null;
|
|
469
|
+
/** @example AL */
|
|
470
|
+
provincia: string | null;
|
|
471
|
+
sezione: string | null;
|
|
472
|
+
/** @example 36 */
|
|
473
|
+
foglio: string | null;
|
|
474
|
+
/** @example G */
|
|
475
|
+
allegato: string | null;
|
|
476
|
+
sviluppo: string | null;
|
|
477
|
+
/** @example 5101 */
|
|
478
|
+
particella: string | null;
|
|
479
|
+
/**
|
|
480
|
+
* Format: date-time
|
|
481
|
+
* @description When the map last gave this answer.
|
|
482
|
+
*/
|
|
483
|
+
updatedAt: string;
|
|
484
|
+
};
|
|
485
|
+
CadastreParcelsPageDto: {
|
|
486
|
+
page: number;
|
|
487
|
+
pageSize: number;
|
|
488
|
+
total: number;
|
|
489
|
+
items: components['schemas']['CadastreParcelRowDto'][];
|
|
490
|
+
};
|
|
442
491
|
TerritoryStatusDto: {
|
|
443
492
|
/** @description Latest OMI publication loaded (`YYYY-S`), null while no supply is loaded. */
|
|
444
493
|
semestre: string | null;
|
|
@@ -463,6 +512,18 @@ interface components {
|
|
|
463
512
|
denominazione: string;
|
|
464
513
|
provincia: string;
|
|
465
514
|
regione: string;
|
|
515
|
+
/**
|
|
516
|
+
* Format: date
|
|
517
|
+
* @description Birth of the municipality, when it falls after 1 January 1991.
|
|
518
|
+
*/
|
|
519
|
+
costituitoIl: string | null;
|
|
520
|
+
/**
|
|
521
|
+
* Format: date
|
|
522
|
+
* @description Suppression date, null for a current municipality.
|
|
523
|
+
*/
|
|
524
|
+
soppressoIl: string | null;
|
|
525
|
+
/** @description Belfiore code of the municipality it merged into. */
|
|
526
|
+
codComuneSuccessore: string | null;
|
|
466
527
|
popolazione: number | null;
|
|
467
528
|
redditoMedio: number | null;
|
|
468
529
|
};
|
|
@@ -514,6 +575,18 @@ interface components {
|
|
|
514
575
|
denominazione: string;
|
|
515
576
|
provincia: string;
|
|
516
577
|
regione: string;
|
|
578
|
+
/**
|
|
579
|
+
* Format: date
|
|
580
|
+
* @description Birth of the municipality, when it falls after 1 January 1991.
|
|
581
|
+
*/
|
|
582
|
+
costituitoIl: string | null;
|
|
583
|
+
/**
|
|
584
|
+
* Format: date
|
|
585
|
+
* @description Suppression date, null for a current municipality.
|
|
586
|
+
*/
|
|
587
|
+
soppressoIl: string | null;
|
|
588
|
+
/** @description Belfiore code of the municipality it merged into. */
|
|
589
|
+
codComuneSuccessore: string | null;
|
|
517
590
|
};
|
|
518
591
|
TerritoryIstatDto: {
|
|
519
592
|
denominazione: string;
|
|
@@ -841,6 +914,42 @@ interface operations {
|
|
|
841
914
|
};
|
|
842
915
|
};
|
|
843
916
|
};
|
|
917
|
+
CadastreController_listParcels: {
|
|
918
|
+
parameters: {
|
|
919
|
+
query?: {
|
|
920
|
+
page?: number;
|
|
921
|
+
pageSize?: number;
|
|
922
|
+
/** @description Cadastral municipality code. */
|
|
923
|
+
codComune?: string;
|
|
924
|
+
foglio?: string;
|
|
925
|
+
particella?: string;
|
|
926
|
+
/** @description What lies under the point. */
|
|
927
|
+
tipologia?: string;
|
|
928
|
+
};
|
|
929
|
+
header?: never;
|
|
930
|
+
path?: never;
|
|
931
|
+
cookie?: never;
|
|
932
|
+
};
|
|
933
|
+
requestBody?: never;
|
|
934
|
+
responses: {
|
|
935
|
+
/** @description The stored map answers, newest first; never a map call. */
|
|
936
|
+
200: {
|
|
937
|
+
headers: {
|
|
938
|
+
[name: string]: unknown;
|
|
939
|
+
};
|
|
940
|
+
content: {
|
|
941
|
+
'application/json': components['schemas']['CadastreParcelsPageDto'];
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
/** @description Missing or invalid API key. */
|
|
945
|
+
401: {
|
|
946
|
+
headers: {
|
|
947
|
+
[name: string]: unknown;
|
|
948
|
+
};
|
|
949
|
+
content?: never;
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
};
|
|
844
953
|
TerritoryController_status: {
|
|
845
954
|
parameters: {
|
|
846
955
|
query?: never;
|
|
@@ -904,6 +1013,8 @@ interface operations {
|
|
|
904
1013
|
provincia?: string;
|
|
905
1014
|
regione?: string;
|
|
906
1015
|
ordina?: 'denominazione' | 'popolazione';
|
|
1016
|
+
/** @description Also the municipalities suppressed since 1991, with their dates. */
|
|
1017
|
+
storici?: boolean;
|
|
907
1018
|
};
|
|
908
1019
|
header?: never;
|
|
909
1020
|
path?: never;
|
|
@@ -1080,6 +1191,8 @@ type ReverseGeocodeRequest = ApiSchemas['ReverseGeocodeRequestDto'];
|
|
|
1080
1191
|
type ReverseGeocodeResult = ApiSchemas['ReverseGeocodeResultDto'];
|
|
1081
1192
|
type CadastreParcelRequest = ApiSchemas['CadastreParcelRequestDto'];
|
|
1082
1193
|
type CadastreParcelResult = ApiSchemas['CadastreParcelResultDto'];
|
|
1194
|
+
type CadastreParcelsPage = ApiSchemas['CadastreParcelsPageDto'];
|
|
1195
|
+
type CadastreParcelRow = ApiSchemas['CadastreParcelRowDto'];
|
|
1083
1196
|
type TerritoryStatus = ApiSchemas['TerritoryStatusDto'];
|
|
1084
1197
|
type TerritoryResolveRequest = ApiSchemas['TerritoryResolveRequestDto'];
|
|
1085
1198
|
type TerritoryResolveResponse = ApiSchemas['TerritoryResolveResponseDto'];
|
|
@@ -1098,6 +1211,7 @@ type TerritoryCompravendita = ApiSchemas['TerritoryCompravenditaDto'];
|
|
|
1098
1211
|
type TerritoryComuniQuery = NonNullable<ApiPaths['/territory/comuni']['get']['parameters']['query']>;
|
|
1099
1212
|
type TerritoryQuotazioniQuery = NonNullable<ApiPaths['/territory/quotazioni']['get']['parameters']['query']>;
|
|
1100
1213
|
type TerritoryCompravenditeQuery = NonNullable<ApiPaths['/territory/compravendite']['get']['parameters']['query']>;
|
|
1214
|
+
type CadastreParcelsQuery = NonNullable<ApiPaths['/cadastre/parcels']['get']['parameters']['query']>;
|
|
1101
1215
|
interface RequestOptions {
|
|
1102
1216
|
signal?: AbortSignal;
|
|
1103
1217
|
}
|
|
@@ -1142,10 +1256,12 @@ interface GeoClient {
|
|
|
1142
1256
|
reverseGeocode(input: ReverseGeocodeRequest, options?: LookupOptions): Promise<ReverseGeocodeResult>;
|
|
1143
1257
|
/** What the AdE cadastral map finds under a point; 503 `CADASTRE_BLOCKED` carries Retry-After. */
|
|
1144
1258
|
cadastreParcel(input: CadastreParcelRequest, options?: LookupOptions): Promise<CadastreParcelResult>;
|
|
1259
|
+
/** The stored cadastral answers, newest first: a read of the store, never a map call. */
|
|
1260
|
+
cadastreParcels(query?: CadastreParcelsQuery, options?: RequestOptions): Promise<CadastreParcelsPage>;
|
|
1145
1261
|
territory: TerritoryClient;
|
|
1146
1262
|
}
|
|
1147
1263
|
|
|
1148
1264
|
declare function createGeoClient(options: GeoClientOptions): GeoClient;
|
|
1149
1265
|
|
|
1150
1266
|
export { ApiError, createGeoClient };
|
|
1151
|
-
export type { CadastreParcelRequest, CadastreParcelResult, GeoClient, GeoClientOptions, GeocodeBatchRequest, GeocodeBatchResponse, GeocodeRequest, GeocodeResult, LookupCache, LookupOptions, RequestOptions, ReverseGeocodeRequest, ReverseGeocodeResult, TerritoryClient, TerritoryCompravendita, TerritoryCompravenditePage, TerritoryCompravenditeQuery, TerritoryComune, TerritoryComuneDetail, TerritoryComuneRiga, TerritoryComuniPage, TerritoryComuniQuery, TerritoryDatasets, TerritoryOmi, TerritoryPointResult, TerritoryQuotazione, TerritoryQuotazioniPage, TerritoryQuotazioniQuery, TerritoryResolveRequest, TerritoryResolveResponse, TerritoryStatus };
|
|
1267
|
+
export type { CadastreParcelRequest, CadastreParcelResult, CadastreParcelRow, CadastreParcelsPage, CadastreParcelsQuery, GeoClient, GeoClientOptions, GeocodeBatchRequest, GeocodeBatchResponse, GeocodeRequest, GeocodeResult, LookupCache, LookupOptions, RequestOptions, ReverseGeocodeRequest, ReverseGeocodeResult, TerritoryClient, TerritoryCompravendita, TerritoryCompravenditePage, TerritoryCompravenditeQuery, TerritoryComune, TerritoryComuneDetail, TerritoryComuneRiga, TerritoryComuniPage, TerritoryComuniQuery, TerritoryDatasets, TerritoryOmi, TerritoryPointResult, TerritoryQuotazione, TerritoryQuotazioniPage, TerritoryQuotazioniQuery, TerritoryResolveRequest, TerritoryResolveResponse, TerritoryStatus };
|
package/dist/index.js
CHANGED
|
@@ -86,6 +86,7 @@ function createGeoClient(options) {
|
|
|
86
86
|
geocodeBatch: (input, request) => data(client.POST("/geocode/batch", { ...lookupInit(request), body: input })),
|
|
87
87
|
reverseGeocode: (input, request) => data(client.POST("/geocode/reverse", { ...lookupInit(request), body: input })),
|
|
88
88
|
cadastreParcel: (input, request) => data(client.POST("/cadastre/parcel", { ...lookupInit(request), body: input })),
|
|
89
|
+
cadastreParcels: (query, options2) => data(client.GET("/cadastre/parcels", { ...options2, params: { query } })),
|
|
89
90
|
territory: territory(client)
|
|
90
91
|
};
|
|
91
92
|
}
|