This package provides a TypeScript client for interacting with Snyk API v1 endpoints. It is generated from Snyk's API Blueprint definitions, offering type definitions for both request bodies and responses to enhance developer experience with type safety. The current stable version is 1.11.2. The project is explicitly in 'maintenance mode,' meaning new feature development has ceased, with ongoing support limited to bug and security fixes. A critical distinction is that this client exclusively supports Snyk API v1 and does not offer integration with Snyk API v3 endpoints. Releases are irregular, typically driven by necessary bug fixes or updates to the underlying Snyk API v1 definitions. It requires Node.js version 14 or above.
npm install snyk-api-ts-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Snyk API client, authenticate using an API token, and list projects for a specific organization using a POST request with filters. It also highlights type usage for request bodies.
Update your code to use `aggregated-issues` or `paths` endpoints. Consult the Snyk API documentation for updated endpoint details and data structures.
Ensure your integration targets Snyk API v1. For Snyk API v3 interactions, an alternative client or direct HTTP requests to the v3 API are required.
Be aware of the limited development scope. For new features or breaking API changes in Snyk, you may need to consider alternative integration methods or direct API calls.
Upgrade your Node.js environment to version 14 or higher.
Verify that your `SNYK_API_TOKEN` environment variable or hardcoded token is correct, has the necessary permissions, and has not expired.
Confirm that the API endpoint or resource you are trying to access is part of Snyk API v1. This client does not support Snyk API v3.
Ensure you are on the latest version of `snyk-api-ts-client`. If the issue persists, the client might not yet reflect the API change due to its maintenance mode, requiring a workaround or manual type assertion.