SDK
Auto-generated type-safe clients built directly from the OpenAPI spec. The TypeScript SDK ships with full IntelliSense for every request and response type.
Single source of truth
SDK types are generated from the same Zod schemas that power runtime validation. A schema change propagates to the OpenAPI spec, the docs, and the SDK in one build.
TypeScript / Node.js
stable
npm install @vmaintain/sdk
import { VMaintainClient } from '@vmaintain/sdk'
const client = new VMaintainClient({ token: process.env.VMAINTAIN_TOKEN })
// List tickets
const { data } = await client.tickets.list({ workspaceId: '...' })
// Create a ticket
const ticket = await client.tickets.create({
workspaceId: '...',
clientId: '...',
subject: 'White screen on homepage',
priority: 'high',
})
Python
coming soon
pip install vmaintain
from vmaintain import VMaintainClient
client = VMaintainClient(token=os.environ["VMAINTAIN_TOKEN"])
# List tickets
result = client.tickets.list(workspace_id="...")
# Create a ticket
ticket = client.tickets.create(
workspace_id="...",
client_id="...",
subject="White screen on homepage",
priority="high",
)
PHP
coming soon
composer require vmaintain/sdk
use VMaintain\Client;
$client = new Client(['token' => getenv('VMAINTAIN_TOKEN')]);
// List tickets
$result = $client->tickets->list(['workspaceId' => '...']);
// Create a ticket
$ticket = $client->tickets->create([
'workspaceId' => '...',
'clientId' => '...',
'subject' => 'White screen on homepage',
'priority' => 'high',
]);
Manual generation
You can generate clients in any language directly from the OpenAPI spec usingopenapi-generatoror any compatible tool.
# Download spec
curl -o openapi.json /docs/openapi.json
# Generate TypeScript client (example)
npx @openapitools/openapi-generator-cli generate \
-i openapi.json \
-g typescript-fetch \
-o ./sdk