serverapi

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package serverapi defines types that mirror the game server's JSON wire format.

These types are used exclusively for deserializing server responses and should change freely as the server evolves. Internal code should use the stable types defined in pkg/game/types.go instead.

Import direction: serverapi imports game (one-way). The game package imports serverapi only in client.go for parsing server responses.

Converter functions (e.g. PlayerToInternal) map external types to internal ones, filtering superfluous fields and normalizing data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbandonMissionResponse added in v0.2.0

type AbandonMissionResponse struct {
	Message   string `json:"message"`
	MissionID string `json:"mission_id"`
	Title     string `json:"title"`
}

AbandonMissionResponse — abandon_mission

type AboardPassenger added in v0.2.0

type AboardPassenger struct {
	CitizenID         string `json:"citizen_id"`
	Name              string `json:"name"`
	Bio               string `json:"bio"`
	Class             string `json:"class"`
	Destination       string `json:"destination"`
	DestinationName   string `json:"destination_name"`
	DestinationSystem string `json:"destination_system"`
	Fare              int    `json:"fare"`
	SpeedBonus        int    `json:"speed_bonus"`
	TicksRemaining    int    `json:"ticks_remaining"`
}

AboardPassenger is one passenger currently aboard the ship, as returned in the list_passengers "passengers" array. Unlike StationPassenger (a fare still waiting at a station) it carries the live fare-guarantee countdown: Fare is the base fare due on delivery, SpeedBonus the extra paid for prompt delivery (it decays toward 0 as TicksRemaining runs down), and TicksRemaining the ticks left before the guarantee expires. Destination/DestinationSystem locate the drop-off.

type AcceptMissionResponse added in v0.2.0

type AcceptMissionResponse struct {
	Message    string `json:"message"`
	MissionID  string `json:"mission_id"`
	Title      string `json:"title"`
	ExpiresAt  string `json:"expires_at,omitempty"`
	TemplateID string `json:"template_id,omitempty"`
	Type       string `json:"type,omitempty"`
}

AcceptMissionResponse wraps the response from accept_mission command.

type Achievement added in v0.2.0

type Achievement struct {
	ID          string               `json:"id"`
	Name        string               `json:"name"`
	Category    string               `json:"category"`
	Description string               `json:"description"`
	Points      int                  `json:"points"`
	Earned      bool                 `json:"earned"`
	Hidden      bool                 `json:"hidden"`
	EarnedAt    string               `json:"earned_at,omitempty"`
	ShareURL    string               `json:"share_url,omitempty"`
	Progress    *AchievementProgress `json:"progress,omitempty"`
}

Achievement is a single entry in a get_achievements response. Locked entries carry a Progress pointer (nil when the achievement has no measurable progress); hidden/secret entries report Name/Description as "???" until earned.

type AchievementDefinition added in v0.2.0

