{"_id":"@bankrail/bankrail-types","name":"@bankrail/bankrail-types","dist-tags":{"latest":"0.4.0"},"versions":{"0.4.0":{"name":"@bankrail/bankrail-types","version":"0.4.0","description":"Canonical TypeScript contract types for the bankrail API — DTOs, enums, and validation decorators.","license":"MIT","author":{"name":"Posteering Infrastructure Limited"},"main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Devnonfarm/bank-rail.git","directory":"packages/bankrail-types"},"homepage":"https://github.com/Devnonfarm/bank-rail/tree/main/packages/bankrail-types#readme","bugs":{"url":"https://github.com/Devnonfarm/bank-rail/issues"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc"},"peerDependencies":{"class-validator":"^0.14.0","class-transformer":"^0.5.0","reflect-metadata":"^0.1.13 || ^0.2.0"},"peerDependenciesMeta":{"class-validator":{"optional":false},"class-transformer":{"optional":false},"reflect-metadata":{"optional":false}},"devDependencies":{"class-validator":"^0.14.0","class-transformer":"^0.5.0","reflect-metadata":"^0.2.0","typescript":"^5.0.0"},"gitHead":"1f1a92bb4ba3eadccde946827165bb7eab67c521","_id":"@bankrail/bankrail-types@0.4.0","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-uKLwdLgWzUxki0Z1SI83Pyhqjx1J38rdz/O5hLj9dm6Q8XQ6IF4fb7eS0MmYapg3pfWGmpylHP3jmEJSLteKFQ==","shasum":"fc25c36565e0fc74651fd4f9b0309d242dd45ceb","tarball":"https://registry.npmjs.org/@bankrail/bankrail-types/-/bankrail-types-0.4.0.tgz","fileCount":5,"unpackedSize":139556,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlfi/GKgtjr280Lfz0SS5xXBw8eFvizRRfN045+YQgBQIge5KC4x9P5V0mc6/49GM9xzFP0CE4CoxpRR4tUJf7jyo="}]},"_npmUser":{"name":"posteering","email":"admin@posteering.com"},"directories":{},"maintainers":[{"name":"posteering","email":"admin@posteering.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bankrail-types_0.4.0_1779557927959_0.7978576093099088"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-23T17:38:47.795Z","0.4.0":"2026-05-23T17:38:48.102Z","modified":"2026-05-23T17:38:48.281Z"},"maintainers":[{"name":"posteering","email":"admin@posteering.com"}],"description":"Canonical TypeScript contract types for the bankrail API — DTOs, enums, and validation decorators.","homepage":"https://github.com/Devnonfarm/bank-rail/tree/main/packages/bankrail-types#readme","repository":{"type":"git","url":"git+https://github.com/Devnonfarm/bank-rail.git","directory":"packages/bankrail-types"},"author":{"name":"Posteering Infrastructure Limited"},"bugs":{"url":"https://github.com/Devnonfarm/bank-rail/issues"},"license":"MIT","readme":"# @bankrail/bankrail-types\n\nCanonical TypeScript contract types for the [bankrail](https://api.posteering.com/api/v1/bankrail/docs) API — DTOs, enums, and validation decorators for integrating with bankrail's payment intents, virtual accounts, and outbound transfers.\n\nThis package is the source-of-truth type surface for the bankrail API. Both bankrail-the-service and external integrators consume the same types from this package — the wire shapes you see are exactly what the server accepts and returns.\n\n## Installation\n\n```bash\nnpm install @bankrail/bankrail-types\n```\n\nThe package has three required peer dependencies. Install them alongside if your project doesn't already use them:\n\n```bash\nnpm install class-validator class-transformer reflect-metadata\n```\n\n`class-validator` and `class-transformer` power the runtime validation decorators on the DTOs. `reflect-metadata` is required by both at runtime — import it once at your application's entry point:\n\n```typescript\nimport 'reflect-metadata';\n```\n\n## Quick start\n\n```typescript\nimport { CreatePaymentIntentDto, PaymentIntentResponse } from '@bankrail/bankrail-types';\n\n// Build a request matching bankrail's expected wire shape\nconst payload: CreatePaymentIntentDto = {\n  amountKobo: 50000,\n  currency: 'NGN',\n  direction: 'inbound',\n};\n\n// Type the response from bankrail\nconst response: PaymentIntentResponse = await callBankrail(payload);\n```\n\nThe package exports the full DTO surface for every productized bankrail route — payment intents, virtual accounts, outbound transfers, invoices, callbacks, and operator surfaces.\n\n## API reference\n\nThe authoritative API reference is served live from the bankrail service:\n\n- **API docs:** [https://api.posteering.com/api/v1/bankrail/docs](https://api.posteering.com/api/v1/bankrail/docs) — full reference with self-signup, route catalog, and request/response examples.\n- **OpenAPI spec (JSON):** `https://api.posteering.com/api/v1/bankrail/openapi.json` — machine-readable, for SDK generation or programmatic consumption.\n\nThe spec describes every route, every request/response shape, and every required auth scope. It also includes an `info.x-bankrail-types-version` field naming which version of this package the running service was built against.\n\n## Versioning\n\nThis package versions independently of the bankrail service. Wire-compatible additive changes (new optional fields, new exported types) ship as patch or minor bumps. Breaking changes to existing types ship as major bumps and are coordinated with the corresponding service release.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n\n## Issues\n\nBug reports and questions: https://github.com/Devnonfarm/bank-rail/issues\n","readmeFilename":"README.md","_rev":"1-5363b3fe6d366a1d7b739f9b6fd88ccb"}