A TypeScript SDK for interacting with the Rowt Server API.
npm install rowt-console-sdk
import RowtConsole from "rowt-console-sdk";
// Or alternatively, import specific types
import { RowtConsole, RowtProject, RowtUser } from "rowt-console-sdk";
// Initialize the SDK with your base URL
const rowtConsole = new RowtConsole("https://api.rowt.io");
// Login and get a user instance
async function login() {
try {
const user = await rowtConsole.login({
email: "[email protected]",
password: "password",
});
console.log("Logged in as:", user.email);
// Get user projects
const projects = await rowtConsole.getUserProjects();
console.log("User projects:", projects);
} catch (error) {
console.error("Login failed:", error);
}
}
login();
The SDK provides the following methods:
login(credentials)
- Authenticate with the Rowt Console APIlogout()
- Log out and clear tokensvalidateUser(credentials)
- Validate user credentialscreateUser(email, password)
- Create a new usergetProfile()
- Get the current user's profilegetCurrentUser()
- Get the current userupdatePassword(updatePasswordDTO)
- Update a user's passwordgetLinksByProjectId(projectId, includeInteractions)
- Get links for a projectgetProjectById(projectId, options)
- Get a project by IDgetUserProjects()
- Get all projects for the current userupdateProject(project)
- Update a projectcreateProject(project)
- Create a new projectregenerateApiKey(projectId)
- Regenerate an API key for a projectgetUserUsage(userId)
- Get usage statistics for a usergetUserTier(userId)
- Get tier information for a user
MIT