@urbankitstudio/atlas 0.6.13 → 0.6.15

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/dist/index.d.cts CHANGED
@@ -47,8 +47,12 @@ interface EndpointRecord {
47
47
  * Declares that this layer CANNOT serve an ATTRIBUTE search - a `where`-clause
48
48
  * query on a column, which is what "search by owner name / APN / address text"
49
49
  * means everywhere on the site. Absent (the default, and true of every
50
- * registration except the 67 Florida counties on the shared FDOR layer, one
51
- * layer and one live case, see below) means an attribute search IS offered.
50
+ * registration except 68: the 67 Florida counties on the shared FDOR layer,
51
+ * see below, and Orleans Parish LA, whose own layer never finishes a table
52
+ * scan) means an attribute search IS offered.
53
+ *
54
+ * Read it through `offersAttributeSearch` / `countyOffersAttributeSearch`,
55
+ * exported by this package, rather than comparing the string yourself.
52
56
  *
53
57
  * THIS IS THE ONE FLAG. Do not add a second field, and do not express this
54
58
  * with `searchable: false` on every column: `searchable` is a FIELD-level
@@ -65,7 +69,7 @@ interface EndpointRecord {
65
69
  * owner_name to not_published would be a false claim about data we do serve
66
70
  * and do bill for. Search and availability are different questions.
67
71
  *
68
- * THE ONE LIVE CASE, and what would retire it. Florida's FDOR statewide
72
+ * THE SHARED-LAYER CASE, and what would retire it. Florida's FDOR statewide
69
73
  * cadastral layer carries all 67 counties and 10.8M parcels, and CO_NO - the
70
74
  * county code, the only column identifying a county, and therefore every
71
75
  * Florida registration's scopeWhere - is NOT INDEXED. Its declared indexes
@@ -213,6 +217,23 @@ interface AtlasIndex {
213
217
  };
214
218
  }
215
219
 
220
+ /**
221
+ * Can this layer take a `where`-clause search at all (owner name, address text,
222
+ * a field filter)? False on a layer flagged `attributeSearch: "unsupported"`,
223
+ * which answers SPATIAL queries only: query it by geometry, as its
224
+ * `sampleQuery` shows, and read the owner and address fields off the hits.
225
+ *
226
+ * This is the package's one reader of that flag, so test it rather than the
227
+ * raw field. It is held equal to the site's reader (offersAttributeSearch in
228
+ * the monorepo's src/lib/capability-core.ts) on every bundled endpoint by the
229
+ * monorepo's atlas-package-capability-parity test.
230
+ */
231
+ declare function offersAttributeSearch(endpoint: Pick<EndpointRecord, "attributeSearch"> | null | undefined): boolean;
232
+ /**
233
+ * Does ANY of this county's layers take a `where` clause? Miami-Dade answers
234
+ * true through its own layer although its statewide FDOR layer is flagged.
235
+ */
236
+ declare function countyOffersAttributeSearch(county: Pick<CountyRecord, "endpoints">): boolean;
216
237
  /**
217
238
  * The reviewed capability assertion for one field, or null when none exists.
218
239
  *
@@ -280,7 +301,51 @@ declare function listCountiesByState(stateSlug: string): CountyRecord[];
280
301
 
281
302
  declare function slugify(s: string): string;
282
303
  declare function countySlugFromName(county: string): string;
283
- declare function buildParcelLookupDeepLink(endpoint: EndpointRecord, base?: string): string;
304
+ /**
305
+ * One spelling for one ArcGIS layer, so two spellings of the same layer compare
306
+ * equal. A URL that parses as http(s) keys on host + path, with no scheme (an
307
+ * http and an https spelling are one layer): the host lowercased, a default
308
+ * port dropped, dot segments resolved, repeated slashes collapsed, the query
309
+ * string and fragment dropped, a trailing `/query` (the operation, not the
310
+ * layer) and trailing slashes stripped, and the path lowercased, since ArcGIS
311
+ * REST paths are case-insensitive. Anything else is trimmed, stripped of
312
+ * trailing slashes and lowercased. Distinct layers stay distinct:
313
+ * `MapServer/15`, `MapServer/1` and `MapServer/150` are three keys.
314
+ *
315
+ * The site's copy (layerKey in the monorepo's src/lib/registered-layer.ts) is
316
+ * held equal to this one by its registered-layer test.
317
+ */
318
+ declare function canonicalLayerUrl(url: string): string;
319
+ /**
320
+ * The county a deep link is for. A CountyRecord satisfies it. Pass the record
321
+ * with its `endpoints` so the link can tell whether the endpoint is the
322
+ * county's primary layer; without them the caller vouches that it is.
323
+ */
324
+ interface DeepLinkCounty {
325
+ stateSlug: string;
326
+ countySlug: string;
327
+ endpoints?: readonly Pick<EndpointRecord, "url">[];
328
+ }
329
+ /**
330
+ * A link into the UrbanKit parcel-lookup tool for one endpoint.
331
+ *
332
+ * Without `county` this is the generic `?endpoint=<url>` link it always was,
333
+ * except that `fieldHint` (the owner column to pre-select) is omitted on a
334
+ * layer that refuses typed search (`attributeSearch: "unsupported"`): there is
335
+ * no text search to pre-select a field for, and the generic route recognises
336
+ * a registry-flagged layer and offers none.
337
+ *
338
+ * With `county` (pass the CountyRecord itself), a flagged or SHARED layer
339
+ * (`scopeWhere` set) links to the county route `<base>/<state>/<county>`, but
340
+ * only when it IS the county's primary layer (`county.endpoints[0]`, compared
341
+ * by canonicalLayerUrl), because the county route always loads that one. Only
342
+ * the county route knows which county it is looking at, so only it can scope a
343
+ * shared layer and show a flagged layer as lookup by location. Any other
344
+ * endpoint keeps the generic link to exactly that endpoint: Broward's FDOR
345
+ * layer is its second, behind the county's own layer, so a county-route link
346
+ * for it would open a different layer.
347
+ */
348
+ declare function buildParcelLookupDeepLink(endpoint: EndpointRecord, base?: string, county?: DeepLinkCounty): string;
284
349
  declare function statePath(stateSlug: string): string;
