TypeScript API client for Nixopus, auto-generated from the OpenAPI spec.
npm install @nixopus/api-client @hey-api/client-fetch
# or
yarn add @nixopus/api-client @hey-api/client-fetchFor Zod schema validation install zod as well:
npm install @nixopus/api-client @hey-api/client-fetch zodimport { createClient } from '@hey-api/client-fetch';
import { getApiV1DeployApplications, getApiV1DeployApplicationDeployments } from '@nixopus/api-client';
const client = createClient({
baseUrl: 'https://api.nixopus.com',
getRequestConfig: () => ({
headers: {
Authorization: `Bearer ${yourToken}`,
'Content-Type': 'application/json',
},
}),
});
// Use the generated SDK functions
const applications = await getApiV1DeployApplications({ client });
const deployments = await getApiV1DeployApplicationDeployments({ client });The package exports generated Zod schemas for request/response validation.
import { z } from 'zod';
import { zPostApiV1DeployApplicationData, zPostApiV1DeployApplicationRestartData } from '@nixopus/api-client';
// Request schemas include .shape.body, .shape.query, .shape.path for body/query/path params
const deployBodySchema = zPostApiV1DeployApplicationData.shape.body ?? z.object({});
const restartBodySchema = zPostApiV1DeployApplicationRestartData.shape.body ?? z.object({});This package is automatically regenerated and published when the OpenAPI spec changes in the nixopus repository.