npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@syncorix/clinical-types

v1.2.1

Published

Canonical shared types for the Doyen clinical platform — pharmacy API DTOs + BFF↔FE contract. Single source of truth consumed by the BFF (clinical-ai-system) and the frontend (doyen-pharma). Neither side maintains its own mirror.

Downloads

513

Readme

@syncorix/clinical-types

Canonical shared types for the Doyen clinical platform. Single source of truth — the BFF (clinical-ai-system) and the frontend (doyen-pharma) both import this package. Neither side maintains its own mirror.

Modules

| Import path | Contents | |---|---| | @syncorix/clinical-types/pharmacy | Pharmacy API DTOs — the BFF↔pharmacy contract (request/response shapes, notification + lifecycle enums). | | @syncorix/clinical-types/contract | BFF↔frontend contract — every type that crosses the BFF→FE boundary. | | @syncorix/clinical-types | Barrel — re-exports both as namespaces (pharmacy, contract). |

import type { TreatmentMedicationItem } from '@syncorix/clinical-types/contract';
import type { CreateNotificationInput } from '@syncorix/clinical-types/pharmacy';

Why this package exists

Before this package there were three drifting copies of the same types:

  1. apps/bff/src/services/pharmacy/types.ts (BFF)
  2. docs/frontend-contract.ts (a hand-maintained "contract" doc)
  3. doyen-pharma/src/lib/types/Bff.types.ts (the FE's byte-for-byte mirror)

They drifted. The 2026-05-20 audit (docs/audit-2026-05-20-api-fe-drift.md) found enum mismatches, a wrong-host TLS reference, and fields the FE rendered as fallbacks because its mirror was stale. This package collapses all three into one.

Consuming it

BFF (clinical-ai-system) — workspace dependency

Already wired. apps/bff has "@syncorix/clinical-types": "workspace:*". The BFF runs on tsx, which resolves the package's exports straight to source .ts — no build step needed for local dev.

Frontend (doyen-pharma) — npm dependency

// doyen-pharma/package.json
"dependencies": {
  "@syncorix/clinical-types": "^1.0.0"
}

Then delete src/lib/types/Bff.types.ts and repoint every import:

// before
import type { TreatmentMedicationItem } from '@/lib/types/Bff.types';
// after
import type { TreatmentMedicationItem } from '@syncorix/clinical-types/contract';

The published package ships built dist/ (.d.ts + .js) via publishConfig, so any FE bundler consumes it without extra transpile config.

Publishing

pnpm --filter @syncorix/clinical-types build   # tsc → dist/
npm publish                                     # uses publishConfig (dist/ exports)

prepublishOnly runs the build automatically. The package is scoped (@syncorix) and publishConfig.access is public — same as @syncorix/clinical-plugin, published to npmjs.org. Publishing requires being a member of the @syncorix npm org (npm login first).

Versioning

Semver on the type contract:

  • patch — comment / doc-hint change, no shape change
  • minor — additive (new optional field, new enum member, new type)
  • major — breaking (removed/renamed field, narrowed type, changed enum)

Bump package.json version and the CONTRACT_VERSION constant in src/contract.ts together. Both BFF and FE adopt a new version in the same release cycle.