@depot/sdk-node
v2.0.0
Published
Node SDK for the Depot API
Readme
Depot API SDK for Node.js
A Node.js SDK for the Depot API.
Installation
Use pnpm or your favorite package manager:
pnpm add @depot/sdk-nodeUsage
Each of the Depot API services is exposed on the main depot export. Authentication is provided via an Authorization header with an Organization Token, for each API request. The service paths match their corresponding gRPC service names.
depot.build.v1.BuildServicedepot.buildkit.v1.BuildKitServicedepot.core.v1.ProjectServicedepot.core.v1.UsageServicedepot.core.v1.OrganizationService
Example
List projects:
import {depot} from '@depot/sdk-node'
const headers = {
Authorization: `Bearer ${process.env.DEPOT_TOKEN}`,
}
async function example() {
const result = await depot.core.v1.ProjectService.listProjects({}, {headers})
console.log(result.projects)
}License
MIT License, see LICENSE.
