@lobehub/iaas-sdk-devices-api
v0.3.0
Published
Generated client for the lobe-iaas devices API
Maintainers
Keywords
Readme
@lobehub/iaas-sdk-devices-api
Generated TypeScript client for the lobe-iaas devices API.
The client sends a service token. Use it on the server only; never ship the token to a browser.
import { createClient, v1DevicesPost } from '@lobehub/iaas-sdk-devices-api';
const client = createClient({
baseUrl: process.env.LOBE_IAAS_DEVICES_API_URL,
headers: { Authorization: `Bearer ${process.env.LOBE_IAAS_DEVICES_API_TOKEN}` },
});
const { data } = await v1DevicesPost({
client,
body: {
requestId: crypto.randomUUID(),
principal: { type: 'PRINCIPAL_TYPE_USER', id: userId },
plan,
deviceClass: 'linux-small',
},
});Regenerate with ./hack/proto-gen from the repository root. Do not edit
src/gen by hand.