type AchievementDefinition struct {
	ID          string         `json:"id"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Category    string         `json:"category"`
	Points      int            `json:"points"`
	Criteria    string         `json:"criteria"`
	Title       string         `json:"title,omitempty"`
	Emblem      string         `json:"emblem,omitempty"`
	Series      string         `json:"series,omitempty"`
	After       string         `json:"after,omitempty"`
	Credits     int            `json:"credits,omitempty"`
	SkillXP     map[string]int `json:"skill_xp,omitempty"`
	Faction     bool           `json:"faction,omitempty"`
}

AchievementDefinition is one entry in the achievement *catalog*. It is a different shape from Achievement, which is the per-player progress view returned by get_achievements (earned/progress/share_url): a definition instead carries the reward and the unlock chain, and has no player-specific state.

The same shape covers player and faction achievements; Faction reports which it is. After names the achievement that must be earned first in a Series. Achievements gate prestige hulls — see ShipClass.RequiredAchievement.

type AchievementProgress added in v0.2.0

type AchievementProgress struct {
	Current int `json:"current"`
	Target  int `json:"target"`
}

AchievementProgress is the current/target counter for an unearned achievement.

type AchievementSummary added in v0.2.0

type AchievementSummary struct {
	Earned int `json:"earned"`
	Points int `json:"points"`
	Total  int `json:"total"`
}

AchievementSummary is the roll-up at the foot of a get_achievements response.

type ActionLogEntry added in v0.2.0

type ActionLogEntry struct {
	ID        int            `json:"id"`
	EventType string         `json:"event_type"`
	Category  string         `json:"category,omitempty"`
	Summary   string         `json:"summary,omitempty"`
	Data      map[string]any `json:"data,omitempty"`
	CreatedAt string         `json:"created_at,omitempty"`
}

ActionLogEntry represents a single entry in the action log.

type ActiveBattle added in v0.2.0

type ActiveBattle struct {
	BattleID     string                    `json:"battle_id"`
	Sides        []ActiveBattleSide        `json:"sides"`
	Participants []ActiveBattleParticipant `json:"participants"`
}

ActiveBattle is the compact in-progress-battle summary carried by the get_system response's active_battle field. It is distinct from the richer per-command battle types (BattleParticipant/BattleSide): here side_id is an integer and the field set is a lightweight overview of who is fighting in the system, not full combat telemetry.

type ActiveBattleParticipant added in v0.2.0

type ActiveBattleParticipant struct {
	// Kind is the v0.531.4 response discriminator: participant discriminator (spec: ActiveBattleParticipantInfo).
	Kind      string `json:"kind,omitempty"`
	PlayerID  string `json:"player_id"`
	Username  string `json:"username"`
	SideID    int    `json:"side_id"`
	FactionID string `json:"faction_id,omitempty"`
	IsNPC     bool   `json:"is_npc,omitempty"`
	ShipClass string `json:"ship_class,omitempty"`
}

ActiveBattleParticipant is one combatant in an ActiveBattle.

type ActiveBattleSide added in v0.2.0

type ActiveBattleSide struct {
	SideID      int    `json:"side_id"`
	PlayerCount int    `json:"player_count"`
	FactionID   string `json:"faction_id,omitempty"`
}

ActiveBattleSide is one team in an ActiveBattle.

type ActiveBuff added in v0.2.0

type ActiveBuff struct {
	ItemID    string `json:"item_id,omitempty"`
	Stat      string `json:"stat,omitempty"`
	Amount    int    `json:"amount,omitempty"`
	TicksLeft int    `json:"ticks_left,omitempty"`
	ExpiresAt int    `json:"expires_at,omitempty"`
}

ActiveBuff represents a temporary buff effect on a ship.

type ActiveMission added in v0.2.0

type ActiveMission struct {
	MissionID      string                   `json:"mission_id"`
	TemplateID     string                   `json:"template_id,omitempty"`
	Type           string                   `json:"type"`
	Title          string                   `json:"title"`
	Description    string                   `json:"description,omitempty"`
	Difficulty     int                      `json:"difficulty,omitempty"`
	Giver          MissionGiver             `json:"giver,omitempty"`
	IssuingBase    string                   `json:"issuing_base,omitempty"`
	AcceptedAt     string                   `json:"accepted_at,omitempty"`
	ExpiresInTicks int                      `json:"expires_in_ticks,omitempty"`
	Requirements   *MissionRequirements     `json:"requirements,omitempty"`
	Rewards        *MissionRewards          `json:"rewards,omitempty"`
	Objectives     []ActiveMissionObjective `json:"objectives,omitempty"`
	Progress       *ActiveMissionProgress   `json:"progress,omitempty"`
}

ActiveMission represents a mission the player has accepted.

type ActiveMissionObjective added in v0.2.0

type ActiveMissionObjective struct {
	Type           string `json:"type"`
	Description    string `json:"description"`
	Completed      bool   `json:"completed,omitempty"`
	Current        int    `json:"current,omitempty"`
	Required       int    `json:"required,omitempty"`
	ItemID         string `json:"item_id,omitempty"`
	ItemName       string `json:"item_name,omitempty"`
	SystemID       string `json:"system_id,omitempty"`
	SystemName     string `json:"system_name,omitempty"`
	TargetBase     string `json:"target_base,omitempty"`
	TargetBaseName string `json:"target_base_name,omitempty"`
	InCargo        int    `json:"in_cargo,omitempty"`
	InStorage      int    `json:"in_storage,omitempty"`
}

ActiveMissionObjective extends MissionObjective with progress tracking.

type ActiveMissionProgress added in v0.2.0

type ActiveMissionProgress struct {
	// PercentComplete is fractional on the wire (e.g. 33.333…); a float so the
	// decode doesn't fail.
	PercentComplete float64 `json:"percent_complete,omitempty"`
	ItemsDelivered  int     `json:"items_delivered,omitempty"`
	ItemsMined      int     `json:"items_mined,omitempty"`
	KillsAchieved   int     `json:"kills_achieved,omitempty"`
	SystemsVisited  int     `json:"systems_visited,omitempty"`
}

ActiveMissionProgress tracks overall mission progress.

type ActiveRaid added in v0.2.0

type ActiveRaid struct {
	BaseID        string `json:"base_id"`
	BaseName      string `json:"base_name"`
	OwnerID       string `json:"owner_id,omitempty"`
	OwnerName     string `json:"owner_name,omitempty"`
	CurrentHealth int    `json:"current_health"`
	MaxHealth     int    `json:"max_health"`
	DamagePerTick int    `json:"damage_per_tick,omitempty"`
	AttackerCount int    `json:"attacker_count,omitempty"`
	IsAttacker    bool   `json:"is_attacker,omitempty"`
}

ActiveRaid represents an ongoing base raid.

type AnalyzeMarketResponse

type AnalyzeMarketResponse struct {
	Insights   []MarketInsight `json:"insights"`
	SkillLevel int             `json:"skill_level"`
	Station    string          `json:"station,omitempty"`
	Message    string          `json:"message,omitempty"`
}

AnalyzeMarketResponse wraps the response from analyze_market command.

type AttackBaseResponse added in v0.2.0

type AttackBaseResponse struct {
	BaseID        string `json:"base_id"`
	BaseName      string `json:"base_name"`
	CurrentHealth int    `json:"current_health"`
	MaxHealth     int    `json:"max_health"`
	Message       string `json:"message"`
}

AttackBaseResponse wraps the response from attack_base command.

type AttackResponse added in v0.2.0

type AttackResponse struct {
	// Kind is the v0.531.4 response discriminator: npc|player.
	Kind    string `json:"kind,omitempty"`
	Command string `json:"command,omitempty"`
	Message string `json:"message"`
	Pending bool   `json:"pending,omitempty"`
}

AttackResponse — attack (ack frame)

type AutoListedOrder added in v0.2.0

type AutoListedOrder struct {
	OrderID    string `json:"order_id,omitempty"`
	Quantity   int    `json:"quantity,omitempty"`
	PriceEach  int    `json:"price_each,omitempty"`
	ListingFee int    `json:"listing_fee,omitempty"`
	Escrow     int    `json:"escrow,omitempty"`
}

AutoListedOrder represents an automatically created sell order from a buy.

type Base

type Base struct {
	ID                string          `json:"id"`
	Name              string          `json:"name"`
	Description       string          `json:"description,omitempty"`
	Type              string          `json:"type"`
	OwnerID           string          `json:"owner_id"`
	OwnerName         string          `json:"owner_name,omitempty"`
	FactionID         string          `json:"faction_id,omitempty"`
	Empire            string          `json:"empire,omitempty"`
	POIID             string          `json:"poi_id"`
	SystemID          string          `json:"system_id"`
	Services          map[string]bool `json:"services"`
	PublicAccess      bool            `json:"public_access"`
	DefenseLevel      int             `json:"defense_level"`
	HasDrones         bool            `json:"has_drones,omitempty"`
	Health            int             `json:"health,omitempty"`
	MaxHealth         int             `json:"max_health,omitempty"`
	Facilities        []string        `json:"facilities,omitempty"`
	PirateRepRequired int             `json:"pirate_rep_required,omitempty"`
	// AutoBuyFuel reports whether a player station automatically buys fuel
	// from docked pilots at live scarcity-based prices. Off by default.
	AutoBuyFuel bool `json:"auto_buy_fuel,omitempty"`
}

Base represents a player-owned or NPC base.

type BaseDestroyed

type BaseDestroyed struct {
	BaseID    string `json:"base_id"`
	BaseName  string `json:"base_name"`
	OwnerID   string `json:"owner_id"`
	OwnerName string `json:"owner_name"`
	WreckID   string `json:"wreck_id"`
	Message   string `json:"message"`
}

BaseDestroyed is sent when a base is destroyed. Server event type: base_destroyed

type BaseRaidUpdate

type BaseRaidUpdate struct {
	BaseID        string `json:"base_id"`
	BaseName      string `json:"base_name"`
	CurrentHealth int    `json:"current_health"`
	MaxHealth     int    `json:"max_health"`
	DamagePerTick int    `json:"damage_per_tick"`
	AttackerCount int    `json:"attacker_count"`
	Message       string `json:"message"`
}

BaseRaidUpdate is sent during a base raid. Server event type: base_raid_update

type BattleAlertParticipant added in v0.2.0

type BattleAlertParticipant struct {
	PlayerID  string `json:"player_id"`
	Username  string `json:"username"`
	ShipClass string `json:"ship_class"`
	ShipName  string `json:"ship_name,omitempty"`
	SideID    int    `json:"side_id"`
	Stance    string `json:"stance,omitempty"`
	Zone      string `json:"zone,omitempty"`
}

BattleAlertParticipant is a slimmer form of BattleParticipant used in battle_alert push events. The alert only carries identity fields (no hp/damage/kill counts); side_id is an integer here, unlike the string-typed SideID on BattleParticipant.

type BattleAlertResponse added in v0.2.0

type BattleAlertResponse struct {
	BattleID     string                   `json:"battle_id"`
	SystemID     string                   `json:"system_id,omitempty"`
	Message      string                   `json:"message,omitempty"`
	Participants []BattleAlertParticipant `json:"participants,omitempty"`
	Sides        []BattleAlertSide        `json:"sides,omitempty"`
}

BattleAlertResponse wraps the payload of a battle_alert push event — broadcast to clients in the same system when a battle begins. It is informational; no action required from the receiver.

type BattleAlertSide added in v0.2.0

type BattleAlertSide struct {
	SideID      int    `json:"side_id"`
	FactionID   string `json:"faction_id,omitempty"`
	PlayerCount int    `json:"player_count"`
}

BattleAlertSide mirrors BattleSide but uses an integer side_id to match the battle_alert payload shape.

type BattleDamage added in v0.2.0

type BattleDamage struct {
	Tick         int64    `json:"tick,omitempty"`
	AttackerID   string   `json:"attacker_id"`
	AttackerName string   `json:"attacker_name,omitempty"`
	TargetID     string   `json:"target_id"`
	TargetName   string   `json:"target_name,omitempty"`
	DamageType   string   `json:"damage_type,omitempty"`
	HitSuccess   bool     `json:"hit_success"`
	HullHit      float64  `json:"hull_hit"`
	ShieldHit    float64  `json:"shield_hit"`
	TotalDamage  float64  `json:"total_damage"`
	WeaponsFired []string `json:"weapons_fired,omitempty"`
	// XPGained maps skill_id -> xp earned from this hit (e.g. gunnery).
	// Consistent with the map[string]int xp_gained shape used elsewhere.
	XPGained map[string]int `json:"xp_gained,omitempty"`
}

BattleDamage is a single weapon-hit telemetry event during a battle. Server event type: battle_damage

type BattleEnded added in v0.2.0

type BattleEnded struct {
	BattleID       string                   `json:"battle_id"`
	Duration       int                      `json:"duration,omitempty"`
	Reason         string                   `json:"reason,omitempty"`
	WinningSide    int                      `json:"winning_side"`
	ShipsDestroyed int                      `json:"ships_destroyed,omitempty"`
	TotalDamage    float64                  `json:"total_damage,omitempty"`
	Participants   []BattleEndedParticipant `json:"participants,omitempty"`
}

BattleEnded is broadcast when a tactical battle the player was part of concludes. WinningSide is -1 for a stalemate. Server event type: battle_ended

type BattleEndedParticipant added in v0.2.0

type BattleEndedParticipant struct {
	PlayerID    string  `json:"player_id"`
	Username    string  `json:"username"`
	SideID      int     `json:"side_id"`
	DamageDealt float64 `json:"damage_dealt"`
	DamageTaken float64 `json:"damage_taken"`
	KillCount   int     `json:"kill_count"`
	Survived    bool    `json:"survived"`
}

BattleEndedParticipant is a participant entry in a battle_ended push, carrying that combatant's per-battle tally. Identity-only otherwise (no ship_class / live hull-shield).

type BattleParticipant added in v0.2.0

type BattleParticipant struct {
	// Kind is the v0.531.4 response discriminator: participant discriminator (spec: ParticipantSnapshot).
	Kind        string `json:"kind,omitempty"`
	PlayerID    string `json:"player_id"`
	Username    string `json:"username"`
	ShipClass   string `json:"ship_class"`
	SideID      string `json:"side_id"`
	Stance      string `json:"stance"`
	TargetID    string `json:"target_id,omitempty"`
	HullPct     int    `json:"hull_pct"`
	ShieldPct   int    `json:"shield_pct"`
	DamageDealt int    `json:"damage_dealt"`
	DamageTaken int    `json:"damage_taken"`
	KillCount   int    `json:"kill_count"`
	AutoPilot   bool   `json:"auto_pilot"`
	Zone        string `json:"zone,omitempty"`
}

BattleParticipant represents a player or NPC in a battle.

type BattleResponse

type BattleResponse struct {
	Action   string `json:"action"`
	BattleID string `json:"battle_id,omitempty"`
	Message  string `json:"message"`
	Stance   string `json:"stance,omitempty"`
	TargetID string `json:"target_id,omitempty"`
}

BattleResponse wraps the response from battle command actions.

type BattleSide added in v0.2.0

type BattleSide struct {
	SideID      string `json:"side_id"`
	FactionID   string `json:"faction_id,omitempty"`
	FactionName string `json:"faction_name,omitempty"`
	FactionTag  string `json:"faction_tag,omitempty"`
	PlayerCount int    `json:"player_count"`
}

BattleSide represents a side in a battle.

type BattleStarted added in v0.2.0

type BattleStarted struct {
	BattleID     string                   `json:"battle_id"`
	SystemID     string                   `json:"system_id,omitempty"`
	Message      string                   `json:"message,omitempty"`
	Participants []BattleAlertParticipant `json:"participants,omitempty"`
	Sides        []BattleAlertSide        `json:"sides,omitempty"`
}

BattleStarted is broadcast when a tactical battle the player is part of begins. Its participant/side shapes match the battle_alert push: integer side_id and identity-only participants (no live hull/shield). Server event type: battle_started

type BattleUpdate added in v0.2.0

type BattleUpdate struct {
	BattleID     string                    `json:"battle_id"`
	Tick         int64                     `json:"tick,omitempty"`
	AutoPilot    bool                      `json:"auto_pilot,omitempty"`
	Participants []BattleUpdateParticipant `json:"participants,omitempty"`
	Sides        []BattleAlertSide         `json:"sides,omitempty"`
	YourSideID   int                       `json:"your_side_id,omitempty"`
	YourStance   string                    `json:"your_stance,omitempty"`
	YourTargetID string                    `json:"your_target_id,omitempty"`
	YourZone     string                    `json:"your_zone,omitempty"`
}

BattleUpdate is a periodic authoritative snapshot of a battle the player is participating in, including the player's own side, stance, target and zone. Server event type: battle_update

type BattleUpdateParticipant added in v0.2.0

type BattleUpdateParticipant struct {
	PlayerID  string `json:"player_id"`
	Username  string `json:"username"`
	ShipClass string `json:"ship_class"`
	SideID    int    `json:"side_id"`
	Stance    string `json:"stance,omitempty"`
	Zone      string `json:"zone,omitempty"`
	HullPct   int    `json:"hull_pct"`
	ShieldPct int    `json:"shield_pct"`
}

BattleUpdateParticipant is a participant entry in a battle_update push. Unlike BattleParticipant it carries an integer side_id and reports live hull/shield as percentages rather than absolute values.

type BrowseForSaleResponse added in v0.2.0

type BrowseForSaleResponse struct {
	Action   string                   `json:"action"`
	BaseID   string                   `json:"base_id"`
	BaseName string                   `json:"base_name"`
	Count    int                      `json:"count"`
	Listings []FacilityForSaleListing `json:"listings"`
}

BrowseForSaleResponse wraps the response from facility(action="browse_for_sale"). Returns the facility listings available at the current station.

type BrowseShipsResponse

type BrowseShipsResponse struct {
	Action   string              `json:"action,omitempty"`
	BaseID   string              `json:"base_id,omitempty"`
	BaseName string              `json:"base_name,omitempty"`
	Listings []ShipListingDetail `json:"listings"`
	Count    int                 `json:"count,omitempty"`
}

BrowseShipsResponse wraps the response from browse_ships command.

type BuildBaseResponse added in v0.2.0

type BuildBaseResponse struct {
	BaseID       string         `json:"base_id"`
	Name         string         `json:"name"`
	Type         string         `json:"type,omitempty"`
	POIID        string         `json:"poi_id"`
	SystemID     string         `json:"system_id"`
	CreditsSpent int            `json:"credits_spent,omitempty"`
	ItemsUsed    map[string]int `json:"items_used,omitempty"`
	DefenseLevel int            `json:"defense_level,omitempty"`
	Message      string         `json:"message,omitempty"`

	// Documented by openapi but previously unmodelled.
	FeePaid      int    `json:"fee_paid"`
	PublicAccess bool   `json:"public_access"`
	Hint         string `json:"hint,omitempty"`
}

BuildBaseResponse wraps the response from build_base command. Shared by build_base (found a faction station) and build_outpost (deploy a members-only outpost) — both return this same shape.

NOTE: openapi declares only base_id/name/poi_id/system_id/fee_paid/ public_access/hint (additionalProperties:false), i.e. it does NOT list Type/CreditsSpent/ItemsUsed/DefenseLevel/Message. Those predate the spec entry and there is no live sample in data/game-api/latest/ to adjudicate, so they are kept rather than deleted: an extra field that never arrives is merely zero, whereas deleting one the server still sends loses data silently. (The spec has been wrong before — see ShipClass.build_materials.) Confirm against a live build_base/build_outpost response and prune whichever set is dead.

type BuyInsuranceResponse added in v0.2.0

type BuyInsuranceResponse struct {
	PolicyID         string            `json:"policy_id"`
	Coverage         int               `json:"coverage"`
	Premium          int               `json:"premium"`
	ExpiresAt        string            `json:"expires_at"`
	RemainingCredits int               `json:"remaining_credits"`
	Message          string            `json:"message"`
	Factors          []InsuranceFactor `json:"factors,omitempty"`
	RiskScore        float64           `json:"risk_score,omitempty"`
}

BuyInsuranceResponse wraps the response from buy_insurance command.

type BuyListedShipResponse added in v0.2.0

type BuyListedShipResponse struct {
	Message     string `json:"message"`
	ShipID      string `json:"ship_id"`
	ClassID     string `json:"class_id"`
	Price       int    `json:"price"`
	CreditsLeft int    `json:"credits_left"`
	OldShipID   string `json:"old_ship_id,omitempty"`
}

BuyListedShipResponse wraps the response from buy_listed_ship command.

type BuyResponse added in v0.2.0

type BuyResponse struct {
	Action             string           `json:"action"`
	Item               string           `json:"item"`
	ItemID             string           `json:"item_id"`
	Quantity           int              `json:"quantity"`
	TotalCost          int              `json:"total_cost"`
	Fills              []OrderFill      `json:"fills"`
	LevelUp            bool             `json:"level_up"`
	AutoListed         *AutoListedOrder `json:"auto_listed,omitempty"`
	DeliveredToCargo   int              `json:"delivered_to_cargo,omitempty"`
	DeliveredToStorage int              `json:"delivered_to_storage,omitempty"`
	Message            string           `json:"message,omitempty"`
	Unfilled           int              `json:"unfilled,omitempty"`
	XPGained           int              `json:"xp_gained,omitempty"`
}

BuyResponse wraps the response from buy command.

type BuyShipResponse added in v0.2.0

type BuyShipResponse struct {
	Message     string `json:"message"`
	NewShipID   string `json:"new_ship_id"`
	OldShipID   string `json:"old_ship_id"`
	ShipClass   string `json:"ship_class"`
	CreditsLeft int    `json:"credits_left"`
}

BuyShipResponse wraps the response from buy_ship command.

type CancelCommissionResponse added in v0.2.0

type CancelCommissionResponse struct {
	Message           string          `json:"message"`
	CreditsTotal      int64           `json:"credits_total,omitempty"`
	MaterialsNote     string          `json:"materials_note,omitempty"`
	MaterialsReturned json.RawMessage `json:"materials_returned,omitempty"`
	Refund            int64           `json:"refund,omitempty"`
}

CancelCommissionResponse — cancel_commission

type CancelOrderResponse added in v0.2.0

type CancelOrderResponse struct {
	// Kind is the v0.531.4 response discriminator: single.
	Kind            string     `json:"kind,omitempty"`
	Action          string     `json:"action"`
	OrderID         string     `json:"order_id"`
	Message         string     `json:"message"`
	DeliveredTo     string     `json:"delivered_to,omitempty"`
	FactionOrder    bool       `json:"faction_order,omitempty"`
	ReturnedCredits int        `json:"returned_credits,omitempty"`
	ReturnedItems   *TradeItem `json:"returned_items,omitempty"`
	Mode            string     `json:"mode,omitempty"`
	Results         []any      `json:"results,omitempty"`
	Summary         any        `json:"summary,omitempty"`
}

CancelOrderResponse wraps the response from cancel_order command.

type CancelShipBuyOrderResponse added in v0.2.0

type CancelShipBuyOrderResponse struct {
	OrderID     string `json:"order_id"`
	Refund      int    `json:"refund"`
	CreditsLeft int    `json:"credits_left"`
	Message     string `json:"message"`
}

CancelShipBuyOrderResponse is returned by cancel_ship_buy_order.

  • cancel_ship_buy_order

type CancelShipListingResponse added in v0.2.0

type CancelShipListingResponse struct {
	ClassID string `json:"class_id"`
	Message string `json:"message"`
	ShipID  string `json:"ship_id"`
}

CancelShipListingResponse — cancel_ship_listing

type CaptainsLogAddResponse added in v0.2.0

type CaptainsLogAddResponse struct {
	Message   string `json:"message"`
	CreatedAt string `json:"created_at"`
	Index     int    `json:"index"`
}

CaptainsLogAddResponse — captains_log_add

type CaptainsLogDeleteResponse added in v0.2.0

type CaptainsLogDeleteResponse struct {
	Index          int    `json:"index"`
	Message        string `json:"message"`
	RemainingCount int    `json:"remaining_count"`
}

CaptainsLogDeleteResponse is returned by captains_log_delete.

  • captains_log_delete

type CaptainsLogEntry

type CaptainsLogEntry struct {
	Index     int    `json:"index"`
	Entry     string `json:"entry"`
	CreatedAt string `json:"created_at"`
}

CaptainsLogEntry represents an entry in the captain's log.

type CaptainsLogGetResponse added in v0.2.0

type CaptainsLogGetResponse struct {
	Entry     string `json:"entry"`
	CreatedAt string `json:"created_at"`
	Index     int    `json:"index"`
}

CaptainsLogGetResponse — captains_log_get

type CaptainsLogListResponse added in v0.2.0

type CaptainsLogListResponse struct {
	Entry      json.RawMessage `json:"entry,omitempty"`
	HasNext    bool            `json:"has_next"`
	HasPrev    bool            `json:"has_prev"`
	Index      int             `json:"index"`
	MaxEntries int             `json:"max_entries"`
	TotalCount int             `json:"total_count"`
}

CaptainsLogListResponse — captains_log_list

type CargoItem

type CargoItem struct {
	ItemID   string  `json:"item_id"`
	Name     string  `json:"name,omitempty"`
	Quantity float64 `json:"quantity"`
	Size     int     `json:"size,omitempty"`
}

CargoItem represents an item in cargo. Used by both events and entity types.

type CarrierCapacity added in v0.2.0

type CarrierCapacity struct {
	ActiveContracts             int   `json:"active_contracts"`
	ActiveContractsUnlimited    bool  `json:"active_contracts_unlimited"`
	ActiveLiability             int64 `json:"active_liability"`
	LiabilityUnlimited          bool  `json:"liability_unlimited"`
	ActiveContractLimit         int   `json:"active_contract_limit,omitempty"`
	AggregateLiabilityLimit     int64 `json:"aggregate_liability_limit,omitempty"`
	RemainingAggregateLiability int64 `json:"remaining_aggregate_liability,omitempty"`
	SinglePackageLiabilityLimit int64 `json:"single_package_liability_limit,omitempty"`
}

CarrierCapacity is the actor's concurrent-contract and liability headroom.

type CarrierProfile added in v0.2.0

type CarrierProfile struct {
	Actor                *ShipmentActor `json:"actor"`
	Tier                 string         `json:"tier"`
	SuccessfulDeliveries int            `json:"successful_deliveries"`
	DeliveredValue       int64          `json:"delivered_value"`
	PriorityDeliveries   int            `json:"priority_deliveries"`
	Returns              int            `json:"returns"`
	Breaches             int            `json:"breaches"`
	Defaults             int            `json:"defaults"`
	ActiveContracts      int            `json:"active_contracts"`
	ActiveLiability      int64          `json:"active_liability"`
	OutstandingDebt      int64          `json:"outstanding_debt"`
	UpdatedAt            string         `json:"updated_at"`
	LastConsequenceAt    string         `json:"last_consequence_at,omitempty"`
	LastRecoveryAt       string         `json:"last_recovery_at,omitempty"`
}

CarrierProfile is global carrier standing for an actor.

type CarrierTierProgress added in v0.2.0

type CarrierTierProgress struct {
	CurrentTier                   string `json:"current_tier"`
	NextTier                      string `json:"next_tier,omitempty"`
	AtMaximumTier                 bool   `json:"at_maximum_tier"`
	SuccessfulDeliveries          int    `json:"successful_deliveries"`
	RequiredSuccessfulDeliveries  int    `json:"required_successful_deliveries"`
	RemainingSuccessfulDeliveries int    `json:"remaining_successful_deliveries"`
	DeliveredValue                int64  `json:"delivered_value"`
	RequiredDeliveredValue        int64  `json:"required_delivered_value"`
	RemainingDeliveredValue       int64  `json:"remaining_delivered_value"`
}

CarrierTierProgress is progress toward the next carrier tier.

type CatalogItem

type CatalogItem struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Category    string `json:"category,omitempty"`
	Rarity      string `json:"rarity,omitempty"`
	Size        int    `json:"size,omitempty"`
	BaseValue   int    `json:"base_value,omitempty"`
	Stackable   bool   `json:"stackable,omitempty"`
	Tradeable   bool   `json:"tradeable,omitempty"`
}

CatalogItem represents an item from the catalog API.

type CatalogResponse

type CatalogResponse struct {
	Type                 string          `json:"type"`
	Items                []CatalogItem   `json:"items"`
	Total                int             `json:"total"`
	Page                 int             `json:"page"`
	PageSize             int             `json:"page_size"`
	TotalPages           int             `json:"total_pages"`
	Message              string          `json:"message"`
	Analysis             json.RawMessage `json:"analysis,omitempty"`
	PassiveRecipeDetails json.RawMessage `json:"passive_recipe_details,omitempty"`
	Recipes              json.RawMessage `json:"recipes,omitempty"`

	// Achievement catalog (server v0.495.1). The Hidden*Count fields report how
	// many achievements exist but are withheld from the listing — the catalog
	// deliberately does not enumerate them.
	Achievements                  []AchievementDefinition `json:"achievements,omitempty"`
	FactionAchievements           []AchievementDefinition `json:"faction_achievements,omitempty"`
	HiddenAchievementCount        int                     `json:"hidden_achievement_count,omitempty"`
	HiddenFactionAchievementCount int                     `json:"hidden_faction_achievement_count,omitempty"`
}

CatalogResponse wraps the response from catalog command.

type ChangelogVersion added in v0.2.0

type ChangelogVersion struct {
	Version     string   `json:"version"`
	ReleaseDate string   `json:"release_date"`
	Notes       []string `json:"notes"`
}

ChangelogVersion represents a version entry in the changelog.

type ChatHistoryResponse

type ChatHistoryResponse struct {
	Action     string        `json:"action,omitempty"`
	Messages   []ChatMessage `json:"messages"`
	Channel    string        `json:"channel"`
	TotalCount int           `json:"total_count,omitempty"`
	HasMore    bool          `json:"has_more,omitempty"`
}

ChatHistoryResponse wraps the response from get_chat_history command.

type ChatMessage

type ChatMessage struct {
	ID         string `json:"id"`
	Channel    string `json:"channel"`
	SenderID   string `json:"sender_id"`
	Sender     string `json:"sender"`
	Content    string `json:"content"`
	TargetID   string `json:"target_id,omitempty"`
	TargetName string `json:"target_name,omitempty"`
	SystemID   string `json:"system_id,omitempty"`
	POIID      string `json:"poi_id,omitempty"`
	// EmpireOfficial is true when the message was delivered through the
	// verified empire-leadership pipeline or from an empire NPC (police,
	// customs, jail authority, salvage authority, Sinter). When set,
	// SenderID is the empire's own ID (solarian / voidborn / crimson /
	// nebula / outerrim). Use it to detect player impersonation of empire
	// officials. (server v0.294.0+)
	EmpireOfficial bool   `json:"empire_official,omitempty"`
	TimestampUTC   string `json:"timestamp_utc"`
	Timestamp      string `json:"timestamp,omitempty"`
}

ChatMessage represents a chat message.

Scope fields (server v0.273.0+): the system channel sets SystemID; the local channel sets both SystemID and POIID. Older servers and other channels leave these empty — callers should fall back to TargetID for system filtering.

type ChatResponse added in v0.2.0

type ChatResponse struct {
	Action  string `json:"action"`
	Warning string `json:"warning"`
	Channel string `json:"channel,omitempty"`
}

ChatResponse wraps the response from the chat command.

type CitizenshipResponse added in v0.2.0

type CitizenshipResponse struct {
	Citizenship      json.RawMessage `json:"citizenship,omitempty"`
	Citizenships     json.RawMessage `json:"citizenships,omitempty"`
	EmpireID         string          `json:"empire_id,omitempty"`
	Empires          json.RawMessage `json:"empires,omitempty"`
	FeePaid          int64           `json:"fee_paid,omitempty"`
	FeeRefunded      int64           `json:"fee_refunded,omitempty"`
	Message          string          `json:"message,omitempty"`
	Origin           string          `json:"origin,omitempty"`
	PendingPetitions json.RawMessage `json:"pending_petitions,omitempty"`
	Petition         json.RawMessage `json:"petition,omitempty"`
	PetitionID       string          `json:"petition_id,omitempty"`
	RecentDecisions  json.RawMessage `json:"recent_decisions,omitempty"`
	Renounced        json.RawMessage `json:"renounced,omitempty"`
	Rules            json.RawMessage `json:"rules,omitempty"`
	Status           string          `json:"status,omitempty"`
}

CitizenshipResponse is returned by the citizenship action, which handles petitioning for, granting, renouncing, and querying empire citizenship. Field presence varies by the citizenship sub-action requested.

  • citizenship

type ClaimInsuranceResponse

type ClaimInsuranceResponse struct {
	Action   string            `json:"action,omitempty"`
	Message  string            `json:"message"`
	Policies []InsurancePolicy `json:"policies"`
}

ClaimInsuranceResponse wraps the response from claim_insurance command.

type CloakResponse added in v0.2.0

type CloakResponse struct {
	Enabled       bool   `json:"enabled"`
	CloakStrength int    `json:"cloak_strength"`
	Message       string `json:"message"`
}

CloakResponse wraps the response from cloak command.

type CombatLogEntry added in v0.2.0

type CombatLogEntry struct {
	Tick       int64   `json:"tick,omitempty"`
	Attacker   string  `json:"attacker,omitempty"`
	Target     string  `json:"target,omitempty"`
	Damage     float64 `json:"damage,omitempty"`
	DamageType string  `json:"damage_type,omitempty"`
	Destroyed  bool    `json:"destroyed,omitempty"`
}

CombatLogEntry represents an entry in a combat log.

type CombatUpdate

type CombatUpdate struct {
	Tick       int64   `json:"tick"`
	Attacker   string  `json:"attacker"`
	Target     string  `json:"target"`
	Damage     float64 `json:"damage"`
	DamageType string  `json:"damage_type"`
	ShieldHit  float64 `json:"shield_hit"`
	HullHit    float64 `json:"hull_hit"`
	Destroyed  bool    `json:"destroyed"`
}

CombatUpdate represents a combat event (player vs player or player vs pirate). Server event type: combat_update

type CommissionDetail added in v0.2.0

type CommissionDetail struct {
	CommissionID         string         `json:"commission_id"`
	ShipClassID          string         `json:"ship_class_id"`
	ShipName             string         `json:"ship_name,omitempty"`
	Status               string         `json:"status"`
	BaseID               string         `json:"base_id,omitempty"`
	BaseName             string         `json:"base_name,omitempty"`
	CreditsPaid          int            `json:"credits_paid"`
	EarmarkedCredits     int            `json:"earmarked_credits,omitempty"`
	MaterialCostEstimate int            `json:"material_cost_estimate,omitempty"`
	MaterialsProvided    bool           `json:"materials_provided,omitempty"`
	RequiredMaterials    map[string]int `json:"required_materials,omitempty"`
	MaterialsGathered    map[string]int `json:"materials_gathered,omitempty"`
	BuildStartTick       int64          `json:"build_start_tick,omitempty"`
	BuildCompleteTick    int64          `json:"build_complete_tick,omitempty"`
	TicksRemaining       int            `json:"ticks_remaining,omitempty"`
	BuiltShipID          string         `json:"built_ship_id,omitempty"`
	CreatedAt            string         `json:"created_at,omitempty"`
}

CommissionDetail represents an active ship commission.

type CommissionQuoteResponse

type CommissionQuoteResponse struct {
	Message                   string      `json:"message"`
	ShipClass                 string      `json:"ship_class"`
	ShipName                  string      `json:"ship_name,omitempty"`
	CanCommission             bool        `json:"can_commission"`
	CreditsOnlyTotal          int         `json:"credits_only_total"`
	ProvideMaterialsTotal     int         `json:"provide_materials_total"`
	CreditsOnlyAvailable      bool        `json:"credits_only_available"`
	CanAffordCreditsOnly      bool        `json:"can_afford_credits_only"`
	CanAffordProvideMaterials bool        `json:"can_afford_provide_materials"`
	Blockers                  []string    `json:"blockers,omitempty"`
	BuildMaterials            []CargoItem `json:"build_materials,omitempty"`
	BuildTime                 int         `json:"build_time,omitempty"`
	LaborCost                 int         `json:"labor_cost,omitempty"`
	MaterialCost              int         `json:"material_cost,omitempty"`
	PlayerCredits             int         `json:"player_credits,omitempty"`
	ShipyardTierHere          int         `json:"shipyard_tier_here,omitempty"`
	ShipyardTierRequired      int         `json:"shipyard_tier_required,omitempty"`
}

CommissionQuoteResponse wraps the response from commission_quote command.

type CommissionShipResponse added in v0.2.0

type CommissionShipResponse struct {
	Message      string `json:"message"`
	CommissionID string `json:"commission_id"`
	ShipClass    string `json:"ship_class"`
	ShipName     string `json:"ship_name,omitempty"`
	Status       string `json:"status"`
	CreditsPaid  int    `json:"credits_paid"`
	CreditsLeft  int    `json:"credits_left"`
	BuildTime    int    `json:"build_time,omitempty"`
	LaborCost    int    `json:"labor_cost,omitempty"`
	MaterialCost int    `json:"material_cost,omitempty"`
}

CommissionShipResponse wraps the response from commission_ship command.

type CommissionStatusResponse

type CommissionStatusResponse struct {
	Commissions []CommissionDetail `json:"commissions"`
	Count       int                `json:"count"`
}

CommissionStatusResponse wraps the response from commission_status command.

type CompleteMissionResponse added in v0.2.0

type CompleteMissionResponse struct {
	Message              string          `json:"message"`
	MissionID            string          `json:"mission_id"`
	Title                string          `json:"title"`
	ChainNext            string          `json:"chain_next,omitempty"`
	CreditsEarned        int64           `json:"credits_earned,omitempty"`
	ItemsReceived        json.RawMessage `json:"items_received,omitempty"`
	SkillXPGained        json.RawMessage `json:"skill_xp_gained,omitempty"`
	CommunityContributed json.RawMessage `json:"community_contributed,omitempty"`
	CommunityProgress    json.RawMessage `json:"community_progress,omitempty"`
	CommunityPercent     float64         `json:"community_percent,omitempty"`
}

CompleteMissionResponse is returned by complete_mission. The server sends reward fields at the top level (not nested under "rewards").

  • complete_mission

type CompletedMissionsResponse added in v0.2.0

type CompletedMissionsResponse struct {
	Missions   json.RawMessage `json:"missions,omitempty"`
	TotalCount int             `json:"total_count"`
}

CompletedMissionsResponse is returned by completed_missions.

  • completed_missions

type ConnectionInfo

type ConnectionInfo struct {
	SystemID string `json:"system_id"`
	Name     string `json:"name"`
	Distance int    `json:"distance"`
}

ConnectionInfo represents a connection from one system to another.

type CraftBulkResponse added in v0.2.0

type CraftBulkResponse struct {
	Action  string            `json:"action"`
	Mode    string            `json:"mode"`
	Results []CraftBulkResult `json:"results"`
	Summary CraftBulkSummary  `json:"summary"`
}

CraftBulkResponse is the response when submitting multiple craft jobs in one request. Corresponds to the third oneOf variant of CraftJobResponse in the openapi spec.

type CraftBulkResult added in v0.2.0

type CraftBulkResult struct {
	Index     int    `json:"index"`
	Success   bool   `json:"success"`
	JobID     string `json:"job_id,omitempty"`
	Recipe    string `json:"recipe,omitempty"`
	Runs      int    `json:"runs,omitempty"`
	Venue     string `json:"venue,omitempty"`
	Message   string `json:"message,omitempty"`
	Error     string `json:"error,omitempty"`
	ErrorCode string `json:"error_code,omitempty"`
}

CraftBulkResult is the outcome of a single job in a bulk craft request.

type CraftBulkSummary added in v0.2.0

type CraftBulkSummary struct {
	Total     int `json:"total"`
	Succeeded int `json:"succeeded"`
	Failed    int `json:"failed"`
}

CraftBulkSummary summarises the outcomes of a bulk craft request.

type CraftDryRunResponse added in v0.2.0

type CraftDryRunResponse struct {
	Action              string          `json:"action"`
	DryRun              bool            `json:"dry_run"`
	Recipe              string          `json:"recipe"`
	Mode                string          `json:"mode"`
	Quantity            int             `json:"quantity"`
	Runs                int             `json:"runs"`
	Venue               string          `json:"venue"`
	VenueType           string          `json:"venue_type"`
	FacilityID          string          `json:"facility_id"`
	Cost                EscrowCost      `json:"cost"`
	CreditsTotal        int             `json:"credits_total"`
	HaveInputs          bool            `json:"have_inputs"`
	HaveCredits         bool            `json:"have_credits"`
	EffectiveTimePerRun float64         `json:"effective_time_per_run"`
	EstCompletionTick   int             `json:"est_completion_tick"`
	Message             string          `json:"message"`
	Produces            []CraftProduces `json:"produces,omitempty"`
	External            bool            `json:"external,omitempty"`
}

CraftDryRunResponse is the response for a dry-run (quote) craft request. Corresponds to the fourth oneOf variant of CraftJobResponse in the openapi spec.

type CraftJobEntry added in v0.2.0

type CraftJobEntry struct {
	JobID         string          `json:"job_id"`
	Recipe        string          `json:"recipe"`
	Mode          string          `json:"mode"`
	RunsTotal     int             `json:"runs_total"`
	RunsDone      int             `json:"runs_done"`
	RunsRemaining int             `json:"runs_remaining"`
	Progress      float64         `json:"progress"`
	ETATicks      int             `json:"eta_ticks"`
	Position      int             `json:"position"`
	Orderer       string          `json:"orderer"`
	Status        string          `json:"status"`
	FacilityID    string          `json:"facility_id"`
	External      bool            `json:"external,omitempty"`
	Venue         string          `json:"venue,omitempty"`
	Produces      []CraftProduces `json:"produces,omitempty"`
}

CraftJobEntry is a single job returned in a queue listing.

type CraftJobQueued added in v0.2.0

type CraftJobQueued struct {
	// Kind is the v0.531.4 response discriminator: job|queue|quote|package|bulk_craft|cancel|bulk_cancel (RecycleResponse aliases this struct, so recycle is covered too).
	Kind                string          `json:"kind,omitempty"`
	Action              string          `json:"action"`
	JobID               string          `json:"job_id"`
	Recipe              string          `json:"recipe"`
	Mode                string          `json:"mode"`
	Venue               string          `json:"venue"`
	VenueType           string          `json:"venue_type"`
	FacilityID          string          `json:"facility_id"`
	Runs                int             `json:"runs"`
	EffectiveTimePerRun float64         `json:"effective_time_per_run"`
	EstCompletionTick   int             `json:"est_completion_tick"`
	Escrowed            EscrowCost      `json:"escrowed"`
	Message             string          `json:"message"`
	Produces            []CraftProduces `json:"produces,omitempty"`
	External            bool            `json:"external,omitempty"`
}

CraftJobQueued is the response when a single craft (or recycle) job is accepted and queued. Corresponds to the first oneOf variant of CraftJobResponse in the openapi spec.

type CraftOutput added in v0.2.0

type CraftOutput struct {
	ItemID        string `json:"item_id"`
	Name          string `json:"name"`
	Quantity      int    `json:"quantity"`
	BonusQuantity int    `json:"bonus_quantity,omitempty"`
}

CraftOutput represents one output item from crafting.

type CraftProduces added in v0.2.0

type CraftProduces struct {
	ItemID   string `json:"item_id"`
	Name     string `json:"name"`
	Quantity int    `json:"quantity"`
}

CraftProduces is a single output item listed on a queued or dry-run craft job.

type CraftQueueListing added in v0.2.0

type CraftQueueListing struct {
	Action string          `json:"action"`
	Jobs   []CraftJobEntry `json:"jobs"`
}

CraftQueueListing is the response when listing queued craft jobs. Corresponds to the second oneOf variant of CraftJobResponse in the openapi spec.

type CraftResponse added in v0.2.0

type CraftResponse struct {
	Action             string            `json:"action"`
	Recipe             string            `json:"recipe"`
	Quantity           int               `json:"quantity"`
	Outputs            []CraftOutput     `json:"outputs"`
	FromStorage        []CraftSourceItem `json:"from_storage,omitempty"`
	FromFactionStorage []CraftSourceItem `json:"from_faction_storage,omitempty"`
	ToStorage          []CraftSourceItem `json:"to_storage,omitempty"`
	ToFactionStorage   []CraftSourceItem `json:"to_faction_storage,omitempty"`
	LevelUp            bool              `json:"level_up,omitempty"`
	LeveledUpSkills    []string          `json:"leveled_up_skills,omitempty"`
	SkillLevel         int               `json:"skill_level,omitempty"`
	XPGained           map[string]int    `json:"xp_gained,omitempty"`
	Message            string            `json:"message"`
}

CraftResponse wraps the response from craft command. v0.240: restructured — outputs is now an array, inputs tracked via from_storage.

type CraftSourceItem added in v0.2.0

type CraftSourceItem struct {
	ItemID   string `json:"item_id"`
	Name     string `json:"name"`
	Quantity int    `json:"quantity"`
}

CraftSourceItem represents an item consumed from or delivered to storage.

type CraftingUpdateDeposit added in v0.2.0

type CraftingUpdateDeposit struct {
	ItemID   string `json:"item_id"`
	ItemName string `json:"item_name"`
	Quantity int    `json:"quantity"`
}

CraftingUpdateDeposit is an item deposited to storage when a craft run completes.

type CraftingUpdateEvent added in v0.2.0

type CraftingUpdateEvent struct {
	Tick int                 `json:"tick"`
	Jobs []CraftingUpdateJob `json:"jobs"`
}

CraftingUpdateEvent is the payload of a crafting_update server push event. Corresponds to Notification_crafting_update in the openapi spec.

type CraftingUpdateJob added in v0.2.0

type CraftingUpdateJob struct {
	JobID         string                  `json:"job_id"`
	Recipe        string                  `json:"recipe"`
	Mode          string                  `json:"mode"`
	Venue         string                  `json:"venue"`
	Storage       string                  `json:"storage"`
	Deposited     []CraftingUpdateDeposit `json:"deposited"`
	RunsDone      int                     `json:"runs_done"`
	RunsRemaining int                     `json:"runs_remaining"`
	Completed     bool                    `json:"completed"`
}

CraftingUpdateJob is a single job entry in a crafting_update event.

type CreateBuyOrderResponse added in v0.2.0

type CreateBuyOrderResponse struct {
	// Kind is the v0.531.4 response discriminator: single (server also defines a bulk shape; no client method issues bulk order ops).
	Kind               string      `json:"kind,omitempty"`
	Action             string      `json:"action"`
	Item               string      `json:"item"`
	ItemID             string      `json:"item_id"`
	Quantity           int         `json:"quantity"`
	PriceEach          int         `json:"price_each"`
	TotalEscrowed      int         `json:"total_escrowed"`
	ListingFee         int         `json:"listing_fee"`
	Message            string      `json:"message"`
	Mode               string      `json:"mode,omitempty"`
	Results            any         `json:"results,omitempty"`
	Summary            any         `json:"summary,omitempty"`
	DeliveredToCargo   int         `json:"delivered_to_cargo,omitempty"`
	DeliveredToStorage int         `json:"delivered_to_storage,omitempty"`
	EscrowRefunded     int         `json:"escrow_refunded,omitempty"`
	Fills              []OrderFill `json:"fills,omitempty"`
	OrderID            string      `json:"order_id,omitempty"`
	QuantityFilled     int         `json:"quantity_filled,omitempty"`
	QuantityListed     int         `json:"quantity_listed,omitempty"`
	QuantityNotListed  int         `json:"quantity_not_listed,omitempty"`
	RemainingEscrowed  int         `json:"remaining_escrowed,omitempty"`
	TotalSpent         int         `json:"total_spent,omitempty"`
}

CreateBuyOrderResponse wraps the response from create_buy_order command.

type CreateFactionResponse added in v0.2.0

type CreateFactionResponse struct {
	Action    string `json:"action"`
	FactionID string `json:"faction_id"`
	Name      string `json:"name"`
}

CreateFactionResponse wraps the response from create_faction command.

type CreateNoteResponse added in v0.2.0

type CreateNoteResponse struct {
	NoteID        string `json:"note_id"`
	Title         string `json:"title"`
	ContentLength int    `json:"content_length"`
	Message       string `json:"message"`
}

CreateNoteResponse wraps the response from create_note command.

type CreateSellOrderResponse added in v0.2.0

type CreateSellOrderResponse struct {
	// Kind is the v0.531.4 response discriminator: single.
	Kind              string      `json:"kind,omitempty"`
	Action            string      `json:"action"`
	Item              string      `json:"item"`
	ItemID            string      `json:"item_id"`
	Quantity          int         `json:"quantity"`
	PriceEach         int         `json:"price_each"`
	ListingFee        int         `json:"listing_fee"`
	Message           string      `json:"message"`
	Fills             []OrderFill `json:"fills,omitempty"`
	FromCargo         int         `json:"from_cargo,omitempty"`
	FromStorage       int         `json:"from_storage,omitempty"`
	OrderID           string      `json:"order_id,omitempty"`
	QuantityFilled    int         `json:"quantity_filled,omitempty"`
	QuantityListed    int         `json:"quantity_listed,omitempty"`
	ReturnedToStorage int         `json:"returned_to_storage,omitempty"`
	TotalEarned       int         `json:"total_earned,omitempty"`
	Consolidated      bool        `json:"consolidated,omitempty"`
	SmugglingLevelUp  bool        `json:"smuggling_level_up,omitempty"`
	SmugglingXP       int         `json:"smuggling_xp,omitempty"`
}

CreateSellOrderResponse wraps the response from create_sell_order command.

type CurrentPOI

type CurrentPOI struct {
	ID       string   `json:"id"`
	Name     string   `json:"name"`
	Type     string   `json:"type"`
	HasBase  bool     `json:"has_base"`
	BaseID   string   `json:"base_id,omitempty"`
	BaseName string   `json:"base_name,omitempty"`
	Online   int      `json:"online"`
	Position Position `json:"position,omitempty"`
}

CurrentPOI represents the current POI with minimal info (from get_system response).

type DeclineMissionResponse added in v0.2.0

type DeclineMissionResponse struct {
	Message    string          `json:"message"`
	Giver      json.RawMessage `json:"giver,omitempty"`
	TemplateID string          `json:"template_id"`
	Title      string          `json:"title"`
}

DeclineMissionResponse — decline_mission

type DeleteNoteResponse added in v0.2.0

type DeleteNoteResponse struct {
	Message string `json:"message"`
	NoteID  string `json:"note_id"`
	Title   string `json:"title,omitempty"`
}

DeleteNoteResponse is returned by delete_note.

  • delete_note

type DeliveredPassenger added in v0.2.0

type DeliveredPassenger struct {
	CitizenID         string `json:"citizen_id,omitempty"`
	Name              string `json:"name,omitempty"`
	Class             string `json:"class,omitempty"`
	Bio               string `json:"bio,omitempty"`
	Destination       string `json:"destination,omitempty"`
	DestinationName   string `json:"destination_name,omitempty"`
	DestinationSystem string `json:"destination_system,omitempty"`
	// BaseFare (server field "base_fare", renamed from "fare") is the
	// passenger's base fare on delivery.
	BaseFare int `json:"base_fare,omitempty"`
	// SpeedBonus is the on-time delivery bonus paid on top of BaseFare; the two
	// sum into the response's fare_collected total.
	SpeedBonus     int `json:"speed_bonus,omitempty"`
	TicksRemaining int `json:"ticks_remaining,omitempty"`
}

DeliveredPassenger is a single passenger delivered on docking.

type DeployDroneResponse added in v0.2.0

type DeployDroneResponse struct {
	DroneID        string `json:"drone_id"`
	DroneType      string `json:"drone_type"`
	Hull           int    `json:"hull"`
	MaxHull        int    `json:"max_hull"`
	Damage         int    `json:"damage"`
	Status         string `json:"status"`
	BandwidthUsed  int    `json:"bandwidth_used"`
	BandwidthTotal int    `json:"bandwidth_total"`
	Message        string `json:"message"`
}

DeployDroneResponse wraps the response from deploy_drone command.

type DepositItemsResponse added in v0.2.0

type DepositItemsResponse struct {
	Action          string `json:"action"`
	ItemID          string `json:"item_id"`
	Quantity        int    `json:"quantity"`
	Source          string `json:"source,omitempty"`
	Destination     string `json:"destination,omitempty"`
	DestTotal       int    `json:"dest_total,omitempty"`
	SourceRemaining int    `json:"source_remaining,omitempty"`
	StorageTotal    int    `json:"storage_total,omitempty"`
	CargoRemaining  int    `json:"cargo_remaining,omitempty"`
	CargoSpace      int    `json:"cargo_space,omitempty"`
}

DepositItemsResponse wraps the response from deposit_items command, which transfers items between cargo, station storage, and faction storage. The server returns a generic transfer shape: source/destination plus the resulting totals (dest_total at the destination, source_remaining at the source). Legacy cargo->storage responses also carry storage_total / cargo_remaining / cargo_space.

type DistressSignalResponse added in v0.2.0

type DistressSignalResponse struct {
	Action         string `json:"action"`
	DistressType   string `json:"distress_type,omitempty"`
	System         string `json:"system,omitempty"`
	SystemName     string `json:"system_name,omitempty"`
	POI            string `json:"poi,omitempty"`
	POIName        string `json:"poi_name,omitempty"`
	MissionsSent   int    `json:"missions_sent,omitempty"`
	ExpiresSeconds int    `json:"expires_seconds,omitempty"`
	Message        string `json:"message"`
}

DistressSignalResponse wraps the response from distress_signal command. v0.240: now accepts distress_type parameter.

type DockResponse added in v0.2.0

type DockResponse struct {
	Action              string          `json:"action,omitempty"`
	Command             string          `json:"command,omitempty"`
	Pending             bool            `json:"pending,omitempty"`
	Base                *Base           `json:"base,omitempty"`
	StationCondition    *StationHealth  `json:"station_condition,omitempty"`
	FuelWarning         string          `json:"fuel_warning,omitempty"`
	Story               string          `json:"story,omitempty"`
	OpenOrders          []ExchangeOrder `json:"open_orders,omitempty"`
	OpenOrdersCount     int             `json:"open_orders_count,omitempty"`
	OpenOrdersTruncated bool            `json:"open_orders_truncated,omitempty"`
	StorageItems        []CargoItem     `json:"storage_items,omitempty"`
	StoredShips         []StorageShip   `json:"stored_ships,omitempty"`
	StoredShipsCount    int             `json:"stored_ships_count,omitempty"`
	UnreadChat          int             `json:"unread_chat,omitempty"`
	UnreadChatNote      string          `json:"unread_chat_note,omitempty"`
	Gifts               []StorageGift   `json:"gifts,omitempty"`
	GiftsCount          int             `json:"gifts_count,omitempty"`
	GiftsNote           string          `json:"gifts_note,omitempty"`
	TradeFills          []TradeFill     `json:"trade_fills,omitempty"`
	TradeFillsCount     int             `json:"trade_fills_count,omitempty"`
	TradeFillsTruncated bool            `json:"trade_fills_truncated,omitempty"`
	// CommissionsReady lists ships you commissioned at this station that
	// are ready for pickup; CommissionsNote is the human-readable summary.
	// Permissive map shape until the per-entry schema is confirmed from a
	// real (non-empty) dock response.
	CommissionsNote  string           `json:"commissions_note,omitempty"`
	CommissionsReady []map[string]any `json:"commissions_ready,omitempty"`
	// YourFacilities lists the player's personal facilities at this base
	// (mirrors player_facilities from `facility list`); FacilityNote is the
	// human-readable summary. Permissive map shape pending confirmation.
	FacilityNote   string           `json:"facility_note,omitempty"`
	YourFacilities []map[string]any `json:"your_facilities,omitempty"`
	// AutoDocked is set when the dock was performed automatically as a
	// precursor to another command (a command requiring the docked state was
	// issued while in space) — see the "Auto-dock/undock" note in the API docs.
	AutoDocked bool `json:"auto_docked,omitempty"`
	// PassengerArrivals reports any aboard passengers bound for this station
	// who were automatically delivered (and their fares collected) on docking.
	PassengerArrivals *PassengerArrivals `json:"passenger_arrivals,omitempty"`
}

DockResponse wraps the response from dock command.

type Drone

type Drone struct {
	DroneID   string `json:"drone_id"`
	DroneType string `json:"drone_type"`
	ItemID    string `json:"item_id,omitempty"`
	Status    string `json:"status"`
	Hull      int    `json:"hull,omitempty"`
	MaxHull   int    `json:"max_hull,omitempty"`
	Damage    int    `json:"damage,omitempty"`
	TargetID  string `json:"target_id,omitempty"`
	POIID     string `json:"poi_id,omitempty"`
}

Drone represents a deployed drone.

type DroneDestroyed

type DroneDestroyed struct {
	DroneID   string `json:"drone_id"`
	DroneType string `json:"drone_type"`
	Message   string `json:"message"`
}

DroneDestroyed is sent when one of your drones is destroyed in combat. Server event type: drone_destroyed

type DroneUpdate

type DroneUpdate struct {
	Tick      int64   `json:"tick"`
	DroneID   string  `json:"drone_id"`
	TargetID  string  `json:"target_id"`
	Damage    float64 `json:"damage"`
	Destroyed bool    `json:"destroyed"`
}

DroneUpdate represents drone combat activity. Server event type: drone_update

type EscrowCost added in v0.2.0

type EscrowCost struct {
	Fee    int           `json:"fee"`
	Labor  int           `json:"labor"`
	Inputs []EscrowInput `json:"inputs"`
}

EscrowCost describes the credits and materials escrowed when a craft job is queued.

type EscrowInput added in v0.2.0

type EscrowInput struct {
	ItemID   string `json:"item_id"`
	Name     string `json:"name"`
	Quantity int    `json:"quantity"`
}

EscrowInput is a single item held in escrow for a craft job.

type EspionageResponse added in v0.2.0

type EspionageResponse struct {
	Action    string `json:"action"`
	Outcome   string `json:"outcome"`
	Story     string `json:"story"`
	IntelType string `json:"intel_type,omitempty"`
}

EspionageResponse wraps the response from espionage. The server returns a short narrative account of the operation rather than structured data: the spy may turn up real intel, turn up nothing, or be spotted and escape empty-handed. IntelType is only set when the run actually produced intel.

type EstimatePurchaseResponse

type EstimatePurchaseResponse struct {
	Action            string      `json:"action"`
	Item              string      `json:"item"`
	QuantityRequested int         `json:"quantity_requested"`
	Available         int         `json:"available"`
	TotalCost         int         `json:"total_cost"`
	Fills             []OrderFill `json:"fills"`
	Unfilled          int         `json:"unfilled"`
	Message           string      `json:"message"`
	SalesTax          int64       `json:"sales_tax,omitempty"`
	SalesTaxRateBps   int         `json:"sales_tax_rate_bps,omitempty"`
	Subtotal          int64       `json:"subtotal,omitempty"`
}

EstimatePurchaseResponse wraps the response from estimate_purchase command.

type ExchangeOrder

type ExchangeOrder struct {
	OrderID        string `json:"order_id"`
	OrderType      string `json:"order_type"`
	Side           string `json:"side,omitempty"`
	ItemID         string `json:"item_id"`
	ItemName       string `json:"item_name,omitempty"`
	Quantity       int    `json:"quantity"`
	Remaining      int    `json:"remaining,omitempty"`
	FilledQuantity int    `json:"filled_quantity,omitempty"`
	PriceEach      int    `json:"price_each"`
	ListingFee     int    `json:"listing_fee,omitempty"`
	CreatedAt      string `json:"created_at"`
	CreatedBy      string `json:"created_by,omitempty"`
	FactionOrder   bool   `json:"faction_order,omitempty"`
}

ExchangeOrder represents a buy or sell order on the station exchange.

type FacilityForSaleListing added in v0.2.0

type FacilityForSaleListing struct {
	ListingID      string `json:"listing_id"`
	FacilityID     string `json:"facility_id,omitempty"`
	FacilityType   string `json:"facility_type,omitempty"`
	FacilityName   string `json:"facility_name,omitempty"`
	Category       string `json:"category,omitempty"`
	Price          int    `json:"price,omitempty"`
	SellerID       string `json:"seller_id,omitempty"`
	SellerName     string `json:"seller_name,omitempty"`
	OwnedByFaction bool   `json:"owned_by_faction,omitempty"`
	FactionID      string `json:"faction_id,omitempty"`
	FactionName    string `json:"faction_name,omitempty"`
	ListedAt       string `json:"listed_at,omitempty"`
}

FacilityForSaleListing is one row in a browse_for_sale response. Field set inferred from the request schema (list_for_sale takes price; buy_listing keys off listing_id); other fields are likely-present based on the domain and will be filled in as real (non-empty) responses arrive. Unknown server fields are ignored by encoding/json so this struct can grow defensively.

type FacilityListResponse added in v0.2.0

type FacilityListResponse struct {
	// Kind is the v0.531.4 response discriminator: list.
	Kind              string           `json:"kind,omitempty"`
	Action            string           `json:"action,omitempty"`
	BaseID            string           `json:"base_id"`
	StationFacilities []map[string]any `json:"station_facilities"`
	PlayerFacilities  []map[string]any `json:"player_facilities"`
	FactionFacilities []map[string]any `json:"faction_facilities"`
	PublicFacilities  []map[string]any `json:"public_facilities"`
	Construction      map[string]any   `json:"construction,omitempty"`
	Power             map[string]any   `json:"power,omitempty"`
	// FactionRent summarizes rent for the faction's facilities at this station
	// (est_rent_per_day, facilities, grace_cycles, total_rent_per_cycle, note),
	// deducted from the faction treasury each cycle. Present only when the
	// viewer's faction owns facilities here.
	FactionRent map[string]any `json:"faction_rent,omitempty"`
	// PlayerRent is the same summary for the viewer's OWN facilities at this
	// station, billed to the player rather than the faction treasury. Note that
	// both rent blocks are scoped to this station only — the server's own note
	// points at `facility owned` for the bill across all stations.
	PlayerRent map[string]any `json:"player_rent,omitempty"`
	// LifeSupport is the station's life-support standing: supply vs demand, the
	// consumables burned per maintenance cycle, and what it is starved of.
	// Confirmed identical to GetBaseResponse.LifeSupport against a live payload,
	// so it shares that type rather than being another raw blob.
	//
	// openapi is no help for anything in this struct: it declares
	// FacilityResponse with no properties at all, so every field here is driven
	// by live payloads.
	LifeSupport *LifeSupport `json:"life_support,omitempty"`
}

FacilityListResponse wraps the response from the `facility action=list` command, which the server returns with action="list". Alongside the per-section facility lists it carries a station-wide construction queue and a power-grid summary block.

type FacilityOwnedResponse added in v0.2.0

type FacilityOwnedResponse struct {
	Action     string              `json:"action"`
	Facilities []OwnedFacility     `json:"facilities"`
	Hint       string              `json:"hint,omitempty"`
	Rent       FacilityRentSummary `json:"rent"`
}

FacilityOwnedResponse models the `facility action=owned` OK frame. Top-level keys (action, facilities, hint, rent) must be covered so the api-monitor does not flag it. Mirrors the local struct in play_as formatFacilityOwned.

type FacilityRentSummary added in v0.2.0

type FacilityRentSummary struct {
	Facilities        int    `json:"facilities"`
	TotalRentPerCycle int    `json:"total_rent_per_cycle"`
	EstRentPerDay     int    `json:"est_rent_per_day"`
	ArrearsOwed       int    `json:"arrears_owed,omitempty"`
	GraceCycles       int    `json:"grace_cycles,omitempty"`
	Note              string `json:"note,omitempty"`
}

FacilityRentSummary is the rent summary block in a FacilityOwnedResponse.

type FacilityResponse

type FacilityResponse struct {
	// Kind is the v0.531.4 response discriminator: detail|discovery|list.
	Kind         string             `json:"kind,omitempty"`
	Action       string             `json:"action"`
	Command      string             `json:"command,omitempty"`
	BaseID       string             `json:"base_id,omitempty"`
	FacilityID   string             `json:"facility_id,omitempty"`
	FacilityName string             `json:"facility_name,omitempty"`
	FacilityType string             `json:"facility_type,omitempty"`
	Category     string             `json:"category,omitempty"`
	Description  string             `json:"description,omitempty"`
	Hint         string             `json:"hint,omitempty"`
	Message      string             `json:"message,omitempty"`
	Page         int                `json:"page,omitempty"`
	PerPage      int                `json:"per_page,omitempty"`
	Total        int                `json:"total,omitempty"`
	TotalPages   int                `json:"total_pages,omitempty"`
	Actions      []map[string]any   `json:"actions,omitempty"`
	Types        []FacilityTypeInfo `json:"types,omitempty"`
	Upgrades     []map[string]any   `json:"upgrades,omitempty"`
}

type FacilityTypeInfo added in v0.2.0

type FacilityTypeInfo struct {
	ID                   string      `json:"id,omitempty"`      // paginated list identifier
	TypeID               string      `json:"type_id,omitempty"` // detail response identifier
	Name                 string      `json:"name,omitempty"`
	Category             string      `json:"category,omitempty"`
	Description          string      `json:"description,omitempty"`
	SatisfiedDescription string      `json:"satisfied_description,omitempty"`
	DegradedDescription  string      `json:"degraded_description,omitempty"`
	Level                int         `json:"level,omitempty"`
	Buildable            bool        `json:"buildable,omitempty"`
	BuildCost            int         `json:"build_cost,omitempty"`
	BuildMaterials       []CargoItem `json:"build_materials,omitempty"`
	BuildTime            int         `json:"build_time,omitempty"`
	LaborCost            int         `json:"labor_cost,omitempty"`
	MaintenancePerCycle  []CargoItem `json:"maintenance_per_cycle,omitempty"`
	RentPerCycle         int         `json:"rent_per_cycle,omitempty"`
	PersonalService      string      `json:"personal_service,omitempty"`
	Service              string      `json:"service,omitempty"`
	FactionService       string      `json:"faction_service,omitempty"`
	FactionCap           int         `json:"faction_cap,omitempty"`
	BonusType            string      `json:"bonus_type,omitempty"`
	BonusValue           float64     `json:"bonus_value,omitempty"`
	Lore                 string      `json:"lore,omitempty"`
	RecipeID             string      `json:"recipe_id,omitempty"`
	Recipe               string      `json:"recipe,omitempty"`
	RecipeMultiplier     float64     `json:"recipe_multiplier,omitempty"`
	Hint                 string      `json:"hint,omitempty"`
	UpgradesTo           string      `json:"upgrades_to,omitempty"`
	UpgradesToName       string      `json:"upgrades_to_name,omitempty"`
	UpgradesFrom         string      `json:"upgrades_from,omitempty"`
	UpgradesFromName     string      `json:"upgrades_from_name,omitempty"`
	RequiresServiceName  string      `json:"requires_service_name,omitempty"`
	RequiresServiceType  string      `json:"requires_service_type,omitempty"`
}

FacilityResponse wraps the response from facility command. FacilityTypeInfo describes a facility type. Used by both the paginated types list (which uses "id") and the single-type detail (which uses "type_id").

type FacilityTypesResponse added in v0.2.0

type FacilityTypesResponse struct {
	Action     string             `json:"action"`
	Hint       string             `json:"hint,omitempty"`
	Page       int                `json:"page,omitempty"`
	PerPage    int                `json:"per_page,omitempty"`
	Total      int                `json:"total,omitempty"`
	TotalPages int                `json:"total_pages,omitempty"`
	Types      []FacilityTypeInfo `json:"types,omitempty"`
	// Single type detail fields (returned when querying a specific type)
	TypeID               string      `json:"type_id,omitempty"`
	Name                 string      `json:"name,omitempty"`
	Category             string      `json:"category,omitempty"`
	Description          string      `json:"description,omitempty"`
	SatisfiedDescription string      `json:"satisfied_description,omitempty"`
	DegradedDescription  string      `json:"degraded_description,omitempty"`
	Level                int         `json:"level,omitempty"`
	Buildable            bool        `json:"buildable,omitempty"`
	BuildCost            int         `json:"build_cost,omitempty"`
	BuildMaterials       []CargoItem `json:"build_materials,omitempty"`
	BuildTime            int         `json:"build_time,omitempty"`
	LaborCost            int         `json:"labor_cost,omitempty"`
	MaintenancePerCycle  []CargoItem `json:"maintenance_per_cycle,omitempty"`
	RentPerCycle         int         `json:"rent_per_cycle,omitempty"`
	PersonalService      string      `json:"personal_service,omitempty"`
	Service              string      `json:"service,omitempty"`
	FactionService       string      `json:"faction_service,omitempty"`
	FactionCap           int         `json:"faction_cap,omitempty"`
	BonusType            string      `json:"bonus_type,omitempty"`
	BonusValue           float64     `json:"bonus_value,omitempty"`
	Lore                 string      `json:"lore,omitempty"`
	RecipeID             string      `json:"recipe_id,omitempty"`
	Recipe               string      `json:"recipe,omitempty"`
	RecipeMultiplier     float64     `json:"recipe_multiplier,omitempty"`
	UpgradesTo           string      `json:"upgrades_to,omitempty"`
	UpgradesToName       string      `json:"upgrades_to_name,omitempty"`
	UpgradesFrom         string      `json:"upgrades_from,omitempty"`
	UpgradesFromName     string      `json:"upgrades_from_name,omitempty"`
	RequiresServiceName  string      `json:"requires_service_name,omitempty"`
	RequiresServiceType  string      `json:"requires_service_type,omitempty"`
	// Pagination/filter envelope fields (added when action="types" returns
	// a list — the server now includes a categories index, applied filters,
	// and a pagination block alongside the page/per_page/total fields above).
	Categories []string       `json:"categories,omitempty"`
	Filters    map[string]any `json:"filters,omitempty"`
	Pagination map[string]any `json:"pagination,omitempty"`
}

FacilityTypesResponse wraps the response from facility action="types" which returns a paginated list of facility type details.

type Faction

type Faction struct {
	ID             string          `json:"id"`
	Name           string          `json:"name"`
	Tag            string          `json:"tag"`
	LeaderID       string          `json:"leader_id"`
	LeaderName     string          `json:"leader_name,omitempty"`
	MemberCount    int             `json:"member_count"`
	Treasury       int             `json:"treasury,omitempty"`
	Members        []FactionMember `json:"members,omitempty"`
	Allies         []string        `json:"allies,omitempty"`
	Enemies        []string        `json:"enemies,omitempty"`
	AtWar          []FactionWar    `json:"at_war,omitempty"`
	PeaceProposals []PeaceProposal `json:"peace_proposals,omitempty"`
}

Faction represents faction information.

type FactionAcceptAllyResponse added in v0.2.0

type FactionAcceptAllyResponse struct {
	Message         string `json:"message"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
}

