@urbankitstudio/atlas 0.8.1 → 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 +45 -0
- package/README.md +40 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +82 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @urbankitstudio/atlas Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
Two record shapes are declared for counties whose owner data does not sit on the parcel layer itself. **No record
|
|
6
|
+
uses either yet**, so the data is the 0.8.1 data and `totals` stay at 538 counties, 521 endpoints and 493 counties
|
|
7
|
+
with an endpoint.
|
|
8
|
+
|
|
9
|
+
**Minor.** Two exported types gain optional keys and one function is added. Nothing is removed or renamed, and
|
|
10
|
+
code written against 0.8.x reads every record exactly as before.
|
|
11
|
+
|
|
12
|
+
- **`ownerJoin`** (type `OwnerJoin`, optional on an endpoint): the owner rows live in a separate TABLE of the same
|
|
13
|
+
service, joined to the parcel polygons by a key. The polygons carry `parcelKey`, the table at `url` carries
|
|
14
|
+
`key`, and a parcel's owners are the table rows whose `key` equals its `parcelKey` value. The table has no
|
|
15
|
+
geometry: query it by key only (`<key> IN (...)`), never spatially, and check that each returned row's key is one
|
|
16
|
+
you asked for.
|
|
17
|
+
- The table's columns are listed in `ownerJoin.fields` only, never in the endpoint's `searchFields`. A reader
|
|
18
|
+
that ignores `ownerJoin` therefore sees a layer with a parcel id and no owner, and cannot ask the parcel layer
|
|
19
|
+
for a column it does not have.
|
|
20
|
+
- `orderField` (required) is a unique, stable column of the table: send it as `orderByFields` whenever you send
|
|
21
|
+
`resultOffset`, or a paged read can repeat a row or skip one.
|
|
22
|
+
- `multiple: "rows"` says a key with several rows stands for several ownership records, and it always comes with
|
|
23
|
+
`maxRowsPerKey`, an integer from 1 to the table's `maxRecordCount`: a key with more rows than that has no owner
|
|
24
|
+
you can state (one key can hold more rows than a query returns). Without `multiple`, treat any key with
|
|
25
|
+
several rows that way.
|
|
26
|
+
- `rowIdField` (optional) labels the rows of one key, an assessment unit for example. It is not unique, so
|
|
27
|
+
de-duplicate the rows of one key by the owner and mailing content you read, never by this column.
|
|
28
|
+
- **`wireName`** (optional on a `SearchField`): the column's fully qualified name on a layer that answers with
|
|
29
|
+
`table.column` names, while `name` stays the bare last segment. The registry's validator refuses `wireName` on
|
|
30
|
+
every record until a later release, so **`name` is still the literal query column for every record today**.
|
|
31
|
+
- **`queryFieldName(field)`** returns `field.wireName ?? field.name`: the column to send in a `where` clause or
|
|
32
|
+
`outFields`, and the key to read back off a row. It returns `name` for every field today. Build queries through
|
|
33
|
+
it and nothing needs to change when a record carries a `wireName`. Keep reading `name` and `label` to decide
|
|
34
|
+
what a column is.
|
|
35
|
+
- The registry's validator now holds a record with an `ownerJoin` to these rules, among others:
|
|
36
|
+
- the two field lists share no name, and `ownerJoin.fields` names no column twice, letter case ignored;
|
|
37
|
+
- the parcel layer's own `searchFields` read as carrying no owner and no mailing column;
|
|
38
|
+
- the table is another layer of the endpoint's own service: the same host and the same service path, with
|
|
39
|
+
`MapServer` and `FeatureServer` read as one service. A table in another service on the same host is refused;
|
|
40
|
+
- no endpoint `url` names a layer that an `ownerJoin.url` names. Two URLs name one layer when they have the same
|
|
41
|
+
service and the same layer number, so the `/FeatureServer/1` spelling of a `/MapServer/1` table counts as that
|
|
42
|
+
table, and letter case, the scheme and a trailing slash do not make a second layer;
|
|
43
|
+
- an endpoint that carries `sharedService: true` carries no `ownerJoin`.
|
|
44
|
+
- A layer URL has one spelling, on `url` and on `ownerJoin.url` alike: the validator refuses a layer id with a
|
|
45
|
+
leading zero (`/MapServer/01`), a `%` escape in the path and a host that ends in a dot. No existing record used
|
|
46
|
+
one, so no `url` changed.
|
|
47
|
+
|
|
3
48
|
## 0.8.1 (2026-11-10)
|
|
4
49
|
|
|
5
50
|
Wording in `notes`, and one new record with no endpoint. `totals.counties` moves from 537 to 538. Endpoints and
|
package/README.md
CHANGED
|
@@ -95,6 +95,7 @@ For single-address owner lookups in the browser, the free [Owner Lookup](https:/
|
|
|
95
95
|
| `offersAttributeSearch(endpoint)` | `false` when the layer refuses a `where` clause (`attributeSearch: "unsupported"`); query it by geometry instead |
|
|
96
96
|
| `countyOffersAttributeSearch(county)` | `true` when any of the county's layers takes a `where` clause |
|
|
97
97
|
| `offersPagination(endpoint)` | `false` when the layer refuses `resultRecordCount` and `resultOffset` (`supportsPagination: false`); send one request without them, see below |
|
|
98
|
+
| `queryFieldName(field)` | the column to send for a field, in a `where` clause or `outFields`: its `wireName` when it has one, else its `name` (every record today), see below |
|
|
98
99
|
| `slugify(s)`, `countySlugFromName(s)` | string helpers matching the atlas slug convention |
|
|
99
100
|
| `statePath(slug)`, `countyPath(state, county)` | URL paths under `/parcel-atlas` |
|
|
100
101
|
| `listCities(filter?)` | `CitySummary[]` — every covered city, narrowed by `state`, `kind` (`violations`, `permits`, `zoning`) or `countySlug` |
|
|
@@ -343,6 +344,45 @@ flagged.
|
|
|
343
344
|
An absent `confidentialFlag` means the layer publishes no such column, not that no
|
|
344
345
|
owner there is protected.
|
|
345
346
|
|
|
347
|
+
## Some counties keep owners in a separate table
|
|
348
|
+
|
|
349
|
+
Declared in 0.9.0 and **carried by no record yet**: the types are here so your
|
|
350
|
+
code can be ready, and every record reads exactly as it did in 0.8.x.
|
|
351
|
+
|
|
352
|
+
An endpoint may carry `ownerJoin` (type `OwnerJoin`). Its parcel layer has the
|
|
353
|
+
polygons and a parcel id but no owner; the owner rows are in a table of the same
|
|
354
|
+
service, at `ownerJoin.url`. A parcel's owners are the table rows whose
|
|
355
|
+
`ownerJoin.key` column equals the parcel's `ownerJoin.parcelKey` value.
|
|
356
|
+
|
|
357
|
+
- The table has no geometry. Query it by key only
|
|
358
|
+
(`<key> IN ('<value>', ...)`, each `'` doubled), never spatially: an ArcGIS
|
|
359
|
+
table ignores a geometry parameter and answers with arbitrary rows. Check that
|
|
360
|
+
each returned row's key is one you asked for.
|
|
361
|
+
- The table's columns are in `ownerJoin.fields` only, never in the endpoint's
|
|
362
|
+
`searchFields`. If you ignore `ownerJoin`, you see a layer with no owner
|
|
363
|
+
column, which is true of the parcel layer.
|
|
364
|
+
- `orderField` is a unique, stable column of the table. Send it as
|
|
365
|
+
`orderByFields` whenever you send `resultOffset`.
|
|
366
|
+
- `multiple: "rows"` means a key with several rows stands for several ownership
|
|
367
|
+
records, up to `maxRowsPerKey` rows (always present with it, at most the
|
|
368
|
+
table's `maxRecordCount`). A key with more rows than that, or any key with
|
|
369
|
+
several rows when `multiple` is absent, has no owner you can state.
|
|
370
|
+
- `rowIdField`, when present, labels the rows of one key. It is not unique:
|
|
371
|
+
de-duplicate the rows of one key by the owner and mailing content you read.
|
|
372
|
+
|
|
373
|
+
A `SearchField` may carry `wireName`: the column's fully qualified name on a
|
|
374
|
+
layer that answers with `table.column` names, while `name` stays the bare last
|
|
375
|
+
segment. The registry's validator refuses it on every record until a later
|
|
376
|
+
release, so `name` is the literal query column for every record today.
|
|
377
|
+
`queryFieldName(field)` returns the name to send either way:
|
|
378
|
+
|
|
379
|
+
```ts
|
|
380
|
+
import { findCountyByFips, queryFieldName } from "@urbankitstudio/atlas";
|
|
381
|
+
|
|
382
|
+
const endpoint = findCountyByFips("17089")!.endpoints[0];
|
|
383
|
+
const outFields = endpoint.searchFields.map(queryFieldName).join(",");
|
|
384
|
+
```
|
|
385
|
+
|
|
346
386
|
## `addedAt` is the one date that never moves
|
|
347
387
|
|
|
348
388
|
A county may carry `addedAt` (YYYY-MM-DD): the date it entered the atlas. It is
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// src/capability.ts
|
|
4
|
+
function queryFieldName(field) {
|
|
5
|
+
return field.wireName ?? field.name;
|
|
6
|
+
}
|
|
4
7
|
function offersAttributeSearch(endpoint) {
|
|
5
8
|
return !!endpoint && endpoint.attributeSearch !== "unsupported";
|
|
6
9
|
}
|
|
@@ -46283,6 +46286,7 @@ exports.pausedAnswer = pausedAnswer;
|
|
|
46283
46286
|
exports.pausedFlags = pausedFlags;
|
|
46284
46287
|
exports.presetOf = presetOf;
|
|
46285
46288
|
exports.propertyQueryUrl = propertyQueryUrl;
|
|
46289
|
+
exports.queryFieldName = queryFieldName;
|
|
46286
46290
|
exports.requestHint = requestHint;
|
|
46287
46291
|
exports.reviewedCapability = reviewedCapability;
|
|
46288
46292
|
exports.slugify = slugify;
|
package/dist/index.d.cts
CHANGED
|
@@ -201,6 +201,71 @@ interface SearchField {
|
|
|
201
201
|
name: string;
|
|
202
202
|
label: string;
|
|
203
203
|
searchable: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* The column's fully qualified name on a layer that answers with one (a
|
|
206
|
+
* server-side join publishes `table.column`, as in
|
|
207
|
+
* `SDE.mc_parcel_polygon.TAXPINNO`), while `name` stays the bare last
|
|
208
|
+
* segment. Declared since 0.9.0 and carried by NO record yet: the registry's
|
|
209
|
+
* validator refuses it until a later release, so `name` is the literal query
|
|
210
|
+
* column on every record today. Read the column to send through
|
|
211
|
+
* `queryFieldName(field)`, exported by this package, so your code is already
|
|
212
|
+
* right when a record does carry one.
|
|
213
|
+
*/
|
|
214
|
+
wireName?: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Owner rows that live in a separate TABLE of the same service, joined to the
|
|
218
|
+
* endpoint's parcel polygons by a key: the polygons carry `parcelKey`, the
|
|
219
|
+
* table carries `key`, and a parcel's owners are the table rows whose `key`
|
|
220
|
+
* equals its `parcelKey` value. Declared since 0.9.0 and carried by NO record
|
|
221
|
+
* yet.
|
|
222
|
+
*
|
|
223
|
+
* The table has no geometry. Query it by key only
|
|
224
|
+
* (`<key> IN ('<value>', ...)`, each `'` doubled), never spatially: an ArcGIS
|
|
225
|
+
* table ignores a geometry parameter, so a spatial query would answer with
|
|
226
|
+
* arbitrary rows. Check that every returned row's `key` is one you asked for.
|
|
227
|
+
*
|
|
228
|
+
* The table's columns live ONLY in `fields`, never in the endpoint's
|
|
229
|
+
* `searchFields`. So a reader that ignores `ownerJoin` sees a layer with a
|
|
230
|
+
* parcel id and no owner, which is the safe reading: it cannot ask the polygon
|
|
231
|
+
* layer for a column that is not on it.
|
|
232
|
+
*/
|
|
233
|
+
interface OwnerJoin {
|
|
234
|
+
/** The table's layer URL: another layer of the endpoint's own service (the
|
|
235
|
+
* same host and service path; `MapServer` and `FeatureServer` are one
|
|
236
|
+
* service). No endpoint `url` in the registry names this layer, under
|
|
237
|
+
* either service type. */
|
|
238
|
+
url: string;
|
|
239
|
+
layerName: string;
|
|
240
|
+
/** The key column on the table. */
|
|
241
|
+
key: string;
|
|
242
|
+
/** The matching column on the endpoint's layer; one of its `searchFields`. */
|
|
243
|
+
parcelKey: string;
|
|
244
|
+
/** The table's documented columns: `key`, `rowIdField` and the owner columns. */
|
|
245
|
+
fields: SearchField[];
|
|
246
|
+
/** A column that labels the rows of one key (an assessment unit, say). It is
|
|
247
|
+
* NOT unique: several rows can share one value and differ only in columns
|
|
248
|
+
* that are not served. De-duplicate the rows of one key by the owner and
|
|
249
|
+
* mailing content you read, never by this column. */
|
|
250
|
+
rowIdField?: string;
|
|
251
|
+
/** `"rows"`: a key with several rows stands for several ownership records,
|
|
252
|
+
* up to `maxRowsPerKey` of them. Absent: treat a key with several rows as
|
|
253
|
+
* having no single owner rather than picking one. */
|
|
254
|
+
multiple?: "rows";
|
|
255
|
+
/** The most table rows one key may hold and still be read as its ownership
|
|
256
|
+
* records: an integer from 1 to `maxRecordCount`, present exactly when
|
|
257
|
+
* `multiple` is `"rows"`. Treat a key with more rows as having no owner you
|
|
258
|
+
* can state (a single key can hold more rows than one query returns). */
|
|
259
|
+
maxRowsPerKey?: number;
|
|
260
|
+
/** A unique, stable column to order the table's pages by: send it as
|
|
261
|
+
* `orderByFields` whenever you send `resultOffset`, or a paged read can
|
|
262
|
+
* repeat a row or skip one. */
|
|
263
|
+
orderField: string;
|
|
264
|
+
/** The most rows the table returns to one query, as its metadata declares;
|
|
265
|
+
* `exceededTransferLimit` on the response is the authority. */
|
|
266
|
+
maxRecordCount: number;
|
|
267
|
+
/** ISO date the table and its key were last verified before publish. */
|
|
268
|
+
lastVerified: string;
|
|
204
269
|
}
|
|
205
270
|
/**
|
|
206
271
|
* The county's own "this owner's record is confidential" column on a layer, the
|
|
@@ -357,6 +422,9 @@ interface EndpointRecord {
|
|
|
357
422
|
* `safeValues`. Absent means the layer publishes no
|
|
358
423
|
* such column, not that no owner there is protected. */
|
|
359
424
|
confidentialFlag?: ConfidentialFlag;
|
|
425
|
+
/** The table that holds this layer's owner rows (see {@link OwnerJoin}).
|
|
426
|
+
* Declared since 0.9.0; absent on every record today. */
|
|
427
|
+
ownerJoin?: OwnerJoin;
|
|
360
428
|
sampleQuery: string | null;
|
|
361
429
|
license: LicenseType;
|
|
362
430
|
licenseUrl: string | null;
|
|
@@ -513,6 +581,19 @@ interface AtlasIndex {
|
|
|
513
581
|
};
|
|
514
582
|
}
|
|
515
583
|
|
|
584
|
+
/**
|
|
585
|
+
* The column name to SEND for a field: in a `where` clause, in `outFields`,
|
|
586
|
+
* and as the key to read back off a returned row. That is `wireName` when the
|
|
587
|
+
* record carries one (a layer that answers with fully qualified
|
|
588
|
+
* `table.column` names) and `name` otherwise.
|
|
589
|
+
*
|
|
590
|
+
* No record carries a `wireName` yet, so this returns `name` for every field
|
|
591
|
+
* today. It exists now so that code written against it keeps working when a
|
|
592
|
+
* record does: go through it rather than reading `field.name` for a query.
|
|
593
|
+
* Keep using `name` and `label` to decide what a column IS (parcel id, owner,
|
|
594
|
+
* address); a qualified name carries table names that read like roles.
|
|
595
|
+
*/
|
|
596
|
+
declare function queryFieldName(field: Pick<SearchField, "name" | "wireName">): string;
|
|
516
597
|
/**
|
|
517
598
|
* Can this layer take a `where`-clause search at all (owner name, address text,
|
|
518
599
|
* a field filter)? False on a layer flagged `attributeSearch: "unsupported"`,
|
|
@@ -1264,4 +1345,4 @@ declare function citiesForCounty(stateSlug: string, countySlug: string): CitySum
|
|
|
1264
1345
|
declare const cityPropertyIndex: CityPropertyIndex;
|
|
1265
1346
|
declare const cityZoningIndex: CityZoningIndex;
|
|
1266
1347
|
|
|
1267
|
-
export { ACCESS_FLAGS, ACCESS_PRESETS, ACCESS_REASONS, ATLAS_COUNTY_PAGE_BASE, type AccessFlag, type AccessFlags, type AccessPageRef, type AccessPreset, type AccessReason, type AccessRecordLike, type Atlas, type AtlasIndex, CITY_RECORD_LIMIT, CITY_STREET_MAX_LEN, COUNTY_RECHECK_REQUEST_MESSAGE, COUNTY_REQUEST_MESSAGE, COUNTY_REQUEST_URL, COVERAGE_REASONS, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type CaseFieldMap, type CasesSource, type CityDatasetDescriptor, type CityFilter, type CityKind, type CityLookup, type CityPropertyIndex, type CityPropertyIndexEntry, type CityPropertyRecord, type CityProvider, type CityQueryTemplate, type CitySource, type CitySummary, type CityZoningIndex, type CityZoningIndexEntry, type CityZoningRecord, type ConfidentialFlag, type ContactInfo, type CountyAccessEntry, type CountyAdvisory, type CountyCoverage, type CountyPausedAnswer, type CountyProduct, type CountyRecord, type CountyRequestHint, type CountyRequestRef, type CoverageAnswer, type CoverageReason, type CoverageRecordLike, type CoverageStatus, type CoverageTextInput, type CurrentZoningFieldMap, type CurrentZoningSource, type DatasetKind, type DeepLinkCounty, type EndpointPresenceLike, type EndpointRecord, type EndpointStatus, type GeocoderConfig, type GeocoderProvider, LIVE_STATUS_URL, type LicenseType, NOT_IN_ATLAS_WHY, NO_PUBLIC_DATA_WHY, POINT_PLACEHOLDER, PRESET_FLAGS, type PropertyDataset, type PropertyDatasets, type PropertyFieldMap, type PropertySource, type PropertySourceType, type PropertyStatusBuckets, type SearchField, type ServiceType, type SplitStreet, type StateFile, type StateIndexEntry, type VerifiedBy, type ZoningByAddressSource, type ZoningSourceType, type ZoningStatusBuckets, type ZoningToolKind, accessBlocks, atlas, atlasIndex, buildCityQuery, buildParcelLookupDeepLink, canonicalLayerUrl, casesLocationTemplate, casesQueryUrl, citiesForCounty, citiesForCountyIn, cityDatasetDescriptors, cityDatasets, cityPath, cityPropertyIndex, cityZoningIndex, countyDownMessage, countyHasEndpoint, countyOffersAttributeSearch, countyPath, countySlugFromName, coverageAnswer, coverageAnswerText, coverageOverridesPause, currentZoningTemplate, findCity, findCityIn, findCounty, findCountyByFips, findState, flagsFor, getCityProperty, getCityZoning, isReviewedUnservable, listCities, listCountiesByState, listStates, mergeCityIndexes, offersAttributeSearch, offersPagination, pausedAnswer, pausedFlags, presetOf, propertyQueryUrl, requestHint, reviewedCapability, slugify, splitAddressStreetName, splitStreet, statePath, streetForDataset };
|
|
1348
|
+
export { ACCESS_FLAGS, ACCESS_PRESETS, ACCESS_REASONS, ATLAS_COUNTY_PAGE_BASE, type AccessFlag, type AccessFlags, type AccessPageRef, type AccessPreset, type AccessReason, type AccessRecordLike, type Atlas, type AtlasIndex, CITY_RECORD_LIMIT, CITY_STREET_MAX_LEN, COUNTY_RECHECK_REQUEST_MESSAGE, COUNTY_REQUEST_MESSAGE, COUNTY_REQUEST_URL, COVERAGE_REASONS, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type CaseFieldMap, type CasesSource, type CityDatasetDescriptor, type CityFilter, type CityKind, type CityLookup, type CityPropertyIndex, type CityPropertyIndexEntry, type CityPropertyRecord, type CityProvider, type CityQueryTemplate, type CitySource, type CitySummary, type CityZoningIndex, type CityZoningIndexEntry, type CityZoningRecord, type ConfidentialFlag, type ContactInfo, type CountyAccessEntry, type CountyAdvisory, type CountyCoverage, type CountyPausedAnswer, type CountyProduct, type CountyRecord, type CountyRequestHint, type CountyRequestRef, type CoverageAnswer, type CoverageReason, type CoverageRecordLike, type CoverageStatus, type CoverageTextInput, type CurrentZoningFieldMap, type CurrentZoningSource, type DatasetKind, type DeepLinkCounty, type EndpointPresenceLike, type EndpointRecord, type EndpointStatus, type GeocoderConfig, type GeocoderProvider, LIVE_STATUS_URL, type LicenseType, NOT_IN_ATLAS_WHY, NO_PUBLIC_DATA_WHY, type OwnerJoin, POINT_PLACEHOLDER, PRESET_FLAGS, type PropertyDataset, type PropertyDatasets, type PropertyFieldMap, type PropertySource, type PropertySourceType, type PropertyStatusBuckets, type SearchField, type ServiceType, type SplitStreet, type StateFile, type StateIndexEntry, type VerifiedBy, type ZoningByAddressSource, type ZoningSourceType, type ZoningStatusBuckets, type ZoningToolKind, accessBlocks, atlas, atlasIndex, buildCityQuery, buildParcelLookupDeepLink, canonicalLayerUrl, casesLocationTemplate, casesQueryUrl, citiesForCounty, citiesForCountyIn, cityDatasetDescriptors, cityDatasets, cityPath, cityPropertyIndex, cityZoningIndex, countyDownMessage, countyHasEndpoint, countyOffersAttributeSearch, countyPath, countySlugFromName, coverageAnswer, coverageAnswerText, coverageOverridesPause, currentZoningTemplate, findCity, findCityIn, findCounty, findCountyByFips, findState, flagsFor, getCityProperty, getCityZoning, isReviewedUnservable, listCities, listCountiesByState, listStates, mergeCityIndexes, offersAttributeSearch, offersPagination, pausedAnswer, pausedFlags, presetOf, propertyQueryUrl, queryFieldName, requestHint, reviewedCapability, slugify, splitAddressStreetName, splitStreet, statePath, streetForDataset };
|
package/dist/index.d.ts
CHANGED
|
@@ -201,6 +201,71 @@ interface SearchField {
|
|
|
201
201
|
name: string;
|
|
202
202
|
label: string;
|
|
203
203
|
searchable: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* The column's fully qualified name on a layer that answers with one (a
|
|
206
|
+
* server-side join publishes `table.column`, as in
|
|
207
|
+
* `SDE.mc_parcel_polygon.TAXPINNO`), while `name` stays the bare last
|
|
208
|
+
* segment. Declared since 0.9.0 and carried by NO record yet: the registry's
|
|
209
|
+
* validator refuses it until a later release, so `name` is the literal query
|
|
210
|
+
* column on every record today. Read the column to send through
|
|
211
|
+
* `queryFieldName(field)`, exported by this package, so your code is already
|
|
212
|
+
* right when a record does carry one.
|
|
213
|
+
*/
|
|
214
|
+
wireName?: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Owner rows that live in a separate TABLE of the same service, joined to the
|
|
218
|
+
* endpoint's parcel polygons by a key: the polygons carry `parcelKey`, the
|
|
219
|
+
* table carries `key`, and a parcel's owners are the table rows whose `key`
|
|
220
|
+
* equals its `parcelKey` value. Declared since 0.9.0 and carried by NO record
|
|
221
|
+
* yet.
|
|
222
|
+
*
|
|
223
|
+
* The table has no geometry. Query it by key only
|
|
224
|
+
* (`<key> IN ('<value>', ...)`, each `'` doubled), never spatially: an ArcGIS
|
|
225
|
+
* table ignores a geometry parameter, so a spatial query would answer with
|
|
226
|
+
* arbitrary rows. Check that every returned row's `key` is one you asked for.
|
|
227
|
+
*
|
|
228
|
+
* The table's columns live ONLY in `fields`, never in the endpoint's
|
|
229
|
+
* `searchFields`. So a reader that ignores `ownerJoin` sees a layer with a
|
|
230
|
+
* parcel id and no owner, which is the safe reading: it cannot ask the polygon
|
|
231
|
+
* layer for a column that is not on it.
|
|
232
|
+
*/
|
|
233
|
+
interface OwnerJoin {
|
|
234
|
+
/** The table's layer URL: another layer of the endpoint's own service (the
|
|
235
|
+
* same host and service path; `MapServer` and `FeatureServer` are one
|
|
236
|
+
* service). No endpoint `url` in the registry names this layer, under
|
|
237
|
+
* either service type. */
|
|
238
|
+
url: string;
|
|
239
|
+
layerName: string;
|
|
240
|
+
/** The key column on the table. */
|
|
241
|
+
key: string;
|
|
242
|
+
/** The matching column on the endpoint's layer; one of its `searchFields`. */
|
|
243
|
+
parcelKey: string;
|
|
244
|
+
/** The table's documented columns: `key`, `rowIdField` and the owner columns. */
|
|
245
|
+
fields: SearchField[];
|
|
246
|
+
/** A column that labels the rows of one key (an assessment unit, say). It is
|
|
247
|
+
* NOT unique: several rows can share one value and differ only in columns
|
|
248
|
+
* that are not served. De-duplicate the rows of one key by the owner and
|
|
249
|
+
* mailing content you read, never by this column. */
|
|
250
|
+
rowIdField?: string;
|
|
251
|
+
/** `"rows"`: a key with several rows stands for several ownership records,
|
|
252
|
+
* up to `maxRowsPerKey` of them. Absent: treat a key with several rows as
|
|
253
|
+
* having no single owner rather than picking one. */
|
|
254
|
+
multiple?: "rows";
|
|
255
|
+
/** The most table rows one key may hold and still be read as its ownership
|
|
256
|
+
* records: an integer from 1 to `maxRecordCount`, present exactly when
|
|
257
|
+
* `multiple` is `"rows"`. Treat a key with more rows as having no owner you
|
|
258
|
+
* can state (a single key can hold more rows than one query returns). */
|
|
259
|
+
maxRowsPerKey?: number;
|
|
260
|
+
/** A unique, stable column to order the table's pages by: send it as
|
|
261
|
+
* `orderByFields` whenever you send `resultOffset`, or a paged read can
|
|
262
|
+
* repeat a row or skip one. */
|
|
263
|
+
orderField: string;
|
|
264
|
+
/** The most rows the table returns to one query, as its metadata declares;
|
|
265
|
+
* `exceededTransferLimit` on the response is the authority. */
|
|
266
|
+
maxRecordCount: number;
|
|
267
|
+
/** ISO date the table and its key were last verified before publish. */
|
|
268
|
+
lastVerified: string;
|
|
204
269
|
}
|
|
205
270
|
/**
|
|
206
271
|
* The county's own "this owner's record is confidential" column on a layer, the
|
|
@@ -357,6 +422,9 @@ interface EndpointRecord {
|
|
|
357
422
|
* `safeValues`. Absent means the layer publishes no
|
|
358
423
|
* such column, not that no owner there is protected. */
|
|
359
424
|
confidentialFlag?: ConfidentialFlag;
|
|
425
|
+
/** The table that holds this layer's owner rows (see {@link OwnerJoin}).
|
|
426
|
+
* Declared since 0.9.0; absent on every record today. */
|
|
427
|
+
ownerJoin?: OwnerJoin;
|
|
360
428
|
sampleQuery: string | null;
|
|
361
429
|
license: LicenseType;
|
|
362
430
|
licenseUrl: string | null;
|
|
@@ -513,6 +581,19 @@ interface AtlasIndex {
|
|
|
513
581
|
};
|
|
514
582
|
}
|
|
515
583
|
|
|
584
|
+
/**
|
|
585
|
+
* The column name to SEND for a field: in a `where` clause, in `outFields`,
|
|
586
|
+
* and as the key to read back off a returned row. That is `wireName` when the
|
|
587
|
+
* record carries one (a layer that answers with fully qualified
|
|
588
|
+
* `table.column` names) and `name` otherwise.
|
|
589
|
+
*
|
|
590
|
+
* No record carries a `wireName` yet, so this returns `name` for every field
|
|
591
|
+
* today. It exists now so that code written against it keeps working when a
|
|
592
|
+
* record does: go through it rather than reading `field.name` for a query.
|
|
593
|
+
* Keep using `name` and `label` to decide what a column IS (parcel id, owner,
|
|
594
|
+
* address); a qualified name carries table names that read like roles.
|
|
595
|
+
*/
|
|
596
|
+
declare function queryFieldName(field: Pick<SearchField, "name" | "wireName">): string;
|
|
516
597
|
/**
|
|
517
598
|
* Can this layer take a `where`-clause search at all (owner name, address text,
|
|
518
599
|
* a field filter)? False on a layer flagged `attributeSearch: "unsupported"`,
|
|
@@ -1264,4 +1345,4 @@ declare function citiesForCounty(stateSlug: string, countySlug: string): CitySum
|
|
|
1264
1345
|
declare const cityPropertyIndex: CityPropertyIndex;
|
|
1265
1346
|
declare const cityZoningIndex: CityZoningIndex;
|
|
1266
1347
|
|
|
1267
|
-
export { ACCESS_FLAGS, ACCESS_PRESETS, ACCESS_REASONS, ATLAS_COUNTY_PAGE_BASE, type AccessFlag, type AccessFlags, type AccessPageRef, type AccessPreset, type AccessReason, type AccessRecordLike, type Atlas, type AtlasIndex, CITY_RECORD_LIMIT, CITY_STREET_MAX_LEN, COUNTY_RECHECK_REQUEST_MESSAGE, COUNTY_REQUEST_MESSAGE, COUNTY_REQUEST_URL, COVERAGE_REASONS, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type CaseFieldMap, type CasesSource, type CityDatasetDescriptor, type CityFilter, type CityKind, type CityLookup, type CityPropertyIndex, type CityPropertyIndexEntry, type CityPropertyRecord, type CityProvider, type CityQueryTemplate, type CitySource, type CitySummary, type CityZoningIndex, type CityZoningIndexEntry, type CityZoningRecord, type ConfidentialFlag, type ContactInfo, type CountyAccessEntry, type CountyAdvisory, type CountyCoverage, type CountyPausedAnswer, type CountyProduct, type CountyRecord, type CountyRequestHint, type CountyRequestRef, type CoverageAnswer, type CoverageReason, type CoverageRecordLike, type CoverageStatus, type CoverageTextInput, type CurrentZoningFieldMap, type CurrentZoningSource, type DatasetKind, type DeepLinkCounty, type EndpointPresenceLike, type EndpointRecord, type EndpointStatus, type GeocoderConfig, type GeocoderProvider, LIVE_STATUS_URL, type LicenseType, NOT_IN_ATLAS_WHY, NO_PUBLIC_DATA_WHY, POINT_PLACEHOLDER, PRESET_FLAGS, type PropertyDataset, type PropertyDatasets, type PropertyFieldMap, type PropertySource, type PropertySourceType, type PropertyStatusBuckets, type SearchField, type ServiceType, type SplitStreet, type StateFile, type StateIndexEntry, type VerifiedBy, type ZoningByAddressSource, type ZoningSourceType, type ZoningStatusBuckets, type ZoningToolKind, accessBlocks, atlas, atlasIndex, buildCityQuery, buildParcelLookupDeepLink, canonicalLayerUrl, casesLocationTemplate, casesQueryUrl, citiesForCounty, citiesForCountyIn, cityDatasetDescriptors, cityDatasets, cityPath, cityPropertyIndex, cityZoningIndex, countyDownMessage, countyHasEndpoint, countyOffersAttributeSearch, countyPath, countySlugFromName, coverageAnswer, coverageAnswerText, coverageOverridesPause, currentZoningTemplate, findCity, findCityIn, findCounty, findCountyByFips, findState, flagsFor, getCityProperty, getCityZoning, isReviewedUnservable, listCities, listCountiesByState, listStates, mergeCityIndexes, offersAttributeSearch, offersPagination, pausedAnswer, pausedFlags, presetOf, propertyQueryUrl, requestHint, reviewedCapability, slugify, splitAddressStreetName, splitStreet, statePath, streetForDataset };
|
|
1348
|
+
export { ACCESS_FLAGS, ACCESS_PRESETS, ACCESS_REASONS, ATLAS_COUNTY_PAGE_BASE, type AccessFlag, type AccessFlags, type AccessPageRef, type AccessPreset, type AccessReason, type AccessRecordLike, type Atlas, type AtlasIndex, CITY_RECORD_LIMIT, CITY_STREET_MAX_LEN, COUNTY_RECHECK_REQUEST_MESSAGE, COUNTY_REQUEST_MESSAGE, COUNTY_REQUEST_URL, COVERAGE_REASONS, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type CaseFieldMap, type CasesSource, type CityDatasetDescriptor, type CityFilter, type CityKind, type CityLookup, type CityPropertyIndex, type CityPropertyIndexEntry, type CityPropertyRecord, type CityProvider, type CityQueryTemplate, type CitySource, type CitySummary, type CityZoningIndex, type CityZoningIndexEntry, type CityZoningRecord, type ConfidentialFlag, type ContactInfo, type CountyAccessEntry, type CountyAdvisory, type CountyCoverage, type CountyPausedAnswer, type CountyProduct, type CountyRecord, type CountyRequestHint, type CountyRequestRef, type CoverageAnswer, type CoverageReason, type CoverageRecordLike, type CoverageStatus, type CoverageTextInput, type CurrentZoningFieldMap, type CurrentZoningSource, type DatasetKind, type DeepLinkCounty, type EndpointPresenceLike, type EndpointRecord, type EndpointStatus, type GeocoderConfig, type GeocoderProvider, LIVE_STATUS_URL, type LicenseType, NOT_IN_ATLAS_WHY, NO_PUBLIC_DATA_WHY, type OwnerJoin, POINT_PLACEHOLDER, PRESET_FLAGS, type PropertyDataset, type PropertyDatasets, type PropertyFieldMap, type PropertySource, type PropertySourceType, type PropertyStatusBuckets, type SearchField, type ServiceType, type SplitStreet, type StateFile, type StateIndexEntry, type VerifiedBy, type ZoningByAddressSource, type ZoningSourceType, type ZoningStatusBuckets, type ZoningToolKind, accessBlocks, atlas, atlasIndex, buildCityQuery, buildParcelLookupDeepLink, canonicalLayerUrl, casesLocationTemplate, casesQueryUrl, citiesForCounty, citiesForCountyIn, cityDatasetDescriptors, cityDatasets, cityPath, cityPropertyIndex, cityZoningIndex, countyDownMessage, countyHasEndpoint, countyOffersAttributeSearch, countyPath, countySlugFromName, coverageAnswer, coverageAnswerText, coverageOverridesPause, currentZoningTemplate, findCity, findCityIn, findCounty, findCountyByFips, findState, flagsFor, getCityProperty, getCityZoning, isReviewedUnservable, listCities, listCountiesByState, listStates, mergeCityIndexes, offersAttributeSearch, offersPagination, pausedAnswer, pausedFlags, presetOf, propertyQueryUrl, queryFieldName, requestHint, reviewedCapability, slugify, splitAddressStreetName, splitStreet, statePath, streetForDataset };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// src/capability.ts
|
|
2
|
+
function queryFieldName(field) {
|
|
3
|
+
return field.wireName ?? field.name;
|
|
4
|
+
}
|
|
2
5
|
function offersAttributeSearch(endpoint) {
|
|
3
6
|
return !!endpoint && endpoint.attributeSearch !== "unsupported";
|
|
4
7
|
}
|
|
@@ -46223,4 +46226,4 @@ function citiesForCounty(stateSlug, countySlug) {
|
|
|
46223
46226
|
return citiesForCountyIn(SUMMARIES, stateSlug, countySlug).map((c) => ({ ...c, kinds: [...c.kinds], names: [...c.names] }));
|
|
46224
46227
|
}
|
|
46225
46228
|
|
|
46226
|
-
export { ACCESS_FLAGS, ACCESS_PRESETS, ACCESS_REASONS, ATLAS_COUNTY_PAGE_BASE, CITY_RECORD_LIMIT, CITY_STREET_MAX_LEN, COUNTY_RECHECK_REQUEST_MESSAGE, COUNTY_REQUEST_MESSAGE, COUNTY_REQUEST_URL, COVERAGE_REASONS, LIVE_STATUS_URL, NOT_IN_ATLAS_WHY, NO_PUBLIC_DATA_WHY, POINT_PLACEHOLDER, PRESET_FLAGS, accessBlocks, atlas, atlasIndex, buildCityQuery, buildParcelLookupDeepLink, canonicalLayerUrl, casesLocationTemplate, casesQueryUrl, citiesForCounty, citiesForCountyIn, cityDatasetDescriptors, cityDatasets, cityPath, cityPropertyIndex, cityZoningIndex, countyDownMessage, countyHasEndpoint, countyOffersAttributeSearch, countyPath, countySlugFromName, coverageAnswer, coverageAnswerText, coverageOverridesPause, currentZoningTemplate, findCity, findCityIn, findCounty, findCountyByFips, findState, flagsFor, getCityProperty, getCityZoning, isReviewedUnservable, listCities, listCountiesByState, listStates, mergeCityIndexes, offersAttributeSearch, offersPagination, pausedAnswer, pausedFlags, presetOf, propertyQueryUrl, requestHint, reviewedCapability, slugify, splitAddressStreetName, splitStreet, statePath, streetForDataset };
|
|
46229
|
+
export { ACCESS_FLAGS, ACCESS_PRESETS, ACCESS_REASONS, ATLAS_COUNTY_PAGE_BASE, CITY_RECORD_LIMIT, CITY_STREET_MAX_LEN, COUNTY_RECHECK_REQUEST_MESSAGE, COUNTY_REQUEST_MESSAGE, COUNTY_REQUEST_URL, COVERAGE_REASONS, LIVE_STATUS_URL, NOT_IN_ATLAS_WHY, NO_PUBLIC_DATA_WHY, POINT_PLACEHOLDER, PRESET_FLAGS, accessBlocks, atlas, atlasIndex, buildCityQuery, buildParcelLookupDeepLink, canonicalLayerUrl, casesLocationTemplate, casesQueryUrl, citiesForCounty, citiesForCountyIn, cityDatasetDescriptors, cityDatasets, cityPath, cityPropertyIndex, cityZoningIndex, countyDownMessage, countyHasEndpoint, countyOffersAttributeSearch, countyPath, countySlugFromName, coverageAnswer, coverageAnswerText, coverageOverridesPause, currentZoningTemplate, findCity, findCityIn, findCounty, findCountyByFips, findState, flagsFor, getCityProperty, getCityZoning, isReviewedUnservable, listCities, listCountiesByState, listStates, mergeCityIndexes, offersAttributeSearch, offersPagination, pausedAnswer, pausedFlags, presetOf, propertyQueryUrl, queryFieldName, requestHint, reviewedCapability, slugify, splitAddressStreetName, splitStreet, statePath, streetForDataset };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@urbankitstudio/atlas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "JS SDK for the UrbanKit County Parcel REST API Atlas: 538 counties across all 50 US states and DC, 521 verified public ArcGIS REST endpoints for county parcel data, with searchable field metadata, sample queries and license info, plus verified city code-violation, building-permit and zoning-case datasets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"parcel",
|