{"_id":"@birdlife-tools/birdlife-schema","_rev":"6-e03c89079e8df1177dc4a4adfd322f4e","name":"@birdlife-tools/birdlife-schema","dist-tags":{"latest":"0.3.7"},"versions":{"0.3.2":{"name":"@birdlife-tools/birdlife-schema","version":"0.3.2","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"license":"MIT","_id":"@birdlife-tools/birdlife-schema@0.3.2","maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"homepage":"https://birdlife.tech","bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"bin":{"birdlife-schema":"bin/birdlife-schema.js"},"dist":{"shasum":"47af7a85eaa459bbad3f53f4c52f79b7a5240cd9","tarball":"https://registry.npmjs.org/@birdlife-tools/birdlife-schema/-/birdlife-schema-0.3.2.tgz","fileCount":26,"integrity":"sha512-hQwd6UbCCUw61hwkixl1y9FZ0BV1qMG6u2hnmZ3NgzbA2WwFBskPtpyvJfLm1Ximh/V4SwW9YiV56b7l7P/UFw==","signatures":[{"sig":"MEQCID9vKJycOXBbc3XIfury61wLO7GtuVobGtGRy1hw2MgSAiB6EbCI1tTWQ0rYNswitle3J0cIETexAuGhnk0+PBeOAg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49631},"gitHead":"5e999a2c1fb29c92b476b4f64d67c65724ff70f3","scripts":{"test":"node tools/validate-schemas.js && node tools/validate-examples.js && node tools/validate-extensions.js","generate":"node tools/generate-json-schema.js","prepublishOnly":"npm run generate"},"_npmUser":{"name":"sreten-blt","email":"sreten@purelymail.com"},"repository":{"url":"git+https://github.com/birdlife-tools/birdlife-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","directories":{},"_nodeVersion":"20.20.2","dependencies":{"avsc":"^5.7.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/birdlife-schema_0.3.2_1782363280472_0.6297019927958469","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@birdlife-tools/birdlife-schema","version":"0.3.3","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"license":"MIT","_id":"@birdlife-tools/birdlife-schema@0.3.3","maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"homepage":"https://birdlife.tech","bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"bin":{"birdlife-schema":"bin/birdlife-schema.js"},"dist":{"shasum":"8225fe590799c877bfb71254a35a682f825ed512","tarball":"https://registry.npmjs.org/@birdlife-tools/birdlife-schema/-/birdlife-schema-0.3.3.tgz","fileCount":26,"integrity":"sha512-YHoiORtzTOpoMiLoqUylnWJJ3sSjmYWSPomCrNQuvNPpFub6GRnTzU/Xur/dAi0Xwnb4yCvRrDFTOo+ehcky6A==","signatures":[{"sig":"MEUCIDAcUS/kZepdd/tLm3to8wY4FoeJY4N5Z4aQUqeSBllcAiEA+F9i7VkYGOjU2j32YyzZm4FXdAp0q7nFauhuXB1jaNI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49663},"gitHead":"e4f17f7f9caf3778f2c4a85c44469cd11a8587b4","scripts":{"test":"node tools/validate-schemas.js && node tools/validate-examples.js && node tools/validate-extensions.js","generate":"node tools/generate-json-schema.js","prepublishOnly":"npm run generate"},"_npmUser":{"name":"sreten-blt","email":"sreten@purelymail.com"},"repository":{"url":"git+https://github.com/birdlife-tools/birdlife-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","directories":{},"_nodeVersion":"20.20.2","dependencies":{"avsc":"^5.7.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/birdlife-schema_0.3.3_1782364561269_0.7259259375109022","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@birdlife-tools/birdlife-schema","version":"0.3.4","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"license":"MIT","_id":"@birdlife-tools/birdlife-schema@0.3.4","maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"homepage":"https://birdlife.tech","bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"bin":{"birdlife-schema":"bin/birdlife-schema.js"},"dist":{"shasum":"45b72efce5b61df249e60768c0966b0b7129779d","tarball":"https://registry.npmjs.org/@birdlife-tools/birdlife-schema/-/birdlife-schema-0.3.4.tgz","fileCount":26,"integrity":"sha512-0ziP0MnRdCykKZutbxP41ve+YXTem/9g+DdmWooVmLg+OOwMsGLJgz/vIJWV7Ej7n/szfT5p7bL82LSrbdM0ow==","signatures":[{"sig":"MEYCIQCfLXKH//LV/mUi0Y8L9kDw/gQxKmXNsAXxZAq3txThggIhAKEjjKjNdYU3SJMWE86NjkzL6k6Rtz87b2jvg8mIY/mB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49663},"gitHead":"882f7d94765d9cc3375dd344366631733cc66dce","scripts":{"test":"node tools/validate-schemas.js && node tools/validate-examples.js && node tools/validate-extensions.js","generate":"node tools/generate-json-schema.js","prepublishOnly":"npm run generate"},"_npmUser":{"name":"sreten-blt","email":"sreten@purelymail.com"},"repository":{"url":"git+https://github.com/birdlife-tools/birdlife-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","directories":{},"_nodeVersion":"20.20.2","dependencies":{"avsc":"^5.7.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/birdlife-schema_0.3.4_1782364834413_0.08569060134003248","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@birdlife-tools/birdlife-schema","version":"0.3.5","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"license":"MIT","_id":"@birdlife-tools/birdlife-schema@0.3.5","maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"homepage":"https://birdlife.tech","bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"bin":{"birdlife-schema":"bin/birdlife-schema.js"},"dist":{"shasum":"a84344d11732026d89d4f7945833ace465fe5b49","tarball":"https://registry.npmjs.org/@birdlife-tools/birdlife-schema/-/birdlife-schema-0.3.5.tgz","fileCount":26,"integrity":"sha512-YLauob2ABB5gAgCzzyglI4eUha2+DEj8G3fKWBMcvo2zOqpdQdTstGQkWcKTp2E29o305fEAUlLT9CeOPNDg/A==","signatures":[{"sig":"MEUCIQCNTOlBCZBIXa0RecDCt0OusqZd3mfIwvTPnXzdGIVeDQIgVx0DS0JvQiuR4KBmKo4vD1cOnbfh8gMlrGFbOF9KXAE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49663},"gitHead":"32e519c4acbaae2fef3fcfbf9afeb53b789908a5","scripts":{"test":"node tools/validate-schemas.js && node tools/validate-examples.js && node tools/validate-extensions.js","generate":"node tools/generate-json-schema.js","prepublishOnly":"npm run generate"},"_npmUser":{"name":"sreten-blt","email":"sreten@purelymail.com"},"repository":{"url":"git+https://github.com/birdlife-tools/birdlife-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","directories":{},"_nodeVersion":"20.20.2","dependencies":{"avsc":"^5.7.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/birdlife-schema_0.3.5_1782450313077_0.36983737211399226","host":"s3://npm-registry-packages-npm-production"}},"0.3.6":{"name":"@birdlife-tools/birdlife-schema","version":"0.3.6","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"license":"MIT","_id":"@birdlife-tools/birdlife-schema@0.3.6","maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"homepage":"https://birdlife.tech","bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"bin":{"birdlife-schema":"bin/birdlife-schema.js"},"dist":{"shasum":"6203802e33e305ee8119f8c2f58a0aa45e2d6f79","tarball":"https://registry.npmjs.org/@birdlife-tools/birdlife-schema/-/birdlife-schema-0.3.6.tgz","fileCount":26,"integrity":"sha512-cJrbr1RIZN0K/fxiyjvewJfJy/LPrXHEO/SyDz0Z23Oor6lAHbdu5/f4X/E/n/mBRg/up5mh9lwHtZL17TxyHw==","signatures":[{"sig":"MEYCIQCuuLbVybZZpEvDBINU2gy2tg3QaSyEXuCadR5HfURcdwIhAJfGJXh1RKcXxA0qCzQ4rHY7SyUyNAUpd2kEXUQT5yEc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49663},"gitHead":"a69d8ebbe533a8ebdd0c674ac91c86948a202071","scripts":{"test":"node tools/validate-schemas.js && node tools/validate-examples.js && node tools/validate-extensions.js","generate":"node tools/generate-json-schema.js","prepublishOnly":"npm run generate"},"_npmUser":{"name":"sreten-blt","email":"sreten@purelymail.com"},"repository":{"url":"git+https://github.com/birdlife-tools/birdlife-schema.git","type":"git"},"_npmVersion":"10.8.2","description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","directories":{},"_nodeVersion":"20.20.2","dependencies":{"avsc":"^5.7.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/birdlife-schema_0.3.6_1782450636914_0.30428127810590055","host":"s3://npm-registry-packages-npm-production"}},"0.3.7":{"name":"@birdlife-tools/birdlife-schema","version":"0.3.7","description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","license":"MIT","repository":{"type":"git","url":"git+https://github.com/birdlife-tools/birdlife-schema.git"},"bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"homepage":"https://birdlife.tech","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"bin":{"birdlife-schema":"bin/birdlife-schema.js"},"scripts":{"test":"node tools/validate-schemas.js && node tools/validate-examples.js && node tools/validate-extensions.js","generate":"node tools/generate-json-schema.js","prepublishOnly":"npm run generate"},"dependencies":{"avsc":"^5.7.9"},"publishConfig":{"access":"public"},"_id":"@birdlife-tools/birdlife-schema@0.3.7","gitHead":"07aeff92c59735ed2543503290de6dd6b7cf0d94","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ClbdIFVcBMu2h7bfJl113/gJiP1Woz5ibDclmdFZ//IaBTs78XLJVaJYI2umYFevK5AEuQeHwp5EjJrmZi2xvg==","shasum":"5df53da34eae8bba46f4c021d475278954babab4","tarball":"https://registry.npmjs.org/@birdlife-tools/birdlife-schema/-/birdlife-schema-0.3.7.tgz","fileCount":26,"unpackedSize":49663,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDCrIXlJT94jtRrDjrJZjuzhG15bDOW7mxBFUhdgXiYmQIhAIDJwEEdjHpr71HIsa4yyQ4F8LViqHbIimVwgt3843K7"}]},"_npmUser":{"name":"sreten-blt","email":"sreten@purelymail.com"},"directories":{},"maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/birdlife-schema_0.3.7_1782450833834_0.3985383975811376"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T04:54:40.297Z","modified":"2026-06-26T05:13:54.139Z","0.3.2":"2026-06-25T04:54:40.611Z","0.3.3":"2026-06-25T05:16:01.405Z","0.3.4":"2026-06-25T05:20:34.538Z","0.3.5":"2026-06-26T05:05:13.230Z","0.3.6":"2026-06-26T05:10:37.053Z","0.3.7":"2026-06-26T05:13:54.017Z"},"bugs":{"url":"https://github.com/birdlife-tools/birdlife-schema/issues"},"license":"MIT","homepage":"https://birdlife.tech","keywords":["avro","schema","biodiversity","ornithology","darwin-core","bird-observation","json-schema","validation"],"repository":{"type":"git","url":"git+https://github.com/birdlife-tools/birdlife-schema.git"},"description":"Language-agnostic data contract schemas for the BirdLife open-source ecosystem","maintainers":[{"name":"sreten-blt","email":"sreten@purelymail.com"}],"readme":"# BirdLife Schema\n\nLanguage-agnostic data contract schemas for the BirdLife open-source ecosystem.\n\n[![npm version](https://img.shields.io/npm/v/@birdlife-tools/birdlife-schema)](https://www.npmjs.com/package/@birdlife-tools/birdlife-schema)\n[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n[![Matrix](https://img.shields.io/badge/Matrix-%23birdlife--schema-black?logo=matrix)](https://matrix.to/#/#birdlife-schema:matrix.org)\n\n## Overview\n\nThis repository defines the canonical data shapes for bird observation and biodiversity data across all BirdLife community tools. Built on [Apache Avro](https://avro.apache.org/) for schema evolution and interoperability.\n\n**Namespace:** `tech.birdlife.schema`\n\n## Resolution API [![live](https://img.shields.io/badge/status-live-brightgreen)](https://birdlife.tech/docs)\n\nNeed deterministic IDs without running your own registry? Use the **[Resolution API](https://birdlife.tech/docs)**:\n\n```bash\n# Taxon → always same UUID for same scientific name\ncurl \"https://birdlife.tech/api/v1/taxon/resolve?name=Erithacus+rubecula\"\n\n# Location → deduplicated by coordinates (~11m precision)\ncurl -X POST https://birdlife.tech/api/v1/location/resolve \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"Minsmere\", \"latitude\": 52.2456, \"longitude\": 1.6234}'\n```\n\nAll API responses are validated against this schema.\n\n## Installation\n\n```bash\n# Install globally for CLI access\nnpm install -g birdlife-schema\n\n# Or install locally in your project\nnpm install birdlife-schema\n```\n\n## CLI Usage\n\n### Validate data against a schema\n\n```bash\n# Validate a single file\nbirdlife-schema validate taxon my-taxon.json\n\n# Validate with JSON output (for CI/scripts)\nbirdlife-schema validate observation data.json --json\n```\n\n**Output:**\n```\nValidating my-taxon.json against taxon schema...\n\n✓ Valid: 1 record(s)\n```\n\n**Error example:**\n```\nValidating bad-data.json against taxon schema...\n\n✗ Invalid: 1 record(s)\n\n  Record 0 (123):\n    - slug: expected \"string\"\n    - taxonRank: expected enum value\n```\n\n### List available entities\n\n```bash\nbirdlife-schema list\n```\n\n### Generate JSON Schema from Avro\n\n```bash\nbirdlife-schema generate\n```\n\n## Programmatic Usage (Node.js)\n\n```javascript\nconst avro = require('avsc');\nconst fs = require('fs');\n\n// Load the schema\nconst taxonSchema = require('birdlife-schema/avro/taxon.avsc');\nconst type = avro.Type.forSchema(taxonSchema);\n\n// Validate data\nconst myData = {\n  taxonID: \"8f14e45f-ceea-467f-a8f8-5c8e1c8d0a3b\",\n  slug: \"erithacus-rubecula\",\n  scientificName: \"Erithacus rubecula\",\n  taxonRank: \"SPECIES\"\n};\n\nif (type.isValid(myData)) {\n  console.log('Valid!');\n} else {\n  console.log('Invalid');\n}\n```\n\n## JSON Schema (for web apps)\n\nJSON Schema versions are auto-generated for use in web applications:\n\n```javascript\n// Use with any JSON Schema validator (ajv, etc.)\nconst taxonJsonSchema = require('birdlife-schema/json-schema/taxon.json');\n```\n\n## Core Entities (Tier 1)\n\n| Entity | Description | Schema |\n|--------|-------------|--------|\n| Taxon | Species taxonomy (aligned with Darwin Core) | [avro](avro/taxon.avsc) / [json](json-schema/taxon.json) |\n| Observation | Bird sighting occurrence record | [avro](avro/observation.avsc) / [json](json-schema/observation.json) |\n| Location | Geographic location data | [avro](avro/location.avsc) / [json](json-schema/location.json) |\n| Observer | Privacy-conscious observer identity | [avro](avro/observer.avsc) / [json](json-schema/observer.json) |\n| Protocol | Survey methodology | [avro](avro/protocol.avsc) / [json](json-schema/protocol.json) |\n| Evidence | Supporting documentation (photos, audio) | [avro](avro/evidence.avsc) / [json](json-schema/evidence.json) |\n\nSee [examples/](examples/) for valid JSON instances of each entity.\n\n## Extensions\n\nAdd custom fields to any entity using the `extensions` map:\n\n```json\n{\n  \"taxonID\": \"...\",\n  \"scientificName\": \"Erithacus rubecula\",\n  \"extensions\": {\n    \"myapp.nestingStatus\": \"confirmed\",\n    \"myapp.broodSize\": 4\n  }\n}\n```\n\n**Rules:**\n- Keys must be namespaced: `namespace.fieldName`\n- Pattern: `^[a-z][a-z0-9_]*\\.[a-zA-Z][a-zA-Z0-9_]*$`\n\nSee [extensions/registry.md](extensions/registry.md) to register your namespace.\n\n## Foundation\n\nThis schema builds on established biodiversity standards:\n\n- **[Darwin Core](https://dwc.tdwg.org/)** — International standard for biodiversity data\n- **[GBIF](https://www.gbif.org/)** — Global Biodiversity Information Facility compatibility\n- **[eBird](https://ebird.org/)** — Citizen science data model alignment\n\nSee [mappings/](mappings/) for field-level mappings to these standards.\n\n## Documentation\n\n- [DATA_CONTRACT_SPECIFICATION.md](docs/DATA_CONTRACT_SPECIFICATION.md) — Full design document\n- [governance.md](docs/governance.md) — Schema change process\n- [alignment-guide.md](docs/alignment-guide.md) — Tool integration guide\n\n## License\n\nThis project is licensed under the **MIT License** — see [LICENSE](LICENSE) for details.\n\n### Third-Party Attribution\n\nThis schema incorporates terms from [Darwin Core](https://dwc.tdwg.org/), a standard maintained by [Biodiversity Information Standards (TDWG)](https://www.tdwg.org/).\n\nDarwin Core is licensed under the **Creative Commons Attribution 4.0 International License (CC BY 4.0)**.\n\n© Biodiversity Information Standards (TDWG)\n\n## Community\n\n- **Website:** [birdlife.tech](https://birdlife.tech)\n- **Matrix:** [#birdlife-schema:matrix.org](https://matrix.to/#/#birdlife-schema:matrix.org)\n- **Email:** info@birdlife.tech\n\n## Contributing\n\nSchema changes require review. See [governance.md](docs/governance.md) for the change process.\n\n---\n\nPart of the [BirdLife Tools](https://github.com/birdlife-tools) open-source conservation toolkit.\n","readmeFilename":"README.md"}