FactionAcceptAllyResponse — faction_accept_ally

type FactionAcceptInviteResponse added in v0.2.0

type FactionAcceptInviteResponse struct {
	Faction   string `json:"faction"`
	FactionID string `json:"faction_id"`
	Message   string `json:"message"`
}

FactionAcceptInviteResponse is returned by faction_accept_invite.

  • faction_accept_invite

type FactionAcceptPeaceResponse added in v0.2.0

type FactionAcceptPeaceResponse struct {
	Message         string `json:"message"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
}

FactionAcceptPeaceResponse wraps the response from faction_accept_peace.

type FactionCancelMissionResponse added in v0.2.0

type FactionCancelMissionResponse struct {
	Message string `json:"message"`
	Status  string `json:"status,omitempty"`
}

FactionCancelMissionResponse — faction_cancel_mission

type FactionCreateBuyOrderResponse added in v0.2.0

type FactionCreateBuyOrderResponse struct {
	// Kind is the v0.531.4 response discriminator: single.
	Kind          string `json:"kind,omitempty"`
	Action        string `json:"action,omitempty"`
	Consolidated  bool   `json:"consolidated,omitempty"`
	FactionID     string `json:"faction_id,omitempty"`
	FactionTag    string `json:"faction_tag,omitempty"`
	Item          string `json:"item,omitempty"`
	ItemID        string `json:"item_id,omitempty"`
	ListingFee    int64  `json:"listing_fee,omitempty"`
	Message       string `json:"message"`
	OrderID       string `json:"order_id,omitempty"`
	PriceEach     int64  `json:"price_each,omitempty"`
	Quantity      int    `json:"quantity,omitempty"`
	TotalEscrowed int64  `json:"total_escrowed,omitempty"`
}

FactionCreateBuyOrderResponse — faction_create_buy_order

type FactionCreateRoleResponse added in v0.2.0

type FactionCreateRoleResponse struct {
	Message  string `json:"message"`
	Name     string `json:"name"`
	Priority int    `json:"priority,omitempty"`
	RoleID   string `json:"role_id"`
}

FactionCreateRoleResponse — faction_create_role

type FactionCreateSellOrderResponse added in v0.2.0

type FactionCreateSellOrderResponse struct {
	// Kind is the v0.531.4 response discriminator: single.
	Kind         string `json:"kind,omitempty"`
	Action       string `json:"action,omitempty"`
	Consolidated bool   `json:"consolidated,omitempty"`
	FactionID    string `json:"faction_id,omitempty"`
	FactionTag   string `json:"faction_tag,omitempty"`
	Item         string `json:"item,omitempty"`
	ItemID       string `json:"item_id,omitempty"`
	ListingFee   int64  `json:"listing_fee,omitempty"`
	Message      string `json:"message"`
	OrderID      string `json:"order_id,omitempty"`
	PriceEach    int64  `json:"price_each,omitempty"`
	Quantity     int    `json:"quantity,omitempty"`
}

FactionCreateSellOrderResponse — faction_create_sell_order

type FactionDeclareWarResponse added in v0.2.0

type FactionDeclareWarResponse struct {
	Message         string `json:"message"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
	Reason          string `json:"reason"`
}

FactionDeclareWarResponse wraps the response from faction_declare_war command.

type FactionDeclineInviteResponse added in v0.2.0

type FactionDeclineInviteResponse struct {
	FactionID string `json:"faction_id"`
	Message   string `json:"message"`
}

FactionDeclineInviteResponse — faction_decline_invite

type FactionDeleteRoleResponse added in v0.2.0

type FactionDeleteRoleResponse struct {
	Message         string `json:"message"`
	ReassignedCount int    `json:"reassigned_count,omitempty"`
	RoleID          string `json:"role_id"`
}

FactionDeleteRoleResponse — faction_delete_role

type FactionDeleteRoomResponse added in v0.2.0

type FactionDeleteRoomResponse struct {
	Action  string `json:"action,omitempty"`
	Message string `json:"message"`
	RoomID  string `json:"room_id"`
}

FactionDeleteRoomResponse — faction_delete_room

type FactionDepositCreditsResponse added in v0.2.0

type FactionDepositCreditsResponse struct {
	Action         string `json:"action"`
	Amount         int    `json:"amount"`
	PlayerCredits  int    `json:"player_credits"`
	FactionCredits int    `json:"faction_credits"`
}

FactionDepositCreditsResponse wraps the response from faction_deposit_credits.

type FactionEditResponse added in v0.2.0

type FactionEditResponse struct {
	Hint    string          `json:"hint,omitempty"`
	Message string          `json:"message"`
	Updates json.RawMessage `json:"updates,omitempty"`
}

FactionEditResponse — faction_edit

type FactionEditRoleResponse added in v0.2.0

type FactionEditRoleResponse struct {
	Message string          `json:"message"`
	RoleID  string          `json:"role_id"`
	Updates json.RawMessage `json:"updates,omitempty"`
}

FactionEditRoleResponse — faction_edit_role

type FactionFacility added in v0.2.0

type FactionFacility struct {
	FacilityID      string `json:"facility_id"`
	Type            string `json:"type"`
	Name            string `json:"name"`
	CustomName      string `json:"custom_name,omitempty"`
	FactionService  string `json:"faction_service,omitempty"`
	Level           int    `json:"level"`
	Status          string `json:"status"`
	RentPerCycle    int    `json:"rent_per_cycle,omitempty"`
	RentalFeePerRun int    `json:"rental_fee_per_run,omitempty"`
	Capacity        int    `json:"capacity,omitempty"`
}

FactionFacility is one facility in a faction's holdings, as listed in the faction_list response's faction_facilities array. Populated when the caller is docked at a station where their faction has built facilities. capacity, custom_name, and rental_fee_per_run appear only on facility types that use them (storage/quarters/market for capacity; refineries for per-run fees).

type FactionFuelBunker added in v0.2.0

type FactionFuelBunker struct {
	BaseID       string `json:"base_id"`
	BaseName     string `json:"base_name,omitempty"`
	FuelReserve  int    `json:"fuel_reserve"`
	FuelCapacity int    `json:"fuel_capacity"`
}

FactionFuelBunker is one base's fuel-bunker status within a faction_info response (gameserver v0.346.0+).

type FactionGarage added in v0.2.0

type FactionGarage struct {
	BaseID     string   `json:"base_id"`
	BaseName   string   `json:"base_name"`
	SystemName string   `json:"system_name"`
	Capacity   int      `json:"capacity"`
	Used       int      `json:"used"`
	Ships      []string `json:"ships,omitempty"`
}

FactionGarage is one station's garage in a faction_garages response.

type FactionGaragesResponse added in v0.2.0

type FactionGaragesResponse struct {
	StationCount int             `json:"station_count"`
	TotalShips   int             `json:"total_ships"`
	Stations     []FactionGarage `json:"stations"`
}

FactionGaragesResponse is returned by faction_garages: ships the faction has stored, grouped by the station holding them.

  • faction_garages

type FactionGetInvitesResponse added in v0.2.0

type FactionGetInvitesResponse struct {
	Invites json.RawMessage `json:"invites,omitempty"`
}

FactionGetInvitesResponse — faction_get_invites

type FactionInfoResponse

type FactionInfoResponse struct {
	Action           string                `json:"action,omitempty"`
	ID               string                `json:"id"`
	Name             string                `json:"name"`
	Tag              string                `json:"tag"`
	LeaderID         string                `json:"leader_id"`
	LeaderUsername   string                `json:"leader_username"`
	MemberCount      int                   `json:"member_count"`
	OwnedBases       int                   `json:"owned_bases"`
	IsMember         bool                  `json:"is_member"`
	IsAlly           bool                  `json:"is_ally"`
	IsEnemy          bool                  `json:"is_enemy"`
	AtWar            bool                  `json:"at_war"`
	Description      string                `json:"description,omitempty"`
	Charter          string                `json:"charter,omitempty"`
	Emblem           string                `json:"emblem,omitempty"`
	PrimaryColor     string                `json:"primary_color,omitempty"`
	SecondaryColor   string                `json:"secondary_color,omitempty"`
	Treasury         int                   `json:"treasury,omitempty"`
	CreatedAt        string                `json:"created_at,omitempty"`
	Members          []FactionMemberDetail `json:"members,omitempty"`
	MembersLimit     int                   `json:"members_limit,omitempty"`
	MembersOffset    int                   `json:"members_offset,omitempty"`
	MembersTruncated bool                  `json:"members_truncated,omitempty"`
	Allies           []FactionSummary      `json:"allies,omitempty"`
	Enemies          []FactionSummary      `json:"enemies,omitempty"`
	Wars             []FactionWarDetail    `json:"wars,omitempty"`
	PeaceProposals   []PeaceProposal       `json:"peace_proposals,omitempty"`

	AllianceProposals json.RawMessage `json:"alliance_proposals,omitempty"`
	Facilities        json.RawMessage `json:"facilities,omitempty"`
	Roles             json.RawMessage `json:"roles,omitempty"`

	// FuelBunkers is the galaxy-wide fuel-bunker summary added in gameserver
	// v0.346.0: one entry per faction base with a bunker. The faction-wide
	// total reserve/capacity is the sum across entries (no top-level total in
	// the response).
	FuelBunkers []FactionFuelBunker `json:"fuel_bunkers,omitempty"`
}

FactionInfoResponse wraps the response from faction_info command.

type FactionIntelStatusResponse added in v0.2.0

type FactionIntelStatusResponse struct {
	IntelLevel      int             `json:"intel_level,omitempty"`
	Reports24h      int             `json:"reports_24h,omitempty"`
	TopContributors json.RawMessage `json:"top_contributors,omitempty"`
	TotalReports    int             `json:"total_reports,omitempty"`
	UniquePlayers   int             `json:"unique_players,omitempty"`
	UniqueSystems   int             `json:"unique_systems,omitempty"`
}

FactionIntelStatusResponse — faction_intel_status

type FactionInviteResponse added in v0.2.0

type FactionInviteResponse struct {
	Message  string `json:"message"`
	PlayerID string `json:"player_id"`
}

FactionInviteResponse wraps the response from faction_invite command.

type FactionKickResponse added in v0.2.0

type FactionKickResponse struct {
	Message  string `json:"message"`
	PlayerID string `json:"player_id"`
}

FactionKickResponse wraps the response from faction_kick command.

type FactionListMissionsResponse added in v0.2.0

type FactionListMissionsResponse struct {
	Action   string           `json:"action,omitempty"`
	BaseID   string           `json:"base_id,omitempty"`
	Missions []FactionMission `json:"missions"`
}

FactionListMissionsResponse wraps the response from faction_list_missions.

type FactionListResponse added in v0.2.0

