diff --git a/fern/pages/contribute/repos/doc-detective-common.md b/fern/pages/contribute/repos/doc-detective-common.md index d850a23..af022f9 100644 --- a/fern/pages/contribute/repos/doc-detective-common.md +++ b/fern/pages/contribute/repos/doc-detective-common.md @@ -7,3 +7,30 @@ title: doc-detective-common The source code lives in the [`doc-detective`](https://github.com/doc-detective/doc-detective) monorepo under `src/common/`, but the package is still published independently to NPM. This package doesn't depend on any other Doc Detective packages. + +## Public API + +The package exports these modules: + +### Functions and utilities + +- `schemas`: JSON schema definitions for test actions and configuration +- `validate`: Schema validation logic +- `detectTests`: Logic to detect tests in documentation files + +### TypeScript types + +The package exports types for Doc Detective's core data structures: + +```typescript +import type { Specification, Test, Step, Context, Config, Report } from 'doc-detective-common'; +``` + +- `Specification`: A test specification containing tests and configuration +- `Test`: An individual test with steps +- `Step`: A single action within a test +- `Context`: Browser/platform context for running tests +- `Config`: Configuration options +- `Report`: Test result report + +Using these types keeps your code in sync with schema changes.