{"_id":"@auth57labs/sdk","_rev":"4-03ebdf4c061b0b54b4c0f8211719c61d","name":"@auth57labs/sdk","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.1":{"name":"@auth57labs/sdk","version":"0.1.1","keywords":["prior-authorization","pa-lookup","healthcare","cms-0057-f","medicaid","medicare","auth57","web-components","lit"],"author":{"name":"Auth57 Labs","email":"hello@auth57labs.com"},"license":"MIT","_id":"@auth57labs/sdk@0.1.1","maintainers":[{"name":"auth57labs","email":"bryan@auth57labs.com"}],"homepage":"https://auth57labs.com","bugs":{"email":"hello@auth57labs.com"},"dist":{"shasum":"b38c2e04f96b8a5f787dadf3b35c5f829600f8d8","tarball":"https://registry.npmjs.org/@auth57labs/sdk/-/sdk-0.1.1.tgz","fileCount":23,"integrity":"sha512-3g9eh7r7uMuDPLHoWhAdFdXCtyQhQLrGZK1GMaK8rL8GrTEO+rV2xYCFzhzmCQ5i2pQK1IeXJd2R+jOAzYbA9Q==","signatures":[{"sig":"MEUCIQDL026X8OXcbTqF+ki4p6tr0tN6QTPzK9J+jflJG4spNwIgLszWYa5Hnuoi+tC8FUcGMXvL9bXFkxpLYFkfMhOlRdM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42569},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./components":{"types":"./dist/components/index.d.ts","import":"./dist/components/index.js"}},"gitHead":"5a6554668ab4117d12444ccd0e8ca105da7795d3","scripts":{"dev":"tsc --watch","test":"echo \"tests TBD\" && exit 0","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"auth57labs","email":"bryan@auth57labs.com"},"repository":{"url":"git+https://github.com/auth57labs/auth57-web.git","type":"git","directory":"sdk"},"_npmVersion":"11.11.1","description":"TypeScript SDK and embeddable Web Components for Auth57 — verified prior-authorization rule data for all 51 US states.","directories":{},"sideEffects":["./dist/components/*.js"],"_nodeVersion":"25.8.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lit":"^3.1.0","typescript":"^5.4.0"},"peerDependencies":{"lit":"^3.1.0"},"peerDependenciesMeta":{"lit":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1777098399385_0.8575627348043424","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@auth57labs/sdk","version":"0.2.0","keywords":["prior-authorization","pa-lookup","healthcare","cms-0057-f","medicaid","medicare","auth57","web-components","lit"],"author":{"name":"Auth57 Labs","email":"hello@auth57labs.com"},"license":"MIT","_id":"@auth57labs/sdk@0.2.0","maintainers":[{"name":"auth57labs","email":"bryan@auth57labs.com"}],"homepage":"https://auth57labs.com","bugs":{"email":"hello@auth57labs.com"},"dist":{"shasum":"6a6fa0e0c384ae5ea7cf1de56dbe11dfe54fd70f","tarball":"https://registry.npmjs.org/@auth57labs/sdk/-/sdk-0.2.0.tgz","fileCount":23,"integrity":"sha512-dZMBJ+UYlPQSvfOfiBddj99YeAAcW7xOsm4AInvLD26z4b7NuDR9eDMZhn7QjUlA2yoR7yT/ARxPFk468MFNEw==","signatures":[{"sig":"MEYCIQDI/lzE1Sx4TnOFMu1aho666oLiXGkndo1bcfYNxAHj4AIhAKKEduHFoym68UvnCI4puKqOos/rdZSKzsq5y68Ugms8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47910},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./components":{"types":"./dist/components/index.d.ts","import":"./dist/components/index.js"}},"gitHead":"de697b705fa83098486e06c1dae139b3bec9a0ff","scripts":{"dev":"tsc --watch","test":"echo \"tests TBD\" && exit 0","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"auth57labs","email":"bryan@auth57labs.com"},"repository":{"url":"git+https://github.com/auth57labs/auth57-web.git","type":"git","directory":"sdk"},"_npmVersion":"11.11.1","description":"TypeScript SDK and embeddable Web Components for Auth57 — verified prior-authorization rule data for all 51 US states.","directories":{},"sideEffects":["./dist/components/*.js"],"_nodeVersion":"25.8.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lit":"^3.1.0","typescript":"^5.4.0"},"peerDependencies":{"lit":"^3.1.0"},"peerDependenciesMeta":{"lit":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1777099075524_0.001860268631524109","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@auth57labs/sdk","version":"0.2.1","keywords":["prior-authorization","pa-lookup","healthcare","cms-0057-f","medicaid","medicare","auth57","web-components","lit"],"author":{"name":"Auth57 Labs","email":"hello@auth57labs.com"},"license":"MIT","_id":"@auth57labs/sdk@0.2.1","maintainers":[{"name":"auth57labs","email":"bryan@auth57labs.com"}],"homepage":"https://auth57labs.com","bugs":{"email":"hello@auth57labs.com"},"dist":{"shasum":"1140d4763fcea8f22772b69662db7ee3f4971c58","tarball":"https://registry.npmjs.org/@auth57labs/sdk/-/sdk-0.2.1.tgz","fileCount":23,"integrity":"sha512-scuaPE0ju4RK9mH/JF3vt0CxZRCNDHyyWq3GSpZ97pF+2kYydRrGnniKKlMtyoRMYTnpI7eOoVb2kTfSj5FQMw==","signatures":[{"sig":"MEYCIQDFqAxxrzDX/AgHY49pcjuQuy8wy4L9nRZsQ5udxqNjygIhAJZS/aMdPJuQz4MGDfv/Y/MWx1fzfpTZNZX/V5++c+m2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47922},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./components":{"types":"./dist/components/index.d.ts","import":"./dist/components/index.js"}},"gitHead":"52614874a5c75fa0f5bae217dcb0ee2df98680e9","scripts":{"dev":"tsc --watch","test":"echo \"tests TBD\" && exit 0","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"auth57labs","email":"bryan@auth57labs.com"},"repository":{"url":"git+https://github.com/auth57labs/auth57-web.git","type":"git","directory":"sdk"},"_npmVersion":"11.11.1","description":"TypeScript SDK and embeddable Web Components for Auth57 — verified prior-authorization rule data for all 51 US states.","directories":{},"sideEffects":["./dist/components/*.js"],"_nodeVersion":"25.8.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"lit":"^3.1.0","typescript":"^5.4.0"},"peerDependencies":{"lit":"^3.1.0"},"peerDependenciesMeta":{"lit":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.1_1777099418167_0.653719312443864","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@auth57labs/sdk","version":"0.3.0","description":"TypeScript SDK and embeddable Web Components for Auth57 — verified prior-authorization rule data for all 51 US states.","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./components":{"types":"./dist/components/index.d.ts","import":"./dist/components/index.js"}},"scripts":{"build":"tsc","dev":"tsc --watch","typecheck":"tsc --noEmit","test":"echo \"tests TBD\" && exit 0"},"keywords":["prior-authorization","pa-lookup","healthcare","cms-0057-f","medicaid","medicare","auth57","web-components","lit"],"author":{"name":"Auth57 Labs","email":"hello@auth57labs.com"},"license":"MIT","homepage":"https://auth57labs.com","repository":{"type":"git","url":"git+https://github.com/auth57labs/auth57-web.git","directory":"sdk"},"bugs":{"email":"hello@auth57labs.com"},"peerDependencies":{"lit":"^3.1.0"},"peerDependenciesMeta":{"lit":{"optional":true}},"devDependencies":{"lit":"^3.1.0","typescript":"^5.4.0"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"sideEffects":["./dist/components/*.js"],"gitHead":"b811f5c9148f18aefd8d91d41c9519361959d971","_id":"@auth57labs/sdk@0.3.0","_nodeVersion":"25.8.2","_npmVersion":"11.11.1","dist":{"integrity":"sha512-MTTIOrkSnWa8nEAsushdYPnd/is6pCrz+QhTntXJeV4dzHWApInqUhosPEh2Oy4jPgsAEerLumdeNzWkKsfIlQ==","shasum":"305d94a5b6557bf1f700273ef988b17f87cf5f2c","tarball":"https://registry.npmjs.org/@auth57labs/sdk/-/sdk-0.3.0.tgz","fileCount":23,"unpackedSize":49501,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDEBIU9dc08prcgR6ZzthFE01iAxI6TyvI4yvOrkloW0AiEAxxfxXgbpEaGwmINJK+m9YYJvoHKZoa0sLlMyd27xN+s="}]},"_npmUser":{"name":"auth57labs","email":"bryan@auth57labs.com"},"directories":{},"maintainers":[{"name":"auth57labs","email":"bryan@auth57labs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.3.0_1777140991057_0.4863241883508649"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-25T06:26:39.258Z","modified":"2026-04-25T18:16:31.339Z","0.1.1":"2026-04-25T06:26:39.603Z","0.2.0":"2026-04-25T06:37:55.693Z","0.2.1":"2026-04-25T06:43:38.376Z","0.3.0":"2026-04-25T18:16:31.223Z"},"bugs":{"email":"hello@auth57labs.com"},"author":{"name":"Auth57 Labs","email":"hello@auth57labs.com"},"license":"MIT","homepage":"https://auth57labs.com","keywords":["prior-authorization","pa-lookup","healthcare","cms-0057-f","medicaid","medicare","auth57","web-components","lit"],"repository":{"type":"git","url":"git+https://github.com/auth57labs/auth57-web.git","directory":"sdk"},"description":"TypeScript SDK and embeddable Web Components for Auth57 — verified prior-authorization rule data for all 51 US states.","maintainers":[{"name":"auth57labs","email":"bryan@auth57labs.com"}],"readme":"# @auth57labs/sdk\n\nTypeScript SDK and embeddable Web Components for **Auth57** — verified prior-authorization rule data for all 51 US states.\n\nFull OpenAPI spec: <https://auth57labs.com/openapi.json>\nInteractive API reference: <https://auth57labs.com/api-reference>\n\n---\n\n## Install\n\n```bash\nnpm install @auth57labs/sdk\n# or pnpm add @auth57labs/sdk\n# or yarn add @auth57labs/sdk\n```\n\nWorks in Node 18+, Deno, Bun, Cloudflare Workers, Vercel Edge, and every modern browser. Zero runtime dependencies for the core client.\n\n## Quick start — TypeScript client\n\n```ts\nimport { Auth57Client } from '@auth57labs/sdk';\n\nconst client = new Auth57Client({\n  apiKey: process.env.AUTH57_API_KEY!, // grab at https://auth57labs.com/subscribe-api\n});\n\nconst result = await client.paLookup({\n  state: 'CA',\n  program: 'medicaid_ffs',\n  service: 'advanced_imaging',\n});\n\nconsole.log(result.result.pa_required);       // true\nconsole.log(result.result.source_url);         // https://www.dhcs.ca.gov/...\nconsole.log(result.next_steps);                // ordered submission guide\n```\n\n### Cross-state comparison\n\n```ts\nconst compared = await client.compare({\n  states: ['CA', 'TX', 'NY', 'FL', 'WA'],\n  program: 'medicaid_mco',\n  drug: 'glp_1_agonists',\n});\n\nconsole.log(compared.summary.divergence_summary);\n// \"3 of 5 states require PA. NY, FL are outliers.\"\n```\n\n### Error handling\n\n```ts\nimport { Auth57Error } from '@auth57labs/sdk';\n\ntry {\n  await client.paLookup({ state: 'CA', program: 'medicaid_ffs', drug: 'unknown' });\n} catch (err) {\n  if (err instanceof Auth57Error) {\n    console.log(err.status);       // 404, 429, 401, etc.\n    console.log(err.body.error);   // \"Rule not found\"\n    if (err.status === 429) console.log(err.body.retry_after_seconds);\n  }\n}\n```\n\n---\n\n## Quick start — Web Component\n\nThe component is pure Lit-based custom elements. Works anywhere — plain HTML, React, Vue, Svelte, and Salesforce Lightning (via a thin LWC wrapper).\n\n```html\n<script type=\"module\" src=\"https://cdn.auth57labs.com/sdk/pa-lookup.js\"></script>\n\n<auth57-pa-lookup\n  api-key=\"fca35353-4528-4fa8-b45f-f47f541ac091\"\n  state=\"CA\"\n  program=\"medicaid_ffs\"\n  service=\"advanced_imaging\"\n  auto-query>\n</auth57-pa-lookup>\n```\n\n### Listening for results\n\n```js\ndocument.querySelector('auth57-pa-lookup').addEventListener('auth57-result', (ev) => {\n  console.log(ev.detail.result.pa_required);\n});\n```\n\n### Imperative API\n\n```js\nconst widget = document.querySelector('auth57-pa-lookup');\nwidget.state = 'TX';\nwidget.drug = 'biologics';\nawait widget.query();\n```\n\n### Styling\n\nThe component exposes CSS custom properties that penetrate the Shadow DOM:\n\n```css\nauth57-pa-lookup {\n  --auth57-accent: #00d4c8;\n  --auth57-accent-cta: #f64d82;\n  --auth57-bg: #ffffff;\n  --auth57-text: #0a0e1a;\n  --auth57-muted: #6b7280;\n  --auth57-border: #e8e4de;\n  --auth57-font: 'Your Font', system-ui, sans-serif;\n}\n```\n\n---\n\n## Salesforce Lightning\n\nWrap `<auth57-pa-lookup>` in a 30-line LWC to use it on any Salesforce record page or Flow screen. Full guide at <https://auth57labs.com/docs/salesforce>.\n\nPreferred setup for no-code users: import the OpenAPI spec directly into Salesforce **External Services** — every endpoint becomes a Flow action with zero custom code. Also covered in the Salesforce guide.\n\n---\n\n## Types exported\n\n```ts\nimport type {\n  StateCode,           // 'AL' | 'AK' | ... | 'WY'\n  Program,             // 'medicaid_ffs' | 'medicare_advantage' | ...\n  PaType,              // 'none' | 'partial' | 'conditional' | 'full'\n  PaLookupInput,\n  PaLookupResponse,\n  CompareInput,\n  CompareResponse,\n  CompareStateResult,\n  PaRule,\n  NextStep,\n  Auth57ApiError,\n} from '@auth57labs/sdk';\n```\n\nAll request/response types mirror the OpenAPI spec exactly.\n\n---\n\n## Runtime compatibility\n\n| Runtime         | Client | Web Component |\n|-----------------|:------:|:-------------:|\n| Browser (modern) | ✓      | ✓             |\n| Node 18+        | ✓      | —             |\n| Deno            | ✓      | —             |\n| Bun             | ✓      | —             |\n| Cloudflare Workers | ✓   | —             |\n| Vercel Edge     | ✓      | —             |\n| Salesforce LWC  | via wrapper | via wrapper |\n\n---\n\n## Building locally\n\n```bash\ncd sdk\nnpm install\nnpm run typecheck\nnpm run build\n```\n\n## License\n\nMIT © Auth57 Labs\n","readmeFilename":"README.md"}