type FactionListResponse struct {
	Factions   []FactionSummary `json:"factions"`
	TotalCount int              `json:"total_count"`
	Offset     int              `json:"offset,omitempty"`
	Limit      int              `json:"limit,omitempty"`

	// Faction-context fields, present when the caller is docked at a station
	// where their faction has built facilities. Absent otherwise.
	BaseID            string                 `json:"base_id,omitempty"`
	FactionID         string                 `json:"faction_id,omitempty"`
	FactionFacilities []FactionFacility      `json:"faction_facilities,omitempty"`
	FactionStorage    *FactionStorageSummary `json:"faction_storage,omitempty"`
	Hint              string                 `json:"hint,omitempty"`
}

FactionListResponse wraps the response from faction_list command.

type FactionMember

type FactionMember struct {
	PlayerID string `json:"player_id"`
	Username string `json:"username"`
	Role     string `json:"role"`
	JoinedAt string `json:"joined_at"`
}

FactionMember represents a member of a faction.

type FactionMemberDetail added in v0.2.0

type FactionMemberDetail struct {
	PlayerID string `json:"player_id"`
	Username string `json:"username"`
	Role     string `json:"role,omitempty"`
	JoinedAt string `json:"joined_at,omitempty"`
	LastSeen string `json:"last_seen,omitempty"`
	IsOnline bool   `json:"is_online,omitempty"`
}

FactionMemberDetail represents a member in the faction info response.

type FactionMission added in v0.2.0

type FactionMission struct {
	MissionID        string          `json:"mission_id,omitempty"`
	TemplateID       string          `json:"template_id,omitempty"`
	Title            string          `json:"title"`
	Type             string          `json:"type,omitempty"`
	Description      string          `json:"description,omitempty"`
	GiverName        string          `json:"giver_name,omitempty"`
	Rewards          json.RawMessage `json:"rewards,omitempty"`
	Objectives       json.RawMessage `json:"objectives,omitempty"`
	AssignedPlayerID string          `json:"assigned_player_id,omitempty"`
	ExpiresAt        string          `json:"expires_at,omitempty"`
}

FactionMission is one posted faction mission (faction_list_missions).

type FactionPostMissionResponse added in v0.2.0

type FactionPostMissionResponse struct {
	Escrowed   json.RawMessage `json:"escrowed,omitempty"`
	Message    string          `json:"message"`
	Status     string          `json:"status,omitempty"`
	TemplateID string          `json:"template_id"`
	Title      string          `json:"title"`
}

FactionPostMissionResponse — faction_post_mission

type FactionPrepayTaxResponse added in v0.2.0

type FactionPrepayTaxResponse struct {
	Action            string `json:"action"`
	AmountPrepaid     int64  `json:"amount_prepaid"`
	TaxPrepaidBalance int64  `json:"tax_prepaid_balance"`
	FactionCredits    int64  `json:"faction_credits"`
	Message           string `json:"message"`
}

FactionPrepayTaxResponse is returned by faction_prepay_tax. Same as PrepayTaxResponse but drawn from (and reporting) faction credits.

  • faction_prepay_tax

type FactionPromoteResponse added in v0.2.0

type FactionPromoteResponse struct {
	Message  string `json:"message"`
	PlayerID string `json:"player_id"`
	NewRole  string `json:"new_role"`
}

FactionPromoteResponse wraps the response from faction_promote command.

type FactionProposeAllyResponse added in v0.2.0

type FactionProposeAllyResponse struct {
	Message         string `json:"message"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
}

FactionProposeAllyResponse — faction_propose_ally

type FactionProposePeaceResponse added in v0.2.0

type FactionProposePeaceResponse struct {
	Message         string `json:"message"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
	Terms           string `json:"terms"`
}

FactionProposePeaceResponse wraps the response from faction_propose_peace.

type FactionQueryIntelResponse added in v0.2.0

type FactionQueryIntelResponse struct {
	Message    string          `json:"message,omitempty"`
	Count      int             `json:"count,omitempty"`
	Entries    json.RawMessage `json:"entries,omitempty"`
	IntelLevel int             `json:"intel_level,omitempty"`
	Limit      int             `json:"limit,omitempty"`
	Offset     int             `json:"offset,omitempty"`
	Total      int             `json:"total,omitempty"`
}

FactionQueryIntelResponse — faction_query_intel

type FactionQueryTradeIntelResponse added in v0.2.0

type FactionQueryTradeIntelResponse struct {
	Entries    json.RawMessage `json:"entries,omitempty"`
	IntelLevel int             `json:"intel_level,omitempty"`
	Limit      int             `json:"limit,omitempty"`
	Offset     int             `json:"offset,omitempty"`
	Showing    int             `json:"showing,omitempty"`
	Total      int             `json:"total,omitempty"`
}

FactionQueryTradeIntelResponse — faction_query_trade_intel

type FactionRemoveAllyResponse added in v0.2.0

type FactionRemoveAllyResponse struct {
	Message         string `json:"message"`
	Removed         bool   `json:"removed,omitempty"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
}

FactionRemoveAllyResponse — faction_remove_ally

type FactionRemoveEnemyResponse added in v0.2.0

type FactionRemoveEnemyResponse struct {
	Message         string `json:"message"`
	Removed         bool   `json:"removed"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
}

FactionRemoveEnemyResponse is returned by faction_remove_enemy.

  • faction_remove_enemy

type FactionRoom added in v0.2.0

type FactionRoom struct {
	RoomID      string `json:"room_id"`
	Name        string `json:"name"`
	Access      string `json:"access,omitempty"`
	Description string `json:"description,omitempty"`
}

FactionRoom is one room in a faction's common space (faction_rooms).

type FactionRoomsResponse added in v0.2.0

type FactionRoomsResponse struct {
	Action string        `json:"action,omitempty"`
	BaseID string        `json:"base_id,omitempty"`
	Rooms  []FactionRoom `json:"rooms"`
}

FactionRoomsResponse wraps the response from faction_rooms.

type FactionScanPOIResponse added in v0.2.0

type FactionScanPOIResponse struct {
	POIID             string        `json:"poi_id"`
	POIName           string        `json:"poi_name,omitempty"`
	SystemID          string        `json:"system_id,omitempty"`
	Hops              int           `json:"hops"`
	ScanPower         int           `json:"scan_power"`
	FacilityLevel     int           `json:"facility_level"`
	FacilityStation   string        `json:"facility_station,omitempty"`
	SignatureDetected bool          `json:"signature_detected,omitempty"`
	Contacts          []ScanContact `json:"contacts,omitempty"`
	NPCs              []ScanNPC     `json:"npcs,omitempty"`
	Pirates           []ScanNPC     `json:"pirates,omitempty"`
	Message           string        `json:"message"`
}

FactionScanPOIResponse is returned by faction_scan_poi: a remote scan of a POI run through a faction facility, so it reaches Hops systems away rather than only the current one.

  • faction_scan_poi

type FactionSetEnemyResponse added in v0.2.0

type FactionSetEnemyResponse struct {
	Message         string `json:"message"`
	TargetFactionID string `json:"target_faction_id"`
	TargetName      string `json:"target_name"`
}

FactionSetEnemyResponse — faction_set_enemy

type FactionStorageSummary added in v0.2.0

type FactionStorageSummary struct {
	Credits   int `json:"credits"`
	ItemTypes int `json:"item_types"`
	Rooms     int `json:"rooms"`
}

FactionStorageSummary is the compact faction-storage snapshot carried by the faction_list response. Full contents come from view_faction_storage (ViewFactionStorageResponse); this is just the headline totals.

type FactionSubmitIntelResponse added in v0.2.0

type FactionSubmitIntelResponse struct {
	Status  string `json:"status"`
	Count   int    `json:"count"`
	Message string `json:"message"`
}

FactionSubmitIntelResponse wraps the response from faction_submit_intel.

type FactionSubmitTradeIntelResponse added in v0.2.0

type FactionSubmitTradeIntelResponse struct {
	Message         string `json:"message"`
	StationsUpdated int    `json:"stations_updated,omitempty"`
	Status          string `json:"status,omitempty"`
}

FactionSubmitTradeIntelResponse — faction_submit_trade_intel

type FactionSummary added in v0.2.0

type FactionSummary struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Tag            string `json:"tag"`
	LeaderUsername string `json:"leader_username,omitempty"`
	MemberCount    int    `json:"member_count,omitempty"`
	OwnedBases     int    `json:"owned_bases,omitempty"`
	PrimaryColor   string `json:"primary_color,omitempty"`
	SecondaryColor string `json:"secondary_color,omitempty"`
}

FactionSummary represents a faction in lists and references.

type FactionTaxEstimateResponse added in v0.2.0

type FactionTaxEstimateResponse struct {
	Action                      string          `json:"action"`
	FactionID                   string          `json:"faction_id"`
	FactionName                 string          `json:"faction_name"`
	Domicile                    string          `json:"domicile"`
	TaxableIncomeToDate         int64           `json:"taxable_income_to_date"`
	DeductibleExpensesToDate    int64           `json:"deductible_expenses_to_date"`
	NetTaxableProfit            int64           `json:"net_taxable_profit"`
	LossCarryforwardApplied     int64           `json:"loss_carryforward_applied,omitempty"`
	IncomeTax                   json.RawMessage `json:"income_tax,omitempty"`
	IncomeTaxTotal              int64           `json:"income_tax_total"`
	CarriedDebt                 json.RawMessage `json:"carried_debt,omitempty"`
	CarriedDebtTotal            int64           `json:"carried_debt_total,omitempty"`
	TaxPrepaid                  int64           `json:"tax_prepaid"`
	LastAssessedAt              int64           `json:"last_assessed_at,omitempty"`
	NextAssessmentApproxSeconds int64           `json:"next_assessment_approx_seconds"`
	TaxCollectionActive         bool            `json:"tax_collection_active"`
	Note                        string          `json:"note,omitempty"`
}

FactionTaxEstimateResponse is returned by get_faction_tax_estimate: the corporate income-tax assessment the faction would face if the weekly cycle ran this instant.

Jurisdiction is hybrid — a faction has no citizenship, so the Domicile empire (the founder's birth empire) taxes worldwide earnings, while every empire the faction owns a facility in taxes what was earned there. Hence IncomeTax is a per-empire breakdown rather than a single figure. Unlike the personal get_tax_estimate there is no property tax: factions are assessed on profit only, with losses carried forward (LossCarryforwardApplied) and unpaid assessments accruing as CarriedDebt.

Nested arrays are left raw to mirror GetTaxEstimateResponse.

  • get_faction_tax_estimate

type FactionTradeIntelStatusResponse added in v0.2.0

type FactionTradeIntelStatusResponse struct {
	IntelLevel      int             `json:"intel_level,omitempty"`
	Reports24h      int             `json:"reports_24h,omitempty"`
	TopContributors json.RawMessage `json:"top_contributors,omitempty"`
	TotalReports    int             `json:"total_reports,omitempty"`
	UniqueItems     int             `json:"unique_items,omitempty"`
	UniqueStations  int             `json:"unique_stations,omitempty"`
}

FactionTradeIntelStatusResponse — faction_trade_intel_status

type FactionVisitRoomResponse added in v0.2.0

type FactionVisitRoomResponse struct {
	Action      string `json:"action,omitempty"`
	Access      string `json:"access,omitempty"`
	Author      string `json:"author,omitempty"`
	CreatedAt   string `json:"created_at,omitempty"`
	Description string `json:"description,omitempty"`
	Name        string `json:"name,omitempty"`
	RoomID      string `json:"room_id"`
	UpdatedAt   string `json:"updated_at,omitempty"`
}

FactionVisitRoomResponse — faction_visit_room

type FactionWar

type FactionWar struct {
	FactionID   string `json:"faction_id"`
	FactionName string `json:"faction_name"`
	StartedAt   string `json:"started_at"`
	OurKills    int    `json:"our_kills"`
	TheirKills  int    `json:"their_kills"`
}

FactionWar represents an active war between factions.

type FactionWarDetail added in v0.2.0

type FactionWarDetail struct {
	TargetFactionID   string `json:"target_faction_id"`
	TargetFactionName string `json:"target_faction_name"`
	TargetFactionTag  string `json:"target_faction_tag,omitempty"`
	DeclaredBy        string `json:"declared_by,omitempty"`
	Reason            string `json:"reason,omitempty"`
	StartedAt         string `json:"started_at,omitempty"`
	OurKills          int    `json:"our_kills,omitempty"`
	TheirKills        int    `json:"their_kills,omitempty"`
}

FactionWarDetail represents a war in the faction info response.

type FactionWithdrawCreditsResponse added in v0.2.0

type FactionWithdrawCreditsResponse struct {
	Action         string `json:"action"`
	Amount         int    `json:"amount"`
	PlayerCredits  int    `json:"player_credits"`
	FactionCredits int    `json:"faction_credits"`
}

FactionWithdrawCreditsResponse wraps the response from faction_withdraw_credits.

type FactionWithdrawInviteResponse added in v0.2.0

type FactionWithdrawInviteResponse struct {
	Message  string `json:"message"`
	PlayerID string `json:"player_id"`
}

FactionWithdrawInviteResponse is returned by faction_withdraw_invite.

  • faction_withdraw_invite

type FactionWriteRoomResponse added in v0.2.0

type FactionWriteRoomResponse struct {
	Action  string `json:"action,omitempty"`
	Access  string `json:"access,omitempty"`
	Faction string `json:"faction,omitempty"`
	Hint    string `json:"hint,omitempty"`
	Message string `json:"message"`
	Name    string `json:"name,omitempty"`
	RoomID  string `json:"room_id"`
}

FactionWriteRoomResponse — faction_write_room

type FaintSignature added in v0.2.0

type FaintSignature struct {
	Type       string `json:"type"`
	Hint       string `json:"hint,omitempty"`
	Difficulty string `json:"difficulty,omitempty"`
}

FaintSignature represents an unresolved survey signature.

type FindRouteResponse

type FindRouteResponse struct {
	Action        string           `json:"action,omitempty"`
	Found         bool             `json:"found"`
	TotalJumps    int              `json:"total_jumps"`
	TargetSystem  string           `json:"target_system,omitempty"`
	TargetPOI     string           `json:"target_poi,omitempty"`
	TargetPOIName string           `json:"target_poi_name,omitempty"`
	FuelPerJump   int              `json:"fuel_per_jump,omitempty"`
	EstimatedFuel int              `json:"estimated_fuel,omitempty"`
	FuelAvailable int              `json:"fuel_available,omitempty"`
	CargoUsed     int              `json:"cargo_used,omitempty"`
	Message       string           `json:"message,omitempty"`
	Route         []RouteStep      `json:"route,omitempty"`
	FleetFuel     []FleetFuelEntry `json:"fleet_fuel,omitempty"`
}

FindRouteResponse wraps the response from find_route command. v0.240: now accepts POI/base targets, includes fuel estimates and fleet fuel analysis.

type FleetFuelEntry added in v0.2.0

type FleetFuelEntry struct {
	PlayerID      string `json:"player_id"`
	Username      string `json:"username"`
	ShipClass     string `json:"ship_class"`
	FuelPerJump   int    `json:"fuel_per_jump"`
	EstimatedFuel int    `json:"estimated_fuel"`
	FuelAvailable int    `json:"fuel_available"`
	FuelOnArrival int    `json:"fuel_on_arrival"`
	CanComplete   bool   `json:"can_complete"`
}

FleetFuelEntry reports per-member fuel analysis for a fleet route.

type FleetMemberStatus added in v0.2.0

type FleetMemberStatus struct {
	PlayerID  string `json:"player_id"`
	Username  string `json:"username"`
	ShipClass string `json:"ship_class"`
	Hull      int    `json:"hull"`
	MaxHull   int    `json:"max_hull"`
	HullPct   int    `json:"hull_pct"`
	Shield    int    `json:"shield"`
	MaxShield int    `json:"max_shield"`
	IsLeader  bool   `json:"is_leader"`
	IsYou     bool   `json:"is_you"`
}

FleetMemberStatus reports the hull/shield status of a fleet member.

type FleetResponse added in v0.2.0

type FleetResponse struct {
	Action        string           `json:"action"`
	FleetID       string           `json:"fleet_id,omitempty"`
	InFleet       bool             `json:"in_fleet,omitempty"`
	IsLeader      bool             `json:"is_leader,omitempty"`
	Leader        string           `json:"leader,omitempty"`
	LeaderName    string           `json:"leader_name,omitempty"`
	Members       []map[string]any `json:"members,omitempty"`
	MaxSize       int              `json:"max_size,omitempty"`
	SystemID      string           `json:"system_id,omitempty"`
	POIID         string           `json:"poi_id,omitempty"`
	PendingInvite bool             `json:"pending_invite,omitempty"`
	InviteFrom    string           `json:"invite_from,omitempty"`
	InviteFleet   string           `json:"invite_fleet,omitempty"`
	Invites       []map[string]any `json:"invites,omitempty"`
	Message       string           `json:"message"`
}

FleetResponse wraps the response from fleet command. v0.240: new command for creating and managing player fleets.

type ForumCreateThreadResponse added in v0.2.0

type ForumCreateThreadResponse struct {
	Message  string `json:"message"`
	ThreadID string `json:"thread_id"`
	Title    string `json:"title"`
}

ForumCreateThreadResponse wraps the response from forum_create_thread command.

type ForumDeleteReplyResponse added in v0.2.0

type ForumDeleteReplyResponse struct {
	Message string `json:"message"`
	ReplyID string `json:"reply_id"`
}

ForumDeleteReplyResponse — forum_delete_reply

type ForumDeleteThreadResponse added in v0.2.0

type ForumDeleteThreadResponse struct {
	Message  string `json:"message"`
	ThreadID string `json:"thread_id"`
}

ForumDeleteThreadResponse — forum_delete_thread

type ForumListResponse

type ForumListResponse struct {
	Action               string               `json:"action,omitempty"`
	Threads              []ForumThreadSummary `json:"threads"`
	Page                 int                  `json:"page,omitempty"`
	Total                int                  `json:"total,omitempty"`
	PerPage              int                  `json:"per_page,omitempty"`
	HasMore              bool                 `json:"has_more,omitempty"`
	Categories           []string             `json:"categories,omitempty"`
	CategoryDescriptions map[string]string    `json:"category_descriptions,omitempty"`
}

ForumListResponse wraps the response from forum_list command.

type ForumReplyDetail added in v0.2.0

type ForumReplyDetail struct {
	ID               string `json:"id"`
	ThreadID         string `json:"thread_id,omitempty"`
	Author           string `json:"author"`
	AuthorID         string `json:"author_id,omitempty"`
	AuthorEmpire     string `json:"author_empire,omitempty"`
	AuthorFactionTag string `json:"author_faction_tag,omitempty"`
	IsDevTeam        bool   `json:"is_dev_team,omitempty"`
	Content          string `json:"content"`
	Upvotes          int    `json:"upvotes,omitempty"`
	CreatedAt        string `json:"created_at,omitempty"`
}

ForumReplyDetail represents a reply in a forum thread.

type ForumReplyResponse added in v0.2.0

type ForumReplyResponse struct {
	Message  string `json:"message"`
	ReplyID  string `json:"reply_id"`
	ThreadID string `json:"thread_id"`
}

ForumReplyResponse wraps the response from forum_reply command.

type ForumThreadResponse

type ForumThreadResponse struct {
	Action  string             `json:"action,omitempty"`
	Thread  ForumThreadSummary `json:"thread"`
	Replies []ForumReplyDetail `json:"replies"`
}

ForumThreadResponse wraps the response from forum_get_thread command.

type ForumThreadSummary added in v0.2.0

type ForumThreadSummary struct {
	ID               string `json:"id"`
	Title            string `json:"title"`
	Author           string `json:"author"`
	AuthorID         string `json:"author_id,omitempty"`
	AuthorEmpire     string `json:"author_empire,omitempty"`
	AuthorFactionTag string `json:"author_faction_tag,omitempty"`
	IsDevTeam        bool   `json:"is_dev_team,omitempty"`
	Category         string `json:"category,omitempty"`
	Content          string `json:"content,omitempty"`
	ReplyCount       int    `json:"reply_count,omitempty"`
	Upvotes          int    `json:"upvotes,omitempty"`
	Pinned           bool   `json:"pinned,omitempty"`
	Locked           bool   `json:"locked,omitempty"`
	CreatedAt        string `json:"created_at,omitempty"`
	UpdatedAt        string `json:"updated_at,omitempty"`
}

ForumThreadSummary represents a thread in the forum listing.

type ForumUpvoteResponse added in v0.2.0

type ForumUpvoteResponse struct {
	Message  string `json:"message"`
	ReplyID  string `json:"reply_id,omitempty"`
	ThreadID string `json:"thread_id,omitempty"`
}

ForumUpvoteResponse — forum_upvote

type FreightDebt added in v0.2.0

type FreightDebt struct {
	ID          string         `json:"id"`
	ShipmentID  string         `json:"shipment_id"`
	Debtor      *ShipmentActor `json:"debtor"`
	Creditor    *ShipmentActor `json:"creditor"`
	Original    int64          `json:"original"`
	Outstanding int64          `json:"outstanding"`
	CreatedAt   string         `json:"created_at"`
	PaidAt      string         `json:"paid_at,omitempty"`
}

FreightDebt is an outstanding failure-debt owed by a carrier.

type GameCommand added in v0.2.0

type GameCommand struct {
	Name         string `json:"name"`
	Category     string `json:"category,omitempty"`
	Description  string `json:"description,omitempty"`
	Format       string `json:"format,omitempty"`
	IsMutation   bool   `json:"is_mutation,omitempty"`
	RequiresAuth bool   `json:"requires_auth,omitempty"`
	Notes        string `json:"notes,omitempty"`
}

GameCommand represents a command in the help/commands listing.

type GetAchievementsResponse added in v0.2.0

type GetAchievementsResponse struct {
	Achievements []Achievement      `json:"achievements"`
	Summary      AchievementSummary `json:"summary"`
	Message      string             `json:"message"`
}

GetAchievementsResponse wraps the response from get_achievements command.

type GetActionLogResponse added in v0.2.0

type GetActionLogResponse struct {
	Entries    []ActionLogEntry `json:"entries"`
	HasMore    bool             `json:"has_more"`
	Category   string           `json:"category,omitempty"`
	Limit      int              `json:"limit,omitempty"`
	FactionID  string           `json:"faction_id,omitempty"`
	Page       int              `json:"page,omitempty"`
	PageSize   int              `json:"page_size,omitempty"`
	Total      int              `json:"total,omitempty"`
	TotalPages int              `json:"total_pages,omitempty"`
}

GetActionLogResponse wraps the response from get_action_log command.

type GetActiveMissionsResponse

type GetActiveMissionsResponse struct {
	Action      string          `json:"action,omitempty"`
	Missions    []ActiveMission `json:"missions"`
	TotalCount  int             `json:"total_count,omitempty"`
	MaxMissions int             `json:"max_missions,omitempty"`
}

GetActiveMissionsResponse wraps the response from get_active_missions command.

type GetBaseCostResponse added in v0.2.0

type GetBaseCostResponse struct {
	StationTypes []StationType  `json:"station_types"`
	Requirements []string       `json:"requirements"`
	BaseCost     map[string]int `json:"base_cost,omitempty"`
	Message      string         `json:"message,omitempty"`
}

GetBaseCostResponse wraps the response from get_base_cost command.

type GetBaseResponse

type GetBaseResponse struct {
	Action    string            `json:"action,omitempty"`
	Base      *Base             `json:"base"`
	Services  []string          `json:"services"`
	Condition *StationHealth    `json:"condition,omitempty"`
	POI       POI               `json:"poi,omitempty"`
	Resources []ResourceDisplay `json:"resources,omitempty"`
	Market    []MarketListing   `json:"market,omitempty"`

	FactionFuelCapacity int   `json:"faction_fuel_capacity,omitempty"`
	FactionFuelReserve  int   `json:"faction_fuel_reserve,omitempty"`
	FuelPrice           int64 `json:"fuel_price,omitempty"`
	FuelPriceAllIn      int64 `json:"fuel_price_all_in,omitempty"`
	FuelTaxPerUnit      int64 `json:"fuel_tax_per_unit,omitempty"`

	LifeSupport *LifeSupport `json:"life_support,omitempty"`
}

GetBaseResponse wraps the response from get_base command.

type GetBattleStatusResponse

type GetBattleStatusResponse struct {
	BattleID      string              `json:"battle_id"`
	SystemID      string              `json:"system_id"`
	IsParticipant bool                `json:"is_participant"`
	Participants  []BattleParticipant `json:"participants,omitempty"`
	Sides         []BattleSide        `json:"sides,omitempty"`
	TickDuration  int                 `json:"tick_duration,omitempty"`
}

GetBattleStatusResponse wraps the response from get_battle_status command.

type GetCargoResponse

type GetCargoResponse struct {
	Action    string      `json:"action,omitempty"`
	Cargo     []CargoItem `json:"cargo"`
	Used      int         `json:"used"`
	Capacity  int         `json:"capacity"`
	Available int         `json:"available"`

	BayCapacity  int             `json:"bay_capacity,omitempty"`
	BayUsed      int             `json:"bay_used,omitempty"`
	CarriedShips json.RawMessage `json:"carried_ships,omitempty"`
}

GetCargoResponse wraps the response from get_cargo command.

type GetCommandsResponse

type GetCommandsResponse struct {
	Action   string        `json:"action,omitempty"`
	Commands []GameCommand `json:"commands"`
}

GetCommandsResponse wraps the response from get_commands command.

type GetDroneResponse added in v0.2.0

type GetDroneResponse struct {
	ID            string          `json:"id"`
	Type          string          `json:"type"`
	Status        string          `json:"status"`
	Hull          int             `json:"hull"`
	MaxHull       int             `json:"max_hull"`
	Cargo         json.RawMessage `json:"cargo,omitempty"`
	CargoCapacity int             `json:"cargo_capacity"`
	CargoUsed     int             `json:"cargo_used"`
	ItemID        string          `json:"item_id,omitempty"`
	POIID         string          `json:"poi_id,omitempty"`
	SystemID      string          `json:"system_id,omitempty"`
	DeployedAt    string          `json:"deployed_at,omitempty"`
	LoadedAt      string          `json:"loaded_at,omitempty"`
	Script        string          `json:"script,omitempty"`
	Memory        json.RawMessage `json:"memory,omitempty"`
	TravelTo      string          `json:"travel_to,omitempty"`
	TravelTicks   int             `json:"travel_ticks,omitempty"`
}

GetDroneResponse is returned by get_drone — details of a single drone.

  • get_drone

type GetDronesResponse

type GetDronesResponse struct {
	BandwidthTotal int             `json:"bandwidth_total"`
	BandwidthUsed  int             `json:"bandwidth_used"`
	BayCapacity    int             `json:"bay_capacity"`
	BayCount       int             `json:"bay_count"`
	DeployedCount  int             `json:"deployed_count"`
	Drones         json.RawMessage `json:"drones,omitempty"`
}

GetDronesResponse is returned by get_drones — drone bay summary and roster.

  • get_drones

type GetEmpireInfoResponse added in v0.2.0

type GetEmpireInfoResponse struct {
	Action  string          `json:"action"`
	Empires json.RawMessage `json:"empires,omitempty"`
}

GetEmpireInfoResponse is returned by get_empire_info.

  • get_empire_info

type GetFactionAchievementsResponse added in v0.2.0

type GetFactionAchievementsResponse struct {
	Achievements []Achievement      `json:"achievements"`
	Summary      AchievementSummary `json:"summary"`
	Message      string             `json:"message,omitempty"`
}

GetFactionAchievementsResponse is returned by get_faction_achievements. It is shape-identical to GetAchievementsResponse — the same per-player progress view (earned/progress/share_url), scoped to the faction's achievements.

  • get_faction_achievements

type GetGuideResponse

type GetGuideResponse struct {
	Action  string       `json:"action,omitempty"`
	Guide   string       `json:"guide,omitempty"`
	Content string       `json:"content,omitempty"`
	Guides  []GuideEntry `json:"guides,omitempty"`
	Hint    string       `json:"hint,omitempty"`
}

GetGuideResponse wraps the response from get_guide command.

type GetInsuranceQuoteResponse

type GetInsuranceQuoteResponse struct {
	Message string         `json:"message"`
	Quote   InsuranceQuote `json:"quote"`
	Notice  string         `json:"notice,omitempty"`
}

GetInsuranceQuoteResponse wraps the response from get_insurance_quote command.

type GetListingsResponse

type GetListingsResponse struct {
	Action      string          `json:"action"`
	Listings    []MarketListing `json:"listings"`
	StationID   string          `json:"station_id"`
	StationName string          `json:"station_name"`
}

GetListingsResponse wraps the response from get_listings command.

type GetMapResponse

type GetMapResponse struct {
	Systems    []MapSystem `json:"systems"`
	TotalCount int         `json:"total_count,omitempty"`
}

GetMapResponse wraps the response from get_map command.

type GetMissionsResponse

type GetMissionsResponse struct {
	Action   string              `json:"action,omitempty"`
	Missions []MissionBoardEntry `json:"missions"`
	BaseName string              `json:"base_name"`
	BaseID   string              `json:"base_id"`
}

GetMissionsResponse wraps the response from get_missions command.

type GetNearbyResponse added in v0.2.0

type GetNearbyResponse struct {
	Action           string          `json:"action,omitempty"`
	Nearby           []NearbyPlayer  `json:"nearby"`
	Pirates          []NearbyPirate  `json:"pirates,omitempty"`
	Count            int             `json:"count"`
	PirateCount      int             `json:"pirate_count,omitempty"`
	POIID            string          `json:"poi_id,omitempty"`
	EmpireNPCCount   int             `json:"empire_npc_count,omitempty"`
	EmpireNPCs       json.RawMessage `json:"empire_npcs,omitempty"`
	OfflineCollapsed int             `json:"offline_collapsed,omitempty"`
}

GetNearbyResponse wraps the response from get_nearby command.

type GetNotesResponse

type GetNotesResponse struct {
	Action     string `json:"action,omitempty"`
	Notes      []Note `json:"notes"`
	TotalCount int    `json:"total_count,omitempty"`
}

GetNotesResponse wraps the response from get_notes command.

type GetNotificationsResponse added in v0.2.0

type GetNotificationsResponse struct {
	Action        string         `json:"action,omitempty"`
	Notifications []Notification `json:"notifications"`
	Count         int            `json:"count"`
	Remaining     int            `json:"remaining"`
	CurrentTick   int            `json:"current_tick"`
	Timestamp     int            `json:"timestamp"`
	Throttled     bool           `json:"throttled,omitempty"`
	RetryAfter    int            `json:"retry_after,omitempty"`
}

GetNotificationsResponse wraps the response from get_notifications command.

type GetPOIResponse

type GetPOIResponse struct {
	// Kind is the v0.531.4 response discriminator: normal|transit (transit variant folded into this one struct).
	Kind          string            `json:"kind,omitempty"`
	Action        string            `json:"action,omitempty"`
	POI           POI               `json:"poi"`
	Base          *Base             `json:"base,omitempty"`
	PoliceDrones  int               `json:"police_drones,omitempty"`
	PoliceWarning string            `json:"police_warning,omitempty"`
	Resources     []ResourceDisplay `json:"resources,omitempty"`
	Services      []string          `json:"services,omitempty"`
}

GetPOIResponse wraps the response from get_poi command.

type GetRecipesResponse

type GetRecipesResponse struct {
	Action  string            `json:"action"`
	Recipes map[string]Recipe `json:"recipes"`
}

GetRecipesResponse wraps the response from get_recipes command.

type GetShipResponse added in v0.2.0

type GetShipResponse struct {
	Ship      Ship         `json:"ship"`
	Modules   []ShipModule `json:"modules"`
	CargoUsed int          `json:"cargo_used"`
	CargoMax  int          `json:"cargo_max"`
	Class     *ShipClass   `json:"class,omitempty"`
}

GetShipResponse wraps the response from get_ship command.

type GetShipsResponse

type GetShipsResponse struct {
	Action      string      `json:"action,omitempty"`
	Ships       []ShipClass `json:"ships"`
	Count       int         `json:"count,omitempty"`
	Message     string      `json:"message,omitempty"`
	StationID   string      `json:"station_id,omitempty"`
	StationName string      `json:"station_name,omitempty"`
}

GetShipsResponse wraps the response from get_ships command (ship class catalog).

type GetSkillsResponse

type GetSkillsResponse struct {
	Action       string                     `json:"action,omitempty"`
	Skills       map[string]SkillDefinition `json:"skills"`
	PlayerSkills []PlayerSkill              `json:"player_skills,omitempty"`
	Message      string                     `json:"message,omitempty"`
}

GetSkillsResponse wraps the response from get_skills command.

type GetStatusResponse

type GetStatusResponse struct {
	Action      string         `json:"action,omitempty"`
	Player      Player         `json:"player"`
	Ship        Ship           `json:"ship"`
	Modules     []ShipModule   `json:"modules"`
	System      SystemData     `json:"system,omitempty"`
	POI         POI            `json:"poi,omitempty"`
	Nearby      []NearbyPlayer `json:"nearby,omitempty"`
	CurrentTick int64          `json:"current_tick,omitempty"`
}

GetStatusResponse wraps the response from get_status command.

type GetSystemAgentsResponse added in v0.2.0

type GetSystemAgentsResponse struct {
	Agents           json.RawMessage `json:"agents,omitempty"`
	Count            int             `json:"count,omitempty"`
	OfflineCollapsed int             `json:"offline_collapsed,omitempty"`
	SystemID         string          `json:"system_id,omitempty"`
}

GetSystemAgentsResponse — get_system_agents

type GetSystemResponse

type GetSystemResponse struct {
	// Kind is the v0.531.4 response discriminator: normal|transit (transit variant folded into this one struct; in_transit bool is the behavioral source).
	Kind           string        `json:"kind,omitempty"`
	Action         string        `json:"action"`
	POI            CurrentPOI    `json:"poi,omitempty"`
	SecurityStatus string        `json:"security_status"`
	System         SystemData    `json:"system"`
	ActiveBattle   *ActiveBattle `json:"active_battle,omitempty"`
	FromSystem     string        `json:"from_system,omitempty"`
	InTransit      bool          `json:"in_transit,omitempty"`
	TicksRemaining int           `json:"ticks_remaining,omitempty"`
	ToSystem       string        `json:"to_system,omitempty"`
	TransitType    string        `json:"transit_type,omitempty"`
}

GetSystemResponse wraps the response from get_system command.

type GetTaxEstimateResponse added in v0.2.0

type GetTaxEstimateResponse struct {
	Action                      string          `json:"action"`
	AssessedPropertyByShip      json.RawMessage `json:"assessed_property_by_ship,omitempty"`
	AssessedPropertyValue       int64           `json:"assessed_property_value"`
	IncomeTax                   json.RawMessage `json:"income_tax,omitempty"`
	IncomeTaxTotal              int64           `json:"income_tax_total"`
	LastAssessedAt              int64           `json:"last_assessed_at,omitempty"`
	LastPropertyAssessedAt      int64           `json:"last_property_assessed_at,omitempty"`
	NextAssessmentApproxSeconds int64           `json:"next_assessment_approx_seconds,omitempty"`
	Note                        string          `json:"note,omitempty"`
	PropertyTax                 json.RawMessage `json:"property_tax,omitempty"`
	PropertyTaxTotal            int64           `json:"property_tax_total"`
	SalesTaxRates               json.RawMessage `json:"sales_tax_rates,omitempty"`
	TaxCollectionActive         bool            `json:"tax_collection_active"`
	TaxableIncomeBySource       json.RawMessage `json:"taxable_income_by_source,omitempty"`
	TaxableIncomeToDate         int64           `json:"taxable_income_to_date"`

	// Market trading is taxed on profit, not turnover: TaxableMarketIncome is
	// MarketSalesToDate less MarketCostOfGoodsDeducted, with prior losses
	// carried forward. TaxPrepaid offsets the next assessment.
	MarketSalesToDate         int64 `json:"market_sales_to_date"`
	MarketCostOfGoodsDeducted int64 `json:"market_cost_of_goods_deducted"`
	MarketLossCarryforward    int64 `json:"market_loss_carryforward,omitempty"`
	TaxableMarketIncome       int64 `json:"taxable_market_income"`
	TaxPrepaid                int64 `json:"tax_prepaid"`
}

GetTaxEstimateResponse is returned by get_tax_estimate.

  • get_tax_estimate

type GetTradesResponse

type GetTradesResponse struct {
	Action   string        `json:"action,omitempty"`
	Incoming []TradeDetail `json:"incoming"`
	Outgoing []TradeDetail `json:"outgoing"`
}

GetTradesResponse wraps the response from get_trades command.

type GetVersionResponse

type GetVersionResponse struct {
	Action      string             `json:"action,omitempty"`
	Version     string             `json:"version"`
	ReleaseDate string             `json:"release_date"`
	Notes       []string           `json:"notes"`
	Page        int                `json:"page,omitempty"`
	PerPage     int                `json:"per_page,omitempty"`
	Total       int                `json:"total,omitempty"`
	TotalPages  int                `json:"total_pages,omitempty"`
	Versions    []ChangelogVersion `json:"versions,omitempty"`
	HasMore     bool               `json:"has_more,omitempty"`
	SearchTerm  string             `json:"search_term,omitempty"`
}

GetVersionResponse wraps the response from get_version command.

type GetWrecksResponse

type GetWrecksResponse struct {
	Action string  `json:"action,omitempty"`
	Wrecks []Wreck `json:"wrecks"`
	Count  int     `json:"count,omitempty"`
}

GetWrecksResponse wraps the response from get_wrecks command.

type GiftShipResponse added in v0.2.0

type GiftShipResponse struct {
	Action    string `json:"action"`
	BaseID    string `json:"base_id,omitempty"`
	ClassID   string `json:"class_id,omitempty"`
	ClassName string `json:"class_name,omitempty"`
	Recipient string `json:"recipient,omitempty"`
	ShipID    string `json:"ship_id,omitempty"`
}

GiftShipResponse wraps the response from gift_ship action (via send_gift with ship).

type GuideEntry added in v0.2.0

type GuideEntry struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description,omitempty"`
}

