TypeScript development SDK
Version 0.0.0-v5-development.2 · 184,609 bytes
Download TypeScript SDKSHA-2562e8889d7fc4caa59eb1e30cc3002d87de96bd4834a44f59b8bdf881f1cd7876b
Runtime requirements
Node.js 22 or newer; preview built and tested on Node.js 25.8.1.
ES modules. The archive includes JavaScript, TypeScript declarations and the ./human account client.
An approved organization grant and issued client credentials for platform.capabilities:read.
Keep client credentials in your server environment; never put client secrets in browser code.
Native API base URL https://www.pradiota.com/sandbox/v1. These packages preserve the configured API path. Use approved sandbox credentials.
Install locally
npm install --ignore-scripts https://www.pradiota.com/assets/developer-sdks/preview-20261007-sandbox-path/pradiota-mighty-developers-staging-0.0.0-v5-development.2.tgz
# Save the example as example.mjs and run it server-side:
node example.mjsMake your first request
Create client credentials after your application is approved and its sandbox license is active. Set MIGHTY_CLIENT_ID and MIGHTY_CLIENT_SECRET in your server environment. The example exchanges them for a platform.capabilities:read token, then calls GET /v1/capabilities. Java and TypeScript use platformCapabilitiesGet; Python uses platform_capabilities_get. Save the example in the file named in the install instructions, then run it locally. Check the HTTP status, request ID and response body.
First request — approved application required
import { Client } from "@pradiota/mighty-developers-staging";
function required(name) {
const value = process.env[name];
if (!value?.trim()) throw new Error(`Set ${name}`);
return value;
}
const client = new Client("https://www.pradiota.com/sandbox/v1");
const auth = await client.clientCredentials(required("MIGHTY_CLIENT_ID"),
required("MIGHTY_CLIENT_SECRET"), "platform.capabilities:read");
if (auth.status !== 200 || !auth.body || typeof auth.body !== "object"
|| typeof auth.body.access_token !== "string" || !auth.body.access_token.trim()) {
throw new Error(`Credential exchange failed: HTTP ${auth.status}`);
}
const response = await client.platformCapabilitiesGet(auth.body.access_token);
console.log(response.status, response.requestId, response.body);