Version 3.0 of the SW Combine SDK introduces two breaking changes. The first affects everyDocumentation Index
Fetch the complete documentation index at: https://swc-sdk.zeltros.dev/llms.txt
Use this file to discover all available pages before exploring further.
list() call in your codebase: return types changed from raw arrays (or bespoke wrapper objects) to a unified Page<T> class. The second is a transparent internal change to how access tokens are transmitted. This guide walks through each change with before-and-after code so you can update your project quickly.
TypeScript will catch the
Page<T> change for you. After upgrading, run tsc — the compiler flags every call site where the return type changed. The fix is almost always adding .data to access the array.Overview of breaking changes
| Area | What changed |
|---|---|
All list() return types | Now return Page<T> instead of T[], FactionListResponse, NewsListResponse, etc. |
| Pagination metadata | Access via page.total, page.start, page.count instead of result.attributes.* |
listRaw() methods | Removed — list() now includes metadata |
listAll() on factions | Removed — use for await...of instead |
| Removed types | Multiple wrapper types replaced by Page<T> (see full list below) |
| Authorization header | Tokens sent via Authorization: OAuth {token} header — no code changes needed |
Updating list() calls
Array-based endpoints
Most endpoints — inventory, galaxy, events, market, datacards, character messages, credit logs, faction members, budgets, stockholders — previously returned plain arrays.Faction list
Thefaction.list() endpoint previously returned a FactionListResponse wrapper with a .faction array and a .attributes metadata object.
News list
The news GNS and SimNews list endpoints previously returned arrays with a.attributes metadata attachment.
Replacing listRaw()
The listRaw() method existed on galaxy and types resources as a way to access pagination metadata alongside the items. It is no longer needed — list() returns a Page<T> that includes both.
Replacing listAll()
FactionResource.listAll() has been removed. Use for await...of on any Page<T> to iterate through all pages automatically:
list() endpoint, not just factions.
Page<T> quick-reference
The table below maps every v2 access pattern to its v3 equivalent:
| v2 pattern | v3 equivalent |
|---|---|
result[0] | result.data[0] |
result.forEach(...) | result.data.forEach(...) |
result.length | result.data.length |
result.map(...) | result.data.map(...) |
result.faction?.[0] | result.data[0] |
result.attributes?.total | result.total |
result.attributes?.start | result.start |
result.attributes?.count | result.count |
listRaw() | list() |
listAll() | for await (const item of await list()) { ... } |
New capabilities in v3
Page<T> adds features that were not available in v2:
Removed types
If you import any of the following types, replace them withPage<T> and update your access patterns. Import Page from swcombine-sdk:
| Removed type | Replacement |
|---|---|
FactionListResponse | Page<FactionListItem> |
FactionListAttributes | Use page.total, page.start, page.count |
NewsListResponse | Page<NewsListItem> |
NewsListAttributes | Use page.total, page.start, page.count |
GalaxyListAttributes | Use page.total, page.start, page.count |
GalaxyPlanetListRawResponse | Page<GalaxyPlanetListItem> |
GalaxySectorListRawResponse | Page<GalaxySectorListItem> |
GalaxySystemListRawResponse | Page<GalaxySystemListItem> |
GalaxyStationListRawResponse | Page<GalaxyStationListItem> |
GalaxyCityListRawResponse | Page<GalaxyCityListItem> |
TypesEntitiesListRawResponse | Page<TypesEntityListItem> |
TypesShipsListRawResponse | Page<TypesEntityListItem> |
TypesEntitiesListMetaResponse | Page<TypesEntityListItem> |
TypesEntityListAttributes | Use page.total, page.start, page.count |
ListResponse<T> | Page<T> |
Authorization header change
Access tokens are now sent in theAuthorization: OAuth {token} HTTP header instead of the ?access_token=... query parameter. No code changes are required — the SDK handles this automatically.
Unchanged endpoints
The following methods were not paginated lists and are unaffected by the v3 changes:character.skills.list()— still returnsCharacterSkillscharacter.privileges.list()— still returnsPrivilegesResponsecharacter.permissions.list()— still returnsCharacterPermissionsResponse- All
.get()methods — still return the entity directly