GuideEntry represents a guide in the guide listing.

type HelpResponse added in v0.2.0

type HelpResponse struct {
	Commands    []GameCommand `json:"commands"`
	Topic       string        `json:"topic,omitempty"`
	Description string        `json:"description,omitempty"`
}

HelpResponse wraps the response from help command.

type HuntResponse added in v0.2.0

type HuntResponse struct {
	Command string `json:"command"`
	Message string `json:"message"`
	Pending bool   `json:"pending"`
}

HuntResponse is returned by hunt. Hunting resolves on a later tick, so the immediate reply only acknowledges the command (Pending).

  • hunt

type InstallModResponse added in v0.2.0

type InstallModResponse struct {
	Message      string  `json:"message"`
	ModuleID     string  `json:"module_id"`
	Quality      float64 `json:"quality,omitempty"`
	QualityGrade string  `json:"quality_grade,omitempty"`
	CPUUsed      int     `json:"cpu_used"`
	PowerUsed    int     `json:"power_used"`
	CurrentAmmo  int     `json:"current_ammo,omitempty"`
	LoadedAmmo   string  `json:"loaded_ammo,omitempty"`
	MagazineSize int     `json:"magazine_size,omitempty"`
}

InstallModResponse wraps the response from install_mod command.

type InsuranceFactor added in v0.2.0

type InsuranceFactor struct {
	Name       string  `json:"name"`
	Detail     string  `json:"detail"`
	Multiplier float64 `json:"multiplier"`
}

InsuranceFactor represents a factor in an insurance quote calculation.

type InsurancePolicy added in v0.2.0

type InsurancePolicy struct {
	PolicyID             string            `json:"policy_id"`
	ShipClass            string            `json:"ship_class,omitempty"`
	BaseID               string            `json:"base_id,omitempty"`
	Coverage             int               `json:"coverage"`
	Premium              int               `json:"premium"`
	RiskScore            float64           `json:"risk_score,omitempty"`
	ExpiresAt            string            `json:"expires_at,omitempty"`
	SelfDestructExcluded bool              `json:"self_destruct_excluded,omitempty"`
	RiskFactors          []InsuranceFactor `json:"risk_factors,omitempty"`
}

InsurancePolicy represents an active insurance policy.

type InsuranceQuote added in v0.2.0

type InsuranceQuote struct {
	Coverage    int               `json:"coverage"`
	Premium     int               `json:"premium"`
	FittedValue int               `json:"fitted_value,omitempty"`
	RiskScore   float64           `json:"risk_score,omitempty"`
	Refused     bool              `json:"refused,omitempty"`
	ExpiresIn   string            `json:"expires_in,omitempty"` // human string e.g. "7 days", not a tick count
	Factors     []InsuranceFactor `json:"factors,omitempty"`
}

InsuranceQuote represents an insurance quote for a ship.

type JettisonResponse added in v0.2.0

type JettisonResponse struct {
	Action     string `json:"action"`
	ItemID     string `json:"item_id"`
	ItemName   string `json:"item_name"`
	Quantity   int    `json:"quantity"`
	CargoUsed  int    `json:"cargo_used"`
	CargoSpace int    `json:"cargo_space"`

	ContainerID string `json:"container_id,omitempty"`
}

JettisonResponse wraps the response from jettison command.

type JoinFactionResponse added in v0.2.0

type JoinFactionResponse struct {
	Faction   string `json:"faction"`
	FactionID string `json:"faction_id"`
	Message   string `json:"message"`
}

JoinFactionResponse — join_faction

type JumpResponse added in v0.2.0

type JumpResponse struct {
	Action      string `json:"action"`
	Command     string `json:"command,omitempty"`
	Pending     bool   `json:"pending,omitempty"`
	ArrivalTick int64  `json:"arrival_tick,omitempty"`
	Destination string `json:"destination,omitempty"`
	IsWormhole  bool   `json:"is_wormhole,omitempty"`
}

JumpResponse wraps the response from jump command.

type JumpedResponse added in v0.2.0

type JumpedResponse struct {
	Action        string `json:"action"`
	FromSystem    string `json:"from_system,omitempty"`
	NavigationXP  int    `json:"navigation_xp,omitempty"`
	ExplorationXP int    `json:"exploration_xp,omitempty"`
	PilotingXP    int    `json:"piloting_xp,omitempty"`
	POI           string `json:"poi,omitempty"`
	System        string `json:"system,omitempty"`
	SystemID      string `json:"system_id,omitempty"`
	AutoUndocked  bool   `json:"auto_undocked,omitempty"`
}

JumpedResponse wraps the response from jumped event after jump completes.

type LifeSupport added in v0.2.0

type LifeSupport struct {
	Supply               int                      `json:"supply"`
	Demand               int                      `json:"demand"`
	Plants               int                      `json:"plants"`
	MaintenanceCycleTick int                      `json:"maintenance_cycle_ticks"`
	Maintenance          []LifeSupportMaintenance `json:"maintenance,omitempty"`
	Starved              []LifeSupportMaintenance `json:"starved,omitempty"`
	Remediation          string                   `json:"remediation,omitempty"`
}

LifeSupport describes a station's life-support standing (server v0.495.1): how much supply it produces against the demand of its population, and the per-cycle consumables that keep it running. Starved lists the maintenance items it is currently short of; Remediation is the server's advice on fixing the shortfall.

type LifeSupportMaintenance added in v0.2.0

type LifeSupportMaintenance struct {
	ItemID           string `json:"item_id"`
	Name             string `json:"name,omitempty"`
	QuantityPerCycle int    `json:"quantity_per_cycle"`
}

LifeSupportMaintenance is one consumable a station's life support burns per maintenance cycle.

type ListPassengersResponse added in v0.2.0

type ListPassengersResponse struct {
	Action         string            `json:"action,omitempty"`
	Count          int               `json:"count"`
	EconomyBerths  string            `json:"economy_berths"`
	BusinessBerths string            `json:"business_berths"`
	FirstBerths    string            `json:"first_berths"`
	Passengers     []AboardPassenger `json:"passengers"`
	// OnboardService summarizes the in-flight service level the ship's fitted
	// dining/leisure modules provide to passengers.
	OnboardService string `json:"onboard_service,omitempty"`
}

ListPassengersResponse wraps the list_passengers response: the passengers currently aboard plus the ship's total passenger berths by class, reported as gauge strings (e.g. "2/3"). Returned by GameClient.ListPassengers.

type ListShipForSaleResponse added in v0.2.0

type ListShipForSaleResponse struct {
	Message     string `json:"message"`
	ListingID   string `json:"listing_id"`
	ShipID      string `json:"ship_id"`
	Price       int    `json:"price"`
	Fee         int    `json:"fee"`
	CreditsLeft int    `json:"credits_left"`
}

ListShipForSaleResponse wraps the response from list_ship_for_sale command.

type ListShipsResponse

type ListShipsResponse struct {
	Ships           []OwnedShip `json:"ships"`
	Count           int         `json:"count"`
	ActiveShipID    string      `json:"active_ship_id,omitempty"`
	ActiveShipClass string      `json:"active_ship_class,omitempty"`
}

ListShipsResponse wraps the response from list_ships command.

type ListStationPassengersResponse added in v0.2.0

type ListStationPassengersResponse struct {
	Action  string             `json:"action"`
	Station string             `json:"station"`
	Count   int                `json:"count"`
	Waiting []StationPassenger `json:"waiting"`

	TransitLounge *TransitLounge `json:"transit_lounge,omitempty"`
}

ListStationPassengersResponse wraps the list_station_passengers response: the queried station and the passengers waiting there. Station is empty when the query defaulted to the currently docked station.

type LoadDroneResponse added in v0.2.0

type LoadDroneResponse struct {
	BayCapacity int    `json:"bay_capacity"`
	BayCount    int    `json:"bay_count"`
	DroneID     string `json:"drone_id"`
	DroneType   string `json:"drone_type"`
	Hull        int    `json:"hull"`
	Message     string `json:"message"`
	Status      string `json:"status"`
}

LoadDroneResponse is returned by load_drone.

  • load_drone

type LoadPassengerResponse added in v0.2.0

type LoadPassengerResponse struct {
	Action    string            `json:"action"`
	Message   string            `json:"message"`
	Loaded    []LoadedPassenger `json:"loaded"`
	Count     int               `json:"count"`
	TotalFare int               `json:"total_fare"`
	// Berth occupancy after the load, each formatted "occupied/capacity". A
	// Count of 0 with free capacity here means the passengers were taken by
	// another ship, not that they failed to fit.
	EconomyBerths  string `json:"economy_berths"`
	BusinessBerths string `json:"business_berths"`
	FirstBerths    string `json:"first_berths"`
}

LoadPassengerResponse wraps the load_passenger response. Fewer passengers may board than were waiting for the destination: berth class and capacity limit who fits (a free upgrade is allowed, but first-class is never downgraded to fit), so Loaded/Count/TotalFare — not the waiting list — are the source of truth for who is actually aboard and the booked fare.

type LoadedPassenger added in v0.2.0

type LoadedPassenger struct {
	Name            string `json:"name"`
	Class           string `json:"class"`
	Destination     string `json:"destination"`
	DestinationName string `json:"destination_name"`
	Fare            int    `json:"fare"`
	TicksRemaining  int    `json:"ticks_remaining"`
}

LoadedPassenger is a single passenger actually boarded by load_passenger.

type LoginResponse

type LoginResponse struct {
	Message       string             `json:"message,omitempty"`
	Player        Player             `json:"player"`
	Ship          Ship               `json:"ship"`
	System        SystemData         `json:"system"`
	POI           POI                `json:"poi"`
	CaptainsLog   []CaptainsLogEntry `json:"captains_log,omitempty"`
	PendingTrades []PendingTradeInfo `json:"pending_trades,omitempty"`
	ReleaseInfo   *ReleaseInfo       `json:"release_info,omitempty"`
	UnreadChat    *UnreadChat        `json:"unread_chat,omitempty"`
}

LoginResponse wraps the response from the logged_in message.

type LootWreckResponse added in v0.2.0

type LootWreckResponse struct {
	Quantity     int     `json:"quantity"`
	WreckEmpty   bool    `json:"wreck_empty"`
	ItemID       string  `json:"item_id,omitempty"`
	ModuleID     string  `json:"module_id,omitempty"`
	ModuleTypeID string  `json:"module_type_id,omitempty"`
	Quality      float64 `json:"quality,omitempty"`
	Wear         float64 `json:"wear,omitempty"`
}

LootWreckResponse wraps the response from loot_wreck command.

type MapSystem

type MapSystem struct {
	SystemID    string   `json:"system_id"`
	Name        string   `json:"name"`
	Position    Position `json:"position"`
	Connections []string `json:"connections"`
	POICount    int      `json:"poi_count"`
	Online      int      `json:"online"`
	Visited     bool     `json:"visited"`
	VisitedAt   string   `json:"visited_at"`
	Empire      string   `json:"empire,omitempty"`
}

MapSystem represents a system in the galaxy map (from get_map).

type MarketInsight added in v0.2.0

type MarketInsight struct {
	Category string `json:"category"`
	Item     string `json:"item"`
	ItemID   string `json:"item_id"`
	Message  string `json:"message"`
	Priority int    `json:"priority"`
}

MarketInsight represents a market analysis insight.

type MarketListing

type MarketListing struct {
	ItemID       string  `json:"item_id"`
	ItemType     string  `json:"item_type"`
	Quantity     float64 `json:"quantity"`
	PricePerUnit float64 `json:"price_per_unit"`
	PriceEach    float64 `json:"price_each"`
	TotalPrice   float64 `json:"total_price"`
	Total        float64 `json:"total"`
	Type         string  `json:"type"`
	ListedBy     string  `json:"listed_by,omitempty"`
	Seller       string  `json:"seller,omitempty"`
}

MarketListing represents a single market listing.

type MarketOrder

type MarketOrder struct {
	PriceEach  float64 `json:"price_each"`
	Quantity   float64 `json:"quantity"`
	MyQuantity int     `json:"my_quantity,omitempty"`
	Source     string  `json:"source,omitempty"`
}

MarketOrder represents a single buy or sell order in the market order book.

type MessageResponse added in v0.2.0

type MessageResponse struct {
	Message string `json:"message"`
}

MessageResponse is a generic response with just a message field.

type MineResponse added in v0.2.0

type MineResponse struct {
	// Kind is the v0.531.4 response discriminator: filtered|yield.
	Kind    string `json:"kind,omitempty"`
	Action  string `json:"action,omitempty"`
	Command string `json:"command,omitempty"`
	Pending bool   `json:"pending,omitempty"`
}

MineResponse wraps the response from mine command.

type MiningYield

type MiningYield struct {
	// Kind is the v0.531.4 response discriminator: yield.
	Kind             string         `json:"kind,omitempty"`
	ResourceID       string         `json:"resource_id"`
	ResourceName     string         `json:"resource_name"`
	Quantity         float64        `json:"quantity"`
	Remaining        float64        `json:"remaining"`
	MaxRemaining     float64        `json:"max_remaining"`
	DepletionPercent float64        `json:"depletion_percent"`
	RemainingDisplay string         `json:"remaining_display"`
	XPGained         map[string]int `json:"xp_gained,omitempty"`
}

MiningYield represents successful mining action with resource extraction. Server event type: mining_yield

type Mission

type Mission struct {
	ID          string             `json:"id"`
	Type        string             `json:"type"`
	Title       string             `json:"title"`
	Description string             `json:"description"`
	Giver       string             `json:"giver"`
	GiverBaseID string             `json:"giver_base_id"`
	Rewards     MissionRewards     `json:"rewards"`
	Objectives  []MissionObjective `json:"objectives"`
	Difficulty  int                `json:"difficulty"`
	ExpiresAt   string             `json:"expires_at,omitempty"`
	AcceptedAt  string             `json:"accepted_at,omitempty"`
	Progress    map[string]int     `json:"progress,omitempty"`
}

Mission represents a mission from a mission board.

type MissionBoardEntry added in v0.2.0

type MissionBoardEntry struct {
	MissionID         string               `json:"mission_id"`
	TemplateID        string               `json:"template_id,omitempty"`
	Type              string               `json:"type"`
	Title             string               `json:"title"`
	Description       string               `json:"description,omitempty"`
	Difficulty        int                  `json:"difficulty,omitempty"`
	Giver             MissionGiver         `json:"giver,omitempty"`
	IssuingBase       string               `json:"issuing_base,omitempty"`
	IssuingBaseID     string               `json:"issuing_base_id,omitempty"`
	IssuingSystemID   string               `json:"issuing_system_id,omitempty"`
	IssuingSystemName string               `json:"issuing_system_name,omitempty"`
	FactionID         string               `json:"faction_id,omitempty"`
	FactionName       string               `json:"faction_name,omitempty"`
	Repeatable        bool                 `json:"repeatable,omitempty"`
	Community         bool                 `json:"community,omitempty"`
	CommunityPercent  float64              `json:"community_percent,omitempty"`
	CommunityProgress map[string]string    `json:"community_progress,omitempty"`
	ChainNext         string               `json:"chain_next,omitempty"`
	ExpiresInTicks    int                  `json:"expires_in_ticks,omitempty"`
	Dialog            *MissionDialog       `json:"dialog,omitempty"`
	ProvidedItems     map[string]int       `json:"provided_items,omitempty"`
	RequiredModules   []string             `json:"required_modules,omitempty"`
	Warnings          []string             `json:"warnings,omitempty"`
	Requirements      *MissionRequirements `json:"requirements,omitempty"`
	Rewards           *MissionRewards      `json:"rewards,omitempty"`
	Objectives        []MissionObjective   `json:"objectives,omitempty"`
}

type MissionDialog added in v0.2.0

type MissionDialog struct {
	Offer    string `json:"offer,omitempty"`
	Accept   string `json:"accept,omitempty"`
	Decline  string `json:"decline,omitempty"`
	Complete string `json:"complete,omitempty"`
}

MissionBoardEntry represents a mission on a mission board. MissionDialog contains NPC dialog text for mission interactions.

type MissionGiver added in v0.2.0

type MissionGiver struct {
	Name  string `json:"name"`
	Title string `json:"title,omitempty"`
}

MissionGiver represents the NPC giving a mission.

type MissionObjective

type MissionObjective struct {
	Type            string   `json:"type"`
	Description     string   `json:"description"`
	ItemID          string   `json:"item_id,omitempty"`
	Quantity        int      `json:"quantity,omitempty"`
	TargetID        string   `json:"target_id,omitempty"`
	TargetBaseID    string   `json:"target_base_id,omitempty"`
	TargetBaseName  string   `json:"target_base_name,omitempty"`
	SystemID        string   `json:"system_id,omitempty"`
	SystemName      string   `json:"system_name,omitempty"`
	EligiblePlayers []string `json:"eligible_players,omitempty"`
	Participants    []string `json:"participants,omitempty"`
	Completed       bool     `json:"completed,omitempty"`
}

MissionObjective represents a single objective in a mission.

type MissionRequirements added in v0.2.0

type MissionRequirements struct {
	DeliverItemID     string `json:"deliver_item_id,omitempty"`
	DeliverItemName   string `json:"deliver_item_name,omitempty"`
	DeliverQuantity   int    `json:"deliver_quantity,omitempty"`
	DeliverToBaseID   string `json:"deliver_to_base_id,omitempty"`
	DeliverToBaseName string `json:"deliver_to_base_name,omitempty"`
	MineItemID        string `json:"mine_item_id,omitempty"`
	MineItemName      string `json:"mine_item_name,omitempty"`
	MineQuantity      int    `json:"mine_quantity,omitempty"`
	KillCount         int    `json:"kill_count,omitempty"`
	TargetPlayerID    string `json:"target_player_id,omitempty"`
	VisitSystemCount  int    `json:"visit_system_count,omitempty"`
}

MissionRequirements represents requirements to complete a mission.

type MissionRewards

type MissionRewards struct {
	Credits    int            `json:"credits"`
	Items      map[string]int `json:"items,omitempty"`
	SkillXP    map[string]int `json:"skill_xp,omitempty"`
	PirateRep  int            `json:"pirate_rep,omitempty"`
	Reputation int            `json:"reputation,omitempty"`
}

MissionRewards represents mission completion rewards.

type MobileCapitalTransitResponse added in v0.2.0

type MobileCapitalTransitResponse struct {
	Action  string `json:"action"`
	Message string `json:"message"`
	System  string `json:"system,omitempty"`
}

MobileCapitalTransitResponse is delivered when the Mobile Capital jumps, relocating the player to a new system.

  • mobile_capital_transit

type ModifyOrderResponse added in v0.2.0

type ModifyOrderResponse struct {
	// Kind is the v0.531.4 response discriminator: single.
	Kind       string `json:"kind,omitempty"`
	Action     string `json:"action"`
	OrderID    string `json:"order_id"`
	OldPrice   int    `json:"old_price"`
	NewPrice   int    `json:"new_price"`
	Message    string `json:"message"`
	ListingFee int    `json:"listing_fee,omitempty"`
	Mode       string `json:"mode,omitempty"`
	Results    []any  `json:"results,omitempty"`
	Summary    any    `json:"summary,omitempty"`
}

ModifyOrderResponse wraps the response from modify_order command.

type ModuleDefinition

type ModuleDefinition struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description"`
	TypeID      string `json:"type_id,omitempty"` // Module type ID
}

ModuleDefinition represents a module's definition including stats and requirements.

type NameShipResponse added in v0.2.0

type NameShipResponse struct {
	Message  string `json:"message"`
	ShipID   string `json:"ship_id"`
	ShipName string `json:"ship_name"`
}

NameShipResponse — name_ship

type NearbyPirate added in v0.2.0

type NearbyPirate struct {
	PirateID  string `json:"pirate_id"`
	Name      string `json:"name"`
	Tier      string `json:"tier,omitempty"`
	IsBoss    bool   `json:"is_boss,omitempty"`
	Hull      int    `json:"hull"`
	MaxHull   int    `json:"max_hull"`
	Shield    int    `json:"shield,omitempty"`
	MaxShield int    `json:"max_shield,omitempty"`
	Status    string `json:"status,omitempty"`
}

NearbyPirate represents a pirate NPC at the current POI.

type NearbyPlayer

type NearbyPlayer struct {
	PlayerID       string `json:"player_id"`
	Username       string `json:"username"`
	ShipClass      string `json:"ship_class"`
	PrimaryColor   string `json:"primary_color,omitempty"`
	SecondaryColor string `json:"secondary_color,omitempty"`
	Anonymous      bool   `json:"anonymous"`
	InCombat       bool   `json:"in_combat"`
	FactionID      string `json:"faction_id,omitempty"`
	FactionTag     string `json:"faction_tag,omitempty"`
	StatusMessage  string `json:"status_message,omitempty"`
	ClanTag        string `json:"clan_tag,omitempty"`
	// Docked players are listed but cannot be attacked, scanned, or traded
	// with until they undock.
	Docked bool `json:"docked,omitempty"`
}

NearbyPlayer represents another player or pirate NPC at the same POI.

type Note

type Note struct {
	NoteID     string `json:"note_id"`
	Title      string `json:"title"`
	Content    string `json:"content,omitempty"`
	AuthorID   string `json:"author_id,omitempty"`
	AuthorName string `json:"author_name,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
	Value      int    `json:"value,omitempty"`
}

Note represents a tradeable text document.

type Notification added in v0.2.0

type Notification struct {
	ID        string `json:"id"`
	Type      string `json:"type"`
	Timestamp string `json:"timestamp"`
	MsgType   string `json:"msg_type"`
	Data      any    `json:"data"`
}

Notification represents a single notification from the server.

type NotificationChannel added in v0.2.0

type NotificationChannel struct {
	Channel      string   `json:"channel"`
	Description  string   `json:"description,omitempty"`
	MessageTypes []string `json:"message_types,omitempty"`
	Muted        bool     `json:"muted"`
}

NotificationChannel is one mutable notification channel.

type NotificationSettingsResponse added in v0.2.0

type NotificationSettingsResponse struct {
	Action   string                `json:"action"`
	Channels []NotificationChannel `json:"channels"`
	Muted    []string              `json:"muted"`
	Message  string                `json:"message"`
}

NotificationSettingsResponse is returned by get_notification_settings and by the mute_notifications / unmute_notifications mutations, which each echo back the full resulting settings.

  • get_notification_settings
  • mute_notifications
  • unmute_notifications

type OrderFill added in v0.2.0

type OrderFill struct {
	Counterparty string `json:"counterparty,omitempty"`
	Source       string `json:"source,omitempty"`
	Quantity     int    `json:"quantity"`
	PriceEach    int    `json:"price_each"`
	Subtotal     int    `json:"subtotal"`
}

OrderFill represents a single fill in a buy/sell order.

type OwnedFacility added in v0.2.0

type OwnedFacility struct {
	FacilityID        string `json:"facility_id"`
	Name              string `json:"name"`
	Type              string `json:"type"`
	BaseID            string `json:"base_id"`
	BaseName          string `json:"base_name"`
	SystemID          string `json:"system_id"`
	RentPerCycle      int    `json:"rent_per_cycle"`
	LaborPerRun       int    `json:"labor_per_run,omitempty"`
	ArrearsOwed       int    `json:"arrears_owed,omitempty"`
	MissedRentCycles  int    `json:"missed_rent_cycles,omitempty"`
	Active            bool   `json:"active"`
	UnderConstruction bool   `json:"under_construction,omitempty"`
}

OwnedFacility is one entry in a FacilityOwnedResponse.

type OwnedShip added in v0.2.0

type OwnedShip struct {
	ShipID         string `json:"ship_id"`
	ClassID        string `json:"class_id"`
	ClassName      string `json:"class_name,omitempty"`
	IsActive       bool   `json:"is_active"`
	Hull           string `json:"hull,omitempty"`
	Fuel           string `json:"fuel,omitempty"`
	CargoUsed      int    `json:"cargo_used,omitempty"`
	Location       string `json:"location,omitempty"`
	LocationBaseID string `json:"location_base_id,omitempty"`
	Modules        int    `json:"modules,omitempty"`
	ListingID      string `json:"listing_id,omitempty"`
	ListingPrice   int64  `json:"listing_price,omitempty"`
	ListingBaseID  string `json:"listing_base_id,omitempty"`
}

OwnedShip represents a player-owned ship in the list_ships response.

Listing fields (server v0.273.4+) are populated when the ship is currently listed for sale; otherwise they are empty/zero.

type POI

type POI struct {
	ID               string        `json:"id"`
	SystemID         string        `json:"system_id"`
	Type             string        `json:"type"`
	Class            string        `json:"class,omitempty"` // MK classification (e.g., "G2 V") or planet class
	Name             string        `json:"name"`
	Description      string        `json:"description"`
	Position         Position      `json:"position"`
	Resources        []POIResource `json:"resources"`
	BaseID           string        `json:"base_id,omitempty"`
	HasBase          bool          `json:"has_base,omitempty"`
	BaseName         string        `json:"base_name,omitempty"`
	Online           int           `json:"online,omitempty"`
	Hidden           bool          `json:"hidden,omitempty"`
	RevealDifficulty int           `json:"reveal_difficulty,omitempty"`
	ExpiresAt        string        `json:"expires_at,omitempty"` // ISO-8601 timestamp when POI expires (e.g., wormholes)
}

POI represents a Point of Interest in a system.

type POIArrival

type POIArrival struct {
	Username string `json:"username"`
	ClanTag  string `json:"clan_tag"`
	POIName  string `json:"poi_name"`
	POIID    string `json:"poi_id"`
}

POIArrival is broadcast when a player arrives at your POI. Server event type: poi_arrival

type POIDeparture

type POIDeparture struct {
	Username string `json:"username"`
	ClanTag  string `json:"clan_tag"`
	POIName  string `json:"poi_name"`
	POIID    string `json:"poi_id"`
}

POIDeparture is broadcast when a player leaves your POI. Server event type: poi_departure

type POIResource

type POIResource struct {
	ResourceID       string  `json:"resource_id"`
	Name             string  `json:"name,omitempty"`
	Richness         float64 `json:"richness"`
	Remaining        float64 `json:"remaining"`
	RemainingDisplay string  `json:"remaining_display,omitempty"`
}

POIResource represents a minable resource at a POI.

type PassengerArrivals added in v0.2.0

type PassengerArrivals struct {
	Delivered         []DeliveredPassenger `json:"delivered,omitempty"`
	FareCollected     int                  `json:"fare_collected,omitempty"`
	ReputationChanges map[string]int       `json:"reputation_changes,omitempty"`
}

PassengerArrivals summarizes passengers delivered when docking at their destination station: the per-passenger list, the total fare collected, and any faction reputation gained from the deliveries.

type PassengerRecord added in v0.2.0

type PassengerRecord struct {
	CitizenID   string `json:"citizen_id"`
	Name        string `json:"name"`
	Citizenship string `json:"citizenship"`
	Bio         string `json:"bio"`
	Class       string `json:"class"`
}

PassengerRecord is the identity subset of a passenger shared across every passenger-bearing response (station waiting list, aboard manifest, load result, dock arrivals). Used to populate the knowledge-base passenger catalog; per-listing fields (destination, fare, ticks) are intentionally omitted. Citizenship/Bio are absent from some sources and unmarshal empty.

type PeaceProposal

type PeaceProposal struct {
	FromFactionID   string `json:"from_faction_id"`
	FromFactionName string `json:"from_faction_name"`
	Terms           string `json:"terms,omitempty"`
	ProposedAt      string `json:"proposed_at"`
}

PeaceProposal represents a peace proposal between factions.

type PendingActionResponse added in v0.2.0

type PendingActionResponse struct {
	Pending bool   `json:"pending"`
	Command string `json:"command,omitempty"`
	Message string `json:"message"`
}

PendingActionResponse wraps the response from a pending action.

type PendingTradeInfo added in v0.2.0

type PendingTradeInfo struct {
	TradeID        string `json:"trade_id"`
	OffererName    string `json:"offerer_name,omitempty"`
	OfferCredits   int    `json:"offer_credits,omitempty"`
	RequestCredits int    `json:"request_credits,omitempty"`
}

PendingTradeInfo represents a summary of a pending trade in the login response.

type PetitionResponse added in v0.2.0

type PetitionResponse struct {
	EmpireID   string `json:"empire_id"`
	EmpireName string `json:"empire_name"`
	Message    string `json:"message"`
}

PetitionResponse is returned by petition (submit a citizenship petition).

  • petition

type PilotlessShip

type PilotlessShip struct {
	PlayerID       string `json:"player_id"`
	PlayerUsername string `json:"player_username"`
	ShipID         string `json:"ship_id"`
	ShipClass      string `json:"ship_class"`
	SystemID       string `json:"system_id"`
	POIID          string `json:"poi_id"`
	ExpireTick     int64  `json:"expire_tick"`
	TicksRemaining int    `json:"ticks_remaining"`
}

PilotlessShip represents a player who disconnected during combat. Server event type: pilotless_ship

type PirateCombat

type PirateCombat struct {
	Tick         int64   `json:"tick"`
	PirateID     string  `json:"pirate_id"`
	PirateName   string  `json:"pirate_name"`
	Damage       float64 `json:"damage"`
	DamageType   string  `json:"damage_type"`
	PlayerHull   float64 `json:"player_hull"`
	PlayerShield float64 `json:"player_shield"`
	Destroyed    bool    `json:"destroyed"`
}

PirateCombat represents pirate NPC combat (damage dealt each tick). Server event type: pirate_combat

type PirateDestroyed

type PirateDestroyed struct {
	PirateID      string  `json:"pirate_id"`
	PirateName    string  `json:"pirate_name"`
	Tier          string  `json:"tier"`
	IsBoss        bool    `json:"is_boss"`
	CreditsReward int     `json:"credits_reward"`
	XPGained      float64 `json:"xp_gained"`
	WreckID       string  `json:"wreck_id"`
	Message       string  `json:"message"`
}

PirateDestroyed is sent when you destroy a pirate NPC. Server event type: pirate_destroyed

type PirateSpawn

type PirateSpawn struct {
	PirateID   string `json:"pirate_id"`
	PirateName string `json:"pirate_name"`
	Tier       string `json:"tier"`
	IsBoss     bool   `json:"is_boss"`
	Message    string `json:"message"`
}

PirateSpawn is sent when a pirate NPC respawns at your current POI. Server event type: pirate_spawn

type PirateWarning

type PirateWarning struct {
	PirateID      string `json:"pirate_id"`
	PirateName    string `json:"pirate_name"`
	Tier          string `json:"tier"`
	IsBoss        bool   `json:"is_boss"`
	AttackInTicks int    `json:"attack_in_ticks"`
	Message       string `json:"message"`
}

PirateWarning is sent when a pirate NPC detects you at their POI. Server event type: pirate_warning

type PlaceShipBuyOrderResponse added in v0.2.0

type PlaceShipBuyOrderResponse struct {
	OrderID     string `json:"order_id"`
	ClassID     string `json:"class_id"`
	Price       int    `json:"price"`
	TaxEscrow   int    `json:"tax_escrow,omitempty"`
	CreditsLeft int    `json:"credits_left"`
	Message     string `json:"message"`
}

PlaceShipBuyOrderResponse is returned by place_ship_buy_order: a standing offer to buy a hull of ClassID at Price, with the sales tax held in escrow.

  • place_ship_buy_order

type Player

type Player struct {
	ID                string                      `json:"id"`
	Username          string                      `json:"username"`
	Empire            string                      `json:"empire"`
	Credits           float64                     `json:"credits"`
	CurrentSystem     string                      `json:"current_system"`
	CurrentPOI        string                      `json:"current_poi"`
	CurrentShipID     string                      `json:"current_ship_id"`
	HomeBase          string                      `json:"home_base"`
	DockedAtBase      string                      `json:"docked_at_base"`
	FactionID         string                      `json:"faction_id,omitempty"`
	FactionRank       string                      `json:"faction_rank,omitempty"`
	StatusMessage     string                      `json:"status_message,omitempty"`
	ClanTag           string                      `json:"clan_tag,omitempty"`
	PrimaryColor      string                      `json:"primary_color,omitempty"`
	SecondaryColor    string                      `json:"secondary_color,omitempty"`
	Anonymous         bool                        `json:"anonymous"`
	IsCloaked         bool                        `json:"is_cloaked"`
	Skills            map[string]Skill            `json:"skills"`
	SkillXP           map[string]float64          `json:"skill_xp,omitempty"`
	Stats             PlayerStats                 `json:"stats"`
	Modules           map[string]ModuleDefinition `json:"modules,omitempty"`
	TowingWreckID     string                      `json:"towing_wreck_id,omitempty"`
	Experience        int64                       `json:"experience,omitempty"`
	DiscoveredSystems map[string]any              `json:"discovered_systems,omitempty"`
	LastActiveAt      string                      `json:"last_active_at,omitempty"`
	LastLoginAt       string                      `json:"last_login_at,omitempty"`
	CreatedAt         string                      `json:"created_at,omitempty"`
}

Player represents a player in the game as returned by the server.

type PlayerDied

type PlayerDied struct {
	KillerID        string           `json:"killer_id"`
	KillerName      string           `json:"killer_name"`
	RespawnBase     string           `json:"respawn_base"`
	Cause           string           `json:"cause,omitempty"`
	CombatLog       []CombatLogEntry `json:"combat_log,omitempty"`
	CloneCost       int              `json:"clone_cost"`
	InsurancePayout int              `json:"insurance_payout"`
	ShipLost        string           `json:"ship_lost"`
	NewShipClass    string           `json:"new_ship_class"`
	WreckID         string           `json:"wreck_id"`
}

PlayerDied represents ship destruction and respawn in an Escape Pod. Server event type: player_died

type PlayerSkill

type PlayerSkill struct {
	SkillID     string  `json:"skill_id"`
	Name        string  `json:"name"`
	Category    string  `json:"category"`
	Level       int     `json:"level"`
	MaxLevel    int     `json:"max_level"`
	CurrentXP   float64 `json:"current_xp"`
	NextLevelXP float64 `json:"next_level_xp"`
}

PlayerSkill represents a player's progress in a specific skill.

type PlayerStats

type PlayerStats struct {
	BasesDestroyed          int   `json:"bases_destroyed"`
	BattlesFled             int   `json:"battles_fled,omitempty"`
	BattlesStarted          int   `json:"battles_started,omitempty"`
	CaptainsLogEntries      int   `json:"captains_log_entries,omitempty"`
	ChatMessagesSent        int   `json:"chat_messages_sent,omitempty"`
	CloakActivations        int   `json:"cloak_activations,omitempty"`
	ConsumablesUsed         int   `json:"consumables_used,omitempty"`
	ContrabandSold          int   `json:"contraband_sold,omitempty"`
	CreditsEarned           int64 `json:"credits_earned"`
	CreditsGifted           int64 `json:"credits_gifted,omitempty"`
	CreditsSpent            int64 `json:"credits_spent"`
	CustomsEvaded           int   `json:"customs_evaded,omitempty"`
	DamageDealt             int64 `json:"damage_dealt,omitempty"`
	DamageTaken             int64 `json:"damage_taken,omitempty"`
	DeathsByPirate          int   `json:"deaths_by_pirate,omitempty"`
	DeathsByPlayer          int   `json:"deaths_by_player,omitempty"`
	DeathsBySelfDestruct    int   `json:"deaths_by_self_destruct,omitempty"`
	DeathsByWildlife        int   `json:"deaths_by_wildlife,omitempty"`
	DeepCorePOIsDiscovered  int   `json:"deep_core_pois_discovered,omitempty"`
	DistanceTraveled        int64 `json:"distance_traveled"`
	ExchangeCreditsEarned   int64 `json:"exchange_credits_earned,omitempty"`
	ExchangeItemsBought     int   `json:"exchange_items_bought,omitempty"`
	ExchangeItemsSold       int   `json:"exchange_items_sold,omitempty"`
	FacilitiesBuilt         int   `json:"facilities_built,omitempty"`
	FacilityItemsProduced   int   `json:"facility_items_produced,omitempty"`
	ForumPostsCreated       int   `json:"forum_posts_created,omitempty"`
	GiftsReceived           int   `json:"gifts_received,omitempty"`
	GiftsSent               int   `json:"gifts_sent,omitempty"`
	InsuranceClaimsMade     int   `json:"insurance_claims_made,omitempty"`
	InsurancePayoutsRecvd   int64 `json:"insurance_payouts_received,omitempty"`
	InsurancePoliciesBought int   `json:"insurance_policies_bought,omitempty"`
	ItemsCrafted            int   `json:"items_crafted"`
	ItemsJettisoned         int   `json:"items_jettisoned,omitempty"`
	JumpsCompleted          int   `json:"jumps_completed,omitempty"`
	MissionsAbandoned       int   `json:"missions_abandoned,omitempty"`
	MissionsAccepted        int   `json:"missions_accepted,omitempty"`
	MissionsCompleted       int   `json:"missions_completed"`
	ModulesInstalled        int   `json:"modules_installed,omitempty"`
	NPCsDestroyed           int   `json:"npcs_destroyed,omitempty"`
	OreMined                int64 `json:"ore_mined"`
	PiratesDestroyed        int   `json:"pirates_destroyed"`
	RefuelsGiven            int   `json:"refuels_given,omitempty"`
	RepairsGiven            int   `json:"repairs_given,omitempty"`
	ScansPerformed          int   `json:"scans_performed,omitempty"`
	SelfDestructs           int   `json:"self_destructs,omitempty"`
	ShipsCommissioned       int   `json:"ships_commissioned,omitempty"`
	ShipsDestroyed          int   `json:"ships_destroyed"`
	ShipsLost               int   `json:"ships_lost"`
	ShipsPurchased          int   `json:"ships_purchased,omitempty"`
	SystemsExplored         int   `json:"systems_explored,omitempty"`
	TimePlayed              int64 `json:"time_played"`
	TimesDocked             int   `json:"times_docked,omitempty"`
	TradesCompleted         int   `json:"trades_completed"`
	WormholesTraversed      int   `json:"wormholes_traversed,omitempty"`
	WreckItemsLooted        int   `json:"wreck_items_looted,omitempty"`
	WrecksScrapped          int   `json:"wrecks_scrapped,omitempty"`
	WrecksSold              int   `json:"wrecks_sold,omitempty"`
}

PlayerStats tracks player statistics and lifetime achievements.

type PoliceCombat

type PoliceCombat struct {
	Tick       int64   `json:"tick"`
	DroneID    string  `json:"drone_id"`
	TargetID   string  `json:"target_id"`
	Damage     float64 `json:"damage"`
	DamageType string  `json:"damage_type"`
	Destroyed  bool    `json:"destroyed"`
}

PoliceCombat represents police drone combat (damage dealt each tick). Server event type: police_combat

type PoliceSpawn

type PoliceSpawn struct {
	Message   string `json:"message"`
	NumDrones int    `json:"num_drones"`
	Target    string `json:"target"`
}

PoliceSpawn is sent when police drones arrive to engage hostile. Server event type: police_spawn

type PoliceWarning

type PoliceWarning struct {
	Message       string `json:"message"`
	PoliceLevel   int    `json:"police_level"`
	ResponseTicks int    `json:"response_ticks"`
	System        string `json:"system"`
}

PoliceWarning is sent when you commit a crime in policed space. Server event type: police_warning

type Position

type Position struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z,omitempty"`
}

Position represents 3D coordinates.

type PrepayTaxResponse added in v0.2.0

type PrepayTaxResponse struct {
	Action            string `json:"action"`
	AmountPrepaid     int64  `json:"amount_prepaid"`
	TaxPrepaidBalance int64  `json:"tax_prepaid_balance"`
	Credits           int64  `json:"credits"`
	Message           string `json:"message"`
}

PrepayTaxResponse is returned by prepay_tax: credits paid ahead of the next personal assessment, offsetting what will be owed.

  • prepay_tax

type RaidStatusResponse added in v0.2.0

type RaidStatusResponse struct {
	ActiveRaids []ActiveRaid `json:"active_raids"`
	Message     string       `json:"message,omitempty"`
}

RaidStatusResponse wraps the response from raid_status command.

type ReadNoteResponse

