TypeScript SDK overview
The TypeScript SDK is a typed client generated from the public Analog WakaTime OpenAPI contract. It is built on axios and works in both TypeScript and plain JavaScript — type definitions are resolved automatically via package.json.
@analog-code-monitor/analog-wakatime-ts-sdk
Repository: Analog-WakaTime-TS-SDK
This documentation is intentionally isolated from other language clients. The Python SDK and Go SDK live beside TypeScript under the common SDK section without duplicating the HTTP API reference.
Environments
| Environment | Supported |
|---|---|
| Node.js | Yes |
| Webpack bundles | Yes |
| Browserify bundles | Yes |
| Module systems | CommonJS and ES6 |
Requirements
- Node.js 18 or newer recommended
- an active Analog WakaTime account
- an active personal API token beginning with
analog-wakatime_live_, or a session JWT
Production API
The generated SDK targets the Analog WakaTime API gateway:
https://api.testingmyproject.space
Minimal request
import * as AnalogWakaTime from '@analog-code-monitor/analog-wakatime-ts-sdk';
const configuration = new AnalogWakaTime.Configuration({
accessToken: process.env.ANALOG_WAKATIME_API_TOKEN,
});
const profileApi = new AnalogWakaTime.ProfileApi(configuration);
async function main() {
const { status, data } = await profileApi.mainApiV1GetMyProfileInfoGet();
console.log(`HTTP ${status}`, data);
}
main();
Pass only the raw token to accessToken. The SDK adds Authorization: Bearer automatically.