@qawolf/api-contracts
v0.1.0
Published
Versioned contracts for the QA Wolf public API
Downloads
301
Keywords
Readme
@qawolf/api-contracts
Versioned contracts for the QA Wolf public API.
The package is the source of truth for public endpoints, and server implementations must derive their public input and output schemas from these contracts. Contract name values are exact tRPC route paths under the public namespace. Authorization and privileged request state stay in the owning server controller or policy.
import { publicContractsV1 } from "@qawolf/api-contracts/v1";
const contract = publicContractsV1.run.create;Contracts are built by a factory that takes the id schemas as input. External consumers use publicContractsV1, which validates ids loosely (the server is the source of truth for id formats). The server instantiates makeContractsV1 with its own strict id schemas, so the contract shape can never drift between the two sides while validation strictness stays server-owned.
This package must not depend on internal packages or expose internal concepts: it is published publicly.
Publishing
This package is intended to be published to the public npm registry so external repositories such as qawolf/cli can consume the public contracts. It is not published yet.
To publish a new version, bump version in package.json and run npm publish from this directory with an npm token authorized for the @qawolf scope (the build runs automatically via prepublishOnly).