285
350
  declare function countyPath(stateSlug: string, countySlug: string): string;
286
351
 
@@ -294,4 +359,4 @@ interface Atlas {
294
359
  }
295
360
  declare const atlas: Atlas;
296
361
 
297
- export { type Atlas, type AtlasIndex, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type ContactInfo, type CountyAdvisory, type CountyRecord, type EndpointRecord, type EndpointStatus, LIVE_STATUS_URL, type LicenseType, type SearchField, type ServiceType, type StateFile, type StateIndexEntry, type VerifiedBy, atlas, atlasIndex, buildParcelLookupDeepLink, countyPath, countySlugFromName, findCounty, findCountyByFips, findState, isReviewedUnservable, listCountiesByState, listStates, reviewedCapability, slugify, statePath };
362
+ export { type Atlas, type AtlasIndex, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type ContactInfo, type CountyAdvisory, type CountyRecord, type DeepLinkCounty, type EndpointRecord, type EndpointStatus, LIVE_STATUS_URL, type LicenseType, type SearchField, type ServiceType, type StateFile, type StateIndexEntry, type VerifiedBy, atlas, atlasIndex, buildParcelLookupDeepLink, canonicalLayerUrl, countyOffersAttributeSearch, countyPath, countySlugFromName, findCounty, findCountyByFips, findState, isReviewedUnservable, listCountiesByState, listStates, offersAttributeSearch, reviewedCapability, slugify, statePath };
package/dist/index.d.ts CHANGED
@@ -47,8 +47,12 @@ interface EndpointRecord {
47
47
  * Declares that this layer CANNOT serve an ATTRIBUTE search - a `where`-clause
48
48
  * query on a column, which is what "search by owner name / APN / address text"
49
49
  * means everywhere on the site. Absent (the default, and true of every
50
- * registration except the 67 Florida counties on the shared FDOR layer, one
51
- * layer and one live case, see below) means an attribute search IS offered.
50
+ * registration except 68: the 67 Florida counties on the shared FDOR layer,
51
+ * see below, and Orleans Parish LA, whose own layer never finishes a table
52
+ * scan) means an attribute search IS offered.
53
+ *
54
+ * Read it through `offersAttributeSearch` / `countyOffersAttributeSearch`,
55
+ * exported by this package, rather than comparing the string yourself.
52
56
  *
53
57
  * THIS IS THE ONE FLAG. Do not add a second field, and do not express this
54
58
  * with `searchable: false` on every column: `searchable` is a FIELD-level
@@ -65,7 +69,7 @@ interface EndpointRecord {
65
69
  * owner_name to not_published would be a false claim about data we do serve
66
70
  * and do bill for. Search and availability are different questions.
67
71
  *
68
- * THE ONE LIVE CASE, and what would retire it. Florida's FDOR statewide
72
+ * THE SHARED-LAYER CASE, and what would retire it. Florida's FDOR statewide
69
73
  * cadastral layer carries all 67 counties and 10.8M parcels, and CO_NO - the
70
74
  * county code, the only column identifying a county, and therefore every
71
75
  * Florida registration's scopeWhere - is NOT INDEXED. Its declared indexes
@@ -213,6 +217,23 @@ interface AtlasIndex {
213
217
  };
214
218
  }
215
219
 
