@yonpm2025/flash-proxy-sdk
v1.0.0
Published
Type-safe FlashProxy SDK with Zod validation for the reseller API.
Maintainers
Readme
Flash Proxy SDK
Type-safe SDK for the FlashProxy reseller API with Zod-validated request/response schemas.
Installation
npm install flash-proxy-sdkQuick start
import { createFlashProxyClient } from 'flash-proxy-sdk';
const client = createFlashProxyClient(process.env.FLASHPROXY_TOKEN!);
const balance = await client.getBalance();
console.log(balance.data.balance_formatted);
const plans = await client.listPlans({ status: 'active', per_page: 50 });
console.log(plans.data.items.length);Sandbox is chosen automatically when the token contains test; otherwise production is used. You can override with options:
const client = createFlashProxyClient(token, { baseUrl: 'https://custom/api/v1' });API surface
All documented endpoints are implemented, including balance, pricing, plans (create/extend/password/usage/proxies), geo lookups, usage summary/realtime, proxy pools/connection info, servers (stats/restart/rotate-ip), VPN config, sub-users, and ISP pools.
Validation
Request bodies and responses are validated with Zod by default. Disable with { validateRequests: false, validateResponses: false } if desired.
Build
npm run buildPublishes ship compiled JS, typings, and source maps from dist/.
