@seta-labs/geo 0.3.0 → 0.4.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/README.md +1 -0
- package/dist/index.d.ts +91 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @seta-labs/geo
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
- New `cadastreParcels(query?)` on `GET /cadastre/parcels`: the stored
|
|
6
|
+
cadastral answers, newest first, filtered by `codComune`, `foglio`,
|
|
7
|
+
`particella` and `tipologia` (exact match), paginated with `page` and
|
|
8
|
+
`pageSize`. A read of the store: it never asks the cadastral map.
|
|
9
|
+
- New types `CadastreParcelsQuery`, `CadastreParcelsPage` and `CadastreParcelRow`.
|
|
10
|
+
|
|
3
11
|
## 0.3.0
|
|
4
12
|
|
|
5
13
|
- `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;
|
|
@@ -841,6 +890,42 @@ interface operations {
|
|
|
841
890
|
};
|
|
842
891
|
};
|
|
843
892
|
};
|
|
893
|
+
CadastreController_listParcels: {
|
|
894
|
+
parameters: {
|
|
895
|
+
query?: {
|
|
896
|
+
page?: number;
|
|
897
|
+
pageSize?: number;
|
|
898
|
+
/** @description Cadastral municipality code. */
|
|
899
|
+
codComune?: string;
|
|
900
|
+
foglio?: string;
|
|
901
|
+
particella?: string;
|
|
902
|
+
/** @description What lies under the point. */
|
|
903
|
+
tipologia?: string;
|
|
904
|
+
};
|
|
905
|
+
header?: never;
|
|
906
|
+
path?: never;
|
|
907
|
+
cookie?: never;
|
|
908
|
+
};
|
|
909
|
+
requestBody?: never;
|
|
910
|
+
responses: {
|
|
911
|
+
/** @description The stored map answers, newest first; never a map call. */
|
|
912
|
+
200: {
|
|
913
|
+
headers: {
|
|
914
|
+
[name: string]: unknown;
|
|
915
|
+
};
|
|
916
|
+
content: {
|
|
917
|
+
'application/json': components['schemas']['CadastreParcelsPageDto'];
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
/** @description Missing or invalid API key. */
|
|
921
|
+
401: {
|
|
922
|
+
headers: {
|
|
923
|
+
[name: string]: unknown;
|
|
924
|
+
};
|
|
925
|
+
content?: never;
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
};
|
|
844
929
|
TerritoryController_status: {
|
|
845
930
|
parameters: {
|
|
846
931
|
query?: never;
|
|
@@ -1080,6 +1165,8 @@ type ReverseGeocodeRequest = ApiSchemas['ReverseGeocodeRequestDto'];
|
|
|
1080
1165
|
type ReverseGeocodeResult = ApiSchemas['ReverseGeocodeResultDto'];
|
|
1081
1166
|
type CadastreParcelRequest = ApiSchemas['CadastreParcelRequestDto'];
|
|
1082
1167
|
type CadastreParcelResult = ApiSchemas['CadastreParcelResultDto'];
|
|
1168
|
+
type CadastreParcelsPage = ApiSchemas['CadastreParcelsPageDto'];
|
|
1169
|
+
type CadastreParcelRow = ApiSchemas['CadastreParcelRowDto'];
|
|
1083
1170
|
type TerritoryStatus = ApiSchemas['TerritoryStatusDto'];
|
|
1084
1171
|
type TerritoryResolveRequest = ApiSchemas['TerritoryResolveRequestDto'];
|
|
1085
1172
|
type TerritoryResolveResponse = ApiSchemas['TerritoryResolveResponseDto'];
|
|
@@ -1098,6 +1185,7 @@ type TerritoryCompravendita = ApiSchemas['TerritoryCompravenditaDto'];
|
|
|
1098
1185
|
type TerritoryComuniQuery = NonNullable<ApiPaths['/territory/comuni']['get']['parameters']['query']>;
|
|
1099
1186
|
type TerritoryQuotazioniQuery = NonNullable<ApiPaths['/territory/quotazioni']['get']['parameters']['query']>;
|
|
1100
1187
|
type TerritoryCompravenditeQuery = NonNullable<ApiPaths['/territory/compravendite']['get']['parameters']['query']>;
|
|
1188
|
+
type CadastreParcelsQuery = NonNullable<ApiPaths['/cadastre/parcels']['get']['parameters']['query']>;
|
|
1101
1189
|
interface RequestOptions {
|
|
1102
1190
|
signal?: AbortSignal;
|
|
1103
1191
|
}
|
|
@@ -1142,10 +1230,12 @@ interface GeoClient {
|
|
|
1142
1230
|
reverseGeocode(input: ReverseGeocodeRequest, options?: LookupOptions): Promise<ReverseGeocodeResult>;
|
|
1143
1231
|
/** What the AdE cadastral map finds under a point; 503 `CADASTRE_BLOCKED` carries Retry-After. */
|
|
1144
1232
|
cadastreParcel(input: CadastreParcelRequest, options?: LookupOptions): Promise<CadastreParcelResult>;
|
|
1233
|
+
/** The stored cadastral answers, newest first: a read of the store, never a map call. */
|
|
1234
|
+
cadastreParcels(query?: CadastreParcelsQuery, options?: RequestOptions): Promise<CadastreParcelsPage>;
|
|
1145
1235
|
territory: TerritoryClient;
|
|
1146
1236
|
}
|
|
1147
1237
|
|
|
1148
1238
|
declare function createGeoClient(options: GeoClientOptions): GeoClient;
|
|
1149
1239
|
|
|
1150
1240
|
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 };
|
|
1241
|
+
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
|
}
|