type ReadNoteResponse struct {
	Action    string `json:"action,omitempty"`
	NoteID    string `json:"note_id"`
	Title     string `json:"title"`
	Content   string `json:"content,omitempty"`
	CreatedBy string `json:"created_by,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
	Value     int    `json:"value,omitempty"`
}

ReadNoteResponse is returned by read_note. The server sends note fields at the top level (not nested), so they are flattened here.

  • read_note

type RecallDroneResponse added in v0.2.0

type RecallDroneResponse struct {
	Message  string `json:"message"`
	Recalled int    `json:"recalled"`
	Skipped  int    `json:"skipped"`
}

RecallDroneResponse is returned by recall_drone.

  • recall_drone

type Recipe

type Recipe struct {
	ID              string         `json:"id"`
	Name            string         `json:"name"`
	Description     string         `json:"description,omitempty"`
	Category        string         `json:"category"`
	RequiredSkills  map[string]int `json:"required_skills,omitempty"`
	Inputs          []RecipeItem   `json:"inputs"`
	Outputs         []RecipeItem   `json:"outputs"`
	CraftingTime    float64        `json:"crafting_time"`
	BaseQuality     int            `json:"base_quality,omitempty"`
	SkillQualityMod int            `json:"skill_quality_mod,omitempty"`
	FacilityOnly    bool           `json:"facility_only,omitempty"`
	Hidden          bool           `json:"hidden,omitempty"`
	FuelOutput      int            `json:"fuel_output,omitempty"`
}

Recipe represents a crafting recipe.

type RecipeItem

type RecipeItem struct {
	ItemID     string `json:"item_id"`
	Quantity   int    `json:"quantity"`
	QualityMod bool   `json:"quality_mod,omitempty"`
}

RecipeItem represents an item requirement or output in a recipe.

type ReconnectedMessage

type ReconnectedMessage struct {
	Message        string `json:"message"`
	WasPilotless   bool   `json:"was_pilotless"`
	TicksRemaining int    `json:"ticks_remaining"`
}

ReconnectedMessage is sent when you reconnect after disconnecting during combat. Server event type: reconnected

type RecycleResponse added in v0.2.0

type RecycleResponse = CraftJobQueued

RecycleResponse reuses the queued-job shape; recycle has no preset and no XP.

type RefitShipResponse added in v0.2.0

type RefitShipResponse struct {
	Message         string `json:"message"`
	ShipID          string `json:"ship_id"`
	ClassID         string `json:"class_id"`
	ModulesReturned int    `json:"modules_returned"`
	CargoReturned   int    `json:"cargo_returned"`
	DefaultModules  int    `json:"default_modules"`
}

RefitShipResponse wraps the response from refit_ship command.

type RefuelResponse added in v0.2.0

type RefuelResponse struct {
	Action           string `json:"action"`
	Source           string `json:"source,omitempty"`
	Fuel             int    `json:"fuel,omitempty"`
	FuelNow          int    `json:"fuel_now,omitempty"`
	FuelMax          int    `json:"fuel_max,omitempty"`
	Cost             int    `json:"cost,omitempty"`
	CellsUsed        int    `json:"cells_used,omitempty"`
	ItemID           string `json:"item_id,omitempty"`
	ItemName         string `json:"item_name,omitempty"`
	TargetFuelMax    int    `json:"target_fuel_max,omitempty"`
	TargetFuelNow    int    `json:"target_fuel_now,omitempty"`
	TargetPlayerID   string `json:"target_player_id,omitempty"`
	TargetPlayerName string `json:"target_player_name,omitempty"`

	AllyFactionID   string          `json:"ally_faction_id,omitempty"`
	AllyFactionTag  string          `json:"ally_faction_tag,omitempty"`
	AllyFuel        int             `json:"ally_fuel,omitempty"`
	FactionFuel     int             `json:"faction_fuel,omitempty"`
	FleetID         string          `json:"fleet_id,omitempty"`
	HasPump         bool            `json:"has_pump,omitempty"`
	Members         json.RawMessage `json:"members,omitempty"`
	RescueCompleted bool            `json:"rescue_completed,omitempty"`
	RescueReward    int64           `json:"rescue_reward,omitempty"`
	TaxAmount       int64           `json:"tax_amount,omitempty"`
}

RefuelResponse wraps the response from refuel command.

type RegisterResponse added in v0.2.0

type RegisterResponse struct {
	Message       string             `json:"message"`
	Password      string             `json:"password"`
	PlayerID      string             `json:"player_id"`
	Player        Player             `json:"player"`
	Ship          Ship               `json:"ship"`
	System        SystemData         `json:"system"`
	POI           POI                `json:"poi"`
	CaptainsLog   []CaptainsLogEntry `json:"captains_log,omitempty"`
	PendingTrades []PendingTradeInfo `json:"pending_trades,omitempty"`
	ReleaseInfo   *ReleaseInfo       `json:"release_info,omitempty"`
	UnreadChat    *UnreadChat        `json:"unread_chat,omitempty"`
}

RegisterResponse wraps the response from the register command.

type ReleaseInfo added in v0.2.0

type ReleaseInfo struct {
	Version     string   `json:"version"`
	ReleaseDate string   `json:"release_date"`
	Notes       []string `json:"notes,omitempty"`
}

ReleaseInfo represents version release info sent at login.

type ReleaseTowResponse added in v0.2.0

type ReleaseTowResponse struct {
	Action  string `json:"action,omitempty"`
	Message string `json:"message"`
	WreckID string `json:"wreck_id"`
}

ReleaseTowResponse — release_tow

type ReloadResponse added in v0.2.0

type ReloadResponse struct {
	Action          string `json:"action"`
	WeaponName      string `json:"weapon_name"`
	WeaponID        string `json:"weapon_id"`
	AmmoName        string `json:"ammo_name"`
	AmmoID          string `json:"ammo_id"`
	CurrentAmmo     int    `json:"current_ammo"`
	MagazineSize    int    `json:"magazine_size"`
	PreviousAmmo    string `json:"previous_ammo,omitempty"`
	RoundsDiscarded int    `json:"rounds_discarded,omitempty"`
}

ReloadResponse wraps the response from reload command.

type RepairModuleResponse added in v0.2.0

type RepairModuleResponse struct {
	Message      string          `json:"message"`
	ModuleID     string          `json:"module_id"`
	RepairAmount float64         `json:"repair_amount,omitempty"`
	WearAfter    float64         `json:"wear_after,omitempty"`
	WearBefore   float64         `json:"wear_before,omitempty"`
	WearStatus   string          `json:"wear_status,omitempty"`
	XPGained     json.RawMessage `json:"xp_gained,omitempty"`
}

RepairModuleResponse — repair_module

type RepairResponse added in v0.2.0

type RepairResponse struct {
	Action           string              `json:"action"`
	Source           string              `json:"source,omitempty"` // "station", "kits", etc.
	Repaired         int                 `json:"repaired"`
	Cost             int                 `json:"cost,omitempty"`
	ItemID           string              `json:"item_id,omitempty"`
	ItemName         string              `json:"item_name,omitempty"`
	KitsUsed         int                 `json:"kits_used,omitempty"`
	Hull             int                 `json:"hull,omitempty"`
	MaxHull          int                 `json:"max_hull,omitempty"`
	TargetPlayerID   string              `json:"target_player_id,omitempty"`
	TargetPlayerName string              `json:"target_player_name,omitempty"`
	TargetHullNow    int                 `json:"target_hull_now,omitempty"`
	TargetHullMax    int                 `json:"target_hull_max,omitempty"`
	HasArm           bool                `json:"has_arm,omitempty"`
	FleetID          string              `json:"fleet_id,omitempty"`
	Members          []FleetMemberStatus `json:"members,omitempty"`
	Message          string              `json:"message,omitempty"`
}

RepairResponse wraps the response from repair command. Supports station repair (credits), in-space repair (kits), and repairing other ships (repair arm + kits).

type ResourceDisplay

type ResourceDisplay struct {
	ResourceID       string  `json:"resource_id"`
	Name             string  `json:"name"`
	Richness         float64 `json:"richness"`
	Remaining        float64 `json:"remaining"`
	RemainingDisplay string  `json:"remaining_display"`
}

ResourceDisplay represents a resource with display information.

type RetreatResponse added in v0.2.0

type RetreatResponse struct {
	Action  string `json:"action"`
	Message string `json:"message"`
}

RetreatResponse wraps the response from retreat action during combat.

type RevealedPOI added in v0.2.0

type RevealedPOI struct {
	ID          string           `json:"id"`
	Name        string           `json:"name"`
	Type        string           `json:"type"`
	Description string           `json:"description,omitempty"`
	Resources   []SurveyResource `json:"resources,omitempty"`
}

RevealedPOI represents a POI revealed by a system survey.

type RouteStep

type RouteStep struct {
	SystemID string `json:"system_id"`
	Name     string `json:"name"`
	Jumps    int    `json:"jumps"`
}

RouteStep represents a step in a route from find_route.

type SalvageWreckResponse added in v0.2.0

type SalvageWreckResponse struct {
	MetalScrap    int  `json:"metal_scrap"`
	Components    int  `json:"components"`
	RareMaterials int  `json:"rare_materials"`
	TotalValue    int  `json:"total_value"`
	XPGained      int  `json:"xp_gained"`
	LevelUp       bool `json:"level_up,omitempty"`
}

SalvageWreckResponse wraps the response from salvage_wreck command.

type ScanContact added in v0.2.0

type ScanContact struct {
	TargetID     string `json:"target_id"`
	Username     string `json:"username"`
	ShipName     string `json:"ship_name,omitempty"`
	ShipClass    string `json:"ship_class,omitempty"`
	FactionID    string `json:"faction_id,omitempty"`
	Hull         int    `json:"hull,omitempty"`
	Shield       int    `json:"shield,omitempty"`
	Cloaked      bool   `json:"cloaked,omitempty"`
	RevealedInfo string `json:"revealed_info,omitempty"`
}

ScanContact is a player ship turned up by faction_scan_poi. RevealedInfo reports how much the scan actually resolved — a cloaked target yields less.

type ScanDetected

type ScanDetected struct {
	ScannerID        string   `json:"scanner_id"`
	ScannerUsername  string   `json:"scanner_username"`
	ScannerShipClass string   `json:"scanner_ship_class"`
	RevealedInfo     []string `json:"revealed_info"`
	Message          string   `json:"message"`
}

ScanDetected is sent when you are scanned by another player. Server event type: scan_detected

type ScanNPC added in v0.2.0

type ScanNPC struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Role      string `json:"role,omitempty"`
	ShipClass string `json:"ship_class,omitempty"`
	Empire    string `json:"empire,omitempty"`
}

ScanNPC is an NPC or pirate turned up by faction_scan_poi. Pirates carry no empire.

type ScanResponse added in v0.2.0

type ScanResponse struct {
	TargetID     string   `json:"target_id"`
	Success      bool     `json:"success"`
	Cloaked      bool     `json:"cloaked,omitempty"`
	RevealedInfo []string `json:"revealed_info"`
	FactionID    string   `json:"faction_id,omitempty"`
	Hull         int      `json:"hull,omitempty"`
	Shield       int      `json:"shield,omitempty"`
	ShipClass    string   `json:"ship_class,omitempty"`
	Username     string   `json:"username,omitempty"`
}

ScanResponse wraps the response from scan command.

type ScanResult

type ScanResult struct {
	TargetID     string   `json:"target_id"`
	Success      bool     `json:"success"`
	RevealedInfo []string `json:"revealed_info"`
	Username     string   `json:"username,omitempty"`
	ShipClass    string   `json:"ship_class,omitempty"`
	Hull         float64  `json:"hull,omitempty"`
	Shield       float64  `json:"shield,omitempty"`
	Cloaked      bool     `json:"cloaked,omitempty"`
}

ScanResult represents the results of scanning a player. Server event type: scan_result

type ScrapShipResponse added in v0.2.0

type ScrapShipResponse struct {
	CargoNote        string          `json:"cargo_note,omitempty"`
	CargoToStorage   json.RawMessage `json:"cargo_to_storage,omitempty"`
	Message          string          `json:"message"`
	ModulesNote      string          `json:"modules_note,omitempty"`
	ModulesToStorage json.RawMessage `json:"modules_to_storage,omitempty"`
	ScrappedClass    string          `json:"scrapped_class,omitempty"`
	ScrappedShipID   string          `json:"scrapped_ship_id"`
}

ScrapShipResponse is returned by scrap_ship.

  • scrap_ship

type ScrapWreckResponse added in v0.2.0

type ScrapWreckResponse struct {
	Action     string          `json:"action,omitempty"`
	Message    string          `json:"message"`
	Materials  json.RawMessage `json:"materials,omitempty"`
	ShipClass  string          `json:"ship_class,omitempty"`
	StoredAt   string          `json:"stored_at,omitempty"`
	TotalValue int64           `json:"total_value,omitempty"`
	WreckID    string          `json:"wreck_id"`
}

ScrapWreckResponse — scrap_wreck

type SearchChangelogResponse

type SearchChangelogResponse struct {
	Action   string             `json:"action,omitempty"`
	Releases []ChangelogVersion `json:"releases"`
}

SearchChangelogResponse wraps the response from search_changelog command.

type SearchSystemsResponse

type SearchSystemsResponse struct {
	Action     string               `json:"action,omitempty"`
	Systems    []SystemSearchResult `json:"systems"`
	TotalFound int                  `json:"total_found,omitempty"`
	Query      string               `json:"query,omitempty"`
	Message    string               `json:"message,omitempty"`
}

SearchSystemsResponse wraps the response from search_systems command.

type SellResponse added in v0.2.0

type SellResponse struct {
	Action           string           `json:"action"`
	Item             string           `json:"item"`
	ItemID           string           `json:"item_id"`
	QuantitySold     int              `json:"quantity_sold"`
	TotalEarned      int              `json:"total_earned"`
	Fills            []OrderFill      `json:"fills"`
	LevelUp          bool             `json:"level_up"`
	AutoListed       *AutoListedOrder `json:"auto_listed,omitempty"`
	Message          string           `json:"message,omitempty"`
	SkillLevel       int              `json:"skill_level,omitempty"`
	Unsold           int              `json:"unsold,omitempty"`
	XPGained         int              `json:"xp_gained,omitempty"`
	SmugglingLevelUp bool             `json:"smuggling_level_up,omitempty"`
	SmugglingXP      int64            `json:"smuggling_xp,omitempty"`
}

SellResponse wraps the response from sell command.

type SellShipResponse added in v0.2.0

type SellShipResponse struct {
	Message          string           `json:"message"`
	CreditsEarned    int              `json:"credits_earned"`
	DaysOwned        int              `json:"days_owned,omitempty"`
	CreditsTotal     int              `json:"credits_total"`
	CargoNote        string           `json:"cargo_note,omitempty"`
	CargoToStorage   []CargoItem      `json:"cargo_to_storage,omitempty"`
	ModulesNote      string           `json:"modules_note,omitempty"`
	ModulesToStorage []map[string]any `json:"modules_to_storage,omitempty"`
}

SellShipResponse wraps the response from sell_ship command.

type SellShipToOrderResponse added in v0.2.0

type SellShipToOrderResponse struct {
	ShipID      string `json:"ship_id"`
	ClassID     string `json:"class_id"`
	Price       int    `json:"price"`
	CreditsLeft int    `json:"credits_left"`
	Message     string `json:"message"`
}

SellShipToOrderResponse is returned by sell_ship_to_order.

  • sell_ship_to_order

type SellWreckResponse added in v0.2.0

type SellWreckResponse struct {
	Action       string `json:"action"`
	WreckID      string `json:"wreck_id"`
	TotalPayout  int    `json:"total_payout"`
	NewBalance   int    `json:"new_balance"`
	Message      string `json:"message"`
	CargoValue   int    `json:"cargo_value,omitempty"`
	SalvageValue int    `json:"salvage_value,omitempty"`
	ShipClass    string `json:"ship_class,omitempty"`
}

SellWreckResponse wraps the response from sell_wreck command.

type SendGiftResponse

type SendGiftResponse struct {
	Action           string `json:"action"`
	Recipient        string `json:"recipient"`
	BaseID           string `json:"base_id,omitempty"`
	CargoRemaining   int    `json:"cargo_remaining,omitempty"`
	CreditsSent      int    `json:"credits_sent,omitempty"`
	ItemID           string `json:"item_id,omitempty"`
	Message          string `json:"message,omitempty"`
	Quantity         int    `json:"quantity,omitempty"`
	Source           string `json:"source,omitempty"`
	StorageRemaining int    `json:"storage_remaining,omitempty"`
	WalletRemaining  int    `json:"wallet_remaining,omitempty"`
}

SendGiftResponse wraps the response from send_gift command.

type SetAnonymousResponse added in v0.2.0

type SetAnonymousResponse struct {
	Action    string `json:"action"`
	Anonymous bool   `json:"anonymous"`
}

SetAnonymousResponse wraps the response from set_anonymous command.

type SetColorsResponse added in v0.2.0

type SetColorsResponse struct {
	Action string `json:"action"`
}

SetColorsResponse wraps the response from set_colors command.

type SetDroneNameResponse added in v0.2.0

type SetDroneNameResponse struct {
	DroneID string `json:"drone_id"`
	Name    string `json:"name"`
	Message string `json:"message"`
}

SetDroneNameResponse wraps the response from set_drone_name command.

type SetHomeBaseResponse added in v0.2.0

type SetHomeBaseResponse struct {
	Message     string `json:"message"`
	HomeBase    string `json:"home_base"`
	OldHomeBase string `json:"old_home_base,omitempty"`
}

SetHomeBaseResponse wraps the response from set_home_base command.

type SetStatusResponse added in v0.2.0

type SetStatusResponse struct {
	Action string `json:"action"`
}

SetStatusResponse wraps the response from set_status command.

type Ship

type Ship struct {
	ID                       string       `json:"id"`
	OwnerID                  string       `json:"owner_id"`
	ClassID                  string       `json:"class_id"`
	Name                     string       `json:"name"`
	Hull                     float64      `json:"hull"`
	MaxHull                  float64      `json:"max_hull"`
	Shield                   float64      `json:"shield"`
	MaxShield                float64      `json:"max_shield"`
	ShieldRecharge           float64      `json:"shield_recharge"`
	Armor                    float64      `json:"armor"`
	Speed                    float64      `json:"speed"`
	Fuel                     float64      `json:"fuel"`
	MaxFuel                  float64      `json:"max_fuel"`
	CargoUsed                float64      `json:"cargo_used"`
	CargoCapacity            float64      `json:"cargo_capacity"`
	CPUUsed                  float64      `json:"cpu_used"`
	CPUCapacity              float64      `json:"cpu_capacity"`
	PowerUsed                float64      `json:"power_used"`
	PowerCapacity            float64      `json:"power_capacity"`
	WeaponSlots              int          `json:"weapon_slots"`
	DefenseSlots             int          `json:"defense_slots"`
	UtilitySlots             int          `json:"utility_slots"`
	Modules                  []string     `json:"modules"`
	Cargo                    []CargoItem  `json:"cargo"`
	ActiveBuffs              []ActiveBuff `json:"active_buffs,omitempty"`
	DamagePenalty            float64      `json:"damage_penalty,omitempty"`
	SpeedPenalty             float64      `json:"speed_penalty,omitempty"`
	GasCargoEfficiency       int          `json:"gas_cargo_efficiency,omitempty"`
	IceCargoEfficiency       int          `json:"ice_cargo_efficiency,omitempty"`
	OreCargoEfficiency       int          `json:"ore_cargo_efficiency,omitempty"`
	CustomName               string       `json:"custom_name,omitempty"`
	LoadedOnCarrierID        string       `json:"loaded_on_carrier_id,omitempty"`
	DisruptionTicksRemaining int          `json:"disruption_ticks_remaining,omitempty"`
	DockedAtBase             string       `json:"docked_at_base,omitempty"`
	LastProcessTick          int64        `json:"last_process_tick,omitempty"`
	CreatedAt                string       `json:"created_at,omitempty"`
}

Ship represents the player's ship with all stats, modules, and cargo.

type ShipBuyOrder added in v0.2.0

type ShipBuyOrder struct {
	OrderID    string `json:"order_id"`
	ClassID    string `json:"class_id"`
	ClassName  string `json:"class_name"`
	Buyer      string `json:"buyer"`
	BaseID     string `json:"base_id"`
	BaseName   string `json:"base_name"`
	Price      int    `json:"price"`
	TaxEscrow  int    `json:"tax_escrow,omitempty"`
	BeingBuilt bool   `json:"being_built,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
}

ShipBuyOrder is one standing ship buy order. BeingBuilt is true once a seller has committed to filling it.

type ShipClass

type ShipClass struct {
	ID                 string   `json:"id"`
	Name               string   `json:"name"`
	Class              string   `json:"class,omitempty"`
	Category           string   `json:"category,omitempty"`
	Description        string   `json:"description,omitempty"`
	Lore               string   `json:"lore,omitempty"`
	Faction            string   `json:"faction,omitempty"`
	Tier               int      `json:"tier,omitempty"`
	Scale              int      `json:"scale,omitempty"`
	BaseHull           int      `json:"base_hull"`
	BaseShield         int      `json:"base_shield,omitempty"`
	BaseShieldRecharge int      `json:"base_shield_recharge,omitempty"`
	BaseArmor          int      `json:"base_armor,omitempty"`
	BaseSpeed          int      `json:"base_speed"`
	BaseFuel           int      `json:"base_fuel"`
	CargoCapacity      int      `json:"cargo_capacity"`
	CPUCapacity        int      `json:"cpu_capacity"`
	PowerCapacity      int      `json:"power_capacity"`
	WeaponSlots        int      `json:"weapon_slots"`
	DefenseSlots       int      `json:"defense_slots"`
	UtilitySlots       int      `json:"utility_slots"`
	BuildTime          int      `json:"build_time,omitempty"`
	ShipyardTier       int      `json:"shipyard_tier,omitempty"`
	StarterShip        bool     `json:"starter_ship,omitempty"`
	DefaultModules     []string `json:"default_modules,omitempty"`
	// BuildMaterials is an array of {item_id, quantity} in live catalog_ships
	// data. openapi.json documents it as an object keyed by item ID; the live
	// shape wins.
	BuildMaterials       []RecipeItem     `json:"build_materials,omitempty"`
	FlavorTags           []string         `json:"flavor_tags,omitempty"`
	TowSpeedBonus        int              `json:"tow_speed_bonus,omitempty"`
	Hidden               bool             `json:"hidden,omitempty"`
	BasedOn              string           `json:"based_on,omitempty"`
	NPCRole              string           `json:"npc_role,omitempty"`
	InherentCapabilities []map[string]any `json:"inherent_capabilities,omitempty"`
	Legacy               bool             `json:"legacy,omitempty"`
	PassiveRecipes       []string         `json:"passive_recipes,omitempty"`
	PilotingRequired     int              `json:"piloting_required,omitempty"`
	RequiredItems        []map[string]any `json:"required_items,omitempty"`
	Special              string           `json:"special,omitempty"`

	// Prestige / unlock gating (v0.495.1). A hull may require a player
	// achievement, a faction achievement (optionally leader-only), or a
	// minimum empire reputation before it can be commissioned or bought.
	RequiredReputation         int    `json:"required_reputation,omitempty"`
	RequiredAchievement        string `json:"required_achievement,omitempty"`
	RequiredFactionAchievement string `json:"required_faction_achievement,omitempty"`
	RequiredFactionLeader      bool   `json:"required_faction_leader,omitempty"`
	// PrestigeLock is catalog-only and present only for hulls the viewer has
	// NOT unlocked; it names the achievement needed to unlock them.
	PrestigeLock string `json:"prestige_lock,omitempty"`
	// DefaultLoadoutVersion bumps whenever the canonical default loadout
	// changes; ships below this version are offered refit_ship.
	DefaultLoadoutVersion int `json:"default_loadout_version,omitempty"`
}

ShipClass represents a ship class definition with stats and requirements.

Ship classes are built (commissioned), not bought at a fixed sticker price: the server dropped the `price` field in v0.495.1, and BuildMaterials + ShipyardTier are the sourcing story now. It also dropped `required_skills` for ships, superseded by the scalar PilotingRequired. Neither field is present in live catalog_ships data — do not reintroduce them.

type ShipLicenseResponse added in v0.2.0

type ShipLicenseResponse struct {
	Empire             string `json:"empire"`
	ShipClass          string `json:"ship_class"`
	ShipName           string `json:"ship_name"`
	CostPaid           int    `json:"cost_paid"`
	RoyaltyPercent     int    `json:"royalty_percent"`
	FactionCreditsLeft int    `json:"faction_credits_left"`
	Hint               string `json:"hint,omitempty"`
}

ShipLicenseResponse is returned by buy_ship_license: the right to build an empire's hull, paid for out of faction credits, against a per-sale royalty.

  • buy_ship_license

type ShipListingDetail added in v0.2.0

type ShipListingDetail struct {
	ListingID    string `json:"listing_id"`
	ShipID       string `json:"ship_id"`
	ShipName     string `json:"ship_name,omitempty"`
	ClassID      string `json:"class_id"`
	Category     string `json:"category,omitempty"`
	Tier         int    `json:"tier,omitempty"`
	Scale        int    `json:"scale,omitempty"`
	Hull         int    `json:"hull,omitempty"`
	MaxHull      int    `json:"max_hull,omitempty"`
	Shield       int    `json:"shield,omitempty"`
	Price        int    `json:"price"`
	Seller       string `json:"seller,omitempty"`
	ModulesCount int    `json:"modules_count,omitempty"`
	ListedAt     string `json:"listed_at,omitempty"`
}

ShipListingDetail represents a ship listed for sale (browse_ships).

type ShipModule added in v0.2.0

type ShipModule struct {
	ID                  string         `json:"id"`
	TypeID              string         `json:"type_id,omitempty"`
	Name                string         `json:"name"`
	Type                string         `json:"type"`
	Slot                string         `json:"slot,omitempty"`
	Size                int            `json:"size,omitempty"`
	Quality             float64        `json:"quality,omitempty"`
	QualityGrade        string         `json:"quality_grade,omitempty"`
	Wear                float64        `json:"wear,omitempty"`
	WearStatus          string         `json:"wear_status,omitempty"`
	CPUUsage            int            `json:"cpu_usage,omitempty"`
	PowerUsage          int            `json:"power_usage,omitempty"`
	Damage              int            `json:"damage,omitempty"`
	DamageType          string         `json:"damage_type,omitempty"`
	Range               int            `json:"range,omitempty"`
	Reach               int            `json:"reach,omitempty"`
	Cooldown            int            `json:"cooldown,omitempty"`
	MagazineSize        int            `json:"magazine_size,omitempty"`
	CurrentAmmo         int            `json:"current_ammo,omitempty"`
	AmmoType            string         `json:"ammo_type,omitempty"`
	LoadedAmmoID        string         `json:"loaded_ammo_id,omitempty"`
	LoadedAmmoName      string         `json:"loaded_ammo_name,omitempty"`
	AccuracyBonus       int            `json:"accuracy_bonus,omitempty"`
	ArmorBonus          int            `json:"armor_bonus,omitempty"`
	ArmorBypassBonus    float64        `json:"armor_bypass_bonus,omitempty"`
	ArmorRepairRate     int            `json:"armor_repair_rate,omitempty"`
	ShieldBonus         int            `json:"shield_bonus,omitempty"`
	ShieldBypassBonus   float64        `json:"shield_bypass_bonus,omitempty"`
	ShieldRechargeBonus int            `json:"shield_recharge_bonus,omitempty"`
	HullBonus           int            `json:"hull_bonus,omitempty"`
	HullPenalty         int            `json:"hull_penalty,omitempty"`
	SpeedBonus          int            `json:"speed_bonus,omitempty"`
	SpeedPenalty        int            `json:"speed_penalty,omitempty"`
	CargoBonus          int            `json:"cargo_bonus,omitempty"`
	CPUBonus            int            `json:"cpu_bonus,omitempty"`
	PowerBonus          int            `json:"power_bonus,omitempty"`
	MaxFuelBonus        int            `json:"max_fuel_bonus,omitempty"`
	DamageReduction     int            `json:"damage_reduction,omitempty"`
	MiningPower         int            `json:"mining_power,omitempty"`
	SalvageBonus        int            `json:"salvage_bonus,omitempty"`
	ScannerPower        int            `json:"scanner_power,omitempty"`
	SurveyPower         int            `json:"survey_power,omitempty"`
	SurveyRange         int            `json:"survey_range,omitempty"`
	SignatureBonus      int            `json:"signature_bonus,omitempty"`
	TrackingBonus       int            `json:"tracking_bonus,omitempty"`
	TowSpeedPenalty     int            `json:"tow_speed_penalty,omitempty"`
	CloakStrength       int            `json:"cloak_strength,omitempty"`
	FuelEfficiency      int            `json:"fuel_efficiency,omitempty"`
	DroneBandwidth      int            `json:"drone_bandwidth,omitempty"`
	DroneCapacity       int            `json:"drone_capacity,omitempty"`
	ResistanceBonus     map[string]int `json:"resistance_bonus,omitempty"`
	Special             string         `json:"special,omitempty"`
}

ShipModule represents an installed module on a ship.

type ShipmentActor added in v0.2.0

