@lokalise/projects-engine-contracts
Shared API contracts and domain schemas for the Projects Engine service.
Contents
src/apiContracts/
Typed route contracts built with defineApiContract from @lokalise/api-contracts, one file per resource:
projectsContracts.ts (getProjectsContract, getProjectContract, patchProjectContract,
deleteProjectContract), plus languageContracts.ts, projectSettingsContracts.ts,
translationSettingsContracts.ts, defaultReviewersContracts.ts and contributorsContracts.ts.
src/schemas/
The Zod schemas those contracts are assembled from — projectSchemas.ts (PROJECT_SCHEMA,
GET_PROJECTS_QUERY_SCHEMA with limit/after, PROJECTS_DEFAULT_LIMIT, PROJECTS_MAX_LIMIT),
domainSchemas.ts, pathParamsSchemas.ts, and one file per resource alongside them.
The project collection is cursor-paginated: getProjectsContract responds with the shared
@lokalise/api-common envelope (data array plus meta: { count, cursor, hasMore }).
Publishing
This package is released with changesets:
- A PR that changes this package needs a changeset: run
pnpm changesetat the repository root, pick the bump and write a one-line summary for consumers. A change that must not release takespnpm changeset --empty. Thechangeset-checkCI job fails a PR without one; PRs labelledskip-releaseskip it. - After merge,
.github/workflows/release.packages.ymlopens a "Release Packages" PR that bumps the version and updates this package'sCHANGELOG.md, merges it, and publishes the package to npm.
Peer dependencies
This package requires zod@^4.0.0 as a peer dependency.
Installation
npm install @lokalise/projects-engine-contracts