charger-client-sdk
v1.0.6
Published
Axios-based SDK for interacting with charger and client APIs
Readme
⚙️ AMC SDK — TypeScript-first SDK for the AMC Platform
A clean, secure, and developer-friendly JavaScript/TypeScript SDK to interact with the AMC (Asset Management Console) API — manage clients, chargers, and AMCs effortlessly.
🚀 Installation
npm install amc-sdk
# or
yarn add amc-sdk
# or
pnpm add amc-sdk⚡ Quick Start
import { AmcClient, ChargerType, Status } from "amc-sdk";
const amc = new AmcClient({
baseUrl: "https://api.example.com",
token: "your-jwt-token-here",
});
const client = await amc.client.get();
console.log("Client:", client);
const charger = await amc.charger.create({
charger_id: "CHG-001",
charger_type: ChargerType.AC,
});
console.log("Charger created:", charger);
const chargers = await amc.charger.getByStatus({
page: 1,
limit: 10,
status: Status.ACTIVE,
});
console.log("Active Chargers:", chargers);🧩 SDK Overview
| Service | Description |
|----------|--------------|
| amc.client | Manage authenticated client info |
| amc.charger | Create, fetch, and filter chargers |
| amc.support | Manage AMC records and pagination |
⚡ Charger Service
📌 create({ charger_id, charger_type })
Create a new charger for the authenticated client.
import { ChargerType } from "amc-sdk";
await amc.charger.create({
charger_id: "CH-101",
charger_type: ChargerType.DC,
});🔍 get(charger_id: string)
Fetch a specific charger by ID.
const charger = await amc.charger.get("CH-101");
console.log(charger);📦 getAll(charger_ids: string[])
Fetch multiple chargers by their IDs.
const chargers = await amc.charger.getAll(["CH-001", "CH-002"]);
console.log("Chargers:", chargers);⚙️ getByStatus({ page, limit, status })
Retrieve chargers by their AMC status (ACTIVE or EXPIRED).
import { Status } from "amc-sdk";
const chargers = await amc.charger.getByStatus({
page: 1,
limit: 10,
status: Status.EXPIRED,
});
console.log(chargers);🧩 Enums
⚡ ChargerType
export enum ChargerType {
AC = "AC",
DC = "DC",
}⚙️ Status
export enum Status {
ACTIVE = "ACTIVE",
EXPIRED = "EXPIRED",
}🧾 Support Service
amc.support.getClientAmcs({ page?, limit? })
Fetch paginated AMCs for the logged-in client.
const { data, pagination } = await amc.support.getClientAmcs({
page: 1,
limit: 5,
});
console.log("Client AMCs:", data);🧱 Class Reference
new AmcClient({ baseUrl, token })
| Parameter | Type | Description |
|------------|------|-------------|
| baseUrl | string | Base API URL |
| token | string | JWT Token |
🪪 License
MIT © 2025 — Maintained by Vinod Vadla
✨ AMC SDK — A TypeScript-first bridge to the AMC ecosystem.
Simplify integration. Amplify productivity.
