Using scope constants
The SDK exports typed constants for every scope. Using them instead of raw strings gives you IDE autocomplete, compile-time typo detection, and a single source of truth if scope names ever change:All scope values sent to the API are lowercase strings with underscores (e.g.,
character_read, personal_inv_ships_all). The constants resolve to these lowercase literals
automatically. The API rejects uppercase scope strings.Scope categories
Character scopes — CharacterScopes
Character scopes — CharacterScopes
Import:
import { CharacterScopes } from 'swcombine-sdk'Message scopes — MessageScopes
Message scopes — MessageScopes
Import:
import { MessageScopes } from 'swcombine-sdk'Personal inventory scopes — Scopes.PersonalInventory
Personal inventory scopes — Scopes.PersonalInventory
Import: The same actions (
import { Scopes } from 'swcombine-sdk'Personal inventory scopes follow the pattern Scopes.PersonalInventory.{ENTITY}.{ACTION}. The top-level overview scope gives access to inventory summary data.READ, RENAME, ASSIGN, MAKEOVER, TAGS_READ, TAGS_WRITE, ALL) are available for: VEHICLES, STATIONS, CITIES, FACILITIES, ITEMS, DROIDS, MATERIALS, CREATURES. Planets have a reduced set (READ, ASSIGN, TAGS_READ, TAGS_WRITE, ALL); NPCs don’t have RENAME.Faction scopes — FactionScopes
Faction scopes — FactionScopes
Import:
import { FactionScopes } from 'swcombine-sdk'Faction inventory scopes — Scopes.FactionInventory
Faction inventory scopes — Scopes.FactionInventory
Import: The full set of entity types mirrors the personal inventory:
import { Scopes } from 'swcombine-sdk'Faction inventory scopes mirror the personal inventory structure under Scopes.FactionInventory:SHIPS, VEHICLES, STATIONS, CITIES, FACILITIES, PLANETS, ITEMS, NPCS, DROIDS, MATERIALS, CREATURES.Helper functions
The SDK provides four helper functions that return pre-built scope arrays for common scenarios:Common scope combinations
Login / authentication only
Login / authentication only
Character profile dashboard
Character profile dashboard
Messaging application
Messaging application
Fleet management tool
Fleet management tool
Faction administration tool
Faction administration tool
Read-only analytics or dashboard
Read-only analytics or dashboard
TypeScript type safety
The SDK exports anAllScopes type — a union of every valid scope literal — so TypeScript catches invalid scope strings at compile time: