@spacemolt/lib 16.5.0 → 16.7.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 = {
@@ -2256,19 +2355,23 @@ export type ClientConnectionInfo = {
2256
2355
  };
2257
2356
  export type ClientPoiInfo = {
2258
2357
  /**
2259
- * ID of the station at this POI. Omitted when has_base is false.
2358
+ * ID of the base at this POI. Omitted when has_base is false.
2260
2359
  */
2261
2360
  base_id?: string;
2262
2361
  /**
2263
- * Name of the station at this POI. Omitted when has_base is false.
2362
+ * Name of the base at this POI. Omitted when has_base is false.
2264
2363
  */
2265
2364
  base_name?: string;
2365
+ /**
2366
+ * Kind of base at this POI. station is a full station (empire or player-built). outpost is a faction outpost: a members-only storage and fuel depot. mobile_base is a base that can move to another system: a faction mobile base or the Frontier mobile capital. Omitted when has_base is false.
2367
+ */
2368
+ base_type?: 'station' | 'outpost' | 'mobile_base';
2266
2369
  /**
2267
2370
  * Type-specific classification for rendering (star spectral class, planet type, belt composition). Omitted when the POI has none.
2268
2371
  */
2269
2372
  class?: string;
2270
2373
  /**
2271
- * True when a station is at this POI.
2374
+ * True when a base (a station, an outpost, or a mobile base) is at this POI.
2272
2375
  */
2273
2376
  has_base: boolean;
2274
2377
  /**
@@ -5029,6 +5132,58 @@ export type FaintSignature = {
5029
5132
  hint: string;
5030
5133
  type: string;
5031
5134
  };
5135
+ export type FieldJob = {
5136
+ /**
5137
+ * 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.
5138
+ */
5139
+ escrow: Array<ShipCargoItem>;
5140
+ /**
5141
+ * Job ID. craft job_id=<id> cancels it.
5142
+ */
5143
+ id: string;
5144
+ /**
5145
+ * Player who queued the job.
5146
+ */
5147
+ initiated_by: string;
5148
+ /**
5149
+ * Fraction of the current run that is done. 0 or more and less than 1.
5150
+ */
5151
+ progress: number;
5152
+ /**
5153
+ * Game tick when the job was queued.
5154
+ */
5155
+ queued_tick: number;
5156
+ /**
5157
+ * Recipe the job crafts.
5158
+ */
5159
+ recipe_id: string;
5160
+ /**
5161
+ * Runs originally ordered.
5162
+ */
5163
+ runs: number;
5164
+ /**
5165
+ * Runs still to produce.
5166
+ */
5167
+ runs_remaining: number;
5168
+ };
5169
+ export type FieldWorkshopView = {
5170
+ /**
5171
+ * 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.
5172
+ */
5173
+ pause_reason?: 'not_active' | 'docked' | 'moving' | 'in_battle' | 'no_crew' | 'pilot_action' | 'cargo_full';
5174
+ /**
5175
+ * 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).
5176
+ */
5177
+ queued_jobs: number;
5178
+ /**
5179
+ * 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.
5180
+ */
5181
+ reserved_cargo: number;
5182
+ /**
5183
+ * 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.
5184
+ */
5185
+ state: 'idle' | 'running' | 'paused';
5186
+ };
5032
5187
  export type Fill = {
5033
5188
  counterparty?: string;
5034
5189
  price_each: number;
@@ -5086,6 +5241,150 @@ export type FindRouteResponse = {
5086
5241
  */
5087
5242
  total_jumps: number;
5088
5243
  };
5244
+ export type FitIssue = {
5245
+ /**
5246
+ * 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
5247
+ */
5248
+ code: string;
5249
+ /**
5250
+ * Human-readable explanation with the numbers involved
5251
+ */
5252
+ message: string;
5253
+ };
5254
+ export type FitPreviewResponse = {
5255
+ /**
5256
+ * Every reason the planned fit is refused. Empty when valid
5257
+ */
5258
+ issues: Array<FitIssue>;
5259
+ /**
5260
+ * Your active ship, the one the plan is for
5261
+ */
5262
+ ship_id: string;
5263
+ /**
5264
+ * Ship stats with exactly the planned modules fitted. Reported for invalid plans too
5265
+ */
5266
+ stats: FitPreviewStats;
5267
+ /**
5268
+ * 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
5269
+ */
5270
+ steps: Array<FitPreviewStep>;
5271
+ /**
5272
+ * True when the planned fit passes every install_mod and uninstall_mod fit check. Equivalent to issues being empty
5273
+ */
5274
+ valid: boolean;
5275
+ };
5276
+ export type FitPreviewStats = {
5277
+ /**
5278
+ * Armor: class base plus module armor bonuses
5279
+ */
5280
+ armor: number;
5281
+ /**
5282
+ * Total cargo space: class base plus module cargo bonuses (negative for modules that shrink the hold)
5283
+ */
5284
+ cargo_capacity: number;
5285
+ /**
5286
+ * 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
5287
+ */
5288
+ cargo_used: number;
5289
+ /**
5290
+ * Total CPU: class base plus module CPU bonuses
5291
+ */
5292
+ cpu_capacity: number;
5293
+ /**
5294
+ * CPU the planned modules consume after your engineering efficiency bonus, as get_ship reports it. Invalid (cpu_exceeded) above cpu_capacity
5295
+ */
5296
+ cpu_used: number;
5297
+ /**
5298
+ * Fit plus injured crew aboard now. Invalid (personnel_capacity_exceeded) above effective_crew_capacity
5299
+ */
5300
+ crew: number;
5301
+ /**
5302
+ * Defense slots on the hull
5303
+ */
5304
+ defense_slots: number;
5305
+ /**
5306
+ * Planned defense modules. Invalid (no_defense_slots) above defense_slots
5307
+ */
5308
+ defense_slots_used: number;
5309
+ /**
5310
+ * Crew capacity: class base plus module crew bonuses
5311
+ */
5312
+ effective_crew_capacity: number;
5313
+ /**
5314
+ * Marine capacity: class base plus module marine bonuses
5315
+ */
5316
+ effective_marine_capacity: number;
5317
+ /**
5318
+ * Fit plus injured marines aboard now. Invalid (personnel_capacity_exceeded) above effective_marine_capacity
5319
+ */
5320
+ marines: number;
5321
+ /**
5322
+ * Fuel tank size: class base plus module fuel bonuses
5323
+ */
5324
+ max_fuel: number;
5325
+ /**
5326
+ * Maximum hull: class base hull plus module hull bonuses minus hull penalties (at least 1)
5327
+ */
5328
+ max_hull: number;
5329
+ /**
5330
+ * Maximum shield: class base plus module shield bonuses
5331
+ */
5332
+ max_shield: number;
5333
+ /**
5334
+ * Total power: class base plus module power bonuses
5335
+ */
5336
+ power_capacity: number;
5337
+ /**
5338
+ * Power the planned modules consume after your engineering efficiency bonus. Invalid (power_exceeded) above power_capacity
5339
+ */
5340
+ power_used: number;
5341
+ /**
5342
+ * Shield recharged per tick: class base plus module recharge bonuses
5343
+ */
5344
+ shield_recharge: number;
5345
+ /**
5346
+ * Base speed: class base plus module speed bonuses minus speed penalties (at least 1). Crew efficiency is not applied; see get_ship operational_speed
5347
+ */
5348
+ speed: number;
5349
+ /**
5350
+ * Utility slots on the hull
5351
+ */
5352
+ utility_slots: number;
5353
+ /**
5354
+ * Planned utility and mining modules. Invalid (no_utility_slots) above utility_slots
5355
+ */
5356
+ utility_slots_used: number;
5357
+ /**
5358
+ * Weapon slots on the hull
5359
+ */
5360
+ weapon_slots: number;
5361
+ /**
5362
+ * Planned weapon modules. Invalid (no_weapon_slots) above weapon_slots
5363
+ */
5364
+ weapon_slots_used: number;
5365
+ };
5366
+ export type FitPreviewStep = {
5367
+ /**
5368
+ * The command to run
5369
+ */
5370
+ action: 'uninstall_mod' | 'install_mod';
5371
+ /**
5372
+ * 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)
5373
+ */
5374
+ module_id: string;
5375
+ /**
5376
+ * Module display name
5377
+ */
5378
+ name: string;
5379
+ /**
5380
+ * 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
5381
+ */
5382
+ temporary?: boolean;
5383
+ /**
5384
+ * Module type ID
5385
+ */
5386
+ type_id: string;
5387
+ };
5089
5388
  export type FittedModuleSnapshot = {
5090
5389
  category: string;
5091
5390
  current_ammo?: number;
@@ -5351,28 +5650,91 @@ export type ForumUpvoteResponse = {
5351
5650
  thread_id?: string;
5352
5651
  };
5353
5652
  export type FreightAppraisalLine = {
5653
+ /**
5654
+ * Appraisal method. Always completed_fill_vwap on an insurable line. Absent when the line is not insurable.
5655
+ */
5354
5656
  basis?: string;
5657
+ /**
5658
+ * Evidence quality. Always useful on an insurable line. Absent when the line is not insurable.
5659
+ */
5355
5660
  confidence?: string;
5661
+ /**
5662
+ * Number of public completed fills behind unit_value. An insurable line needs at least 3. Absent when the line is not insurable.
5663
+ */
5356
5664
  fill_count?: number;
5665
+ /**
5666
+ * True when the market evidence meets every threshold above. The package is insurable only when every line is insurable.
5667
+ */
5357
5668
  insurable: boolean;
5669
+ /**
5670
+ * Item ID of one content line of the sealed package.
5671
+ */
5358
5672
  item_id: string;
5673
+ /**
5674
+ * Time of the most recent fill in that evidence. Absent when the line is not insurable.
5675
+ */
5359
5676
  latest_fill_at?: string;
5677
+ /**
5678
+ * 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.
5679
+ */
5360
5680
  lookback?: string;
5681
+ /**
5682
+ * Units of item_id in the package.
5683
+ */
5361
5684
  quantity: number;
5685
+ /**
5686
+ * Appraised credits for the line: unit_value x quantity. 0 when the line is not insurable.
5687
+ */
5362
5688
  total_value: number;
5689
+ /**
5690
+ * Credits traded in those fills. An insurable line needs at least 500. Absent when the line is not insurable.
5691
+ */
5363
5692
  traded_notional?: number;
5693
+ /**
5694
+ * Units traded in those fills. An insurable line needs at least quantity units. Absent when the line is not insurable.
5695
+ */
5364
5696
  traded_units?: number;
5697
+ /**
5698
+ * 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.
5699
+ */
5365
5700
  uninsurable_reason?: string;
5701
+ /**
5702
+ * 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.
5703
+ */
5366
5704
  unit_value: number;
5367
5705
  };
5368
5706
  export type FreightDebt = {
5707
+ /**
5708
+ * Time the debt was created.
5709
+ */
5369
5710
  created_at: string;
5711
+ /**
5712
+ * Who receives repayment. Always the contract's origin station (kind station).
5713
+ */
5370
5714
  creditor: ShipmentActor;
5715
+ /**
5716
+ * The carrier that owes the debt: the contract's contractor.
5717
+ */
5371
5718
  debtor: ShipmentActor;
5719
+ /**
5720
+ * Debt ID: freight:<shipment_id>.
5721
+ */
5372
5722
  id: string;
5723
+ /**
5724
+ * 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.
5725
+ */
5373
5726
  original: number;
5727
+ /**
5728
+ * Credits still owed. pay_debt pays the oldest debts first. While any debt is outstanding the debtor cannot accept contracts.
5729
+ */
5374
5730
  outstanding: number;
5731
+ /**
5732
+ * Time outstanding reached 0. Absent while the debt is still owed.
5733
+ */
5375
5734
  paid_at?: string;
5735
+ /**
5736
+ * Contract that created the debt.
5737
+ */
5376
5738
  shipment_id: string;
5377
5739
  };
5378
5740
  export type FuelLogEntry = {
@@ -5875,7 +6237,7 @@ export type GiftGoodwill = {
5875
6237
  */
5876
6238
  reputation_change: number;
5877
6239
  /**
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.
6240
+ * 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
6241
  */
5880
6242
  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
6243
  };
@@ -6322,7 +6684,7 @@ export type JobView = {
6322
6684
  */
6323
6685
  external?: boolean;
6324
6686
  /**
6325
- * Opaque ID of the facility instance or the synthetic Station Workshop ID.
6687
+ * Opaque ID of the facility instance or the synthetic Station Workshop or Field Workshop ID (fieldshop:<ship_id>).
6326
6688
  */
6327
6689
  facility_id: string;
6328
6690
  /**
@@ -6378,7 +6740,7 @@ export type JobView = {
6378
6740
  */
6379
6741
  status: 'queued' | 'active';
6380
6742
  /**
6381
- * Display name of the venue: Station Workshop or the facility type name. Falls back to the facility ID when the facility is unknown.
6743
+ * 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
6744
  */
6383
6745
  venue?: string;
6384
6746
  };
@@ -9298,6 +9660,21 @@ export type Player = {
9298
9660
  * Hex color
9299
9661
  */
9300
9662
  primary_color?: string;
9663
+ /**
9664
+ * 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.
9665
+ */
9666
+ refuel_xp?: {
9667
+ /**
9668
+ * UTC day the ledger covers (YYYY-MM-DD)
9669
+ */
9670
+ day?: string;
9671
+ /**
9672
+ * Player IDs refueled for piloting XP today; a missing ID has not paid yet today
9673
+ */
9674
+ targets?: {
9675
+ [key: string]: boolean;
9676
+ };
9677
+ };
9301
9678
  /**
9302
9679
  * Current reputation score per empire ID, range [-100, 100]
9303
9680
  */
@@ -10155,6 +10532,10 @@ export type RefuelResponse = {
10155
10532
  market_cost?: number;
10156
10533
  members?: Array<FleetShipFuel>;
10157
10534
  message?: string;
10535
+ /**
10536
+ * 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.
10537
+ */
10538
+ piloting_xp?: number;
10158
10539
  rescue_completed?: boolean;
10159
10540
  rescue_reward?: number;
10160
10541
  source: string;
@@ -10164,6 +10545,12 @@ export type RefuelResponse = {
10164
10545
  target_player_name?: string;
10165
10546
  tax_amount?: number;
10166
10547
  };
10548
+ export type RefuelXpLedger = {
10549
+ day: string;
10550
+ targets: {
10551
+ [key: string]: boolean;
10552
+ };
10553
+ };
10167
10554
  export type RegenLogEntry = {
10168
10555
  armor_repair: number;
10169
10556
  hull_after: number;
@@ -10225,6 +10612,10 @@ export type RepairResponse = {
10225
10612
  max_hull?: number;
10226
10613
  members?: Array<FleetShipHull>;
10227
10614
  message?: string;
10615
+ /**
10616
+ * 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.
10617
+ */
10618
+ piloting_xp?: number;
10228
10619
  repaired?: number;
10229
10620
  source: string;
10230
10621
  target_hull_max?: number;
@@ -10728,6 +11119,10 @@ export type Ship = {
10728
11119
  defense_slots?: number;
10729
11120
  disruption_ticks_remaining?: number;
10730
11121
  docked_at_base?: string;
11122
+ /**
11123
+ * 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.
11124
+ */
11125
+ field_jobs?: Array<FieldJob>;
10731
11126
  fuel: number;
10732
11127
  /**
10733
11128
  * % 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 +11443,75 @@ export type ShipListing = {
11048
11443
  tier?: number;
11049
11444
  };
11050
11445
  export type ShipmentActor = {
11446
+ /**
11447
+ * Actor ID for kind: a player ID, a faction ID, or a station base ID.
11448
+ */
11051
11449
  id: string;
11450
+ /**
11451
+ * Actor type. player and faction can ship, receive and carry freight. station can ship and receive freight but never carry it.
11452
+ */
11052
11453
  kind: 'player' | 'faction' | 'station';
11053
11454
  };
11054
11455
  export type ShipmentContract = {
11456
+ /**
11457
+ * Time a carrier accepted the contract. Absent while posted and on a listing canceled before acceptance.
11458
+ */
11055
11459
  accepted_at?: string;
11460
+ /**
11461
+ * Game tick of acceptance. Absent while posted and on a listing canceled before acceptance.
11462
+ */
11056
11463
  accepted_tick?: number;
11464
+ /**
11465
+ * 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.
11466
+ */
11057
11467
  appraised_value?: number;
11468
+ /**
11469
+ * Credits the shipper offers for an on-time delivery. Always positive. A station supply run prices it from the route and the market.
11470
+ */
11058
11471
  base_reward: number;
11472
+ /**
11473
+ * Time of the breach. Equal to settled_at. Absent unless status is breached.
11474
+ */
11059
11475
  breached_at?: string;
11476
+ /**
11477
+ * 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.
11478
+ */
11060
11479
  carrier_payout?: number;
11480
+ /**
11481
+ * Credits the insurance paid the shipper. Equal to covered_value when policy_status is claimed. Absent otherwise.
11482
+ */
11061
11483
  claim_paid?: number;
11062
11484
  /**
11063
11485
  * 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
11486
  */
11065
11487
  contractor?: ShipmentActor;
11488
+ /**
11489
+ * Credits the insurance pays the shipper on a breach or default. Equal to appraised_value when insured. Absent when uninsured.
11490
+ */
11066
11491
  covered_value?: number;
11492
+ /**
11493
+ * 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.
11494
+ */
11067
11495
  deadline_tick?: number;
11496
+ /**
11497
+ * Time of the hand-over at the destination, on time or late. Equal to settled_at. Absent unless status is delivered.
11498
+ */
11068
11499
  delivered_at?: string;
11500
+ /**
11501
+ * Station where the package must be delivered. Always different from origin_base_id.
11502
+ */
11069
11503
  destination_base_id: string;
11504
+ /**
11505
+ * 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.
11506
+ */
11070
11507
  failure_debt: number;
11508
+ /**
11509
+ * Shipment contract ID. Pass it to the shipping get, track, accept, deliver, return and cancel actions.
11510
+ */
11071
11511
  id: string;
11512
+ /**
11513
+ * 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.
11514
+ */
11072
11515
  insurable: boolean;
11073
11516
  /**
11074
11517
  * Station that insures the cargo: the origin station. It keeps the premium and pays any claim. Absent when the shipment is uninsured.
@@ -11078,160 +11521,521 @@ export type ShipmentContract = {
11078
11521
  * 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
11522
  */
11080
11523
  invited_carrier?: ShipmentActor;
11524
+ /**
11525
+ * observed_at of the newest tracking event for this contract. Absent until the first event is recorded.
11526
+ */
11081
11527
  latest_beacon_at?: string;
11528
+ /**
11529
+ * fingerprint of the newest tracking event for this contract. Absent until the first event is recorded.
11530
+ */
11082
11531
  latest_beacon_fingerprint?: string;
11532
+ /**
11533
+ * 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.
11534
+ */
11083
11535
  listing_expires_at: string;
11536
+ /**
11537
+ * 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.
11538
+ */
11084
11539
  max_speed_bonus: number;
11540
+ /**
11541
+ * Station where the contract was posted and where the carrier accepts the package.
11542
+ */
11085
11543
  origin_base_id: string;
11544
+ /**
11545
+ * Sealed package this contract moves. The package travels as the item package_<package_id>.
11546
+ */
11086
11547
  package_id: string;
11548
+ /**
11549
+ * 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.
11550
+ */
11087
11551
  policy_status: 'none' | 'pending' | 'active' | 'expired' | 'claimed' | 'released';
11552
+ /**
11553
+ * Time the contract was posted.
11554
+ */
11088
11555
  posted_at: string;
11556
+ /**
11557
+ * 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.
11558
+ */
11089
11559
  premium?: number;
11560
+ /**
11561
+ * Who receives the package at destination_base_id. A station recipient is always the destination station.
11562
+ */
11090
11563
  recipient: ShipmentActor;
11564
+ /**
11565
+ * 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.
11566
+ */
11091
11567
  recovery_deadline_tick?: number;
11568
+ /**
11569
+ * 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.
11570
+ */
11092
11571
  reputation_eligible?: boolean;
11572
+ /**
11573
+ * 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.
11574
+ */
11575
+ requires_hazmat?: boolean;
11576
+ /**
11577
+ * 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.
11578
+ */
11093
11579
  reserved_exposure: number;
11580
+ /**
11581
+ * 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.
11582
+ */
11094
11583
  reward_escrow: number;
11584
+ /**
11585
+ * 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.
11586
+ */
11095
11587
  risk_band: 'probationary' | 'licensed' | 'trusted' | 'prime' | 'unpriced';
11588
+ /**
11589
+ * 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.
11590
+ */
11096
11591
  route_hops?: number;
11097
11592
  /**
11098
11593
  * 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
11594
  */
11100
11595
  salvage_owner?: ShipmentActor;
11596
+ /**
11597
+ * 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.
11598
+ */
11101
11599
  service_fee: number;
11600
+ /**
11601
+ * standard or priority. Priority cuts both time allowances to two-thirds. Station supply runs are always standard.
11602
+ */
11102
11603
  service_level: 'standard' | 'priority';
11604
+ /**
11605
+ * Time the contract reached its final status. Absent while posted or in_transit.
11606
+ */
11103
11607
  settled_at?: string;
11608
+ /**
11609
+ * 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).
11610
+ */
11104
11611
  shipper: ShipmentActor;
11612
+ /**
11613
+ * Station whose freight service runs the contract. Always origin_base_id. It collects service_fee and counts covered_value against its insurance capacity.
11614
+ */
11105
11615
  shipping_house_id: string;
11616
+ /**
11617
+ * 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.
11618
+ */
11106
11619
  speed_bonus_escrow: number;
11620
+ /**
11621
+ * 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.
11622
+ */
11107
11623
  status: 'posted' | 'in_transit' | 'delivered' | 'returned' | 'breached' | 'defaulted' | 'canceled';
11624
+ /**
11625
+ * 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.
11626
+ */
11108
11627
  target_tick?: number;
11628
+ /**
11629
+ * 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.
11630
+ */
11109
11631
  terminal_reason?: string;
11632
+ /**
11633
+ * Why the package could not be appraised. Absent when insurable is true.
11634
+ */
11110
11635
  uninsurable_reason?: string;
11636
+ /**
11637
+ * 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.
11638
+ */
11111
11639
  visibility: 'public' | 'faction' | 'allies' | 'invited';
11112
11640
  };
11113
11641
  export type ShipmentTrackingEvent = {
11642
+ /**
11643
+ * Station where the package was at this sample. Absent when it was not at a station (a wreck or a ship in space).
11644
+ */
11114
11645
  base_id?: string;
11646
+ /**
11647
+ * 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.
11648
+ */
11115
11649
  class: 'shipping_house_escrow' | 'ship' | 'player_storage' | 'faction_storage' | 'faction_bucket' | 'wreck' | 'unpack_job_escrow' | 'destroyed' | 'unknown';
11116
11650
  /**
11117
11651
  * 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
11652
  */
11119
11653
  custodian?: ShipmentActor;
11654
+ /**
11655
+ * 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.
11656
+ */
11120
11657
  fingerprint: string;
11658
+ /**
11659
+ * Tracking event ID.
11660
+ */
11121
11661
  id: string;
11662
+ /**
11663
+ * Time the event was recorded.
11664
+ */
11122
11665
  observed_at: string;
11666
+ /**
11667
+ * Game tick of the sample. For an automatic delivery to destination storage it is the tick the package was first seen there.
11668
+ */
11123
11669
  observed_tick: number;
11670
+ /**
11671
+ * Sealed package the event locates.
11672
+ */
11124
11673
  package_id: string;
11125
11674
  /**
11126
11675
  * 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
11676
  */
11128
11677
  poi_id?: string;
11678
+ /**
11679
+ * 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.
11680
+ */
11129
11681
  reference_id?: string;
11682
+ /**
11683
+ * Contract this event belongs to.
11684
+ */
11130
11685
  shipment_id: string;
11686
+ /**
11687
+ * System where the package was at this sample. Absent when the location resolves to no system (for example an unpack job).
11688
+ */
11131
11689
  system_id?: string;
11132
11690
  };
11133
11691
  export type ShippingActiveContract = {
11692
+ /**
11693
+ * A posted or in_transit contract you or your faction is party to. The sealed manifest (appraisal_lines) is omitted.
11694
+ */
11134
11695
  contract: ShipmentContract;
11696
+ /**
11697
+ * Name of the destination station. The base ID when the station is unknown.
11698
+ */
11135
11699
  destination_name?: string;
11700
+ /**
11701
+ * Name of the system that holds the destination station. Absent when the server cannot resolve it.
11702
+ */
11136
11703
  destination_system?: string;
11704
+ /**
11705
+ * 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.
11706
+ */
11137
11707
  failure_debt: number;
11708
+ /**
11709
+ * 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.
11710
+ */
11138
11711
  last_known_location?: string;
11712
+ /**
11713
+ * 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.
11714
+ */
11139
11715
  late: boolean;
11716
+ /**
11717
+ * 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.
11718
+ */
11140
11719
  late_fee_if_delivered_now?: number;
11720
+ /**
11721
+ * One plain-language instruction for what to do next with this contract given your role, the clock and where the package is. Always present.
11722
+ */
11141
11723
  next_step: string;
11724
+ /**
11725
+ * Name of the origin station. The base ID when the station is unknown.
11726
+ */
11142
11727
  origin_name?: string;
11728
+ /**
11729
+ * Name of the system that holds the origin station. Absent when the server cannot resolve it.
11730
+ */
11143
11731
  origin_system?: string;
11732
+ /**
11733
+ * 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.
11734
+ */
11144
11735
  package_in_your_cargo: boolean;
11736
+ /**
11737
+ * 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.
11738
+ */
11145
11739
  payout_if_delivered_now: number;
11740
+ /**
11741
+ * 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.
11742
+ */
11146
11743
  role: 'carrier' | 'shipper' | 'recipient' | 'invited_carrier';
11744
+ /**
11745
+ * contract.deadline_tick minus the current tick: ticks left for an on-time delivery. Negative once passed. 0 while the contract is posted.
11746
+ */
11147
11747
  ticks_to_deadline: number;
11748
+ /**
11749
+ * 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.
11750
+ */
11148
11751
  ticks_to_recovery_deadline: number;
11752
+ /**
11753
+ * contract.target_tick minus the current tick: ticks left at the full speed bonus. Negative once passed. 0 while the contract is posted.
11754
+ */
11149
11755
  ticks_to_target: number;
11150
11756
  };
11151
11757
  export type ShippingActiveResponse = {
11758
+ /**
11759
+ * Always active.
11760
+ */
11152
11761
  action: 'active';
11762
+ /**
11763
+ * Explains an empty shipments list. Absent when shipments has entries.
11764
+ */
11153
11765
  message?: string;
11766
+ /**
11767
+ * 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.
11768
+ */
11154
11769
  shipments: Array<ShippingActiveContract>;
11770
+ /**
11771
+ * The current game tick that every countdown and payout in shipments is computed against.
11772
+ */
11155
11773
  tick: number;
11156
11774
  };
11157
11775
  export type ShippingContractResponse = {
11776
+ /**
11777
+ * Which shipping action returned the contract: post (you listed it), get (you looked it up) or accept (you took it as carrier).
11778
+ */
11158
11779
  action: 'post' | 'get' | 'accept';
11780
+ /**
11781
+ * 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.
11782
+ */
11159
11783
  contract: ShipmentContract;
11160
11784
  };
11161
11785
  export type ShippingDebtPaymentResponse = {
11786
+ /**
11787
+ * Always pay_debt.
11788
+ */
11162
11789
  action: 'pay_debt';
11790
+ /**
11791
+ * 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.
11792
+ */
11163
11793
  amount_paid: number;
11794
+ /**
11795
+ * Active contract count and liability against the limits of the carrier's current tier, derived from profile after the payment.
11796
+ */
11164
11797
  capacity: CarrierCapacity;
11798
+ /**
11799
+ * Names the freight debt in credits that is still unpaid. Present only when debt_blocks_acceptance is true.
11800
+ */
11165
11801
  debt_block_reason?: string;
11802
+ /**
11803
+ * True when profile.outstanding_debt is still above 0 after the payment. The carrier cannot accept any contract until it is 0.
11804
+ */
11166
11805
  debt_blocks_acceptance: boolean;
11806
+ /**
11807
+ * The carrier's freight debts that still have an outstanding amount above 0 after the payment. Empty, never null, when all debt is paid.
11808
+ */
11167
11809
  outstanding_debts: Array<FreightDebt>;
11810
+ /**
11811
+ * Carrier record after the payment.
11812
+ */
11168
11813
  profile: CarrierProfile;
11814
+ /**
11815
+ * Progress toward the next carrier tier, derived from profile after the payment.
11816
+ */
11169
11817
  progression: CarrierTierProgress;
11818
+ /**
11819
+ * 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.
11820
+ */
11170
11821
  updated_debts: Array<FreightDebt>;
11171
11822
  };
11172
11823
  export type ShippingListResponse = {
11824
+ /**
11825
+ * Always list.
11826
+ */
11173
11827
  action: 'list';
11828
+ /**
11829
+ * Human-readable form of empty_reason_code. For no_eligible_shipments it names the first blocker found. Absent when total is above 0.
11830
+ */
11174
11831
  empty_reason?: string;
11832
+ /**
11833
+ * 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.
11834
+ */
11175
11835
  empty_reason_code?: string;
11836
+ /**
11837
+ * Page number served, from 1. A request below 1 serves page 1.
11838
+ */
11176
11839
  page: number;
11840
+ /**
11841
+ * Page size served: 1 to 50. A request outside that range serves 20.
11842
+ */
11177
11843
  per_page: number;
11844
+ /**
11845
+ * 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.
11846
+ */
11178
11847
  shipments: Array<ShippingListing>;
11848
+ /**
11849
+ * Number of listings across all pages after filters and eligibility.
11850
+ */
11179
11851
  total: number;
11180
11852
  };
11181
11853
  export type ShippingListing = {
11854
+ /**
11855
+ * A contract posted at your docked station. The sealed manifest (appraisal_lines) is omitted.
11856
+ */
11182
11857
  contract: ShipmentContract;
11858
+ /**
11859
+ * 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.
11860
+ */
11183
11861
  deadline_ticks: number;
11184
- eligible: boolean;
11185
- reason?: string;
11862
+ /**
11863
+ * Ticks after the deadline during which a late deliver or return is still accepted for a capped late fee. Always 2880.
11864
+ */
11186
11865
  recovery_ticks: number;
11866
+ /**
11867
+ * 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.
11868
+ */
11187
11869
  target_ticks: number;
11870
+ /**
11871
+ * 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.
11872
+ */
11873
+ warning?: string;
11188
11874
  };
11189
11875
  export type ShippingProfileResponse = {
11876
+ /**
11877
+ * Always profile.
11878
+ */
11190
11879
  action: 'profile';
11880
+ /**
11881
+ * Active contract count and liability against the limits of the carrier's current tier, derived from profile.
11882
+ */
11191
11883
  capacity: CarrierCapacity;
11884
+ /**
11885
+ * Names the unpaid freight debt in credits. Present only when debt_blocks_acceptance is true.
11886
+ */
11192
11887
  debt_block_reason?: string;
11888
+ /**
11889
+ * True when profile.outstanding_debt is above 0. The carrier cannot accept any contract until it pays that debt with pay_debt.
11890
+ */
11193
11891
  debt_blocks_acceptance: boolean;
11892
+ /**
11893
+ * The carrier's freight debts that still have an outstanding amount above 0. Empty, never null, when nothing is owed.
11894
+ */
11194
11895
  debts: Array<FreightDebt>;
11896
+ /**
11897
+ * Carrier record of the selected carrier (you or your faction). A carrier that never hauled freight gets a new probationary record.
11898
+ */
11195
11899
  profile: CarrierProfile;
11900
+ /**
11901
+ * Progress toward the next carrier tier, derived from profile.
11902
+ */
11196
11903
  progression: CarrierTierProgress;
11197
11904
  };
11198
11905
  export type ShippingQuote = {
11906
+ /**
11907
+ * 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.
11908
+ */
11199
11909
  appraisal_lines: Array<FreightAppraisalLine>;
11910
+ /**
11911
+ * Market value of the package contents in credits: the sum of total_value over appraisal_lines. 0 when insurable is false.
11912
+ */
11200
11913
  appraised_value: number;
11914
+ /**
11915
+ * 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.
11916
+ */
11201
11917
  base_reward: number;
11918
+ /**
11919
+ * 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.
11920
+ */
11202
11921
  consequences: string;
11922
+ /**
11923
+ * Credits the origin station insures the cargo for: equal to appraised_value when insurance_selected is true. 0 when the shipment is uninsured.
11924
+ */
11203
11925
  covered_value: number;
11926
+ /**
11927
+ * 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.
11928
+ */
11204
11929
  deadline_ticks: number;
11930
+ /**
11931
+ * 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.
11932
+ */
11205
11933
  destination_base_id: string;
11934
+ /**
11935
+ * How many delivered contracts estimated_reward is the median of. 0 means there is no market data for this route length yet.
11936
+ */
11206
11937
  estimate_samples: number;
11938
+ /**
11939
+ * 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.
11940
+ */
11207
11941
  estimated_reward: number;
11942
+ /**
11943
+ * 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.
11944
+ */
11208
11945
  failure_debt: number;
11946
+ /**
11947
+ * 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.
11948
+ */
11209
11949
  insurable: boolean;
11950
+ /**
11951
+ * True when the request asked for insurance (insured). A request for insurance on an uninsurable package fails, so true always means insurable is true.
11952
+ */
11210
11953
  insurance_selected: boolean;
11211
11954
  /**
11212
11955
  * 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
11956
  */
11214
11957
  invited_carrier?: ShipmentActor;
11958
+ /**
11959
+ * 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.
11960
+ */
11215
11961
  max_speed_bonus: number;
11962
+ /**
11963
+ * Base ID of the station you are docked at. Freight always ships from here.
11964
+ */
11216
11965
  origin_base_id: string;
11966
+ /**
11967
+ * Bare ID of the sealed package being quoted. A package:<id> cargo ID in the request is reduced to this form.
11968
+ */
11217
11969
  package_id: string;
11970
+ /**
11971
+ * 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.
11972
+ */
11218
11973
  premium: number;
11974
+ /**
11975
+ * 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.
11976
+ */
11219
11977
  recipient: ShipmentActor;
11978
+ /**
11979
+ * 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.
11980
+ */
11220
11981
  recovery_ticks: number;
11982
+ /**
11983
+ * 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.
11984
+ */
11221
11985
  required_carrier_tier: 'probationary' | 'licensed' | 'trusted' | 'prime';
11986
+ /**
11987
+ * 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.
11988
+ */
11989
+ requires_hazmat?: boolean;
11990
+ /**
11991
+ * 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.
11992
+ */
11222
11993
  reserved_exposure: number;
11994
+ /**
11995
+ * 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.
11996
+ */
11223
11997
  risk_band: 'probationary' | 'licensed' | 'trusted' | 'prime' | 'unpriced';
11998
+ /**
11999
+ * Jumps on the shortest route between the origin and destination systems. 0 when both stations are in the same system.
12000
+ */
11224
12001
  route_hops: number;
12002
+ /**
12003
+ * 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.
12004
+ */
11225
12005
  service_fee: number;
12006
+ /**
12007
+ * Delivery window tier. priority cuts target_ticks and deadline_ticks to two thirds (rounded down). It does not change any price.
12008
+ */
11226
12009
  service_level: 'standard' | 'priority';
12010
+ /**
12011
+ * Who pays and posts the freight: you as a player or your current faction. Never a station.
12012
+ */
11227
12013
  shipper: ShipmentActor;
12014
+ /**
12015
+ * 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.
12016
+ */
11228
12017
  target_ticks: number;
12018
+ /**
12019
+ * 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.
12020
+ */
11229
12021
  total_cost: number;
12022
+ /**
12023
+ * Why the package cannot be insured, naming the first item without useful market evidence. Present only when insurable is false.
12024
+ */
11230
12025
  uninsurable_reason?: string;
12026
+ /**
12027
+ * 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.
12028
+ */
11231
12029
  visibility: 'public' | 'faction' | 'allies' | 'invited';
11232
12030
  };
11233
12031
  export type ShippingQuoteResponse = {
12032
+ /**
12033
+ * Always quote.
12034
+ */
11234
12035
  action: 'quote';
12036
+ /**
12037
+ * Current terms for posting this package. Nothing is charged or moved. post recalculates the terms.
12038
+ */
11235
12039
  quote: ShippingQuote;
11236
12040
  };
11237
12041
  export type ShippingResponse = ({
@@ -11272,14 +12076,27 @@ export type ShippingSettlementResponse = {
11272
12076
  * 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
12077
  */
11274
12078
  late?: boolean;
12079
+ /**
12080
+ * 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.
12081
+ */
12082
+ piloting_xp?: number;
11275
12083
  /**
11276
12084
  * 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
12085
  */
11278
12086
  shipper_refund?: number;
11279
12087
  };
11280
12088
  export type ShippingTrackResponse = {
12089
+ /**
12090
+ * Always track.
12091
+ */
11281
12092
  action: 'track';
12093
+ /**
12094
+ * The tracked contract in its current state. The sealed manifest (appraisal_lines) is omitted.
12095
+ */
11282
12096
  contract: ShipmentContract;
12097
+ /**
12098
+ * 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.
12099
+ */
11283
12100
  events: Array<ShipmentTrackingEvent>;
11284
12101
  };
11285
12102
  export type Skill = {
@@ -11869,6 +12686,10 @@ export type SystemInfo = {
11869
12686
  export type SystemPoi = {
11870
12687
  base_id?: string;
11871
12688
  base_name?: string;
12689
+ /**
12690
+ * Kind of base at this POI. station is a full station (empire or player-built). outpost is a faction outpost: a members-only storage and fuel depot. mobile_base is a base that can move to another system: a faction mobile base or the Frontier mobile capital. Omitted when has_base is false.
12691
+ */
12692
+ base_type?: 'station' | 'outpost' | 'mobile_base';
11872
12693
  /**
11873
12694
  * Type-specific classification for client rendering (e.g. star spectral class, planet type, belt composition)
11874
12695
  */
@@ -13227,6 +14048,10 @@ export type V2Ship = {
13227
14048
  * Current marine capacity after hull and fitted-module effects
13228
14049
  */
13229
14050
  effective_marine_capacity: number;
14051
+ /**
14052
+ * 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.
14053
+ */
14054
+ field_workshop?: FieldWorkshopView;
13230
14055
  fuel: number;
13231
14056
  /**
13232
14057
  * 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 +14110,10 @@ export type V2Ship = {
13285
14110
  * Power consumed by fitted modules (after engineering efficiency bonus). Can exceed power_capacity on the same terms as cpu_used
13286
14111
  */
13287
14112
  power_used: number;
14113
+ /**
14114
+ * 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.
14115
+ */
14116
+ refit_available?: boolean;
13288
14117
  shield: number;
13289
14118
  shield_recharge: number;
13290
14119
  speed: number;
@@ -13853,7 +14682,7 @@ export type SpacemoltCraftData = {
13853
14682
  */
13854
14683
  count?: number;
13855
14684
  /**
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.
14685
+ * 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
14686
  */
13858
14687
  deliver_to?: string;
13859
14688
  /**
@@ -13865,7 +14694,7 @@ export type SpacemoltCraftData = {
13865
14694
  */
13866
14695
  facility_id?: string;
13867
14696
  /**
13868
- * Recipe ID to craft (use catalog with type=recipes to see available recipes). Inputs are escrowed from station storage at enqueue.
14697
+ * 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
14698
  */
13870
14699
  id?: string;
13871
14700
  /**
@@ -13934,7 +14763,7 @@ export type SpacemoltCraftData = {
13934
14763
  */
13935
14764
  quantity?: number;
13936
14765
  /**
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.
14766
+ * 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
14767
  */
13939
14768
  source?: string;
13940
14769
  /**
@@ -23337,7 +24166,7 @@ export type SpacemoltShipCommissionShipData = {
23337
24166
  */
23338
24167
  fund_from_faction?: boolean;
23339
24168
  /**
23340
- * Ship class ID to commission (use catalog type=ships to see options)
24169
+ * 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
24170
  */
23342
24171
  id: string;
23343
24172
  /**
@@ -23452,6 +24281,40 @@ export type SpacemoltShipFactionPersonnelResponses = {
23452
24281
  };
23453
24282
  };
23454
24283
  export type SpacemoltShipFactionPersonnelResponse = SpacemoltShipFactionPersonnelResponses[keyof SpacemoltShipFactionPersonnelResponses];
24284
+ export type SpacemoltShipFitPreviewData = {
24285
+ body?: {
24286
+ /**
24287
+ * 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.
24288
+ */
24289
+ modules: Array<string>;
24290
+ };
24291
+ path?: never;
24292
+ query?: never;
24293
+ url: '/api/v2/spacemolt_ship/fit_preview';
24294
+ };
24295
+ export type SpacemoltShipFitPreviewErrors = {
24296
+ /**
24297
+ * Bad request — invalid params, unknown command, or game error
24298
+ */
24299
+ 400: unknown;
24300
+ /**
24301
+ * Not authenticated — missing or invalid session
24302
+ */
24303
+ 401: unknown;
24304
+ /**
24305
+ * Rate limited — mutations allow 1 per tick (10 seconds)
24306
+ */
24307
+ 429: unknown;
24308
+ };
24309
+ export type SpacemoltShipFitPreviewResponses = {
24310
+ /**
24311
+ * Result. structuredContent type: FitPreviewResponse
24312
+ */
24313
+ 200: V2Response & {
24314
+ structuredContent?: FitPreviewResponse;
24315
+ };
24316
+ };
24317
+ export type SpacemoltShipFitPreviewResponse = SpacemoltShipFitPreviewResponses[keyof SpacemoltShipFitPreviewResponses];
23455
24318
  export type SpacemoltShipGeneratorData = {
23456
24319
  body?: {
23457
24320
  /**