{"_id":"@dcsv-io/d2-problem-details-abstractions","_rev":"2-5790e85923684f3eb947e6730c3ceb2d","name":"@dcsv-io/d2-problem-details-abstractions","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@dcsv-io/d2-problem-details-abstractions","version":"0.1.1","_id":"@dcsv-io/d2-problem-details-abstractions@0.1.1","maintainers":[{"name":"dcsv-tristan","email":"tristan@dcsv.io"}],"dist":{"shasum":"9a053c1f398f27fa0644193d4abc7e27c1c8ae7a","tarball":"https://registry.npmjs.org/@dcsv-io/d2-problem-details-abstractions/-/d2-problem-details-abstractions-0.1.1.tgz","fileCount":11,"integrity":"sha512-Eh8q/caUgNRV9g0a5FVu1X0/kSyWVi14OveahUDxGzvvqhk8ZUe2E0R2ykQZwhMwnPt0JzWBj5eBgcl6+xacPg==","signatures":[{"sig":"MEUCIHb7jIue8Vk4EyEYufeq+XFZ4WhAPb/CK/a+H5GD96oiAiEA8j5NKAy1iZAvBowJrsMUk1d+S5fVw6+PIPFo1J1txBU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27721},"main":"./dist/index.js","type":"module","_from":"file:bundle/npm/dcsv-io-d2-problem-details-abstractions-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -b","test:coverage":"vitest run --coverage","type-check:test":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"dcsv-tristan","email":"tristan@dcsv.io"},"_resolved":"/home/runner/work/D2-Public/D2-Public/bundle/npm/dcsv-io-d2-problem-details-abstractions-0.1.1.tgz","_integrity":"sha512-Eh8q/caUgNRV9g0a5FVu1X0/kSyWVi14OveahUDxGzvvqhk8ZUe2E0R2ykQZwhMwnPt0JzWBj5eBgcl6+xacPg==","_npmVersion":"11.16.0","description":"<!-- Copyright (c) DCSV. Licensed under the Apache License, Version 2.0. -->","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"4.0.18","typescript":"5.9.3","@vitest/coverage-v8":"4.0.18"},"_npmOperationalInternal":{"tmp":"tmp/d2-problem-details-abstractions_0.1.1_1784262844991_0.2737402191522349","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dcsv-io/d2-problem-details-abstractions","version":"0.1.2","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"devDependencies":{"@vitest/coverage-v8":"4.0.18","typescript":"5.9.3","vitest":"4.0.18"},"scripts":{"build":"tsc -b","test":"vitest run","test:coverage":"vitest run --coverage","type-check:test":"tsc -p tsconfig.test.json"},"_id":"@dcsv-io/d2-problem-details-abstractions@0.1.2","description":"<!-- Copyright (c) DCSV. Licensed under the Apache License, Version 2.0. -->","_integrity":"sha512-Qizia385/WRze0APb3hQpojUbVZ6ioXIiRC1+uJxNTiA/59paVzc6a+14mjLGn8l9gNQ6WFdRM+FAgFqZMHIng==","_resolved":"/home/runner/work/D2-Public/D2-Public/bundle/npm/dcsv-io-d2-problem-details-abstractions-0.1.2.tgz","_from":"file:bundle/npm/dcsv-io-d2-problem-details-abstractions-0.1.2.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-Qizia385/WRze0APb3hQpojUbVZ6ioXIiRC1+uJxNTiA/59paVzc6a+14mjLGn8l9gNQ6WFdRM+FAgFqZMHIng==","shasum":"1a9a5ddf6281bbfa396c47d1d0611aa98d618e99","tarball":"https://registry.npmjs.org/@dcsv-io/d2-problem-details-abstractions/-/d2-problem-details-abstractions-0.1.2.tgz","fileCount":11,"unpackedSize":27746,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBfeN0/XOkgak7/A2tfwbylX3b01/3A1lflNWYo0/SgcAiB92TrAiZnlVadistHr6ujd4HNdRMbNXUKxy+QUnXQLVQ=="}]},"_npmUser":{"name":"dcsv-tristan","email":"tristan@dcsv.io"},"directories":{},"maintainers":[{"name":"dcsv-tristan","email":"tristan@dcsv.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/d2-problem-details-abstractions_0.1.2_1784287048529_0.7974118095417448"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T04:34:04.886Z","modified":"2026-07-17T11:17:28.917Z","0.1.1":"2026-07-17T04:34:05.116Z","0.1.2":"2026-07-17T11:17:28.705Z"},"description":"<!-- Copyright (c) DCSV. Licensed under the Apache License, Version 2.0. -->","maintainers":[{"name":"dcsv-tristan","email":"tristan@dcsv.io"}],"readme":"<!--\nCopyright (c) DCSV. Licensed under the Apache License, Version 2.0.\n-->\n\n# @dcsv-io/d2-problem-details-abstractions\n\nFoundational, zero-dependency package that declares the RFC 7807\nProblemDetails wire-format catalog: the type-URI prefix, the\n`application/problem+json` content type, the extension-key wire names, the\nper-status coarse titles, and the `defaultTitleForStatus` lookup. Mirrors\n`DcsvIo.D2.ProblemDetails.Abstractions` on the .NET side — a leaf package\nwith no outbound dependencies, so any package can import these wire constants\nwithout pulling JWT-parsing or route-guard machinery.\n\n## Install\n\n```bash\npnpm add @dcsv-io/d2-problem-details-abstractions\n```\n\n## Public API\n\n| Export                         | Purpose                                                                                          |\n| ------------------------------ | ------------------------------------------------------------------------------------------------ |\n| `PROBLEM_TYPE_URI_PREFIX`      | Base URI for the RFC 7807 `type` field; the runtime appends the kebab-cased error code.         |\n| `PROBLEM_DETAILS_CONTENT_TYPE` | RFC 7807 §6.1 MIME type (`application/problem+json`).                                            |\n| `ProblemDetailsExtensionKeys`  | `as const` map of extension-key wire values (`ERROR_CODE`, `MESSAGES`, `INPUT_ERRORS`, `CATEGORY`, `TRACE_ID`, `CORRELATION_ID`). |\n| `ProblemDetailsTitles`         | `as const` map of per-status coarse English titles.                                              |\n| `defaultTitleForStatus`        | Returns the spec-declared title for an HTTP status, or the fallback title.                       |\n\nThe catalog is auto-generated from\n`contracts/problem-details/problem-details.spec.json` (generated sources committed).\nDo not edit `src/generated/problem-details.g.ts` by hand — changes will be\noverwritten on the next codegen run.\n\n## Dependencies\n\nNone. Zero runtime deps — this is a foundational leaf in the dependency graph.\n\n## Parity with .NET\n\nMirrors `DcsvIo.D2.ProblemDetails.Abstractions` — both declare the\nspec-derived ProblemDetails wire constants, generated from the same\n`contracts/problem-details/problem-details.spec.json` source. Single spec,\ntwo emitters, cross-language wire drift structurally impossible. The\nbody-builder that consumes these constants lives one layer up (host-supplied\nProblemDetails helpers / JWT middleware) — so the leaf stays free of the result envelope.\n","readmeFilename":"README.md"}