@bella-baxter/kiota-client
Kiota-generated TypeScript client for the full Bella Baxter REST API — projects, environments, providers, secrets, API keys, and more.
Most users should use
@bella-baxter/sdkinstead. It wraps this client with authentication, live-reloading, and ZKE support out of the box.
Installation
npm install @bella-baxter/kiota-client
# or
pnpm add @bella-baxter/kiota-client
Usage
This package is primarily consumed by @bella-baxter/sdk and the Bella CLI. For direct usage:
import { BellaClient } from '@bella-baxter/kiota-client';
import {
FetchRequestAdapter,
HttpClient,
} from '@microsoft/kiota-http-fetchlibrary';
import { BellaAuthenticationProvider } from '@bella-baxter/sdk';
const authProvider = new BellaAuthenticationProvider({
apiKey: process.env.BELLA_BAXTER_API_KEY!,
});
const adapter = new FetchRequestAdapter(
authProvider,
undefined,
undefined,
new HttpClient(),
);
adapter.baseUrl = process.env.BELLA_BAXTER_URL!;
const client = new BellaClient(adapter);
// List projects
const projects = await client.api.v1.projects.get();
// Get secrets for an environment
const secrets = await client.api.v1
.projects.byProjectSlug('my-app')
.environments.byEnvironmentSlug('production')
.secrets.get();
Regenerating
The client is generated from the Bella Baxter OpenAPI spec. To regenerate after API changes:
cd apps/sdk
./generate.sh