geolookup-plugin 0.1.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.
Files changed (74) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +485 -0
  3. package/config.yaml +26 -0
  4. package/data/alabama.tar.gz +0 -0
  5. package/data/alaska.tar.gz +0 -0
  6. package/data/american samoa.tar.gz +0 -0
  7. package/data/arizona.tar.gz +0 -0
  8. package/data/arkansas.tar.gz +0 -0
  9. package/data/california.tar.gz +0 -0
  10. package/data/cnmi.tar.gz +0 -0
  11. package/data/colorado.tar.gz +0 -0
  12. package/data/connecticut.tar.gz +0 -0
  13. package/data/dc.tar.gz +0 -0
  14. package/data/delaware.tar.gz +0 -0
  15. package/data/florida.tar.gz +0 -0
  16. package/data/georgia.tar.gz +0 -0
  17. package/data/guam.tar.gz +0 -0
  18. package/data/hawaii.tar.gz +0 -0
  19. package/data/idaho.tar.gz +0 -0
  20. package/data/illinois.tar.gz +0 -0
  21. package/data/indiana.tar.gz +0 -0
  22. package/data/iowa.tar.gz +0 -0
  23. package/data/kansas.tar.gz +0 -0
  24. package/data/kentucky.tar.gz +0 -0
  25. package/data/louisiana.tar.gz +0 -0
  26. package/data/maine.tar.gz +0 -0
  27. package/data/maryland.tar.gz +0 -0
  28. package/data/massachusetts.tar.gz +0 -0
  29. package/data/michigan.tar.gz +0 -0
  30. package/data/minnesota.tar.gz +0 -0
  31. package/data/mississippi.tar.gz +0 -0
  32. package/data/missouri.tar.gz +0 -0
  33. package/data/montana.tar.gz +0 -0
  34. package/data/nebraska.tar.gz +0 -0
  35. package/data/nevada.tar.gz +0 -0
  36. package/data/new hampshire.tar.gz +0 -0
  37. package/data/new jersey.tar.gz +0 -0
  38. package/data/new mexico.tar.gz +0 -0
  39. package/data/new york.tar.gz +0 -0
  40. package/data/north carolina.tar.gz +0 -0
  41. package/data/north dakota.tar.gz +0 -0
  42. package/data/ohio.tar.gz +0 -0
  43. package/data/oklahoma.tar.gz +0 -0
  44. package/data/oregon.tar.gz +0 -0
  45. package/data/pennsylvania.tar.gz +0 -0
  46. package/data/puerto rico.tar.gz +0 -0
  47. package/data/rhode island.tar.gz +0 -0
  48. package/data/south carolina.tar.gz +0 -0
  49. package/data/south dakota.tar.gz +0 -0
  50. package/data/tennessee.tar.gz +0 -0
  51. package/data/texas.tar.gz +0 -0
  52. package/data/usvi.tar.gz +0 -0
  53. package/data/utah.tar.gz +0 -0
  54. package/data/vermont.tar.gz +0 -0
  55. package/data/virginia.tar.gz +0 -0
  56. package/data/washington.tar.gz +0 -0
  57. package/data/west virginia.tar.gz +0 -0
  58. package/data/wisconsin.tar.gz +0 -0
  59. package/data/wyoming.tar.gz +0 -0
  60. package/dist/index.d.ts +16 -0
  61. package/dist/index.js +24 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/resources/DataLoad.d.ts +26 -0
  64. package/dist/resources/DataLoad.js +141 -0
  65. package/dist/resources/DataLoad.js.map +1 -0
  66. package/dist/resources/Geolookup.d.ts +44 -0
  67. package/dist/resources/Geolookup.js +105 -0
  68. package/dist/resources/Geolookup.js.map +1 -0
  69. package/dist/types.d.ts +11 -0
  70. package/dist/types.js +2 -0
  71. package/dist/types.js.map +1 -0
  72. package/package.json +57 -0
  73. package/schemas/README.md +11 -0
  74. package/schemas/schema.graphql +71 -0
