# SW Combine SDK ## Docs - [OAuth Flow](https://swc-sdk.zeltros.dev/authentication/oauth-flow.md): Run the OAuth 2.0 authorization code flow with the SW Combine SDK: register your app, generate an auth URL, handle the callback, and protect against CSRF. - [Authentication](https://swc-sdk.zeltros.dev/authentication/overview.md): Learn the three ways to initialize the SW Combine SDK client — public, token-only, and full OAuth — and which endpoints each mode unlocks. - [OAuth Scopes](https://swc-sdk.zeltros.dev/authentication/scopes.md): All 170+ SW Combine SDK OAuth scope constants for character, message, inventory, and faction access, with helper functions and common combinations. - [Token Management](https://swc-sdk.zeltros.dev/authentication/token-management.md): Learn how to store OAuth tokens, trigger automatic and manual refresh, check expiration, and implement custom persistence with the SW Combine SDK. - [Client Modes](https://swc-sdk.zeltros.dev/concepts/client-modes.md): Understand the three SW Combine SDK client modes, when to use each one, and how to configure the SWCombine constructor for your use case. - [Error Handling](https://swc-sdk.zeltros.dev/concepts/error-handling.md): Learn how to catch typed SWCError exceptions from the SW Combine SDK, inspect error details, and understand which failures are retried automatically. - [Pagination](https://swc-sdk.zeltros.dev/concepts/pagination.md): Learn how every SW Combine SDK list() method returns a Page object, how to control page size, and how to auto-paginate with for await...of. - [Rate Limits](https://swc-sdk.zeltros.dev/concepts/rate-limits.md): Understand the SW Combine API's 600 requests/hour limit, how to monitor your remaining quota in real time, and how the SDK handles rate limit responses. - [Migrating to v3.x](https://swc-sdk.zeltros.dev/guides/migration-v3.md): Update your code for the two v3 breaking changes: Page replaces raw arrays on all list() methods, and several wrapper types were removed. - [Combine Galactic Time](https://swc-sdk.zeltros.dev/guides/timestamp-utility.md): Create, format, compare, and do arithmetic with CGT timestamps using the SDK's Timestamp utility class that converts between CGT and JavaScript dates. - [TypeScript types, enums, and type safety in the SDK](https://swc-sdk.zeltros.dev/guides/typescript-usage.md): Import types, use enums, and annotate your code with the full set of types the SW Combine SDK exports from its TypeScript-first codebase. - [Installation](https://swc-sdk.zeltros.dev/installation.md): Install swcombine-sdk, meet the Node.js 18+ and TypeScript 5.5+ requirements, configure environment variables, and choose ESM or CommonJS imports. - [Introduction](https://swc-sdk.zeltros.dev/introduction.md): Type-safe Node.js SDK for the Star Wars Combine API v2.0. Covers 60+ endpoints with built-in OAuth 2.0, auto-pagination, and automatic retries. - [Quickstart](https://swc-sdk.zeltros.dev/quickstart.md) - [Character](https://swc-sdk.zeltros.dev/resources/character.md): Use client.character to fetch character profiles, send and receive messages, manage credits, query skills, and inspect OAuth privileges and permissions. - [Datacard](https://swc-sdk.zeltros.dev/resources/datacard.md): Use client.datacard to list all production datacards licensed to a faction, including the entity types a faction is authorized to manufacture. - [Events](https://swc-sdk.zeltros.dev/resources/events.md): Use client.events to query the Star Wars Combine event log by mode — character, faction, inventory, or combat — and retrieve individual game events. - [Faction](https://swc-sdk.zeltros.dev/resources/faction.md): Use client.faction to retrieve faction details, list members, manage budgets and stockholders, and query credit logs. - [Galaxy](https://swc-sdk.zeltros.dev/resources/galaxy.md): Use client.galaxy to paginate through all star systems, planets, sectors, stations, and cities in the Star Wars Combine galaxy map. - [Inventory](https://swc-sdk.zeltros.dev/resources/inventory.md): Use client.inventory to list and manage entities (ships, vehicles, facilities, etc.) owned or assigned to characters and factions. - [Location](https://swc-sdk.zeltros.dev/resources/location.md): Use client.location to retrieve the current galactic position of any entity — characters, ships, vehicles, and more — by entity type and UID. - [Market](https://swc-sdk.zeltros.dev/resources/market.md): Use client.market to browse and retrieve in-game market vendors that list ships, items, and other assets for sale on the Star Wars Combine marketplace. - [News](https://swc-sdk.zeltros.dev/resources/news.md): Use client.news to list and retrieve Galactic News Service articles and sim news posts, with optional category filtering for sim news. - [Types](https://swc-sdk.zeltros.dev/resources/types.md): Use client.types to list and retrieve entity class hierarchies and type definitions for ships, vehicles, items, NPCs, and all other entity categories.