npm.io
17.6.2 • Published 1 week ago

@lokalise/projects-engine-contracts

Licence
Apache-2.0
Version
17.6.2
Deps
2
Size
180 kB
Vulns
0
Weekly
978

@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 changeset at the repository root, pick the bump and write a one-line summary for consumers. A change that must not release takes pnpm changeset --empty. The changeset-check CI job fails a PR without one; PRs labelled skip-release skip it.
  • After merge, .github/workflows/release.packages.yml opens a "Release Packages" PR that bumps the version and updates this package's CHANGELOG.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

Keywords