From 3054cd7d7d92aa9a9b96cadd91a01097b624a58b Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:45:01 +0000 Subject: [PATCH] Document doc-detective-common public API exports --- .../contribute/repos/doc-detective-common.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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.