type ShipmentActor struct {
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

ShipmentActor identifies a party to a shipment (kind: player|faction|station).

type ShipmentContract added in v0.2.0

type ShipmentContract struct {
	ID                      string         `json:"id"`
	PackageID               string         `json:"package_id"`
	Shipper                 *ShipmentActor `json:"shipper"`
	Recipient               *ShipmentActor `json:"recipient"`
	Contractor              *ShipmentActor `json:"contractor,omitempty"`
	OriginBaseID            string         `json:"origin_base_id"`
	DestinationBaseID       string         `json:"destination_base_id"`
	ShippingHouseID         string         `json:"shipping_house_id"`
	Visibility              string         `json:"visibility"`
	ServiceLevel            string         `json:"service_level"`
	Status                  string         `json:"status"`
	PostedAt                string         `json:"posted_at"`
	ListingExpiresAt        string         `json:"listing_expires_at"`
	AcceptedAt              string         `json:"accepted_at,omitempty"`
	AcceptedTick            int64          `json:"accepted_tick,omitempty"`
	DeliveredAt             string         `json:"delivered_at,omitempty"`
	BreachedAt              string         `json:"breached_at,omitempty"`
	SettledAt               string         `json:"settled_at,omitempty"`
	TargetTick              int64          `json:"target_tick,omitempty"`
	DeadlineTick            int64          `json:"deadline_tick,omitempty"`
	BaseReward              int64          `json:"base_reward"`
	MaxSpeedBonus           int64          `json:"max_speed_bonus"`
	ServiceFee              int64          `json:"service_fee"`
	RewardEscrow            int64          `json:"reward_escrow"`
	SpeedBonusEscrow        int64          `json:"speed_bonus_escrow"`
	AppraisedValue          int64          `json:"appraised_value,omitempty"`
	CoveredValue            int64          `json:"covered_value,omitempty"`
	Premium                 int64          `json:"premium,omitempty"`
	ReservedExposure        int64          `json:"reserved_exposure"`
	FailureDebt             int64          `json:"failure_debt"`
	CarrierPayout           int64          `json:"carrier_payout,omitempty"`
	ClaimPaid               int64          `json:"claim_paid,omitempty"`
	PolicyStatus            string         `json:"policy_status"`
	Insurable               bool           `json:"insurable"`
	UninsurableReason       string         `json:"uninsurable_reason,omitempty"`
	RiskBand                string         `json:"risk_band"`
	Insurer                 *ShipmentActor `json:"insurer,omitempty"`
	InvitedCarrier          *ShipmentActor `json:"invited_carrier,omitempty"`
	SalvageOwner            *ShipmentActor `json:"salvage_owner,omitempty"`
	ReputationEligible      bool           `json:"reputation_eligible,omitempty"`
	RouteHops               int            `json:"route_hops,omitempty"`
	TerminalReason          string         `json:"terminal_reason,omitempty"`
	LatestBeaconAt          string         `json:"latest_beacon_at,omitempty"`
	LatestBeaconFingerprint string         `json:"latest_beacon_fingerprint,omitempty"`
}

ShipmentContract is a freight contract. Deadlines are ticks (DeadlineTick, TargetTick), not wall-clock. Status: posted|in_transit|delivered|returned| breached|defaulted|canceled. RiskBand / carrier tier: probationary|licensed|trusted|prime (+ unpriced for risk_band).

type ShipmentTrackingEvent added in v0.2.0

type ShipmentTrackingEvent struct {
	ID           string         `json:"id"`
	ShipmentID   string         `json:"shipment_id"`
	PackageID    string         `json:"package_id"`
	Class        string         `json:"class"`
	Custodian    *ShipmentActor `json:"custodian,omitempty"`
	Fingerprint  string         `json:"fingerprint"`
	ObservedAt   string         `json:"observed_at"`
	ObservedTick int64          `json:"observed_tick"`
	BaseID       string         `json:"base_id,omitempty"`
	POIID        string         `json:"poi_id,omitempty"`
	ReferenceID  string         `json:"reference_id,omitempty"`
	SystemID     string         `json:"system_id,omitempty"`
}

ShipmentTrackingEvent is one beacon custody event (class: shipping_house_escrow |ship|player_storage|faction_storage|faction_bucket|wreck|unpack_job_escrow| destroyed|unknown).

type ShippingContractResponse added in v0.2.0

type ShippingContractResponse struct {
	Action   string           `json:"action"`
	Contract ShipmentContract `json:"contract"`
}

ShippingContractResponse is action=post|get|accept.

type ShippingDebtPaymentResponse added in v0.2.0

type ShippingDebtPaymentResponse struct {
	Action               string              `json:"action"`
	AmountPaid           int64               `json:"amount_paid"`
	Profile              CarrierProfile      `json:"profile"`
	Capacity             CarrierCapacity     `json:"capacity"`
	Progression          CarrierTierProgress `json:"progression"`
	DebtBlocksAcceptance bool                `json:"debt_blocks_acceptance"`
	DebtBlockReason      string              `json:"debt_block_reason,omitempty"`
	UpdatedDebts         []FreightDebt       `json:"updated_debts"`
	OutstandingDebts     []FreightDebt       `json:"outstanding_debts"`
}

ShippingDebtPaymentResponse is action=pay_debt.

type ShippingListResponse added in v0.2.0

type ShippingListResponse struct {
	Action          string            `json:"action"`
	Shipments       []ShippingListing `json:"shipments"`
	Page            int               `json:"page"`
	PerPage         int               `json:"per_page"`
	Total           int               `json:"total"`
	EmptyReason     string            `json:"empty_reason,omitempty"`
	EmptyReasonCode string            `json:"empty_reason_code,omitempty"`
}

ShippingListResponse is action=list (the docked freight board).

type ShippingListing added in v0.2.0

type ShippingListing struct {
	Contract ShipmentContract `json:"contract"`
	Eligible bool             `json:"eligible"`
	Reason   string           `json:"reason,omitempty"`
}

ShippingListing wraps a contract for the board view; Eligible reports whether this carrier can actually accept it (Reason explains when not).

type ShippingProfileResponse added in v0.2.0

type ShippingProfileResponse struct {
	Action               string              `json:"action"`
	Profile              CarrierProfile      `json:"profile"`
	Capacity             CarrierCapacity     `json:"capacity"`
	Progression          CarrierTierProgress `json:"progression"`
	Debts                []FreightDebt       `json:"debts"`
	DebtBlocksAcceptance bool                `json:"debt_blocks_acceptance"`
	DebtBlockReason      string              `json:"debt_block_reason,omitempty"`
}

ShippingProfileResponse is action=profile.

type ShippingSettlementResponse added in v0.2.0

type ShippingSettlementResponse struct {
	Action        string           `json:"action"`
	Contract      ShipmentContract `json:"contract"`
	CarrierPayout int64            `json:"carrier_payout,omitempty"`
	ClaimPaid     int64            `json:"claim_paid,omitempty"`
	DebtCreated   int64            `json:"debt_created,omitempty"`
	ShipperRefund int64            `json:"shipper_refund,omitempty"`
}

ShippingSettlementResponse is action=deliver|return|cancel.

type ShippingTrackResponse added in v0.2.0

type ShippingTrackResponse struct {
	Action   string                  `json:"action"`
	Contract ShipmentContract        `json:"contract"`
	Events   []ShipmentTrackingEvent `json:"events"`
}

ShippingTrackResponse is action=track.

type Skill

type Skill struct {
	Level int     `json:"level"`
	XP    float64 `json:"xp"`
}

Skill represents a player's skill level and XP. The server may send skills as either a plain number (level only) or an object with level and xp fields. UnmarshalJSON handles both formats.

func (*Skill) UnmarshalJSON

func (s *Skill) UnmarshalJSON(data []byte) error

UnmarshalJSON handles both simple (number) and detailed (object) skill formats.

type SkillDefinition

type SkillDefinition struct {
	ID             string             `json:"id"`
	Name           string             `json:"name"`
	Description    string             `json:"description,omitempty"`
	Category       string             `json:"category,omitempty"`
	MaxLevel       int                `json:"max_level"`
	XpPerLevel     []float64          `json:"xp_per_level"`
	BonusPerLevel  map[string]float64 `json:"bonus_per_level,omitempty"`
	RequiredSkills map[string]int     `json:"required_skills,omitempty"`
	TrainingSource string             `json:"training_source,omitempty"`
}

SkillDefinition holds static skill data.

type SkillLevelUp

type SkillLevelUp struct {
	SkillID  string  `json:"skill_id"`
	NewLevel int     `json:"new_level"`
	XPGained float64 `json:"xp_gained"`
}

SkillLevelUp is sent when you level up a skill through passive training. Server event type: skill_level_up

type StationConfigResponse added in v0.2.0

type StationConfigResponse struct {
	Action                  string            `json:"action"`
	BaseID                  string            `json:"base_id"`
	Name                    string            `json:"name"`
	Description             string            `json:"description,omitempty"`
	PublicAccess            bool              `json:"public_access"`
	AllowOutsiderFacilities bool              `json:"allow_outsider_facilities"`
	AutoBuyFuel             bool              `json:"auto_buy_fuel"`
	AllowedFactions         []string          `json:"allowed_factions,omitempty"`
	AllowedPlayers          []string          `json:"allowed_players,omitempty"`
	BannedPlayers           []string          `json:"banned_players,omitempty"`
	ServiceAccess           map[string]string `json:"service_access,omitempty"`
	MarketFeeBps            int               `json:"market_fee_bps,omitempty"`
	RefuelPriceEach         int               `json:"refuel_price_each,omitempty"`
	RepairPricePerHull      int               `json:"repair_price_per_hull,omitempty"`
	Message                 string            `json:"message,omitempty"`
}

StationConfigResponse is returned by station: the owner-facing admin view of a player/faction station. ServiceAccess maps a service name to its access policy.

  • station

type StationHealth added in v0.2.0

type StationHealth struct {
	Condition         string `json:"condition"`
	ConditionText     string `json:"condition_text"`
	SatisfactionPct   int    `json:"satisfaction_pct"`
	SatisfiedCount    int    `json:"satisfied_count"`
	TotalServiceInfra int    `json:"total_service_infra"`
}

StationHealth represents the condition of a station.

type StationPassenger added in v0.2.0

type StationPassenger struct {
	CitizenID         string `json:"citizen_id"`
	Name              string `json:"name"`
	Citizenship       string `json:"citizenship"`
	Class             string `json:"class"`
	Destination       string `json:"destination"`
	DestinationName   string `json:"destination_name"`
	DestinationSystem string `json:"destination_system"`
	EstimatedFare     int    `json:"estimated_fare"`
}

StationPassenger is one NPC waiting at a station for transport, as returned in the list_station_passengers "waiting" array. Fare is a per-passenger estimate that scales with distance/hops; DestinationSystem is the system that contains the Destination station POI.

type StationType added in v0.2.0

type StationType struct {
	Type        string `json:"type"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Cost        int    `json:"cost"`
}

StationType represents a type of station that can be built.

type Storage

type Storage struct {
	BaseID   string        `json:"base_id"`
	BaseName string        `json:"base_name"`
	Items    []CargoItem   `json:"items"`
	Credits  int           `json:"credits"`
	Ships    []StorageShip `json:"ships,omitempty"`
	Gifts    []StorageGift `json:"gifts,omitempty"`
}

Storage represents items and credits stored at a station.

type StorageGift added in v0.2.0

type StorageGift struct {
	SenderID  string            `json:"sender_id"`
	Sender    string            `json:"sender"`
	Message   string            `json:"message,omitempty"`
	Credits   int               `json:"credits,omitempty"`
	Items     []StorageGiftItem `json:"items,omitempty"`
	Ships     []StorageGiftShip `json:"ships,omitempty"`
	Timestamp string            `json:"timestamp,omitempty"`
}

StorageGift represents a gift in station storage.

type StorageGiftItem added in v0.2.0

type StorageGiftItem struct {
	ItemID   string `json:"item_id"`
	Name     string `json:"name,omitempty"`
	Quantity int    `json:"quantity"`
}

StorageGiftItem represents an item within a gift.

type StorageGiftShip added in v0.2.0

type StorageGiftShip struct {
	ShipID    string `json:"ship_id"`
	ClassID   string `json:"class_id"`
	ClassName string `json:"class_name,omitempty"`
}

StorageGiftShip represents a ship within a gift.

type StorageShip added in v0.2.0

type StorageShip struct {
	ShipID    string `json:"ship_id"`
	ClassID   string `json:"class_id"`
	ClassName string `json:"class_name,omitempty"`
	CargoUsed int    `json:"cargo_used,omitempty"`
	Modules   int    `json:"modules,omitempty"`
}

StorageShip represents a ship stored at a station.

type SupplyCommissionResponse added in v0.2.0

type SupplyCommissionResponse struct {
	Message          string          `json:"message"`
	AllSourced       bool            `json:"all_sourced,omitempty"`
	CommissionID     string          `json:"commission_id"`
	CommissionStatus string          `json:"commission_status,omitempty"`
	Credits          int64           `json:"credits,omitempty"`
	ItemID           string          `json:"item_id,omitempty"`
	ItemName         string          `json:"item_name,omitempty"`
	Materials        json.RawMessage `json:"materials,omitempty"`
	Supplied         int             `json:"supplied,omitempty"`
}

SupplyCommissionResponse — supply_commission

type SurveyResource added in v0.2.0

type SurveyResource struct {
	ResourceID       string  `json:"resource_id"`
	Name             string  `json:"name,omitempty"`
	Richness         float64 `json:"richness,omitempty"`
	Remaining        float64 `json:"remaining,omitempty"`
	MaxRemaining     float64 `json:"max_remaining,omitempty"`
	RemainingDisplay string  `json:"remaining_display,omitempty"`
	DepletionPercent float64 `json:"depletion_percent,omitempty"`
}

SurveyResource represents a resource found during a survey.

type SurveySystemResponse

type SurveySystemResponse struct {
	Action          string           `json:"action,omitempty"`
	SystemID        string           `json:"system_id,omitempty"`
	SystemName      string           `json:"system_name,omitempty"`
	SurveyPower     int              `json:"survey_power,omitempty"`
	NewlyRevealed   []RevealedPOI    `json:"newly_revealed,omitempty"`
	AlreadyRevealed []RevealedPOI    `json:"already_revealed,omitempty"`
	FaintSignatures []FaintSignature `json:"faint_signatures,omitempty"`
	XPGained        map[string]int   `json:"xp_gained,omitempty"`
	Message         string           `json:"message,omitempty"`
	AnomalyHint     string           `json:"anomaly_hint,omitempty"`
}

SurveySystemResponse wraps the response from survey_system command.

type SwitchShipResponse added in v0.2.0

type SwitchShipResponse struct {
	Message         string      `json:"message"`
	ActiveShipID    string      `json:"active_ship_id"`
	ActiveShipClass string      `json:"active_ship_class"`
	StoredShipID    string      `json:"stored_ship_id"`
	StoredShipClass string      `json:"stored_ship_class"`
	CargoNote       string      `json:"cargo_note,omitempty"`
	CargoToStorage  []CargoItem `json:"cargo_to_storage,omitempty"`
}

SwitchShipResponse wraps the response from switch_ship command.

type SystemData

type SystemData struct {
	ID             string           `json:"id"`
	Name           string           `json:"name"`
	Description    string           `json:"description"`
	Empire         string           `json:"empire"`
	PoliceLevel    int              `json:"police_level"`
	SecurityStatus string           `json:"security_status,omitempty"`
	IsStronghold   bool             `json:"is_stronghold,omitempty"`
	Online         int              `json:"online,omitempty"`
	POIs           []POI            `json:"pois"`
	Connections    []ConnectionInfo `json:"connections"`
	Discovered     bool             `json:"discovered"`
	Position       Position         `json:"position"`
	DiscoveredBy   string           `json:"discovered_by,omitempty"`
}

SystemData holds complete system information.

type SystemSearchResult

type SystemSearchResult struct {
	SystemID    string   `json:"system_id"`
	Name        string   `json:"name"`
	Position    Position `json:"position,omitempty"`
	Connections []string `json:"connections,omitempty"`
}

SystemSearchResult represents a system from search_systems.

type TowWreckResponse added in v0.2.0

type TowWreckResponse struct {
	Action       string `json:"action"`
	WreckID      string `json:"wreck_id"`
	Insured      bool   `json:"insured"`
	Message      string `json:"message"`
	CargoCount   int    `json:"cargo_count,omitempty"`
	ModuleCount  int    `json:"module_count,omitempty"`
	SalvageValue int    `json:"salvage_value,omitempty"`
	ShipClass    string `json:"ship_class,omitempty"`
	SpeedPenalty string `json:"speed_penalty,omitempty"`
}

TowWreckResponse wraps the response from tow_wreck command.

type TradeAcceptResponse added in v0.2.0

type TradeAcceptResponse struct {
	TradeID     string `json:"trade_id"`
	Message     string `json:"message"`
	YourCredits int    `json:"your_credits,omitempty"`
}

TradeAcceptResponse wraps the response from trade_accept command.

type TradeDetail added in v0.2.0

type TradeDetail struct {
	TradeID        string      `json:"trade_id"`
	OffererName    string      `json:"offerer_name,omitempty"`
	TargetName     string      `json:"target_name,omitempty"`
	OfferCredits   int         `json:"offer_credits"`
	RequestCredits int         `json:"request_credits"`
	OfferItems     []TradeItem `json:"offer_items,omitempty"`
	RequestItems   []TradeItem `json:"request_items,omitempty"`
	ExpiresAt      string      `json:"expires_at,omitempty"`
}

TradeDetail represents a pending trade offer (incoming or outgoing).

type TradeFill added in v0.2.0

type TradeFill struct {
	ItemID    string `json:"item_id,omitempty"`
	ItemName  string `json:"item_name,omitempty"`
	PriceEach int64  `json:"price_each,omitempty"`
	Quantity  int    `json:"quantity,omitempty"`
	Timestamp string `json:"timestamp,omitempty"`
	Total     int64  `json:"total,omitempty"`
	Type      string `json:"type,omitempty"` // "buy" or "sell"
}

TradeFill is a notification of an exchange trade fill that occurred while the player was away; surfaced in DockResponse.TradeFills when docking.

type TradeItem added in v0.2.0

type TradeItem struct {
	ItemID   string `json:"item_id"`
	Quantity int    `json:"quantity"`
}

TradeItem represents an item in a trade offer.

type TradeOffer

type TradeOffer struct {
	TradeID        string      `json:"trade_id"`
	FromPlayer     string      `json:"from_player"`
	FromName       string      `json:"from_name"`
	OfferItems     []CargoItem `json:"offer_items"`
	OfferCredits   int         `json:"offer_credits"`
	RequestItems   []CargoItem `json:"request_items"`
	RequestCredits int         `json:"request_credits"`
}

TradeOffer represents an incoming trade offer from another player. Server event type: trade_offer_received

type TradeOfferResponse added in v0.2.0

type TradeOfferResponse struct {
	TradeID string `json:"trade_id"`
	Message string `json:"message"`
}

TradeOfferResponse wraps the response from trade_offer command.

type TransitLounge added in v0.2.0

type TransitLounge struct {
	Lounge     string                   `json:"lounge"`
	Capacity   int                      `json:"capacity"`
	Occupancy  int                      `json:"occupancy"`
	Passengers []TransitLoungePassenger `json:"passengers"`
}

TransitLounge is a station's connecting-passenger lounge (server v0.495.1): passengers who have been dropped mid-route and are waiting for an onward leg. Occupancy counts those currently waiting against Capacity.

type TransitLoungePassenger added in v0.2.0

type TransitLoungePassenger struct {
	CitizenID         string `json:"citizen_id"`
	Name              string `json:"name"`
	Bio               string `json:"bio"`
	Class             string `json:"class"`
	BerthClass        string `json:"berth_class,omitempty"`
	Destination       string `json:"destination"`
	DestinationName   string `json:"destination_name"`
	DestinationSystem string `json:"destination_system,omitempty"`
	BaseFare          int    `json:"base_fare"`
	SpeedBonus        int    `json:"speed_bonus,omitempty"`
	TicksRemaining    int    `json:"ticks_remaining"`
	Connecting        bool   `json:"connecting,omitempty"`
}

TransitLoungePassenger is one fare waiting in a transit lounge. It is a distinct shape from StationPassenger: the fare is already agreed (BaseFare, not an estimate) and it carries the live delivery countdown and berth class.

type TravelProgress

type TravelProgress struct {
	Progress    float64 `json:"travel_progress"`
	Destination string  `json:"travel_destination"`
	Type        string  `json:"travel_type"`
	ArrivalTick int64   `json:"travel_arrival_tick"`
}

TravelProgress represents travel state when in transit.

type TravelResponse added in v0.2.0

type TravelResponse struct {
	Action                 string         `json:"action"`
	POI                    string         `json:"poi,omitempty"`
	POIID                  string         `json:"poi_id,omitempty"`
	ArrivalTick            int64          `json:"arrival_tick,omitempty"`
	Destination            string         `json:"destination,omitempty"`
	AutoUndocked           bool           `json:"auto_undocked,omitempty"`
	OnlinePlayersCount     int            `json:"online_players_count,omitempty"`
	OnlinePlayersTruncated bool           `json:"online_players_truncated,omitempty"`
	OnlinePlayers          []NearbyPlayer `json:"online_players,omitempty"`
	OfflineCollapsed       int            `json:"offline_collapsed,omitempty"`
	XPGained               map[string]int `json:"xp_gained,omitempty"`
}

TravelResponse wraps the response from travel command.

Also covers the "arrived" completion event (see client_api_monitor.go — both "travel" and "arrived" map to this struct). Fields populated on the initial ACK vs the arrival completion differ; XPGained only appears on arrived (navigation + piloting skill XP).

type UndockResponse added in v0.2.0

type UndockResponse struct {
	Action       string `json:"action"`
	AutoUndocked bool   `json:"auto_undocked,omitempty"`
}

UndockResponse wraps the response from undock command.

AutoUndocked is set when the undock was performed automatically as a precursor to another command (travel/jump issued while docked) — see the "Auto-dock/undock" note in the API docs.

type UninstallModResponse added in v0.2.0

type UninstallModResponse struct {
	Message        string  `json:"message"`
	ModuleID       string  `json:"module_id"`
	CPUUsed        int     `json:"cpu_used"`
	PowerUsed      int     `json:"power_used"`
	Destroyed      bool    `json:"destroyed,omitempty"`
	Quality        float64 `json:"quality,omitempty"`
	QualityGrade   string  `json:"quality_grade,omitempty"`
	UninstallCount int     `json:"uninstall_count,omitempty"`
	Wear           float64 `json:"wear,omitempty"`
	WearStatus     string  `json:"wear_status,omitempty"`
	Damaged        bool    `json:"damaged,omitempty"`
}

UninstallModResponse wraps the response from uninstall_mod command.

type UnloadDroneResponse added in v0.2.0

type UnloadDroneResponse struct {
	DroneID string `json:"drone_id"`
	ItemID  string `json:"item_id"`
	Message string `json:"message"`
}

UnloadDroneResponse is returned by unload_drone.

  • unload_drone

type UnloadPassengerResponse added in v0.2.0

type UnloadPassengerResponse struct {
	// Kind is the v0.531.4 response discriminator: single|all|transfer|lounge_checkin.
	Kind          string `json:"kind,omitempty"`
	Action        string `json:"action"`
	FareCollected int    `json:"fare_collected,omitempty"`
}

UnloadPassengerResponse wraps the unload_passenger response. The server reply carries no "action" field; it is detected by the distinctive "fare_collected" key (see client.go's storeKey detection for passenger responses). FareCollected is 0 when the passenger is stranded off-destination (no fare, small reputation hit).

type UnreadChat added in v0.2.0

type UnreadChat struct {
	Local   int `json:"local,omitempty"`
	System  int `json:"system,omitempty"`
	Faction int `json:"faction,omitempty"`
	Private int `json:"private,omitempty"`
}

UnreadChat represents unread message counts by channel.

type UploadDroneScriptResponse added in v0.2.0

type UploadDroneScriptResponse struct {
	DroneID   string `json:"drone_id"`
	Message   string `json:"message"`
	ScriptLen int    `json:"script_len"`
}

UploadDroneScriptResponse is returned by upload_drone_script.

  • upload_drone_script

type UseItemResponse added in v0.2.0

type UseItemResponse struct {
	Action            string       `json:"action"`
	EffectType        string       `json:"effect_type"`
	ItemID            string       `json:"item_id"`
	ItemName          string       `json:"item_name"`
	QuantityUsed      int          `json:"quantity_used"`
	QuantityRemaining int          `json:"quantity_remaining"`
	ActiveBuffs       []ActiveBuff `json:"active_buffs,omitempty"`
	Amount            int          `json:"amount,omitempty"`
	Duration          int          `json:"duration,omitempty"`
	ExpiresAt         int          `json:"expires_at,omitempty"`
	Hull              int          `json:"hull,omitempty"`
	HullRestored      int          `json:"hull_restored,omitempty"`
	MaxHull           int          `json:"max_hull,omitempty"`
	Shield            int          `json:"shield,omitempty"`
	ShieldRestored    int          `json:"shield_restored,omitempty"`
	MaxShield         int          `json:"max_shield,omitempty"`
	Stat              string       `json:"stat,omitempty"`
	Message           string       `json:"message,omitempty"`
	DestinationPOI    string       `json:"destination_poi,omitempty"`
	DestinationSystem string       `json:"destination_system,omitempty"`
	OriginPOI         string       `json:"origin_poi,omitempty"`
	OriginSystem      string       `json:"origin_system,omitempty"`
	DockedAt          string       `json:"docked_at,omitempty"`
	HomeBaseName      string       `json:"home_base_name,omitempty"`
	FuelAdded         int          `json:"fuel_added,omitempty"`
	FuelMax           int          `json:"fuel_max,omitempty"`
	FuelNow           int          `json:"fuel_now,omitempty"`
}

UseItemResponse wraps the response from use_item command.

type ViewCompletedMissionResponse added in v0.2.0

type ViewCompletedMissionResponse struct {
	TemplateID     string          `json:"template_id"`
	Title          string          `json:"title"`
	Type           string          `json:"type,omitempty"`
	ChainNext      string          `json:"chain_next,omitempty"`
	CompletionTime string          `json:"completion_time,omitempty"`
	Difficulty     int             `json:"difficulty,omitempty"`
	Objectives     json.RawMessage `json:"objectives,omitempty"`
	Rewards        json.RawMessage `json:"rewards,omitempty"`
	Repeatable     bool            `json:"repeatable,omitempty"`
	Giver          json.RawMessage `json:"giver,omitempty"`
	Dialog         json.RawMessage `json:"dialog,omitempty"`
	Description    string          `json:"description,omitempty"`
}

ViewCompletedMissionResponse — view_completed_mission

type ViewFactionStorageResponse added in v0.2.0

type ViewFactionStorageResponse struct {
	FactionID      string           `json:"faction_id"`
	FactionName    string           `json:"faction_name"`
	FactionTag     string           `json:"faction_tag"`
	BaseID         string           `json:"base_id"`
	Credits        int              `json:"credits"`
	Items          []CargoItem      `json:"items"`
	RecentActivity []map[string]any `json:"recent_activity,omitempty"`

	FactionFuelCapacity int    `json:"faction_fuel_capacity,omitempty"`
	FactionFuelReserve  int    `json:"faction_fuel_reserve,omitempty"`
	Hint                string `json:"hint,omitempty"`
}

ViewFactionStorageResponse wraps the response from view_faction_storage.

type ViewInsuranceResponse added in v0.2.0

type ViewInsuranceResponse struct {
	Message  string          `json:"message,omitempty"`
	Policies json.RawMessage `json:"policies,omitempty"`
}

ViewInsuranceResponse is returned by view_insurance.

  • view_insurance

type ViewMarketItem

type ViewMarketItem struct {
	ItemID       string        `json:"item_id"`
	ItemName     string        `json:"item_name"`
	Category     string        `json:"category,omitempty"`
	BestBuy      float64       `json:"best_buy"`
	BestSell     float64       `json:"best_sell"`
	BuyPrice     int           `json:"buy_price,omitempty"`
	BuyQuantity  int           `json:"buy_quantity,omitempty"`
	SellPrice    int           `json:"sell_price,omitempty"`
	SellQuantity int           `json:"sell_quantity,omitempty"`
	Spread       int           `json:"spread,omitempty"`
	BuyOrders    []MarketOrder `json:"buy_orders"`
	SellOrders   []MarketOrder `json:"sell_orders"`
}

ViewMarketItem represents an item in the aggregated market order book returned by the view_market command. Each item shows the best buy/sell prices and full order book.

type ViewMarketResponse

type ViewMarketResponse struct {
	Action      string           `json:"action"`
	Base        string           `json:"base,omitempty"`
	BaseID      string           `json:"base_id,omitempty"`
	Items       []ViewMarketItem `json:"items"`
	Message     string           `json:"message,omitempty"`
	Categories  []string         `json:"categories,omitempty"`
	CurrentTick int64            `json:"current_tick,omitempty"`
}

ViewMarketResponse wraps the response from view_market command.

type ViewOrdersResponse

type ViewOrdersResponse struct {
	Action                 string          `json:"action"`
	Base                   string          `json:"base,omitempty"`
	Orders                 []ExchangeOrder `json:"orders"`
	FactionOrders          []ExchangeOrder `json:"faction_orders,omitempty"`
	OrdersCount            int             `json:"orders_count,omitempty"`
	FactionOrdersCount     int             `json:"faction_orders_count,omitempty"`
	OrdersTruncated        bool            `json:"orders_truncated,omitempty"`
	FactionOrdersTruncated bool            `json:"faction_orders_truncated,omitempty"`
	Hint                   string          `json:"hint,omitempty"`
	HasMore                bool            `json:"has_more,omitempty"`
	Page                   int             `json:"page,omitempty"`
	PageSize               int             `json:"page_size,omitempty"`
	Scope                  string          `json:"scope,omitempty"`
	SortBy                 string          `json:"sort_by,omitempty"`
	Total                  int             `json:"total,omitempty"`
	TotalPages             int             `json:"total_pages,omitempty"`
	ItemFilter             string          `json:"item_filter,omitempty"`
	OrderType              string          `json:"order_type,omitempty"`
	SearchTerm             string          `json:"search_term,omitempty"`
}

ViewOrdersResponse wraps the response from view_orders command.

type ViewShipBuyOrdersResponse added in v0.2.0

type ViewShipBuyOrdersResponse struct {
	Count  int            `json:"count"`
	Orders []ShipBuyOrder `json:"orders"`
}

ViewShipBuyOrdersResponse is returned by view_ship_buy_orders.

  • view_ship_buy_orders

type ViewStorageResponse

type ViewStorageResponse struct {
	BaseID  string        `json:"base_id"`
	Credits int           `json:"credits"`
	Items   []CargoItem   `json:"items"`
	Ships   []StorageShip `json:"ships,omitempty"`
	Gifts   []StorageGift `json:"gifts,omitempty"`
	Hint    string        `json:"hint,omitempty"`

	Messages json.RawMessage `json:"messages,omitempty"`
}

ViewStorageResponse wraps the response from view_storage command.

type WithdrawItemsResponse added in v0.2.0

type WithdrawItemsResponse struct {
	Action           string `json:"action"`
	ItemID           string `json:"item_id"`
	Quantity         int    `json:"quantity"`
	Source           string `json:"source,omitempty"`
	Destination      string `json:"destination,omitempty"`
	DestTotal        int    `json:"dest_total,omitempty"`
	SourceRemaining  int    `json:"source_remaining,omitempty"`
	StorageRemaining int    `json:"storage_remaining,omitempty"`
	CargoTotal       int    `json:"cargo_total,omitempty"`
	CargoSpace       int    `json:"cargo_space,omitempty"`
}

WithdrawItemsResponse wraps the response from withdraw_items command, which transfers items between cargo, station storage, and faction storage. The server returns a generic transfer shape: source/destination plus the resulting totals (dest_total at the destination, source_remaining at the source). Legacy storage->cargo responses also carry storage_remaining / cargo_total / cargo_space.

type Wreck

type Wreck struct {
	ID                string      `json:"id"`
	Type              string      `json:"type,omitempty"`
	ShipClass         string      `json:"ship_class"`
	POIID             string      `json:"poi_id"`
	SystemID          string      `json:"system_id,omitempty"`
	VictimID          string      `json:"victim_id,omitempty"`
	VictimName        string      `json:"victim_name,omitempty"`
	KillerID          string      `json:"killer_id,omitempty"`
	KillerName        string      `json:"killer_name,omitempty"`
	Cargo             []CargoItem `json:"cargo,omitempty"`
	Modules           []string    `json:"modules,omitempty"`
	SalvageValue      int         `json:"salvage_value,omitempty"`
	InsurancePolicyID string      `json:"insurance_policy_id,omitempty"`
	TowedByPlayerID   string      `json:"towed_by_player_id,omitempty"`
	CreatedAt         string      `json:"created_at,omitempty"`
	ExpiresAt         string      `json:"expires_at,omitempty"`
	ExpireTick        int64       `json:"expire_tick,omitempty"`
}

Wreck represents a destroyed ship's wreckage.

type WriteNoteResponse added in v0.2.0

type WriteNoteResponse struct {
	NoteID        string `json:"note_id"`
	ContentLength int    `json:"content_length"`
	Message       string `json:"message"`
}

WriteNoteResponse wraps the response from write_note command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL