Key features
TypeScript first
Full type definitions for every endpoint, parameter, and response. Your editor autocompletes method names, parameters, and return types without any extra configuration.
OAuth 2.0 built in
Complete OAuth flow with authorization URL generation, callback handling, and automatic token refresh. Supports both online and offline access types.
Auto-pagination
Every list endpoint returns
Page<T> with hasMore, getNextPage(), and for await...of support to iterate across all results automatically.Automatic retries
Exponential backoff for network errors, 5xx responses, and rate limit hits. Respects
Retry-After headers from the API.Type-safe OAuth scopes
170+ scope constants with autocomplete —
CharacterScopes.READ, MessageScopes.SEND, Scopes.PersonalInventory.SHIPS.READ — so you never mistype a scope string.Minimal footprint
A single production dependency (
axios). Ships as both ES Modules and CommonJS so it works with any Node.js project setup.Supported resources
The client exposes all 11 resource categories through a singleSWCombine instance:
| Property | Resource | What it covers |
|---|---|---|
client.character | Characters | Profile, messages, skills, privileges, credits, credit log |
client.faction | Factions | Info, members, budgets, stockholders, credits, credit log |
client.galaxy | Galaxy | Systems, sectors, planets, stations, cities |
client.inventory | Inventory | Entity listing and management across all entity types |
client.market | Market | Vendor listings and details |
client.news | News | Galactic News Service (GNS) and Sim News feeds |
client.events | Events | Personal, faction, inventory, and combat events |
client.types | Types | Entity types, classes, and detailed type info |
client.location | Location | Entity location lookups |
client.datacard | Datacards | Datacard management and assignment |
client.api | API utilities | Hello world, permissions, rate limits, time conversion |
The SDK also exports a
Timestamp utility for working with Combine Galactic Time (CGT), which uses the Star Wars Combine’s custom calendar system.Requirements
- Node.js 18 or higher
- TypeScript 5.5 or higher (for TypeScript projects)
- An npm account to install the package
Get started
Quickstart
Install the SDK, initialize a client, and make your first API call in under five minutes.
Installation
Detailed setup instructions including environment variables, ESM vs CJS configuration, and TypeScript setup.
Authentication
Set up OAuth 2.0, obtain access tokens, and configure automatic token refresh.
API resources
Browse all available resource methods with parameters and examples.