@urbankitstudio/atlas 0.6.29 → 0.6.30

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/README.md CHANGED
@@ -92,6 +92,7 @@ For single-address owner lookups in the browser, the free [Owner Lookup](https:/
92
92
  | `canonicalLayerUrl(url)` | one key per layer: host + path, scheme, default port, query, fragment, a trailing `/query` and case folded away |
93
93
  | `offersAttributeSearch(endpoint)` | `false` when the layer refuses a `where` clause (`attributeSearch: "unsupported"`); query it by geometry instead |
94
94
  | `countyOffersAttributeSearch(county)` | `true` when any of the county's layers takes a `where` clause |
95
+ | `offersPagination(endpoint)` | `false` when the layer refuses `resultRecordCount` and `resultOffset` (`supportsPagination: false`); send one request without them, see below |
95
96
  | `slugify(s)`, `countySlugFromName(s)` | string helpers matching the atlas slug convention |
96
97
  | `statePath(slug)`, `countyPath(state, county)` | URL paths under `/parcel-atlas` |
97
98
 
@@ -142,6 +143,34 @@ Treat both as *unknown*. Neither should render as "up".
142
143
 
143
144
  Omit `?fips=` to get every tracked county in one call.
144
145
 
146
+ ## Some layers refuse pagination
147
+
148
+ An endpoint may carry `supportsPagination: false` and a `maxRecordCount`. That
149
+ layer answers any `resultRecordCount` or `resultOffset`, in any letter case,
150
+ with HTTP 200 and an error body instead of rows:
151
+
152
+ ```json
153
+ {"error":{"code":400,"message":"Pagination is not supported."}}
154
+ ```
155
+
156
+ Check `offersPagination(endpoint)` before adding either parameter. When it is
157
+ `false`, send one request without them. The layer returns at most
158
+ `maxRecordCount` rows and sets `exceededTransferLimit` when more matched, so
159
+ narrow the `where` clause or the geometry instead of paging. The endpoint's
160
+ `sampleQuery` already has that shape. `maxRecordCount` is what the layer
161
+ declared when it was registered; the response's `exceededTransferLimit` is the
162
+ authority on whether a result was cut.
163
+
164
+ ```ts
165
+ import { findCountyByFips, offersPagination } from "@urbankitstudio/atlas";
166
+
167
+ const endpoint = findCountyByFips("17089")!.endpoints[0];
168
+ const params = new URLSearchParams({ where: "1=1", outFields: "*", f: "json" });
169
+ if (offersPagination(endpoint)) params.set("resultRecordCount", "100");
170
+ ```
171
+
172
+ An absent `supportsPagination` means the layer pages; `true` is never written.
173
+
145
174
  ## `addedAt` is the one date that never moves
146
175
 
147
176
  A county may carry `addedAt` (YYYY-MM-DD): the date it entered the atlas. It is
package/dist/index.cjs CHANGED
@@ -4,6 +4,9 @@
4
4
  function offersAttributeSearch(endpoint) {
5
5
  return !!endpoint && endpoint.attributeSearch !== "unsupported";
6
6
  }
7
+ function offersPagination(endpoint) {
8
+ return !!endpoint && endpoint.supportsPagination !== false;
9
+ }
7
10
  function countyOffersAttributeSearch(county) {
8
11
  const endpoints = Array.isArray(county.endpoints) ? county.endpoints : [];
9
12
  return endpoints.some(offersAttributeSearch);
@@ -28995,6 +28998,7 @@ exports.isReviewedUnservable = isReviewedUnservable;
28995
28998
  exports.listCountiesByState = listCountiesByState;
28996
28999
  exports.listStates = listStates;
28997
29000
  exports.offersAttributeSearch = offersAttributeSearch;
29001
+ exports.offersPagination = offersPagination;
28998
29002
  exports.reviewedCapability = reviewedCapability;
28999
29003
  exports.slugify = slugify;
29000
29004
  exports.statePath = statePath;
package/dist/index.d.cts CHANGED
@@ -89,6 +89,28 @@ interface EndpointRecord {
89
89
  * and every surface re-offers the search on its own. Nothing else changes.
90
90
  */
91
91
  attributeSearch?: "unsupported";
92
+ /**
93
+ * Declares that this layer REFUSES pagination: any `resultRecordCount` or
94
+ * `resultOffset` in a query (in any letter case) gets HTTP 200 with
95
+ * `{"error":{"code":400,"message":"Pagination is not supported."}}`. Only the
96
+ * literal `false` is allowed; absent (true of every other registration) means
97
+ * the layer pages. Named after Esri's own
98
+ * `advancedQueryCapabilities.supportsPagination`.
99
+ *
100
+ * On a flagged layer send ONE request with neither parameter. It returns at
101
+ * most `maxRecordCount` rows and sets `exceededTransferLimit` when more
102
+ * matched, so narrow the `where` clause or the geometry instead of paging.
103
+ * The layer's `sampleQuery` already has that shape.
104
+ *
105
+ * Read it through `offersPagination`, exported by this package, rather than
106
+ * comparing the value yourself.
107
+ */
108
+ supportsPagination?: false;
109
+ /** The most rows the layer returns to one query, as its metadata declares.
110
+ * Present on every layer flagged `supportsPagination: false`. A declared
111
+ * value: the server's real cap can change, and `exceededTransferLimit` on
112
+ * the response is the authority on whether a result was cut. */
113
+ maxRecordCount?: number;
92
114
  sampleQuery: string | null;
93
115
  license: LicenseType;
94
116
  licenseUrl: string | null;
@@ -235,6 +257,20 @@ interface AtlasIndex {
235
257
  * monorepo's atlas-package-capability-parity test.
236
258
  */
237
259
  declare function offersAttributeSearch(endpoint: Pick<EndpointRecord, "attributeSearch"> | null | undefined): boolean;
260
+ /**
261
+ * May a query to this layer carry `resultRecordCount` or `resultOffset`? False
262
+ * on a layer flagged `supportsPagination: false`, which answers either
263
+ * parameter (in any letter case) with HTTP 200 and the error body
264
+ * `{"error":{"code":400,"message":"Pagination is not supported."}}`. On such a
265
+ * layer send one request with neither parameter: it returns at most the
266
+ * endpoint's `maxRecordCount` rows and sets `exceededTransferLimit` when more
267
+ * matched, so narrow the `where` clause or the geometry instead of paging.
268
+ *
269
+ * The package's one reader of that flag, held equal to the site's reader
270
+ * (offersPagination in the monorepo's src/lib/capability-core.ts) on every
271
+ * bundled endpoint by the monorepo's atlas-package-capability-parity test.
272
+ */
273
+ declare function offersPagination(endpoint: Pick<EndpointRecord, "supportsPagination"> | null | undefined): boolean;
238
274
  /**
239
275
  * Does ANY of this county's layers take a `where` clause? Miami-Dade answers
240
276
  * true through its own layer although its statewide FDOR layer is flagged.
@@ -365,4 +401,4 @@ interface Atlas {
365
401
  }
366
402
  declare const atlas: Atlas;
367
403
 
368
- 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 };
404
+ 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, offersPagination, reviewedCapability, slugify, statePath };
package/dist/index.d.ts CHANGED
@@ -89,6 +89,28 @@ interface EndpointRecord {
89
89
  * and every surface re-offers the search on its own. Nothing else changes.
90
90
  */
91
91
  attributeSearch?: "unsupported";
92
+ /**
93
+ * Declares that this layer REFUSES pagination: any `resultRecordCount` or
94
+ * `resultOffset` in a query (in any letter case) gets HTTP 200 with
95
+ * `{"error":{"code":400,"message":"Pagination is not supported."}}`. Only the
96
+ * literal `false` is allowed; absent (true of every other registration) means
97
+ * the layer pages. Named after Esri's own
98
+ * `advancedQueryCapabilities.supportsPagination`.
99
+ *
100
+ * On a flagged layer send ONE request with neither parameter. It returns at
101
+ * most `maxRecordCount` rows and sets `exceededTransferLimit` when more
102
+ * matched, so narrow the `where` clause or the geometry instead of paging.
103
+ * The layer's `sampleQuery` already has that shape.
104
+ *
105
+ * Read it through `offersPagination`, exported by this package, rather than
106
+ * comparing the value yourself.
107
+ */
108
+ supportsPagination?: false;
109
+ /** The most rows the layer returns to one query, as its metadata declares.
110
+ * Present on every layer flagged `supportsPagination: false`. A declared
111
+ * value: the server's real cap can change, and `exceededTransferLimit` on
112
+ * the response is the authority on whether a result was cut. */
113
+ maxRecordCount?: number;
92
114
  sampleQuery: string | null;
93
115
  license: LicenseType;
94
116
  licenseUrl: string | null;
@@ -235,6 +257,20 @@ interface AtlasIndex {
235
257
  * monorepo's atlas-package-capability-parity test.
236
258
  */
237
259
  declare function offersAttributeSearch(endpoint: Pick<EndpointRecord, "attributeSearch"> | null | undefined): boolean;
260
+ /**
261
+ * May a query to this layer carry `resultRecordCount` or `resultOffset`? False
262
+ * on a layer flagged `supportsPagination: false`, which answers either
263
+ * parameter (in any letter case) with HTTP 200 and the error body
264
+ * `{"error":{"code":400,"message":"Pagination is not supported."}}`. On such a
265
+ * layer send one request with neither parameter: it returns at most the
266
+ * endpoint's `maxRecordCount` rows and sets `exceededTransferLimit` when more
267
+ * matched, so narrow the `where` clause or the geometry instead of paging.
268
+ *
269
+ * The package's one reader of that flag, held equal to the site's reader
270
+ * (offersPagination in the monorepo's src/lib/capability-core.ts) on every
271
+ * bundled endpoint by the monorepo's atlas-package-capability-parity test.
272
+ */
273
+ declare function offersPagination(endpoint: Pick<EndpointRecord, "supportsPagination"> | null | undefined): boolean;
238
274
  /**
239
275
  * Does ANY of this county's layers take a `where` clause? Miami-Dade answers
240
276
  * true through its own layer although its statewide FDOR layer is flagged.
@@ -365,4 +401,4 @@ interface Atlas {
365
401
  }
366
402
  declare const atlas: Atlas;
367
403
 
368
- 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 };
404
+ 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, offersPagination, reviewedCapability, slugify, statePath };
package/dist/index.js CHANGED
@@ -2,6 +2,9 @@
2
2
  function offersAttributeSearch(endpoint) {
3
3
  return !!endpoint && endpoint.attributeSearch !== "unsupported";
4
4
  }
5
+ function offersPagination(endpoint) {
6
+ return !!endpoint && endpoint.supportsPagination !== false;
7
+ }
5
8
  function countyOffersAttributeSearch(county) {
6
9
  const endpoints = Array.isArray(county.endpoints) ? county.endpoints : [];
7
10
  return endpoints.some(offersAttributeSearch);
@@ -28978,4 +28981,4 @@ function countyPath(stateSlug, countySlug) {
28978
28981
  return `/parcel-atlas/${stateSlug}/${countySlug}`;
28979
28982
  }
28980
28983
 
28981
- export { LIVE_STATUS_URL, atlas, atlasIndex, buildParcelLookupDeepLink, canonicalLayerUrl, countyOffersAttributeSearch, countyPath, countySlugFromName, findCounty, findCountyByFips, findState, isReviewedUnservable, listCountiesByState, listStates, offersAttributeSearch, reviewedCapability, slugify, statePath };
28984
+ export { LIVE_STATUS_URL, atlas, atlasIndex, buildParcelLookupDeepLink, canonicalLayerUrl, countyOffersAttributeSearch, countyPath, countySlugFromName, findCounty, findCountyByFips, findState, isReviewedUnservable, listCountiesByState, listStates, offersAttributeSearch, offersPagination, reviewedCapability, slugify, statePath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urbankitstudio/atlas",
3
- "version": "0.6.29",
3
+ "version": "0.6.30",
4
4
  "description": "JS SDK for the UrbanKit County Parcel REST API Atlas: 306 counties across all 50 US states and DC, 324 verified public ArcGIS REST endpoints for county parcel data, with searchable field metadata, sample queries and license info.",
5
5
  "keywords": [
6
6
  "parcel",