@repo/legacy
Bridge to legacy CircleHealth functionality. It exports useGenerateSessionNotePDF (client-side PDF generation using pdf-lib and html-to-text), the switchTemplateAndRegenerate server action, and related types. This package is intended to be temporary; features should be migrated to proper v2 implementations over time.
Dependencies
%%{init:{"theme":"dark"}}%%
graph TD
legacy["@repo/legacy"]
db["@repo/db"]
errors["@repo/errors"]
logger["@repo/logger"]
safe["@repo/safe"]
utils["@repo/utils"]
typescript_config["@repo/typescript-config"]
vitest_config["@repo/vitest-config"]
legacy --> db
legacy --> errors
legacy --> logger
legacy --> safe
legacy --> utils
legacy -.-> typescript_config
legacy -.-> vitest_config
%%{init:{"theme":"default"}}%%
graph TD
legacy["@repo/legacy"]
db["@repo/db"]
errors["@repo/errors"]
logger["@repo/logger"]
safe["@repo/safe"]
utils["@repo/utils"]
typescript_config["@repo/typescript-config"]
vitest_config["@repo/vitest-config"]
legacy --> db
legacy --> errors
legacy --> logger
legacy --> safe
legacy --> utils
legacy -.-> typescript_config
legacy -.-> vitest_config
graph TD
legacy["@repo/legacy"]
db["@repo/db"]
errors["@repo/errors"]
logger["@repo/logger"]
safe["@repo/safe"]
utils["@repo/utils"]
typescript_config["@repo/typescript-config"]
vitest_config["@repo/vitest-config"]
legacy --> db
legacy --> errors
legacy --> logger
legacy --> safe
legacy --> utils
legacy -.-> typescript_config
legacy -.-> vitest_config
Usage
import { useGenerateSessionNotePDF } from "@repo/legacy" ; // In a React component const { generate , isGenerating } = useGenerateSessionNotePDF ();
Copy
Scripts
Script
Description
check-types
Typecheck with tsc --noEmit
test
Run Vitest with coverage
test:watch
Run Vitest in watch mode
Classes LegacyApiClient Interfaces LegacyTemplate LegacyTemplateSection Type Aliases KipuLocation LegacyAuditRunResponseStatus LegacyAuditRunResponseViewModel LegacyIcdCode LegacyParsedSource LightningStepLocation ModifyAiNoteInput ModifyAiNoteResponse SunwaveFacility Variables AI_OPTION_IDS kipuLocationsInputSchema lightningStepLocationsInputSchema modifyAiNoteInputSchema sunwaveLocationsInputSchema syncAdmissionsInputSchema syncPatientsInputSchema Functions switchTemplateAndRegenerate toLegacyResponseViewModel useGenerateSessionNotePDF