@@ -0,0 +1,11 @@
1
+ # Schemas
2
+
3
+ Your schemas are defined in `.graphql` files within this `schemas` directory. These files contain the structure and types for your database tables, allowing Harper to automatically generate REST APIs for CRUD operations.
4
+
5
+ Take a look at the [Adding Tables with Schemas](../.agents/skills/harper-best-practices/rules/adding-tables-with-schemas.md) to learn more!
6
+
7
+ ## Want to read more?
8
+
9
+ Check out the rest of the "skills" documentation!
10
+
11
+ [Harper Best Practices Skill](../.agents/skills/harper-best-practices/SKILL.md)
@@ -0,0 +1,71 @@
1
+ # Location stores geographic entities across three tiers of US administrative hierarchy:
2
+ # Tier 1 (place): Cities, towns, CDPs — partial coverage (urban areas only)
3
+ # Tier 2 (county_subdivision): Townships, MCDs, CCDs — full national coverage
4
+ # Tier 3 (county): Counties, parishes, boroughs — full national coverage
5
+ #
6
+ # Each location links back to its H3 cells via relationship directives. A tier 1
7
+ # location connects to cells through tier_1, tier 2 through tier_2, etc. Not every
8
+ # location has cells at every tier — a county won't have tier_1 cells, for example.
9
+ type Location @table(database: "geolookup") {
10
+ id: ID @primaryKey
11
+ tier: Int
12
+ tier_label: String
13
+ name: String @indexed
14
+ name_full: String
15
+ feature_type: String
16
+ state_name: String
17
+ state_abbrev: String
18
+ lat: Float
19
+ lon: Float
20
+ h3_index: String @indexed
21
+ country_code: String
22
+ lsad: String
23
+ county_name: String
24
+ county_fips: String
25
+ place_cells: [Cell] @relationship(to : tier_1)
26
+ county_subdivision_cells: [Cell] @relationship(to : tier_2)
27
+ county_cells: [Cell] @relationship(to : tier_3)
28
+ }
29
+
30
+ # DataLoadJob tracks the progress of asynchronous bulk data loading jobs.
31
+ # When a user hits the DataLoad endpoint with a state name, a job record is created
32
+ # here and returned immediately. The job progresses through statuses:
33
+ # pending → extracting → loading_locations → loading_cells → completed (or error)
34
+ # Exported so it can be queried directly via REST to check job progress.
35
+ type DataLoadJob @table(database: "geolookup") @export {
36
+ id: ID @primaryKey
37
+ state: String @indexed
38
+ status: String @indexed
39
+ error_message: String
40
+ location_count: Int
41
+ cell_count: Int
42
+ started_at: String
43
+ completed_at: String
44
+ duration_ms: Int
45
+ }
46
+
47
+ # Cell is the spatial index that powers reverse geocoding lookups. Each record
48
+ # represents a single H3 hexagonal cell and links to the Location(s) it belongs
49
+ # to at each tier.
50
+ #
51
+ # Cells are stored in H3's "compact" representation — groups of 7 sibling cells
52
+ # sharing a parent are replaced by that parent cell, recursively. This means cells
53
+ # exist at mixed resolutions (2 through 9), dramatically reducing table size while
54
+ # covering the same geographic area.
55
+ #
56
+ # A single cell can belong to locations at multiple tiers simultaneously. For example,
57
+ # one cell might be in San Francisco (tier_1), a county subdivision (tier_2), and
58
+ # San Francisco County (tier_3).
59
+ #
60
+ # The tier fields are indexed to support lookups in both directions:
61
+ # - Cell → Location: the @relationship directives join to Location records
62
+ # - Location → Cells: the Location relationship directives join back via tier fields
63
+ type Cell @table(database: "geolookup") {
64
+ h3_index: ID @primaryKey
65
+ tier_1: String @indexed
66
+ tier_2: String @indexed
67
+ tier_3: String @indexed
68
+ county: Location @relationship(from: tier_3)
69
+ county_subdivision: Location @relationship(from: tier_2)
70
+ place: Location @relationship(from: tier_1)
71
+ }