220
+ /**
221
+ * Can this layer take a `where`-clause search at all (owner name, address text,
222
+ * a field filter)? False on a layer flagged `attributeSearch: "unsupported"`,
223
+ * which answers SPATIAL queries only: query it by geometry, as its
224
+ * `sampleQuery` shows, and read the owner and address fields off the hits.
225
+ *
226
+ * This is the package's one reader of that flag, so test it rather than the
227
+ * raw field. It is held equal to the site's reader (offersAttributeSearch in
228
+ * the monorepo's src/lib/capability-core.ts) on every bundled endpoint by the
229
+ * monorepo's atlas-package-capability-parity test.
230
+ */
231
+ declare function offersAttributeSearch(endpoint: Pick<EndpointRecord, "attributeSearch"> | null | undefined): boolean;
232
+ /**
233
+ * Does ANY of this county's layers take a `where` clause? Miami-Dade answers
234
+ * true through its own layer although its statewide FDOR layer is flagged.
235
+ */
236
+ declare function countyOffersAttributeSearch(county: Pick<CountyRecord, "endpoints">): boolean;
216
237
  /**
217
238
  * The reviewed capability assertion for one field, or null when none exists.
218
239
  *
@@ -280,7 +301,51 @@ declare function listCountiesByState(stateSlug: string): CountyRecord[];
280
301
 
281
302
  declare function slugify(s: string): string;
282
303
  declare function countySlugFromName(county: string): string;
283
- declare function buildParcelLookupDeepLink(endpoint: EndpointRecord, base?: string): string;
304
+ /**
305
+ * One spelling for one ArcGIS layer, so two spellings of the same layer compare
306
+ * equal. A URL that parses as http(s) keys on host + path, with no scheme (an
307
+ * http and an https spelling are one layer): the host lowercased, a default
308
+ * port dropped, dot segments resolved, repeated slashes collapsed, the query
309
+ * string and fragment dropped, a trailing `/query` (the operation, not the
310
+ * layer) and trailing slashes stripped, and the path lowercased, since ArcGIS
311
+ * REST paths are case-insensitive. Anything else is trimmed, stripped of
312
+ * trailing slashes and lowercased. Distinct layers stay distinct:
313
+ * `MapServer/15`, `MapServer/1` and `MapServer/150` are three keys.
314
+ *
315
+ * The site's copy (layerKey in the monorepo's src/lib/registered-layer.ts) is
316
+ * held equal to this one by its registered-layer test.
317
+ */
318
+ declare function canonicalLayerUrl(url: string): string;
319
+ /**
320
+ * The county a deep link is for. A CountyRecord satisfies it. Pass the record
321
+ * with its `endpoints` so the link can tell whether the endpoint is the
322
+ * county's primary layer; without them the caller vouches that it is.
323
+ */
324
+ interface DeepLinkCounty {
325
+ stateSlug: string;
326
+ countySlug: string;
327
+ endpoints?: readonly Pick<EndpointRecord, "url">[];
328
+ }
329
+ /**
330
+ * A link into the UrbanKit parcel-lookup tool for one endpoint.
331
+ *
332
+ * Without `county` this is the generic `?endpoint=<url>` link it always was,
333
+ * except that `fieldHint` (the owner column to pre-select) is omitted on a
334
+ * layer that refuses typed search (`attributeSearch: "unsupported"`): there is
335
+ * no text search to pre-select a field for, and the generic route recognises
336
+ * a registry-flagged layer and offers none.
337
+ *
338
+ * With `county` (pass the CountyRecord itself), a flagged or SHARED layer
339
+ * (`scopeWhere` set) links to the county route `<base>/<state>/<county>`, but
340
+ * only when it IS the county's primary layer (`county.endpoints[0]`, compared
341
+ * by canonicalLayerUrl), because the county route always loads that one. Only
342
+ * the county route knows which county it is looking at, so only it can scope a
343
+ * shared layer and show a flagged layer as lookup by location. Any other
344
+ * endpoint keeps the generic link to exactly that endpoint: Broward's FDOR
345
+ * layer is its second, behind the county's own layer, so a county-route link
346
+ * for it would open a different layer.
347
+ */
348
+ declare function buildParcelLookupDeepLink(endpoint: EndpointRecord, base?: string, county?: DeepLinkCounty): string;
284
349
  declare function statePath(stateSlug: string): string;
285
350
  declare function countyPath(stateSlug: string, countySlug: string): string;
286
351
 
@@ -294,4 +359,4 @@ interface Atlas {
294
359
  }
295
360
  declare const atlas: Atlas;
296
361
 
297
- export { type Atlas, type AtlasIndex, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type ContactInfo, type CountyAdvisory, type CountyRecord, type EndpointRecord, type EndpointStatus, LIVE_STATUS_URL, type LicenseType, type SearchField, type ServiceType, type StateFile, type StateIndexEntry, type VerifiedBy, atlas, atlasIndex, buildParcelLookupDeepLink, countyPath, countySlugFromName, findCounty, findCountyByFips, findState, isReviewedUnservable, listCountiesByState, listStates, reviewedCapability, slugify, statePath };
362
+ export { type Atlas, type AtlasIndex, type CapabilityBasis, type CapabilityBasisType, type CapabilityField, type CapabilityOverrides, type CapabilityStatus, type ContactInfo, type CountyAdvisory, type CountyRecord, type DeepLinkCounty, type EndpointRecord, type EndpointStatus, LIVE_STATUS_URL, type LicenseType, type SearchField, type ServiceType, type StateFile, type StateIndexEntry, type VerifiedBy, atlas, atlasIndex, buildParcelLookupDeepLink, canonicalLayerUrl, countyOffersAttributeSearch, countyPath, countySlugFromName, findCounty, findCountyByFips, findState, isReviewedUnservable, listCountiesByState, listStates, offersAttributeSearch, reviewedCapability, slugify, statePath };