@spacemolt/lib 16.5.0 → 16.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1804,11 +1804,18 @@ export type BuyResponse = {
1804
1804
  xp_gained?: number;
1805
1805
  };
1806
1806
  export type CancelCommissionResponse = {
1807
+ /**
1808
+ * The caller's wallet balance after the cancel. It includes the refund only when refunded_to is the caller.
1809
+ */
1807
1810
  credits_total: number;
1808
1811
  materials_note?: string;
1809
1812
  materials_returned?: Array<CargoItem>;
1810
1813
  message: string;
1811
1814
  refund: number;
1815
+ /**
1816
+ * Who received the credit refund: the username of the player who placed the commission (not always the caller: a ManageBases member can cancel a capital mobile base for the faction), or for a faction-funded commission the name of the faction whose treasury received it.
1817
+ */
1818
+ refunded_to: string;
1812
1819
  };
1813
1820
  export type CancelOrderCommandResponse = ({
1814
1821
  kind: 'single';
@@ -1926,41 +1933,133 @@ export type CargoItem = {
1926
1933
  size?: number;
1927
1934
  };
1928
1935
  export type CarrierCapacity = {
1929
- active_contract_limit?: number;
1936
+ /**
1937
+ * Number of in_transit contracts the carrier holds. Same as the profile's active_contracts.
1938
+ */
1930
1939
  active_contracts: number;
1940
+ /**
1941
+ * Always true: the number of contracts a carrier can hold has no cap. Only liability is limited.
1942
+ */
1931
1943
  active_contracts_unlimited: boolean;
1944
+ /**
1945
+ * Sum in credits of reserved_exposure over the carrier's in_transit contracts.
1946
+ */
1932
1947
  active_liability: number;
1948
+ /**
1949
+ * Largest active_liability in credits the carrier can reach by accepting: 50000 probationary, 100000 licensed, 1000000 trusted. Absent for prime (no limit).
1950
+ */
1933
1951
  aggregate_liability_limit?: number;
1952
+ /**
1953
+ * True for a prime carrier. The liability limits are then absent.
1954
+ */
1934
1955
  liability_unlimited: boolean;
1956
+ /**
1957
+ * aggregate_liability_limit - active_liability, never below 0. Absent for prime.
1958
+ */
1935
1959
  remaining_aggregate_liability?: number;
1960
+ /**
1961
+ * Largest reserved_exposure in credits one accepted contract can have at this tier: 25000 probationary, 50000 licensed, 500000 trusted. Absent for prime (no limit).
1962
+ */
1936
1963
  single_package_liability_limit?: number;
1937
1964
  };
1938
1965
  export type CarrierProfile = {
1966
+ /**
1967
+ * Number of in_transit contracts this carrier holds.
1968
+ */
1939
1969
  active_contracts: number;
1970
+ /**
1971
+ * Sum in credits of reserved_exposure over those in_transit contracts.
1972
+ */
1940
1973
  active_liability: number;
1974
+ /**
1975
+ * The player or faction this freight-carrier record belongs to. One record per carrier across the whole galaxy.
1976
+ */
1941
1977
  actor: ShipmentActor;
1978
+ /**
1979
+ * Count of contracts that ended breached.
1980
+ */
1942
1981
  breaches: number;
1982
+ /**
1983
+ * Count of contracts that ended defaulted.
1984
+ */
1943
1985
  defaults: number;
1986
+ /**
1987
+ * Sum in credits of appraised_value over those deliveries.
1988
+ */
1944
1989
  delivered_value: number;
1990
+ /**
1991
+ * Time of the newest late delivery, late return, breach or default. Absent when there has been none.
1992
+ */
1945
1993
  last_consequence_at?: string;
1994
+ /**
1995
+ * Time a debt payment last brought outstanding_debt to 0. Absent when that has never happened.
1996
+ */
1946
1997
  last_recovery_at?: string;
1998
+ /**
1999
+ * Count of deliveries made after deadline_tick but inside the recovery window.
2000
+ */
1947
2001
  late_deliveries: number;
2002
+ /**
2003
+ * Sum in credits of outstanding over this carrier's freight debts. While positive the carrier cannot accept any contract.
2004
+ */
1948
2005
  outstanding_debt: number;
2006
+ /**
2007
+ * How many of those deliveries were priority service delivered at or before target_tick.
2008
+ */
1949
2009
  priority_deliveries: number;
2010
+ /**
2011
+ * Count of packages handed back to the shipper at the origin, on time or late.
2012
+ */
1950
2013
  returns: number;
2014
+ /**
2015
+ * Count of on-time deliveries with reputation_eligible true.
2016
+ */
1951
2017
  successful_deliveries: number;
2018
+ /**
2019
+ * Carrier standing. It sets which risk_band the carrier can accept and its liability limits. An on-time reputation-eligible delivery raises it when both thresholds are met: licensed 5 deliveries and 250 credits delivered, trusted 20 and 250000, prime 50 and 2000000. Each breach or default drops it one tier. A new carrier starts probationary.
2020
+ */
1952
2021
  tier: 'probationary' | 'licensed' | 'trusted' | 'prime';
2022
+ /**
2023
+ * Time the record last changed.
2024
+ */
1953
2025
  updated_at: string;
1954
2026
  };
1955
2027
  export type CarrierTierProgress = {
2028
+ /**
2029
+ * True at prime. The required and remaining fields are then 0.
2030
+ */
1956
2031
  at_maximum_tier: boolean;
2032
+ /**
2033
+ * The carrier's tier now.
2034
+ */
1957
2035
  current_tier: 'probationary' | 'licensed' | 'trusted' | 'prime';
2036
+ /**
2037
+ * The profile's delivered_value in credits.
2038
+ */
1958
2039
  delivered_value: number;
2040
+ /**
2041
+ * The tier one step above current_tier. Absent at prime.
2042
+ */
1959
2043
  next_tier?: 'licensed' | 'trusted' | 'prime';
2044
+ /**
2045
+ * required_delivered_value - delivered_value, never below 0. Promotion needs both remainders at 0 and happens on the next on-time reputation-eligible delivery. After a demotion both can already be 0.
2046
+ */
1960
2047
  remaining_delivered_value: number;
2048
+ /**
2049
+ * required_successful_deliveries - successful_deliveries, never below 0. 0 means the threshold is met.
2050
+ */
1961
2051
  remaining_successful_deliveries: number;
2052
+ /**
2053
+ * delivered_value in credits needed for next_tier: 250 for licensed, 250000 for trusted, 2000000 for prime. 0 at prime.
2054
+ */
1962
2055
  required_delivered_value: number;
2056
+ /**
2057
+ * successful_deliveries needed for next_tier: 5 for licensed, 20 for trusted, 50 for prime. 0 at prime.
2058
+ */
1963
2059
  required_successful_deliveries: number;
2060
+ /**
2061
+ * The profile's successful_deliveries.
2062
+ */
1964
2063
  successful_deliveries: number;
1965
2064
  };
1966
2065
  export type CatalogAchievement = {
@@ -5029,6 +5128,58 @@ export type FaintSignature = {
5029
5128
  hint: string;
5030
5129
  type: string;
5031
5130
  };
5131
+ export type FieldJob = {
5132
+ /**
5133
+ * Inputs held for the remaining runs. One entry per item. size is the item's base cargo size. A finished run uses its share; a cancel returns the rest to cargo.
5134
+ */
5135
+ escrow: Array<ShipCargoItem>;
5136
+ /**
5137
+ * Job ID. craft job_id=<id> cancels it.
5138
+ */
5139
+ id: string;
5140
+ /**
5141
+ * Player who queued the job.
5142
+ */
5143
+ initiated_by: string;
5144
+ /**
5145
+ * Fraction of the current run that is done. 0 or more and less than 1.
5146
+ */
5147
+ progress: number;
5148
+ /**
5149
+ * Game tick when the job was queued.
5150
+ */
5151
+ queued_tick: number;
5152
+ /**
5153
+ * Recipe the job crafts.
5154
+ */
5155
+ recipe_id: string;
5156
+ /**
5157
+ * Runs originally ordered.
5158
+ */
5159
+ runs: number;
5160
+ /**
5161
+ * Runs still to produce.
5162
+ */
5163
+ runs_remaining: number;
5164
+ };
5165
+ export type FieldWorkshopView = {
5166
+ /**
5167
+ * Why the queue does not advance. Present only when state is paused. not_active: the ship is not its owner's active ship (parked or in a carrier bay or the pilot switched ships). docked: the pilot is docked. moving: travelling or jumping (including with a fleet). in_battle: the pilot is in a battle. no_crew: the ship has no fit crew. pilot_action: in the most recent tick the pilot ran a command that uses the ship (travel, jump, dock, undock, mine, attack, hunt, scan, cloak, loot_wreck, tow_wreck, release_tow, jettison, install_mod, uninstall_mod, reload, drone commands, survey_system or use_item). cargo_full: no queued job's next run fits in cargo after that run's inputs are used; free cargo space to resume.
5168
+ */
5169
+ pause_reason?: 'not_active' | 'docked' | 'moving' | 'in_battle' | 'no_crew' | 'pilot_action' | 'cargo_full';
5170
+ /**
5171
+ * Number of jobs queued on this ship's Field Workshop. 0 when state is idle. craft with no recipe_id lists them (venue Field Workshop).
5172
+ */
5173
+ queued_jobs: number;
5174
+ /**
5175
+ * Cargo space held by inputs escrowed on this ship's Field Workshop jobs. It is not part of cargo_used but it is not free: free cargo space is cargo_capacity - cargo_used - reserved_cargo. A finished run releases its inputs' share. A cancel returns the inputs to cargo into this space. 0 when no inputs are escrowed.
5176
+ */
5177
+ reserved_cargo: number;
5178
+ /**
5179
+ * idle: no jobs are queued on this ship. running: the queue advances this tick at Station Workshop speed. paused: it does not advance and pause_reason says why. A pause loses nothing: progress and escrowed inputs stay on the jobs.
5180
+ */
5181
+ state: 'idle' | 'running' | 'paused';
5182
+ };
5032
5183
  export type Fill = {
5033
5184
  counterparty?: string;
5034
5185
  price_each: number;
@@ -5086,6 +5237,150 @@ export type FindRouteResponse = {
5086
5237
  */
5087
5238
  total_jumps: number;
5088
5239
  };
5240
+ export type FitIssue = {
5241
+ /**
5242
+ * The error code install_mod or uninstall_mod returns for the same problem: cpu_exceeded, power_exceeded, no_weapon_slots, no_defense_slots, no_utility_slots, module_limit, module_withdrawn, cargo_capacity_exceeded, personnel_capacity_exceeded, or no_safe_order when the fit is valid but no refit order reaches it
5243
+ */
5244
+ code: string;
5245
+ /**
5246
+ * Human-readable explanation with the numbers involved
5247
+ */
5248
+ message: string;
5249
+ };
5250
+ export type FitPreviewResponse = {
5251
+ /**
5252
+ * Every reason the planned fit is refused. Empty when valid
5253
+ */
5254
+ issues: Array<FitIssue>;
5255
+ /**
5256
+ * Your active ship, the one the plan is for
5257
+ */
5258
+ ship_id: string;
5259
+ /**
5260
+ * Ship stats with exactly the planned modules fitted. Reported for invalid plans too
5261
+ */
5262
+ stats: FitPreviewStats;
5263
+ /**
5264
+ * An order of uninstall_mod and install_mod calls that reaches the planned fit without any call being refused for CPU, power, slots or personnel capacity. Cargo limits are checked against your hold as it is now: modules moving into and out of cargo during the steps are not counted, so keep room in your hold. Run the steps in order, one per tick. Empty when the plan is invalid or already matches the current fit
5265
+ */
5266
+ steps: Array<FitPreviewStep>;
5267
+ /**
5268
+ * True when the planned fit passes every install_mod and uninstall_mod fit check. Equivalent to issues being empty
5269
+ */
5270
+ valid: boolean;
5271
+ };
5272
+ export type FitPreviewStats = {
5273
+ /**
5274
+ * Armor: class base plus module armor bonuses
5275
+ */
5276
+ armor: number;
5277
+ /**
5278
+ * Total cargo space: class base plus module cargo bonuses (negative for modules that shrink the hold)
5279
+ */
5280
+ cargo_capacity: number;
5281
+ /**
5282
+ * Cargo space your hold uses right now, including field workshop escrow. The plan is invalid (cargo_capacity_exceeded) when this exceeds cargo_capacity and the plan shrinks the hold
5283
+ */
5284
+ cargo_used: number;
5285
+ /**
5286
+ * Total CPU: class base plus module CPU bonuses
5287
+ */
5288
+ cpu_capacity: number;
5289
+ /**
5290
+ * CPU the planned modules consume after your engineering efficiency bonus, as get_ship reports it. Invalid (cpu_exceeded) above cpu_capacity
5291
+ */
5292
+ cpu_used: number;
5293
+ /**
5294
+ * Fit plus injured crew aboard now. Invalid (personnel_capacity_exceeded) above effective_crew_capacity
5295
+ */
5296
+ crew: number;
5297
+ /**
5298
+ * Defense slots on the hull
5299
+ */
5300
+ defense_slots: number;
5301
+ /**
5302
+ * Planned defense modules. Invalid (no_defense_slots) above defense_slots
5303
+ */
5304
+ defense_slots_used: number;
5305
+ /**
5306
+ * Crew capacity: class base plus module crew bonuses
5307
+ */
5308
+ effective_crew_capacity: number;
5309
+ /**
5310
+ * Marine capacity: class base plus module marine bonuses
5311
+ */
5312
+ effective_marine_capacity: number;
5313
+ /**
5314
+ * Fit plus injured marines aboard now. Invalid (personnel_capacity_exceeded) above effective_marine_capacity
5315
+ */
5316
+ marines: number;
5317
+ /**
5318
+ * Fuel tank size: class base plus module fuel bonuses
5319
+ */
5320
+ max_fuel: number;
5321
+ /**
5322
+ * Maximum hull: class base hull plus module hull bonuses minus hull penalties (at least 1)
5323
+ */
5324
+ max_hull: number;
5325
+ /**
5326
+ * Maximum shield: class base plus module shield bonuses
5327
+ */
5328
+ max_shield: number;
5329
+ /**
5330
+ * Total power: class base plus module power bonuses
5331
+ */
5332
+ power_capacity: number;
5333
+ /**
5334
+ * Power the planned modules consume after your engineering efficiency bonus. Invalid (power_exceeded) above power_capacity
5335
+ */
5336
+ power_used: number;
5337
+ /**
5338
+ * Shield recharged per tick: class base plus module recharge bonuses
5339
+ */
5340
+ shield_recharge: number;
5341
+ /**
5342
+ * Base speed: class base plus module speed bonuses minus speed penalties (at least 1). Crew efficiency is not applied; see get_ship operational_speed
5343
+ */
5344
+ speed: number;
5345
+ /**
5346
+ * Utility slots on the hull
5347
+ */
5348
+ utility_slots: number;
5349
+ /**
5350
+ * Planned utility and mining modules. Invalid (no_utility_slots) above utility_slots
5351
+ */
5352
+ utility_slots_used: number;
5353
+ /**
5354
+ * Weapon slots on the hull
5355
+ */
5356
+ weapon_slots: number;
5357
+ /**
5358
+ * Planned weapon modules. Invalid (no_weapon_slots) above weapon_slots
5359
+ */
5360
+ weapon_slots_used: number;
5361
+ };
5362
+ export type FitPreviewStep = {
5363
+ /**
5364
+ * The command to run
5365
+ */
5366
+ action: 'uninstall_mod' | 'install_mod';
5367
+ /**
5368
+ * The id to pass to the command: a fitted module instance ID for uninstall_mod, a module type ID for install_mod (the module must be in your cargo)
5369
+ */
5370
+ module_id: string;
5371
+ /**
5372
+ * Module display name
5373
+ */
5374
+ name: string;
5375
+ /**
5376
+ * True on an uninstall_mod of a module the plan keeps. A later install_mod step fits it again, so keep it in your cargo. Omitted (false) for modules the plan removes
5377
+ */
5378
+ temporary?: boolean;
5379
+ /**
5380
+ * Module type ID
5381
+ */
5382
+ type_id: string;
5383
+ };
5089
5384
  export type FittedModuleSnapshot = {
5090
5385
  category: string;
5091
5386
  current_ammo?: number;
@@ -5351,28 +5646,91 @@ export type ForumUpvoteResponse = {
5351
5646
  thread_id?: string;
5352
5647
  };
5353
5648
  export type FreightAppraisalLine = {
5649
+ /**
5650
+ * Appraisal method. Always completed_fill_vwap on an insurable line. Absent when the line is not insurable.
5651
+ */
5354
5652
  basis?: string;
5653
+ /**
5654
+ * Evidence quality. Always useful on an insurable line. Absent when the line is not insurable.
5655
+ */
5355
5656
  confidence?: string;
5657
+ /**
5658
+ * Number of public completed fills behind unit_value. An insurable line needs at least 3. Absent when the line is not insurable.
5659
+ */
5356
5660
  fill_count?: number;
5661
+ /**
5662
+ * True when the market evidence meets every threshold above. The package is insurable only when every line is insurable.
5663
+ */
5357
5664
  insurable: boolean;
5665
+ /**
5666
+ * Item ID of one content line of the sealed package.
5667
+ */
5358
5668
  item_id: string;
5669
+ /**
5670
+ * Time of the most recent fill in that evidence. Absent when the line is not insurable.
5671
+ */
5359
5672
  latest_fill_at?: string;
5673
+ /**
5674
+ * Market window that supplied the evidence: 24h0m0s, 168h0m0s or 720h0m0s. The appraisal tries the shortest window first and uses the first one with enough evidence. Absent when the line is not insurable.
5675
+ */
5360
5676
  lookback?: string;
5677
+ /**
5678
+ * Units of item_id in the package.
5679
+ */
5361
5680
  quantity: number;
5681
+ /**
5682
+ * Appraised credits for the line: unit_value x quantity. 0 when the line is not insurable.
5683
+ */
5362
5684
  total_value: number;
5685
+ /**
5686
+ * Credits traded in those fills. An insurable line needs at least 500. Absent when the line is not insurable.
5687
+ */
5363
5688
  traded_notional?: number;
5689
+ /**
5690
+ * Units traded in those fills. An insurable line needs at least quantity units. Absent when the line is not insurable.
5691
+ */
5364
5692
  traded_units?: number;
5693
+ /**
5694
+ * Why the line failed appraisal. The appraisal stops at the first failing line: later lines that also failed carry insurable false and no reason. Absent on an insurable line.
5695
+ */
5365
5696
  uninsurable_reason?: string;
5697
+ /**
5698
+ * Appraised credits per unit: the volume-weighted average price of public completed exchange fills of this item across the galaxy in the lookback window (floor of total credits / units). Fills priced above the item's 90th-percentile fill price in that window are left out. 0 when the line is not insurable.
5699
+ */
5366
5700
  unit_value: number;
5367
5701
  };
5368
5702
  export type FreightDebt = {
5703
+ /**
5704
+ * Time the debt was created.
5705
+ */
5369
5706
  created_at: string;
5707
+ /**
5708
+ * Who receives repayment. Always the contract's origin station (kind station).
5709
+ */
5370
5710
  creditor: ShipmentActor;
5711
+ /**
5712
+ * The carrier that owes the debt: the contract's contractor.
5713
+ */
5371
5714
  debtor: ShipmentActor;
5715
+ /**
5716
+ * Debt ID: freight:<shipment_id>.
5717
+ */
5372
5718
  id: string;
5719
+ /**
5720
+ * Credits owed when the debt was created. For a breach or default it is the contract's failure_debt. For a late delivery or return it is the late fee: 10% of (base_reward + max_speed_bonus) held between 100 and 2500 credits and never above failure_debt / 2.
5721
+ */
5373
5722
  original: number;
5723
+ /**
5724
+ * Credits still owed. pay_debt pays the oldest debts first. While any debt is outstanding the debtor cannot accept contracts.
5725
+ */
5374
5726
  outstanding: number;
5727
+ /**
5728
+ * Time outstanding reached 0. Absent while the debt is still owed.
5729
+ */
5375
5730
  paid_at?: string;
5731
+ /**
5732
+ * Contract that created the debt.
5733
+ */
5376
5734
  shipment_id: string;
5377
5735
  };
5378
5736
  export type FuelLogEntry = {
@@ -5875,7 +6233,7 @@ export type GiftGoodwill = {
5875
6233
  */
5876
6234
  reputation_change: number;
5877
6235
  /**
5878
- * Outcome class that picked the reply: stranger (a pirate crew kept the gift but owes nothing to a pilot never introduced to the pirate network), bounty_partial, bounty_cleared, hostile, cooling, unwanted_items, unwanted_ship, or token/appreciated/generous/lavish/devoted followed by _credits, _items or _ship. A ship given to a pirate crew instead reports what the crew did with it: ship_scrap (no pirate design for that hull), ship_refit (rebuilt to a pirate design) or ship_pirate (a pirate-built hull) followed by _cheap, _mid or _expensive by its fitted value; or, when the boss gets involved, boss_upgrade (the boss switches to your ship because it out-fights the boss's current one), boss_hunt (the boss's flagship is in a player's hands and the boss takes your stronger ship to hunt them), boss_flagship_returned, boss_rival_flown (the boss flies another boss's flagship until the stolen one comes back) or boss_rival_scrapped, each with _cold appended when the crew does not like you. stranger, hostile and cooling still apply to ordinary pirate ship gifts.
6236
+ * Outcome class that picked the reply: stranger (a pirate crew kept the gift but owes nothing to a pilot never introduced to the pirate network), bounty_partial, bounty_cleared, hostile, cooling, unwanted_items, unwanted_ship, or token/appreciated/generous/lavish/devoted followed by _credits, _items or _ship. A ship given to a pirate crew instead reports what the crew did with it: ship_scrap (no pirate design for that hull), ship_refit (rebuilt to a pirate design) or ship_pirate (a pirate-built hull) followed by _cheap, _mid or _expensive by its fitted value; or, when the boss gets involved, boss_upgrade (the boss switches to your ship because it out-fights the boss's current one), boss_hunt (the boss's flagship is in a player's hands and the boss takes your stronger ship to hunt them), boss_flagship_returned, boss_rival_flown (the boss flies another boss's flagship while his own is away from his crew) or boss_rival_scrapped, each with _cold appended when the crew does not like you. stranger, hostile and cooling still apply to ordinary pirate ship gifts.
5879
6237
  */
5880
6238
  situation: 'stranger' | 'bounty_partial' | 'bounty_cleared' | 'hostile' | 'cooling' | 'unwanted_items' | 'unwanted_ship' | 'token_credits' | 'token_items' | 'token_ship' | 'appreciated_credits' | 'appreciated_items' | 'appreciated_ship' | 'generous_credits' | 'generous_items' | 'generous_ship' | 'lavish_credits' | 'lavish_items' | 'lavish_ship' | 'devoted_credits' | 'devoted_items' | 'devoted_ship' | 'ship_scrap_cheap' | 'ship_scrap_mid' | 'ship_scrap_expensive' | 'ship_refit_cheap' | 'ship_refit_mid' | 'ship_refit_expensive' | 'ship_pirate_cheap' | 'ship_pirate_mid' | 'ship_pirate_expensive' | 'boss_upgrade' | 'boss_upgrade_cold' | 'boss_hunt' | 'boss_hunt_cold' | 'boss_flagship_returned' | 'boss_flagship_returned_cold' | 'boss_rival_flown' | 'boss_rival_flown_cold' | 'boss_rival_scrapped' | 'boss_rival_scrapped_cold';
5881
6239
  };
@@ -6322,7 +6680,7 @@ export type JobView = {
6322
6680
  */
6323
6681
  external?: boolean;
6324
6682
  /**
6325
- * Opaque ID of the facility instance or the synthetic Station Workshop ID.
6683
+ * Opaque ID of the facility instance or the synthetic Station Workshop or Field Workshop ID (fieldshop:<ship_id>).
6326
6684
  */
6327
6685
  facility_id: string;
6328
6686
  /**
@@ -6378,7 +6736,7 @@ export type JobView = {
6378
6736
  */
6379
6737
  status: 'queued' | 'active';
6380
6738
  /**
6381
- * Display name of the venue: Station Workshop or the facility type name. Falls back to the facility ID when the facility is unknown.
6739
+ * Display name of the venue: Station Workshop, Field Workshop (hand-crafting aboard a field workshop hull) or the facility type name. Falls back to the facility ID when the facility is unknown.
6382
6740
  */
6383
6741
  venue?: string;
6384
6742
  };
@@ -9298,6 +9656,21 @@ export type Player = {
9298
9656
  * Hex color
9299
9657
  */
9300
9658
  primary_color?: string;
9659
+ /**
9660
+ * Players this player refueled ship-to-ship for piloting XP today (UTC). Each target pays piloting XP once per UTC day. Omitted until the first such refuel. Resets when the day changes.
9661
+ */
9662
+ refuel_xp?: {
9663
+ /**
9664
+ * UTC day the ledger covers (YYYY-MM-DD)
9665
+ */
9666
+ day?: string;
9667
+ /**
9668
+ * Player IDs refueled for piloting XP today; a missing ID has not paid yet today
9669
+ */
9670
+ targets?: {
9671
+ [key: string]: boolean;
9672
+ };
9673
+ };
9301
9674
  /**
9302
9675
  * Current reputation score per empire ID, range [-100, 100]
9303
9676
  */
@@ -10155,6 +10528,10 @@ export type RefuelResponse = {
10155
10528
  market_cost?: number;
10156
10529
  members?: Array<FleetShipFuel>;
10157
10530
  message?: string;
10531
+ /**
10532
+ * Piloting skill XP earned for a ship-to-ship refuel: 25 × the piloting XP per action of your active ship tier (tier 1: 1 / tier 2: 2 / tier 3: 4 / tier 4: 7 / tier 5: 12). Each target pays once per UTC day. Omitted (0) for a station refuel and for a repeat target on the same UTC day.
10533
+ */
10534
+ piloting_xp?: number;
10158
10535
  rescue_completed?: boolean;
10159
10536
  rescue_reward?: number;
10160
10537
  source: string;
@@ -10164,6 +10541,12 @@ export type RefuelResponse = {
10164
10541
  target_player_name?: string;
10165
10542
  tax_amount?: number;
10166
10543
  };
10544
+ export type RefuelXpLedger = {
10545
+ day: string;
10546
+ targets: {
10547
+ [key: string]: boolean;
10548
+ };
10549
+ };
10167
10550
  export type RegenLogEntry = {
10168
10551
  armor_repair: number;
10169
10552
  hull_after: number;
@@ -10225,6 +10608,10 @@ export type RepairResponse = {
10225
10608
  max_hull?: number;
10226
10609
  members?: Array<FleetShipHull>;
10227
10610
  message?: string;
10611
+ /**
10612
+ * Piloting skill XP earned for a ship-to-ship repair: 1 per 10 hull repaired (rounded down) × the piloting XP per action of your active ship tier (tier 1: 1 / tier 2: 2 / tier 3: 4 / tier 4: 7 / tier 5: 12). Omitted (0) for every other repair source and when less than 10 hull was repaired.
10613
+ */
10614
+ piloting_xp?: number;
10228
10615
  repaired?: number;
10229
10616
  source: string;
10230
10617
  target_hull_max?: number;
@@ -10728,6 +11115,10 @@ export type Ship = {
10728
11115
  defense_slots?: number;
10729
11116
  disruption_ticks_remaining?: number;
10730
11117
  docked_at_base?: string;
11118
+ /**
11119
+ * Jobs queued on this ship's Field Workshop (field workshop hulls only), in run order. Their escrowed inputs are not in cargo or cargo_used but still take hold space. Omitted when the ship has none.
11120
+ */
11121
+ field_jobs?: Array<FieldJob>;
10731
11122
  fuel: number;
10732
11123
  /**
10733
11124
  * % of normal cargo space gases occupy: 40 means 100 size-1 units fill 40 cargo and 100 size-2 units fill 80 (lower is better; 0 = no bonus)
@@ -11048,27 +11439,75 @@ export type ShipListing = {
11048
11439
  tier?: number;
11049
11440
  };
11050
11441
  export type ShipmentActor = {
11442
+ /**
11443
+ * Actor ID for kind: a player ID, a faction ID, or a station base ID.
11444
+ */
11051
11445
  id: string;
11446
+ /**
11447
+ * Actor type. player and faction can ship, receive and carry freight. station can ship and receive freight but never carry it.
11448
+ */
11052
11449
  kind: 'player' | 'faction' | 'station';
11053
11450
  };
11054
11451
  export type ShipmentContract = {
11452
+ /**
11453
+ * Time a carrier accepted the contract. Absent while posted and on a listing canceled before acceptance.
11454
+ */
11055
11455
  accepted_at?: string;
11456
+ /**
11457
+ * Game tick of acceptance. Absent while posted and on a listing canceled before acceptance.
11458
+ */
11056
11459
  accepted_tick?: number;
11460
+ /**
11461
+ * Market value of the package contents in credits at posting: the sum of each line's quantity x completed-fill VWAP. Absent (0) when insurable is false.
11462
+ */
11057
11463
  appraised_value?: number;
11464
+ /**
11465
+ * Credits the shipper offers for an on-time delivery. Always positive. A station supply run prices it from the route and the market.
11466
+ */
11058
11467
  base_reward: number;
11468
+ /**
11469
+ * Time of the breach. Equal to settled_at. Absent unless status is breached.
11470
+ */
11059
11471
  breached_at?: string;
11472
+ /**
11473
+ * Credits paid to the carrier for an on-time delivery: reward_escrow + the speed bonus earned at the delivery tick. Absent before settlement and on every other outcome, including a late delivery.
11474
+ */
11060
11475
  carrier_payout?: number;
11476
+ /**
11477
+ * Credits the insurance paid the shipper. Equal to covered_value when policy_status is claimed. Absent otherwise.
11478
+ */
11061
11479
  claim_paid?: number;
11062
11480
  /**
11063
11481
  * Player or faction carrier that accepted the contract. Absent while the listing is still posted and on a listing canceled or expired before anyone accepted it.
11064
11482
  */
11065
11483
  contractor?: ShipmentActor;
11484
+ /**
11485
+ * Credits the insurance pays the shipper on a breach or default. Equal to appraised_value when insured. Absent when uninsured.
11486
+ */
11066
11487
  covered_value?: number;
11488
+ /**
11489
+ * Last tick for an on-time delivery: accepted_tick + the deadline allowance. The deadline allowance is 540 + 180 x max(route hops, 1) ticks for standard service and two-thirds of that (rounded down) for priority. After it the reward is forfeit. Absent while the listing is posted: acceptance sets it. The board shows the allowance as target_ticks and deadline_ticks.
11490
+ */
11067
11491
  deadline_tick?: number;
11492
+ /**
11493
+ * Time of the hand-over at the destination, on time or late. Equal to settled_at. Absent unless status is delivered.
11494
+ */
11068
11495
  delivered_at?: string;
11496
+ /**
11497
+ * Station where the package must be delivered. Always different from origin_base_id.
11498
+ */
11069
11499
  destination_base_id: string;
11500
+ /**
11501
+ * Freight debt the carrier owes if the contract is breached or defaults. 500 credits when uninsured (and on every station supply run). When insured: covered_value + max(100, covered_value / 10) rounded down. A late delivery or return owes a smaller late fee instead: 10% of (base_reward + max_speed_bonus) held between 100 and 2500 credits and never above failure_debt / 2.
11502
+ */
11070
11503
  failure_debt: number;
11504
+ /**
11505
+ * Shipment contract ID. Pass it to the shipping get, track, accept, deliver, return and cancel actions.
11506
+ */
11071
11507
  id: string;
11508
+ /**
11509
+ * True when every content line had enough public completed-fill market evidence to appraise. Always true on station supply runs. It says the package can be insured, not that it is: see policy_status.
11510
+ */
11072
11511
  insurable: boolean;
11073
11512
  /**
11074
11513
  * Station that insures the cargo: the origin station. It keeps the premium and pays any claim. Absent when the shipment is uninsured.
@@ -11078,160 +11517,521 @@ export type ShipmentContract = {
11078
11517
  * The only player or faction carrier allowed to see and accept this listing. Present only when visibility is invited; absent for public, faction and allies listings.
11079
11518
  */
11080
11519
  invited_carrier?: ShipmentActor;
11520
+ /**
11521
+ * observed_at of the newest tracking event for this contract. Absent until the first event is recorded.
11522
+ */
11081
11523
  latest_beacon_at?: string;
11524
+ /**
11525
+ * fingerprint of the newest tracking event for this contract. Absent until the first event is recorded.
11526
+ */
11082
11527
  latest_beacon_fingerprint?: string;
11528
+ /**
11529
+ * posted_at plus 24 hours. A listing that nobody accepts by then becomes canceled with terminal_reason listing_expired and the shipper gets reward_escrow, speed_bonus_escrow and premium back.
11530
+ */
11083
11531
  listing_expires_at: string;
11532
+ /**
11533
+ * Extra credits the shipper offers for speed. The carrier earns all of it through target_tick. It then falls linearly (rounded down) to 0 at deadline_tick. 0 on station supply runs.
11534
+ */
11084
11535
  max_speed_bonus: number;
11536
+ /**
11537
+ * Station where the contract was posted and where the carrier accepts the package.
11538
+ */
11085
11539
  origin_base_id: string;
11540
+ /**
11541
+ * Sealed package this contract moves. The package travels as the item package_<package_id>.
11542
+ */
11086
11543
  package_id: string;
11544
+ /**
11545
+ * Insurance policy state. none: uninsured (every station supply run). pending: insured and posted. active: insured and in transit. released: delivered. expired: returned, or canceled before acceptance. claimed: breached or defaulted, and the shipper received claim_paid.
11546
+ */
11087
11547
  policy_status: 'none' | 'pending' | 'active' | 'expired' | 'claimed' | 'released';
11548
+ /**
11549
+ * Time the contract was posted.
11550
+ */
11088
11551
  posted_at: string;
11552
+ /**
11553
+ * Insurance premium in credits that the shipper paid at posting: max(1, covered_value x 2% x (1 + 0.075 x route_hops)) rounded down. The insurer station keeps it once a carrier accepts. Reset to 0 when the listing is canceled or expires, because the shipper gets it back. Absent when uninsured.
11554
+ */
11089
11555
  premium?: number;
11556
+ /**
11557
+ * Who receives the package at destination_base_id. A station recipient is always the destination station.
11558
+ */
11090
11559
  recipient: ShipmentActor;
11560
+ /**
11561
+ * Last tick for a late delivery or return: deadline_tick + 2880. After it the contract defaults with terminal_reason deadline_expired. Absent while posted. A contract accepted before this field existed also omits it and uses deadline_tick + 2880.
11562
+ */
11091
11563
  recovery_deadline_tick?: number;
11564
+ /**
11565
+ * Set at acceptance. False when the shipper and carrier are the same party: the same actor, or a player and the faction they belonged to at acceptance. A false value skips the tier and liability-limit checks at acceptance, and an on-time delivery then adds nothing to the carrier record. Late marks, returns, breaches and defaults count either way. Absent before acceptance.
11566
+ */
11092
11567
  reputation_eligible?: boolean;
11568
+ /**
11569
+ * True when the sealed package holds refined radioactive material. The carrier must fly a ship with a lead_lined_cargo_i or lead_lined_cargo_ii module to withdraw it from storage or carry it. Set when the contract posts. Absent or false: no hazmat hold is needed.
11570
+ */
11571
+ requires_hazmat?: boolean;
11572
+ /**
11573
+ * Liability in credits this contract adds to the carrier's active_liability while in transit. Equal to appraised_value when insurable is true. 1000000 when insurable is false. Checked against the carrier tier's single-package and aggregate limits at acceptance.
11574
+ */
11093
11575
  reserved_exposure: number;
11576
+ /**
11577
+ * Credits held for the carrier's base reward. Equal to base_reward until the contract reaches a final status, then 0. An on-time delivery pays it to the carrier. Every other final status refunds it to the shipper.
11578
+ */
11094
11579
  reward_escrow: number;
11580
+ /**
11581
+ * Cargo risk class from appraised_value. probationary: up to 25000 credits. licensed: up to 50000. trusted: up to 500000. prime: above 500000. unpriced: insurable is false. Accepting needs a carrier tier at least equal to the band (unpriced needs prime) unless reputation_eligible is false.
11582
+ */
11095
11583
  risk_band: 'probationary' | 'licensed' | 'trusted' | 'prime' | 'unpriced';
11584
+ /**
11585
+ * Jumps between the origin and destination systems when the contract was posted. Absent when both stations are in the same system. Acceptance measures the route again for target_tick and deadline_tick.
11586
+ */
11096
11587
  route_hops?: number;
11097
11588
  /**
11098
11589
  * Salvage claimant recorded for the package: the insurer station, set when an insured contract posts. No current game action reads it. Absent when the shipment is uninsured.
11099
11590
  */
11100
11591
  salvage_owner?: ShipmentActor;
11592
+ /**
11593
+ * Credits the shipper paid the shipping_house_id station at posting: max(25, (base_reward + max_speed_bonus) / 20) rounded down. Never refunded. 0 on station supply runs.
11594
+ */
11101
11595
  service_fee: number;
11596
+ /**
11597
+ * standard or priority. Priority cuts both time allowances to two-thirds. Station supply runs are always standard.
11598
+ */
11102
11599
  service_level: 'standard' | 'priority';
11600
+ /**
11601
+ * Time the contract reached its final status. Absent while posted or in_transit.
11602
+ */
11103
11603
  settled_at?: string;
11604
+ /**
11605
+ * Who posted the contract and paid its escrow: a player, a faction (paid from the treasury), or a station for an automatic station supply run (kind station: the origin station).
11606
+ */
11104
11607
  shipper: ShipmentActor;
11608
+ /**
11609
+ * Station whose freight service runs the contract. Always origin_base_id. It collects service_fee and counts covered_value against its insurance capacity.
11610
+ */
11105
11611
  shipping_house_id: string;
11612
+ /**
11613
+ * Credits held for the speed bonus. Equal to max_speed_bonus until the contract reaches a final status, then 0. An on-time delivery pays the earned part to the carrier and refunds the rest to the shipper. Every other final status refunds it all.
11614
+ */
11106
11615
  speed_bonus_escrow: number;
11616
+ /**
11617
+ * Lifecycle state. posted: listed and not accepted. in_transit: accepted. delivered: handed over at the destination, on time or late. returned: handed back at the origin. breached: the seal was opened or the carrying ship was captured. defaulted: the package was lost or the recovery window closed. canceled: the shipper canceled or the listing expired before anyone accepted it. All states except posted and in_transit are final.
11618
+ */
11107
11619
  status: 'posted' | 'in_transit' | 'delivered' | 'returned' | 'breached' | 'defaulted' | 'canceled';
11620
+ /**
11621
+ * Last tick that still pays the full speed bonus: accepted_tick + the target allowance. The target allowance is 300 + 90 x max(route hops, 1) ticks for standard service and two-thirds of that (rounded down) for priority. Absent while the listing is posted: acceptance sets it. The board shows the allowance as target_ticks and deadline_ticks.
11622
+ */
11108
11623
  target_tick?: number;
11624
+ /**
11625
+ * Why the contract reached a final status. delivered: delivered_intact, delivered_late, delivered_via_destination_storage or delivered_late_via_destination_storage. returned: returned_intact or returned_late. canceled: canceled_by_shipper or listing_expired. breached: package seal opened or ship_captured. defaulted: deadline_expired or a loss reason such as package destroyed with carrier ship or package seized by customs. Absent while posted or in_transit.
11626
+ */
11109
11627
  terminal_reason?: string;
11628
+ /**
11629
+ * Why the package could not be appraised. Absent when insurable is true.
11630
+ */
11110
11631
  uninsurable_reason?: string;
11632
+ /**
11633
+ * Who can see and accept the listing while it is posted. public: any carrier. faction: members of the shipper faction. allies: members of the shipper faction and its allies. invited: only invited_carrier. faction and allies need a faction shipper. Station supply runs are always public.
11634
+ */
11111
11635
  visibility: 'public' | 'faction' | 'allies' | 'invited';
11112
11636
  };
11113
11637
  export type ShipmentTrackingEvent = {
11638
+ /**
11639
+ * Station where the package was at this sample. Absent when it was not at a station (a wreck or a ship in space).
11640
+ */
11114
11641
  base_id?: string;
11642
+ /**
11643
+ * Kind of place that held the package. shipping_house_escrow: the posted listing at the origin. ship: a ship's cargo. player_storage and faction_storage: station storage. faction_bucket: a faction storage bucket. wreck: a wreck's cargo. unpack_job_escrow: an unpack job. No current code path records destroyed or unknown.
11644
+ */
11115
11645
  class: 'shipping_house_escrow' | 'ship' | 'player_storage' | 'faction_storage' | 'faction_bucket' | 'wreck' | 'unpack_job_escrow' | 'destroyed' | 'unknown';
11116
11646
  /**
11117
11647
  * Who held the package at this sample: the storage owner, the owner of the carrying ship, or the recipient or shipper at hand-over or return. Absent when the location names no holder (shipping-house escrow, a wreck or an unknown location).
11118
11648
  */
11119
11649
  custodian?: ShipmentActor;
11650
+ /**
11651
+ * Opaque key for the location. A new event is recorded only when the location's fingerprint differs from the contract's latest_beacon_fingerprint. Compare fingerprints for equality only.
11652
+ */
11120
11653
  fingerprint: string;
11654
+ /**
11655
+ * Tracking event ID.
11656
+ */
11121
11657
  id: string;
11658
+ /**
11659
+ * Time the event was recorded.
11660
+ */
11122
11661
  observed_at: string;
11662
+ /**
11663
+ * Game tick of the sample. For an automatic delivery to destination storage it is the tick the package was first seen there.
11664
+ */
11123
11665
  observed_tick: number;
11666
+ /**
11667
+ * Sealed package the event locates.
11668
+ */
11124
11669
  package_id: string;
11125
11670
  /**
11126
11671
  * POI where the package was at this sample. Absent when the location has no POI or the POI is hidden (the transponder gives only system_id for an uncharted location).
11127
11672
  */
11128
11673
  poi_id?: string;
11674
+ /**
11675
+ * ID of the holder for this class. shipping_house_escrow: the shipment ID. ship: the outermost ship carrying the package. wreck: the wreck ID. unpack_job_escrow: the unpack job ID. On the acceptance, delivery and return events: the custodian as kind:id (for example player:<id>). Absent on a storage sample from the periodic beacon.
11676
+ */
11129
11677
  reference_id?: string;
11678
+ /**
11679
+ * Contract this event belongs to.
11680
+ */
11130
11681
  shipment_id: string;
11682
+ /**
11683
+ * System where the package was at this sample. Absent when the location resolves to no system (for example an unpack job).
11684
+ */
11131
11685
  system_id?: string;
11132
11686
  };
11133
11687
  export type ShippingActiveContract = {
11688
+ /**
11689
+ * A posted or in_transit contract you or your faction is party to. The sealed manifest (appraisal_lines) is omitted.
11690
+ */
11134
11691
  contract: ShipmentContract;
11692
+ /**
11693
+ * Name of the destination station. The base ID when the station is unknown.
11694
+ */
11135
11695
  destination_name?: string;
11696
+ /**
11697
+ * Name of the system that holds the destination station. Absent when the server cannot resolve it.
11698
+ */
11136
11699
  destination_system?: string;
11700
+ /**
11701
+ * Same value as contract.failure_debt: the freight debt in credits the carrier owes if it opens or destroys the package or misses the recovery deadline.
11702
+ */
11137
11703
  failure_debt: number;
11704
+ /**
11705
+ * The class of the latest tracking event (for example ship or player_storage), followed by ' at <station name>' when that event names a station. Absent when the contract has no tracking events.
11706
+ */
11138
11707
  last_known_location?: string;
11708
+ /**
11709
+ * True when the current tick is past contract.deadline_tick. The reward is forfeited and a deliver or return now costs late_fee_if_delivered_now. Always false while posted.
11710
+ */
11139
11711
  late: boolean;
11712
+ /**
11713
+ * Late fee in credits a deliver at the current tick creates as freight debt: 10% of (base_reward + max_speed_bonus), at least 100, at most 2500 and never more than half of failure_debt. Present only when late is true.
11714
+ */
11140
11715
  late_fee_if_delivered_now?: number;
11716
+ /**
11717
+ * One plain-language instruction for what to do next with this contract given your role, the clock and where the package is. Always present.
11718
+ */
11141
11719
  next_step: string;
11720
+ /**
11721
+ * Name of the origin station. The base ID when the station is unknown.
11722
+ */
11142
11723
  origin_name?: string;
11724
+ /**
11725
+ * Name of the system that holds the origin station. Absent when the server cannot resolve it.
11726
+ */
11143
11727
  origin_system?: string;
11728
+ /**
11729
+ * True when the sealed package is in your active ship's cargo now. False when it is in storage, on another ship or you fly no ship.
11730
+ */
11144
11731
  package_in_your_cargo: boolean;
11732
+ /**
11733
+ * Credits the carrier gets for a deliver at the current tick: contract.reward_escrow plus the speed bonus earned now (full max_speed_bonus at or before target_tick, decaying linearly and rounded down to 0 at deadline_tick). 0 while posted and once late.
11734
+ */
11145
11735
  payout_if_delivered_now: number;
11736
+ /**
11737
+ * How you or your faction is bound to the contract. Checks your player first, then your faction; for each the first match wins in the order carrier (contractor), shipper, recipient, invited_carrier.
11738
+ */
11146
11739
  role: 'carrier' | 'shipper' | 'recipient' | 'invited_carrier';
11740
+ /**
11741
+ * contract.deadline_tick minus the current tick: ticks left for an on-time delivery. Negative once passed. 0 while the contract is posted.
11742
+ */
11147
11743
  ticks_to_deadline: number;
11744
+ /**
11745
+ * contract.recovery_deadline_tick minus the current tick: ticks left for a late deliver or return before the contract defaults. 0 while the contract is posted.
11746
+ */
11148
11747
  ticks_to_recovery_deadline: number;
11748
+ /**
11749
+ * contract.target_tick minus the current tick: ticks left at the full speed bonus. Negative once passed. 0 while the contract is posted.
11750
+ */
11149
11751
  ticks_to_target: number;
11150
11752
  };
11151
11753
  export type ShippingActiveResponse = {
11754
+ /**
11755
+ * Always active.
11756
+ */
11152
11757
  action: 'active';
11758
+ /**
11759
+ * Explains an empty shipments list. Absent when shipments has entries.
11760
+ */
11153
11761
  message?: string;
11762
+ /**
11763
+ * Every posted or in_transit contract you or your faction is party to, soonest deadline_tick first; posted contracts (no deadline yet) come last. Empty, never null, when there are none.
11764
+ */
11154
11765
  shipments: Array<ShippingActiveContract>;
11766
+ /**
11767
+ * The current game tick that every countdown and payout in shipments is computed against.
11768
+ */
11155
11769
  tick: number;
11156
11770
  };
11157
11771
  export type ShippingContractResponse = {
11772
+ /**
11773
+ * Which shipping action returned the contract: post (you listed it), get (you looked it up) or accept (you took it as carrier).
11774
+ */
11158
11775
  action: 'post' | 'get' | 'accept';
11776
+ /**
11777
+ * The contract after the action. post: status posted. accept: status in_transit with contractor and the target, deadline and recovery ticks set from the acceptance tick. get: its current state in any status. The sealed manifest (appraisal_lines) is always omitted.
11778
+ */
11159
11779
  contract: ShipmentContract;
11160
11780
  };
11161
11781
  export type ShippingDebtPaymentResponse = {
11782
+ /**
11783
+ * Always pay_debt.
11784
+ */
11162
11785
  action: 'pay_debt';
11786
+ /**
11787
+ * Credits taken from the carrier and paid to its creditors. The requested amount capped at the outstanding debt, or all outstanding debt when amount is omitted. Always above 0.
11788
+ */
11163
11789
  amount_paid: number;
11790
+ /**
11791
+ * Active contract count and liability against the limits of the carrier's current tier, derived from profile after the payment.
11792
+ */
11164
11793
  capacity: CarrierCapacity;
11794
+ /**
11795
+ * Names the freight debt in credits that is still unpaid. Present only when debt_blocks_acceptance is true.
11796
+ */
11165
11797
  debt_block_reason?: string;
11798
+ /**
11799
+ * True when profile.outstanding_debt is still above 0 after the payment. The carrier cannot accept any contract until it is 0.
11800
+ */
11166
11801
  debt_blocks_acceptance: boolean;
11802
+ /**
11803
+ * The carrier's freight debts that still have an outstanding amount above 0 after the payment. Empty, never null, when all debt is paid.
11804
+ */
11167
11805
  outstanding_debts: Array<FreightDebt>;
11806
+ /**
11807
+ * Carrier record after the payment.
11808
+ */
11168
11809
  profile: CarrierProfile;
11810
+ /**
11811
+ * Progress toward the next carrier tier, derived from profile after the payment.
11812
+ */
11169
11813
  progression: CarrierTierProgress;
11814
+ /**
11815
+ * The debts this payment reduced, oldest first, with their new outstanding amounts. A debt with outstanding 0 is now fully paid. The payment clears older debts before newer ones.
11816
+ */
11170
11817
  updated_debts: Array<FreightDebt>;
11171
11818
  };
11172
11819
  export type ShippingListResponse = {
11820
+ /**
11821
+ * Always list.
11822
+ */
11173
11823
  action: 'list';
11824
+ /**
11825
+ * Human-readable form of empty_reason_code. For no_eligible_shipments it names the first blocker found. Absent when total is above 0.
11826
+ */
11174
11827
  empty_reason?: string;
11828
+ /**
11829
+ * Why total is 0: no_shipments (nothing you can see is posted here), no_matching_shipments (your filters excluded everything) or no_eligible_shipments (you cannot accept any of it now, for example unpaid freight debt or low carrier tier). Absent when total is above 0, including a page past the end.
11830
+ */
11175
11831
  empty_reason_code?: string;
11832
+ /**
11833
+ * Page number served, from 1. A request below 1 serves page 1.
11834
+ */
11176
11835
  page: number;
11836
+ /**
11837
+ * Page size served: 1 to 50. A request outside that range serves 20.
11838
+ */
11177
11839
  per_page: number;
11840
+ /**
11841
+ * One page of the freight board at your docked station: posted contracts the selected carrier can see, that pass the filters and that it can accept. Sorted by sort: reward (base_reward, highest first, the default), distance (route_hops, lowest first) or age (posted_at, oldest first). Empty, never null, when nothing matches or the page is past the end.
11842
+ */
11178
11843
  shipments: Array<ShippingListing>;
11844
+ /**
11845
+ * Number of listings across all pages after filters and eligibility.
11846
+ */
11179
11847
  total: number;
11180
11848
  };
11181
11849
  export type ShippingListing = {
11850
+ /**
11851
+ * A contract posted at your docked station. The sealed manifest (appraisal_lines) is omitted.
11852
+ */
11182
11853
  contract: ShipmentContract;
11854
+ /**
11855
+ * Ticks after acceptance until the on-time deadline. Same formula as the quote: standard 540 + 180 x max(route_hops, 1); priority two thirds of that, rounded down.
11856
+ */
11183
11857
  deadline_ticks: number;
11184
- eligible: boolean;
11185
- reason?: string;
11858
+ /**
11859
+ * Ticks after the deadline during which a late deliver or return is still accepted for a capped late fee. Always 2880.
11860
+ */
11186
11861
  recovery_ticks: number;
11862
+ /**
11863
+ * Ticks after acceptance that still earn the full max_speed_bonus. Same formula as the quote: standard 300 + 90 x max(route_hops, 1); priority two thirds of that, rounded down.
11864
+ */
11187
11865
  target_ticks: number;
11866
+ /**
11867
+ * A problem with this run for the ship you fly now that you can fix before you accept. Present when contract.requires_hazmat is true and your active ship has no lead_lined_cargo_i or lead_lined_cargo_ii module. Absent when nothing blocks you.
11868
+ */
11869
+ warning?: string;
11188
11870
  };
11189
11871
  export type ShippingProfileResponse = {
11872
+ /**
11873
+ * Always profile.
11874
+ */
11190
11875
  action: 'profile';
11876
+ /**
11877
+ * Active contract count and liability against the limits of the carrier's current tier, derived from profile.
11878
+ */
11191
11879
  capacity: CarrierCapacity;
11880
+ /**
11881
+ * Names the unpaid freight debt in credits. Present only when debt_blocks_acceptance is true.
11882
+ */
11192
11883
  debt_block_reason?: string;
11884
+ /**
11885
+ * True when profile.outstanding_debt is above 0. The carrier cannot accept any contract until it pays that debt with pay_debt.
11886
+ */
11193
11887
  debt_blocks_acceptance: boolean;
11888
+ /**
11889
+ * The carrier's freight debts that still have an outstanding amount above 0. Empty, never null, when nothing is owed.
11890
+ */
11194
11891
  debts: Array<FreightDebt>;
11892
+ /**
11893
+ * Carrier record of the selected carrier (you or your faction). A carrier that never hauled freight gets a new probationary record.
11894
+ */
11195
11895
  profile: CarrierProfile;
11896
+ /**
11897
+ * Progress toward the next carrier tier, derived from profile.
11898
+ */
11196
11899
  progression: CarrierTierProgress;
11197
11900
  };
11198
11901
  export type ShippingQuote = {
11902
+ /**
11903
+ * The sealed manifest with its appraisal: one line per item entry in the package. Only you see this; contract responses never include it. Never null.
11904
+ */
11199
11905
  appraisal_lines: Array<FreightAppraisalLine>;
11906
+ /**
11907
+ * Market value of the package contents in credits: the sum of total_value over appraisal_lines. 0 when insurable is false.
11908
+ */
11200
11909
  appraised_value: number;
11910
+ /**
11911
+ * Flat reward in credits you offer the carrier for an on-time delivery, as sent in the request. 0 on a quote that only asks for estimated_reward; post rejects 0.
11912
+ */
11201
11913
  base_reward: number;
11914
+ /**
11915
+ * Plain-language summary of the carrier's liability: late delivery, the recovery window and what a breach costs. Always present. The amounts are in failure_debt and recovery_ticks.
11916
+ */
11202
11917
  consequences: string;
11918
+ /**
11919
+ * Credits the origin station insures the cargo for: equal to appraised_value when insurance_selected is true. 0 when the shipment is uninsured.
11920
+ */
11203
11921
  covered_value: number;
11922
+ /**
11923
+ * Ticks after acceptance until the on-time deadline. The speed bonus falls to 0 here and a later delivery forfeits the reward. standard: 540 + 180 x max(route_hops, 1). priority: two thirds of that, rounded down.
11924
+ */
11204
11925
  deadline_ticks: number;
11926
+ /**
11927
+ * Base ID of the destination station. A station POI ID in the request resolves to its base ID. Never the same as origin_base_id.
11928
+ */
11205
11929
  destination_base_id: string;
11930
+ /**
11931
+ * How many delivered contracts estimated_reward is the median of. 0 means there is no market data for this route length yet.
11932
+ */
11206
11933
  estimate_samples: number;
11934
+ /**
11935
+ * Market rate hint in credits: the median base_reward of delivered player and faction contracts whose route_hops is within 1 of this route (the upper middle value for an even count). Station supply contracts and zero-reward contracts are left out. Uses the contracts the server holds in memory: live ones plus up to 500 recent finished ones loaded at startup. 0 when estimate_samples is 0.
11936
+ */
11207
11937
  estimated_reward: number;
11938
+ /**
11939
+ * Freight debt in credits the carrier owes if it opens or destroys the package or holds it past the recovery window. Uninsured: 500. Insured: covered_value + max(100, covered_value / 10) rounded down. The late fee is never more than half of it.
11940
+ */
11208
11941
  failure_debt: number;
11942
+ /**
11943
+ * True when every appraisal line has useful completed-fill market evidence: at least 3 fills, at least 500 credits traded and at least the line quantity traded in the last 24 hours, 7 days or 30 days. False means you can only post uninsured.
11944
+ */
11209
11945
  insurable: boolean;
11946
+ /**
11947
+ * True when the request asked for insurance (insured). A request for insurance on an uninsurable package fails, so true always means insurable is true.
11948
+ */
11210
11949
  insurance_selected: boolean;
11211
11950
  /**
11212
11951
  * The only player or faction carrier allowed to see and accept this listing. Present only when visibility is invited; absent for public, faction and allies listings.
11213
11952
  */
11214
11953
  invited_carrier?: ShipmentActor;
11954
+ /**
11955
+ * Extra credits you offer for a fast delivery, as sent in the request (speed_bonus). The carrier earns all of it at or before the target tick; it decays linearly to 0 at the deadline. 0 when you offer no bonus.
11956
+ */
11215
11957
  max_speed_bonus: number;
11958
+ /**
11959
+ * Base ID of the station you are docked at. Freight always ships from here.
11960
+ */
11216
11961
  origin_base_id: string;
11962
+ /**
11963
+ * Bare ID of the sealed package being quoted. A package:<id> cargo ID in the request is reduced to this form.
11964
+ */
11217
11965
  package_id: string;
11966
+ /**
11967
+ * Insurance premium in credits: max(1, covered_value x 200 x (10000 + 750 x route_hops) / 100000000) rounded down, i.e. 2% of covered_value plus 7.5% of that per hop. 0 when insurance_selected is false. cancel refunds it.
11968
+ */
11218
11969
  premium: number;
11970
+ /**
11971
+ * Who receives the package at the destination. The same as shipper when the request names no recipient. A station recipient is always the destination station.
11972
+ */
11219
11973
  recipient: ShipmentActor;
11974
+ /**
11975
+ * Ticks after the deadline during which a late deliver or return is still accepted for a capped late fee instead of the full failure_debt. Always 2880.
11976
+ */
11220
11977
  recovery_ticks: number;
11978
+ /**
11979
+ * Lowest carrier tier that can accept the contract: the tier with the same name as risk_band, or prime for unpriced. A carrier that is the shipper or shares its faction skips this check.
11980
+ */
11221
11981
  required_carrier_tier: 'probationary' | 'licensed' | 'trusted' | 'prime';
11982
+ /**
11983
+ * True when the sealed package holds refined radioactive material. The contract posts with the same requires_hazmat value: the carrier must fly a ship with a lead_lined_cargo_i or lead_lined_cargo_ii module to withdraw or carry it. Absent or false: no hazmat hold is needed.
11984
+ */
11985
+ requires_hazmat?: boolean;
11986
+ /**
11987
+ * Liability in credits that acceptance adds to the carrier's active_liability and checks against its tier's single-package and aggregate limits: appraised_value, or 1000000 when insurable is false. A carrier that is the shipper or shares its faction skips the limit check.
11988
+ */
11222
11989
  reserved_exposure: number;
11990
+ /**
11991
+ * Risk class from appraised_value whether or not you insure: probationary up to 25000 credits, licensed up to 50000, trusted up to 500000, prime above that. unpriced when insurable is false.
11992
+ */
11223
11993
  risk_band: 'probationary' | 'licensed' | 'trusted' | 'prime' | 'unpriced';
11994
+ /**
11995
+ * Jumps on the shortest route between the origin and destination systems. 0 when both stations are in the same system.
11996
+ */
11224
11997
  route_hops: number;
11998
+ /**
11999
+ * Freight service fee in credits: max(25, (base_reward + max_speed_bonus) / 20) rounded down. The origin station receives it when you post. cancel does not refund it.
12000
+ */
11225
12001
  service_fee: number;
12002
+ /**
12003
+ * Delivery window tier. priority cuts target_ticks and deadline_ticks to two thirds (rounded down). It does not change any price.
12004
+ */
11226
12005
  service_level: 'standard' | 'priority';
12006
+ /**
12007
+ * Who pays and posts the freight: you as a player or your current faction. Never a station.
12008
+ */
11227
12009
  shipper: ShipmentActor;
12010
+ /**
12011
+ * Ticks after acceptance that still earn the full max_speed_bonus. standard: 300 + 90 x max(route_hops, 1). priority: two thirds of that, rounded down.
12012
+ */
11228
12013
  target_ticks: number;
12014
+ /**
12015
+ * Credits taken from the shipper when you post: base_reward + max_speed_bonus + service_fee + premium. Post fails with quote_changed when it is above a positive max_total_cost.
12016
+ */
11229
12017
  total_cost: number;
12018
+ /**
12019
+ * Why the package cannot be insured, naming the first item without useful market evidence. Present only when insurable is false.
12020
+ */
11230
12021
  uninsurable_reason?: string;
12022
+ /**
12023
+ * Who sees the listing on the freight board: public (any carrier), faction (members of the shipper faction), allies (the shipper faction and its allies) or invited (only invited_carrier). faction and allies need a faction shipper.
12024
+ */
11231
12025
  visibility: 'public' | 'faction' | 'allies' | 'invited';
11232
12026
  };
11233
12027
  export type ShippingQuoteResponse = {
12028
+ /**
12029
+ * Always quote.
12030
+ */
11234
12031
  action: 'quote';
12032
+ /**
12033
+ * Current terms for posting this package. Nothing is charged or moved. post recalculates the terms.
12034
+ */
11235
12035
  quote: ShippingQuote;
11236
12036
  };
11237
12037
  export type ShippingResponse = ({
@@ -11272,14 +12072,27 @@ export type ShippingSettlementResponse = {
11272
12072
  * True when the deliver or return happened after deadline_tick but inside the recovery window: the reward goes back to the shipper and the carrier owes the late fee in debt_created. Omitted (false) when on time and for cancel.
11273
12073
  */
11274
12074
  late?: boolean;
12075
+ /**
12076
+ * Piloting skill XP the delivering pilot earned for the run: (20 + 20 × contract.route_hops) × the piloting XP per action of the active ship tier (tier 1: 1, tier 2: 2, tier 3: 4, tier 4: 7, tier 5: 12). Paid on time or late. Omitted (0) for return, for cancel, for a self-shipment (contract.reputation_eligible is false), and when piloting is already at its maximum level.
12077
+ */
12078
+ piloting_xp?: number;
11275
12079
  /**
11276
12080
  * Credits returned to the shipper from escrow. On-time deliver: the unearned part of the speed bonus (max_speed_bonus minus the bonus paid). Late deliver and return: base_reward plus max_speed_bonus. Cancel: base_reward plus max_speed_bonus plus the insurance premium; the service_fee is not refunded. On deliver and return the insurer station keeps the premium. Omitted when 0.
11277
12081
  */
11278
12082
  shipper_refund?: number;
11279
12083
  };
11280
12084
  export type ShippingTrackResponse = {
12085
+ /**
12086
+ * Always track.
12087
+ */
11281
12088
  action: 'track';
12089
+ /**
12090
+ * The tracked contract in its current state. The sealed manifest (appraisal_lines) is omitted.
12091
+ */
11282
12092
  contract: ShipmentContract;
12093
+ /**
12094
+ * The most recent package location events for the contract, oldest first. At most limit events: limit defaults to 50 and a value of 0 or less or above 200 also gives 50.
12095
+ */
11283
12096
  events: Array<ShipmentTrackingEvent>;
11284
12097
  };
11285
12098
  export type Skill = {
@@ -13227,6 +14040,10 @@ export type V2Ship = {
13227
14040
  * Current marine capacity after hull and fitted-module effects
13228
14041
  */
13229
14042
  effective_marine_capacity: number;
14043
+ /**
14044
+ * State of this ship's Field Workshop (hand-crafting from cargo while undocked). get_ship only. Present only for a hull with a field workshop; omitted for every other ship and in state deltas.
14045
+ */
14046
+ field_workshop?: FieldWorkshopView;
13230
14047
  fuel: number;
13231
14048
  /**
13232
14049
  * Percent of normal cargo space gases occupy: 40 means 100 size-1 units fill 40 cargo and 100 size-2 units fill 80 (lower is better; omitted when no bonus)
@@ -13285,6 +14102,10 @@ export type V2Ship = {
13285
14102
  * Power consumed by fitted modules (after engineering efficiency bonus). Can exceed power_capacity on the same terms as cpu_used
13286
14103
  */
13287
14104
  power_used: number;
14105
+ /**
14106
+ * True when refit_ship would apply to this ship: its base stats predate a class rebalance, or its class's standard loadout changed since it was built or last refitted. refit_ship still needs a shipyard. Omitted (false) when the ship matches its class.
14107
+ */
14108
+ refit_available?: boolean;
13288
14109
  shield: number;
13289
14110
  shield_recharge: number;
13290
14111
  speed: number;
@@ -13853,7 +14674,7 @@ export type SpacemoltCraftData = {
13853
14674
  */
13854
14675
  count?: number;
13855
14676
  /**
13856
- * Output destination: 'storage' (default), 'faction' (faction main store — requires manage treasury permission), or 'faction:<bucket name or id>' for a specific faction Storage Extension bucket. Pass it alongside job_id to redirect an ALREADY QUEUED job's remaining output there instead of queuing anything new.
14677
+ * Output destination: 'storage' (default), 'faction' (faction main store — requires manage treasury permission), or 'faction:<bucket name or id>' for a specific faction Storage Extension bucket. Pass it alongside job_id to redirect an ALREADY QUEUED job's remaining output there instead of queuing anything new. Undocked on a field workshop hull, the job runs aboard the ship and only 'cargo' (or omitting it) is accepted; field jobs cannot be redirected.
13857
14678
  */
13858
14679
  deliver_to?: string;
13859
14680
  /**
@@ -13865,7 +14686,7 @@ export type SpacemoltCraftData = {
13865
14686
  */
13866
14687
  facility_id?: string;
13867
14688
  /**
13868
- * Recipe ID to craft (use catalog with type=recipes to see available recipes). Inputs are escrowed from station storage at enqueue.
14689
+ * Recipe ID to craft (use catalog with type=recipes to see available recipes). Inputs are escrowed from station storage at enqueue; undocked on a field workshop hull they come from ship cargo.
13869
14690
  */
13870
14691
  id?: string;
13871
14692
  /**
@@ -13934,7 +14755,7 @@ export type SpacemoltCraftData = {
13934
14755
  */
13935
14756
  quantity?: number;
13936
14757
  /**
13937
- * Where inputs and labor/rental credits are pulled FROM. Same values as deliver_to: 'storage', 'faction', or 'faction:<bucket>'. Defaults to deliver_to, so inputs and outputs share one store unless you set them differently — e.g. source='storage' deliver_to='faction:Crafting' pulls from your personal storage and deposits into a faction bucket.
14758
+ * Where inputs and labor/rental credits are pulled FROM. Same values as deliver_to: 'storage', 'faction', or 'faction:<bucket>'. Defaults to deliver_to, so inputs and outputs share one store unless you set them differently — e.g. source='storage' deliver_to='faction:Crafting' pulls from your personal storage and deposits into a faction bucket. Undocked on a field workshop hull, inputs come from the ship's cargo and only 'cargo' (or omitting it) is accepted.
13938
14759
  */
13939
14760
  source?: string;
13940
14761
  /**
@@ -23337,7 +24158,7 @@ export type SpacemoltShipCommissionShipData = {
23337
24158
  */
23338
24159
  fund_from_faction?: boolean;
23339
24160
  /**
23340
- * Ship class ID to commission (use catalog type=ships to see options)
24161
+ * Ship class ID to commission (use catalog type=ships to see options). Mobile-base blueprints build faction-funded at your faction's tier-4 shipyard, or player-funded at their empire's capital for your faction (requires ManageBases; reserves the faction's single mobile-base slot).
23341
24162
  */
23342
24163
  id: string;
23343
24164
  /**
@@ -23452,6 +24273,40 @@ export type SpacemoltShipFactionPersonnelResponses = {
23452
24273
  };
23453
24274
  };
23454
24275
  export type SpacemoltShipFactionPersonnelResponse = SpacemoltShipFactionPersonnelResponses[keyof SpacemoltShipFactionPersonnelResponses];
24276
+ export type SpacemoltShipFitPreviewData = {
24277
+ body?: {
24278
+ /**
24279
+ * The complete planned fit for your active ship: one module type ID per fitted module, repeated to fit more than one. [] previews an empty ship.
24280
+ */
24281
+ modules: Array<string>;
24282
+ };
24283
+ path?: never;
24284
+ query?: never;
24285
+ url: '/api/v2/spacemolt_ship/fit_preview';
24286
+ };
24287
+ export type SpacemoltShipFitPreviewErrors = {
24288
+ /**
24289
+ * Bad request — invalid params, unknown command, or game error
24290
+ */
24291
+ 400: unknown;
24292
+ /**
24293
+ * Not authenticated — missing or invalid session
24294
+ */
24295
+ 401: unknown;
24296
+ /**
24297
+ * Rate limited — mutations allow 1 per tick (10 seconds)
24298
+ */
24299
+ 429: unknown;
24300
+ };
24301
+ export type SpacemoltShipFitPreviewResponses = {
24302
+ /**
24303
+ * Result. structuredContent type: FitPreviewResponse
24304
+ */
24305
+ 200: V2Response & {
24306
+ structuredContent?: FitPreviewResponse;
24307
+ };
24308
+ };
24309
+ export type SpacemoltShipFitPreviewResponse = SpacemoltShipFitPreviewResponses[keyof SpacemoltShipFitPreviewResponses];
23455
24310
  export type SpacemoltShipGeneratorData = {
23456
24311
  body?: {
23457
24312
  /**