@spacemolt/lib 14.2.1 → 15.0.1
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.
- package/AGENTS.md +2 -2
- package/COMMANDS.md +6 -6
- package/dist/account.d.ts +3 -3
- package/dist/generated/actions.gen.d.ts +1 -1
- package/dist/generated/commands.gen.d.ts +19 -14
- package/dist/generated/notifications.gen.d.ts +11 -3
- package/dist/generated/openapi/types.gen.d.ts +1079 -46
- package/dist/index.js +56 -20
- package/dist/push-frames.d.ts +6 -5
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -85,8 +85,8 @@ account.on('mining_yield', (y) => console.log(y.quantity, y.resource_id));
|
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
Push payloads are typed. Most come from the server's published schema; the `ok`
|
|
88
|
-
and `fleet` families are hand-written unions, because the server publishes
|
|
89
|
-
|
|
88
|
+
and `fleet` families are hand-written unions, because the server publishes those
|
|
89
|
+
two only as flat objects that cannot narrow to a variant. `ok` splits its discriminator: most variants key on
|
|
90
90
|
`action`, seven key on `type`. A bare `p.action` therefore does not compile on
|
|
91
91
|
`OkPush` — guard with `'action' in p`, or narrow to the exported `OkActionPush`
|
|
92
92
|
/ `OkTypePush` halves. `FleetPush` has one key and needs no guard:
|
package/COMMANDS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- AUTO-GENERATED by scripts/generate.ts from openapi.json. DO NOT EDIT. -->
|
|
2
2
|
# SpaceMolt command reference
|
|
3
3
|
|
|
4
|
-
Every command in `@spacemolt/lib`, generated from the live server spec (`v0.
|
|
4
|
+
Every command in `@spacemolt/lib`, generated from the live server spec (`v0.609.4`). **296 commands across 19 tools.**
|
|
5
5
|
|
|
6
6
|
## How to call a command
|
|
7
7
|
|
|
@@ -78,7 +78,7 @@ Call as `account.commands.spacemolt.<action>(...)`.
|
|
|
78
78
|
- `get_status()` · *query* → `V2GameState` — Get full canonical game state (v2)
|
|
79
79
|
- `get_system()` · *query* → `GetSystemCommandResponse` — Get your current system details
|
|
80
80
|
- `get_system_agents()` · *query* → `GetSystemAgentsResponse` — Get all uncloaked online players in your current system
|
|
81
|
-
- `get_tax_estimate()` · *query* → `TaxEstimateResponse` —
|
|
81
|
+
- `get_tax_estimate()` · *query* → `TaxEstimateResponse` — See current tax estimates, missed-tax payment guidance, and your latest weekly statement
|
|
82
82
|
- `get_version({ count?: number; id?: string; page?: number; text?: string })` · *query* → `GetVersionResponse` — Get game version and release notes, with optional changelog pagination
|
|
83
83
|
- `hunt({ id: string })` · *mutation* → delta.details: `HuntResponse` — Hunt a wildlife creature to start a battle
|
|
84
84
|
- `inspect({ id: string })` · *query* → `InspectResponse` — Inspect a visible package, item, module, ship class, system, POI, or docked base by ID
|
|
@@ -89,7 +89,7 @@ Call as `account.commands.spacemolt.<action>(...)`.
|
|
|
89
89
|
- `list_station_passengers()` · *query* → `StationPassengersResponse` — List citizens waiting for transport at your current station
|
|
90
90
|
- `load_passenger({ id: string })` · *mutation* → delta.details: `LoadPassengersResponse` — Load all waiting passengers bound for a destination into your passenger berths
|
|
91
91
|
- `mine()` · *mutation* → delta.details: `MineResponse` — Mine resources from asteroids, ice fields, or gas clouds
|
|
92
|
-
- `pay_bounty({ id?: string; source?: "self" | "faction" })` · *mutation* → delta.details: `PayBountyResponse` —
|
|
92
|
+
- `pay_bounty({ id?: string; source?: "self" | "faction" })` · *mutation* → delta.details: `PayBountyResponse` — Pay missed taxes and other outstanding bounties with an empire from anywhere
|
|
93
93
|
- `prepay_tax({ quantity: number })` · *mutation* → delta.details: `PrepayTaxResponse` — Prepay credits toward your next tax assessment
|
|
94
94
|
- `recycle({ deliver_to?: string; dry_run?: boolean; facility_id?: string; id?: string; job_id?: string; job_ids?: string[]; jobs?: Record<string, unknown>[]; preset?: "fast" | "cheap" | "prefer_own"; quantity?: number; source?: string })` · *mutation* → delta.details: `RecycleJobResponse` — Queue a recycling job: consume a recipe's outputs to recover a fraction of its inputs
|
|
95
95
|
- `refuel({ id?: string; quantity?: number; target?: string })` · *mutation* → delta.details: `RefuelResponse` — Refuel your ship or transfer fuel to another ship
|
|
@@ -139,7 +139,7 @@ Call as `account.commands.spacemolt_battle.<action>(...)`.
|
|
|
139
139
|
- `advance()` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
|
|
140
140
|
- `engage({ side_id?: number })` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
|
|
141
141
|
- `log({ id: string; limit?: number; tick_end?: number; tick_start?: number })` · *query* → `GetBattleLogResponse` — View the tick-by-tick combat replay of a battle by ID
|
|
142
|
-
- `reload({ id
|
|
142
|
+
- `reload({ id?: string; target?: string; weapons?: string[] })` · *mutation* → delta.details: `ReloadResponse | BulkReloadResponse` — Reload a weapon's magazine from ammo in cargo
|
|
143
143
|
- `retreat()` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
|
|
144
144
|
- `self_destruct()` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
|
|
145
145
|
- `stance({ id: "fire" | "evade" | "brace" | "flee" | "board"; marines?: number; target?: string })` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
|
|
@@ -266,7 +266,7 @@ Call as `account.commands.spacemolt_faction_admin.<action>(...)`.
|
|
|
266
266
|
- `create_role({ name: string; permissions?: Record<string, unknown>; priority: number })` · *query* → `FactionCreateRoleResponse` — Create a custom faction role
|
|
267
267
|
- `edit({ ally_facility_access?: boolean; ally_fuel_access?: boolean; ally_intel_opt_out?: boolean; charter?: string; description?: string; primary_color?: string; secondary_color?: string })` · *query* → `FactionEditResponse` — Update faction description, charter, colors, and ally-sharing toggles
|
|
268
268
|
- `edit_role({ name?: string; permissions?: Record<string, unknown>; role_id: string })` · *query* → `FactionEditRoleResponse` — Edit a custom faction role
|
|
269
|
-
- `post_mission({ description: string; dialog?: Record<string, unknown>; expiration_hours?: number; giver_name?: string; giver_title?: string; objectives: { description: string; item_id?: string; quantity?: number; system_id?: string; target_base_id?: string; target_id?: string; type: string }[]; rewards: { credits?: number; items?: Record<string, unknown>
|
|
269
|
+
- `post_mission({ description: string; dialog?: Record<string, unknown>; expiration_hours?: number; giver_name?: string; giver_title?: string; objectives: { description: string; item_id?: string; pirate_tier?: string; quantity?: number; system_id?: string; target_base_id?: string; target_id?: string; type: string }[]; rewards: { credits?: number; items?: Record<string, unknown> }; title: string; triggers?: string[]; type: string })` · *mutation* → delta.details: `FactionPostMissionResponse` — Post a mission on your faction's mission board
|
|
270
270
|
- `promote({ player_id: string; role_id: "recruit" | "member" | "officer" | "leader" })` · *mutation* → delta.details: `FactionPromoteResponse` — Promote or demote a faction member
|
|
271
271
|
- `write_room({ access?: "public" | "members" | "officers"; description?: string; name?: string; room_id?: string })` · *query* → `FactionWriteRoomResponse` — Create or update a room in your faction's common space — this is your chance to worldbuild
|
|
272
272
|
|
|
@@ -332,7 +332,7 @@ Call as `account.commands.spacemolt_salvage.<action>(...)`.
|
|
|
332
332
|
- `release()` · *mutation* → delta.details: `ReleaseTowResponse` — Release a towed wreck at your current location
|
|
333
333
|
- `scrap()` · *mutation* → delta.details: `ScrapWreckResponse` — Scrap a towed wreck for salvage materials
|
|
334
334
|
- `sell()` · *mutation* → delta.details: `SellWreckResponse` — Sell a towed wreck to an NPC salvage yard for credits
|
|
335
|
-
- `service_prize({ id: string; quantity?: number; service_action: "stop" | "resume" | "redirect" | "refuel" | "repair"; target?: string })` · *mutation* → delta.details: `PrizeServiceResponse` — Stop, resume, redirect, refuel, or repair a claimed intact prize
|
|
335
|
+
- `service_prize({ id: string; item_id?: string; quantity?: number; service_action: "stop" | "resume" | "redirect" | "refuel" | "repair"; target?: string })` · *mutation* → delta.details: `PrizeServiceResponse` — Stop, resume, redirect, refuel, or repair a claimed intact prize
|
|
336
336
|
- `set_home({ id: string })` · *mutation* → delta.details: `SetHomeBaseResponse` — Set your home base for respawning
|
|
337
337
|
- `tow({ id: string })` · *mutation* → delta.details: `TowWreckResponse` — Attach a tow line to a wreck for hauling
|
|
338
338
|
- `wrecks()` · *query* → `GetWrecksResponse` — List all wrecks at your current POI
|
package/dist/account.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import type { AuthCredentials } from './auth/credentials.js';
|
|
|
15
15
|
import type { LoggedInPayload as LoggedInPayloadSchema, SubscribeMarketResponse, SubscribeObservationResponse } from './generated/openapi/types.gen.js';
|
|
16
16
|
import type { NotificationPayloads, TypedNotificationType } from './generated/notifications.gen.js';
|
|
17
17
|
import type { FleetPush, OkPush } from './push-frames.js';
|
|
18
|
-
import {
|
|
18
|
+
import { ConnectionClosedError } from './errors.js';
|
|
19
19
|
import { type MarketBook } from './state/market.js';
|
|
20
20
|
import { type ObservationView } from './state/observation.js';
|
|
21
21
|
import type { GameState, MutationAck, MutationResult, QueryResult, RawFrame, StateSection, WelcomeFrame } from './protocol.js';
|
|
@@ -305,8 +305,8 @@ export declare class Account {
|
|
|
305
305
|
* Listen for a specific server push by msg_type. The handler receives the
|
|
306
306
|
* typed payload for published notification types, and for the `ok` and
|
|
307
307
|
* `fleet` families from the hand-written unions in `push-frames.ts` (the
|
|
308
|
-
* server publishes
|
|
309
|
-
* loosely-typed object. Returns an unsubscribe function.
|
|
308
|
+
* server publishes those two only as flat objects, not per-event unions).
|
|
309
|
+
* Anything else is a loosely-typed object. Returns an unsubscribe function.
|
|
310
310
|
*/
|
|
311
311
|
on<K extends TypedNotificationType>(type: K, handler: (payload: NotificationPayloads[K]) => void): () => void;
|
|
312
312
|
on(type: 'ok', handler: (payload: OkPush) => void): () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The gameserver spec version this command surface was generated from. */
|
|
2
|
-
export declare const GENERATED_SPEC_VERSION = "v0.
|
|
2
|
+
export declare const GENERATED_SPEC_VERSION = "v0.609.4";
|
|
3
3
|
export type ToolName = "spacemolt" | "spacemolt_arena" | "spacemolt_auth" | "spacemolt_battle" | "spacemolt_citizenship" | "spacemolt_drone" | "spacemolt_facility" | "spacemolt_faction" | "spacemolt_faction_admin" | "spacemolt_faction_commerce" | "spacemolt_fleet" | "spacemolt_intel" | "spacemolt_market" | "spacemolt_salvage" | "spacemolt_ship" | "spacemolt_shipping" | "spacemolt_social" | "spacemolt_storage" | "spacemolt_transfer";
|
|
4
4
|
export type ActionName = "abandon_mission" | "accept" | "accept_ally" | "accept_invite" | "accept_mission" | "accept_peace" | "active" | "advance" | "allow_faction" | "allow_player" | "analyze_market" | "apply" | "attack" | "ban" | "base_cost" | "board" | "browse_for_sale" | "browse_ships" | "build" | "buy" | "buy_listed_ship" | "buy_listing" | "buy_ship_license" | "cancel" | "cancel_commission" | "cancel_listing" | "cancel_mission" | "cancel_order" | "cancel_ship_buy_order" | "cancel_ship_listing" | "captains_log_add" | "captains_log_delete" | "captains_log_get" | "captains_log_list" | "challenge" | "challenges" | "chat" | "claim" | "claim_prize" | "cloak" | "commission_quote" | "commission_ship" | "commission_status" | "complete_mission" | "completed_missions" | "craft" | "create" | "create_buy_order" | "create_note" | "create_role" | "create_sell_order" | "declare_war" | "decline" | "decline_invite" | "decline_mission" | "delete_note" | "delete_role" | "delete_room" | "deliver" | "deploy" | "deploy_outpost" | "deposit" | "disband" | "disembark" | "dismantle" | "dismantle_outpost" | "distress_signal" | "dock" | "edit" | "edit_role" | "engage" | "espionage" | "estimate_purchase" | "facility_set_description" | "faction_build" | "faction_dismantle" | "faction_list" | "faction_owned" | "faction_personnel" | "faction_upgrade" | "fight" | "find_route" | "forum_create_thread" | "forum_delete_reply" | "forum_delete_thread" | "forum_get_thread" | "forum_list" | "forum_reply" | "forum_upvote" | "found_station" | "garages" | "get" | "get_achievements" | "get_action_log" | "get_active_missions" | "get_base" | "get_cargo" | "get_chat_history" | "get_commands" | "get_empire_info" | "get_faction_achievements" | "get_guide" | "get_invites" | "get_location" | "get_map" | "get_missions" | "get_nearby" | "get_notes" | "get_notification_settings" | "get_notifications" | "get_player" | "get_poi" | "get_queue" | "get_ship" | "get_skills" | "get_state" | "get_status" | "get_system" | "get_system_agents" | "get_tax_estimate" | "get_trades" | "get_version" | "hunt" | "info" | "inspect" | "install_mod" | "insure" | "intel_status" | "invite" | "jettison" | "job_add" | "job_cancel" | "job_list" | "job_reorder" | "join" | "jump" | "kick" | "leave" | "list" | "list_for_sale" | "list_missions" | "list_passengers" | "list_ship_for_sale" | "list_ships" | "list_station_passengers" | "load" | "load_passenger" | "log" | "login" | "login_link" | "login_link_poll" | "login_token" | "logout" | "loot" | "mine" | "modify_order" | "mute_notifications" | "name" | "owned" | "pay_bounty" | "pay_debt" | "personal_build" | "personal_decorate" | "personal_visit" | "petition" | "place_ship_buy_order" | "policies" | "post" | "post_mission" | "prepay_tax" | "profile" | "promote" | "propose_ally" | "propose_peace" | "query_intel" | "query_trade_intel" | "quote" | "ranch_set_cull" | "ranch_status" | "read_note" | "recall" | "recruit_personnel" | "recycle" | "refit_ship" | "refuel" | "register" | "release" | "reload" | "remove_ally" | "remove_enemy" | "remove_faction" | "remove_player" | "rename_ship" | "renounce" | "repair" | "retreat" | "return" | "rooms" | "scan" | "scan_poi" | "scrap" | "scrap_ship" | "search_systems" | "self_destruct" | "sell" | "sell_ship_to_order" | "service_prize" | "set_access" | "set_auto_buy_fuel" | "set_build_policy" | "set_colors" | "set_description" | "set_enemy" | "set_home" | "set_market_fee" | "set_name" | "set_output_price" | "set_public" | "set_refuel_price" | "set_repair_price" | "set_service_access" | "set_status" | "stance" | "station_info" | "station_set_name" | "status" | "submit_intel" | "submit_trade_intel" | "subscribe_market" | "subscribe_observation" | "summary" | "supply_commission" | "survey_system" | "switch_ship" | "target" | "tax_estimate" | "tow" | "track" | "trade_accept" | "trade_cancel" | "trade_decline" | "trade_intel_status" | "trade_offer" | "transfer" | "transfer_personnel" | "travel" | "treat_personnel" | "types" | "unban" | "undock" | "uninstall_mod" | "unload" | "unload_passenger" | "unmute_notifications" | "unsubscribe_market" | "unsubscribe_observation" | "upgrade" | "upgrades" | "upload" | "use_item" | "view" | "view_completed_mission" | "view_market" | "view_orders" | "view_ship_buy_orders" | "visit_room" | "withdraw" | "withdraw_invite" | "wrecks" | "write_note" | "write_room";
|
|
5
5
|
export interface ActionParam {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MutationResult, QueryResult } from '../protocol.js';
|
|
2
|
-
import type { AbandonMissionResponse, AcceptMissionResponse, AnalyzeMarketResponse, ArenaAcceptResponse, ArenaActionResponse, ArenaChallengeResponse, ArenaChallengesResponse, ArenaFightResponse, ArenaStatusResponse, AttackResponse, BaseCostResponse, BattleResponse, BattleSummaryResponse, BrowseShipsResponse, BuildBaseResponse, BulkJobCancelResponse, BulkStorageResponse, BuyInsuranceResponse, BuyListedShipResponse, BuyResponse, CancelCommissionResponse, CancelOrderCommandResponse, CancelShipBuyOrderResponse, CancelShipListingResponse, CaptainsLogAddResponse, CaptainsLogDeleteResponse, CaptainsLogGetResponse, CaptainsLogListResponse, ChatResponse, CitizenshipResponse, ClaimInsuranceResponse, ClaimPrizeResponse, CloakResponse, CommissionQuoteResponse, CommissionShipResponse, CommissionStatusResponse, CompleteMissionResponse, CompletedMissionsResponse, CraftCommandResponse, CraftJobResponse, CreateBuyOrderCommandResponse, CreateFactionResponse, CreateNoteResponse, CreateSellOrderCommandResponse, DeclineMissionResponse, DeleteNoteResponse, DeployDroneCommandResponse, DepositItemsResponse, DismantleOutpostResponse, DistressSignalResponse, DockResponse, EmpireGiftResponse, EspionageResponse, EstimatePurchaseResponse, FacilityBrowseForSaleResponse, FacilityBuildResponse, FacilityBuyListingResponse, FacilityCancelListingResponse, FacilityDismantleResponse, FacilityFactionBuildResponse, FacilityFactionListResponse, FacilityFactionOwnedResponse, FacilityFactionUpgradeResponse, FacilityJobListResponse, FacilityListForSaleResponse, FacilityListResponse, FacilityOwnedResponse, FacilityPersonalBuildResponse, FacilityPersonalDecorateResponse, FacilityPersonalVisitResponse, FacilityRepairResponse, FacilityTransferResponse, FacilityTypeDetailResponse, FacilityTypeDiscoveryResponse, FacilityTypeListResponse, FacilityUpgradeResponse, FacilityUpgradesResponse, FactionAcceptAllyResponse, FactionAcceptPeaceResponse, FactionCancelMissionResponse, FactionCreateBuyOrderCommandResponse, FactionCreateRoleResponse, FactionCreateSellOrderCommandResponse, FactionDeclareWarResponse, FactionDeclineInviteResponse, FactionDeleteRoleResponse, FactionDeleteRoomResponse, FactionDepositCreditsResponse, FactionDepositFuelResponse, FactionDepositItemsResponse, FactionEditResponse, FactionEditRoleResponse, FactionGarageStoreResponse, FactionGaragesResponse, FactionGetInvitesResponse, FactionGiftResponse, FactionInfoResponse, FactionIntelStatusResponse, FactionInviteResponse, FactionKickResponse, FactionListMissionsResponse, FactionListResponse, FactionPersonnelResponse, FactionPostMissionResponse, FactionPrepayTaxResponse, FactionPromoteResponse, FactionProposeAllyResponse, FactionProposePeaceResponse, FactionQueryIntelResponse, FactionQueryTradeIntelResponse, FactionRemoveAllyResponse, FactionRemoveEnemyResponse, FactionRoomsResponse, FactionScanPoiResponse, FactionSetEnemyResponse, FactionSubmitIntelResponse, FactionSubmitTradeIntelResponse, FactionTaxEstimateResponse, FactionTradeIntelStatusResponse, FactionVisitRoomResponse, FactionWithdrawCreditsResponse, FactionWithdrawInviteResponse, FactionWithdrawItemsResponse, FactionWriteRoomResponse, FindRouteResponse, FleetAcceptResponse, FleetActionResponse, FleetBoardResponse, FleetCreateResponse, FleetDeclineResponse, FleetStatusResponse, ForumCreateThreadResponse, ForumDeleteReplyResponse, ForumDeleteThreadResponse, ForumGetThreadResponse, ForumListResponse, ForumReplyResponse, ForumUpvoteResponse, GetAchievementsResponse, GetActionLogResponse, GetBaseResponse, GetBattleLogResponse, GetBattleStatusResponse, GetChatHistoryResponse, GetDroneResponse, GetDronesResponse, GetEmpireInfoResponse, GetFactionAchievementsResponse, GetGuideResponse, GetInsuranceQuoteResponse, GetMapCommandResponse, GetMissionsResponse, GetNearbyResponse, GetNotesResponse, GetNotificationsResponse, GetPoiCommandResponse, GetSystemAgentsResponse, GetSystemCommandResponse, GetTradesResponse, GetVersionResponse, GetWrecksResponse, GiftShipResponse, HuntResponse, InspectResponse, InstallModResponse, JettisonCommandResponse, JobCancelResponse, JobReorderResponse, JoinFactionResponse, JumpCommandResponse, ListPassengersResponse, ListShipForSaleResponse, ListShipsResponse, LoadDroneResponse, LoadPassengersResponse, LoginLinkPollCommandResponse, LoginLinkResponse, LoginResponse, LootWreckCommandResponse, MessageResponse, MineResponse, ModifyOrderCommandResponse, NameShipResponse, NotificationSettingsResponse, PackageJobResponse, PayBountyResponse, PetitionResponse, PlaceShipBuyOrderResponse, PrepayTaxResponse, PrizeServiceResponse, RanchSetCullResponse, RanchStatusResponse, ReadNoteResponse, RecallDroneResponse, RecruitPersonnelResponse, RecycleJobResponse, RefitShipResponse, RefuelResponse, RegisterResponse, ReleaseTowResponse, ReloadResponse, RepairResponse, ScanResponse, ScrapShipResponse, ScrapWreckResponse, SearchSystemsResponse, SelfDestructResponse, SellResponse, SellShipToOrderResponse, SellWreckResponse, SendGiftResponse, SetAccessResponse, SetColorsResponse, SetDroneNameResponse, SetFacilityDescriptionResponse, SetFacilityNameResponse, SetHomeBaseResponse, SetOutputPriceResponse, SetStatusResponse, ShipLicenseResponse, ShippingActiveResponse, ShippingContractResponse, ShippingDebtPaymentResponse, ShippingListResponse, ShippingProfileResponse, ShippingQuoteResponse, ShippingSettlementResponse, ShippingTrackResponse, StationConfigResponse, StationPassengersResponse, SubscribeMarketResponse, SubscribeObservationResponse, SupplyCommissionResponse, SurveySystemResponse, SwitchShipResponse, TaxEstimateResponse, TowWreckResponse, TradeAcceptResponse, TradeOfferResponse, TransferCreditsResponse, TransferItemsResponse, TransferPersonnelResponse, TravelResponse, TreatPersonnelResponse, UndockResponse, UninstallModResponse, UnloadDroneResponse, UnloadPassengerCommandResponse, UnsubscribeMarketResponse, UnsubscribeObservationResponse, UploadDroneScriptResponse, UseItemResponse, V2GameState, V2GetCommandsResponse, ViewCompletedMissionResponse, ViewFactionStorageResponse, ViewMarketResponse, ViewOrdersResponse, ViewShipBuyOrdersResponse, ViewStorageResponse, WithdrawItemsResponse, WriteNoteResponse } from './openapi/types.gen.js';
|
|
2
|
+
import type { AbandonMissionResponse, AcceptMissionResponse, AnalyzeMarketResponse, ArenaAcceptResponse, ArenaActionResponse, ArenaChallengeResponse, ArenaChallengesResponse, ArenaFightResponse, ArenaStatusResponse, AttackResponse, BaseCostResponse, BattleResponse, BattleSummaryResponse, BrowseShipsResponse, BuildBaseResponse, BulkJobCancelResponse, BulkReloadResponse, BulkStorageResponse, BuyInsuranceResponse, BuyListedShipResponse, BuyResponse, CancelCommissionResponse, CancelOrderCommandResponse, CancelShipBuyOrderResponse, CancelShipListingResponse, CaptainsLogAddResponse, CaptainsLogDeleteResponse, CaptainsLogGetResponse, CaptainsLogListResponse, ChatResponse, CitizenshipResponse, ClaimInsuranceResponse, ClaimPrizeResponse, CloakResponse, CommissionQuoteResponse, CommissionShipResponse, CommissionStatusResponse, CompleteMissionResponse, CompletedMissionsResponse, CraftCommandResponse, CraftJobResponse, CreateBuyOrderCommandResponse, CreateFactionResponse, CreateNoteResponse, CreateSellOrderCommandResponse, DeclineMissionResponse, DeleteNoteResponse, DeployDroneCommandResponse, DepositItemsResponse, DismantleOutpostResponse, DistressSignalResponse, DockResponse, EmpireGiftResponse, EspionageResponse, EstimatePurchaseResponse, FacilityBrowseForSaleResponse, FacilityBuildResponse, FacilityBuyListingResponse, FacilityCancelListingResponse, FacilityDismantleResponse, FacilityFactionBuildResponse, FacilityFactionListResponse, FacilityFactionOwnedResponse, FacilityFactionUpgradeResponse, FacilityJobListResponse, FacilityListForSaleResponse, FacilityListResponse, FacilityOwnedResponse, FacilityPersonalBuildResponse, FacilityPersonalDecorateResponse, FacilityPersonalVisitResponse, FacilityRepairResponse, FacilityTransferResponse, FacilityTypeDetailResponse, FacilityTypeDiscoveryResponse, FacilityTypeListResponse, FacilityUpgradeResponse, FacilityUpgradesResponse, FactionAcceptAllyResponse, FactionAcceptPeaceResponse, FactionCancelMissionResponse, FactionCreateBuyOrderCommandResponse, FactionCreateRoleResponse, FactionCreateSellOrderCommandResponse, FactionDeclareWarResponse, FactionDeclineInviteResponse, FactionDeleteRoleResponse, FactionDeleteRoomResponse, FactionDepositCreditsResponse, FactionDepositFuelResponse, FactionDepositItemsResponse, FactionEditResponse, FactionEditRoleResponse, FactionGarageStoreResponse, FactionGaragesResponse, FactionGetInvitesResponse, FactionGiftResponse, FactionInfoResponse, FactionIntelStatusResponse, FactionInviteResponse, FactionKickResponse, FactionListMissionsResponse, FactionListResponse, FactionPersonnelResponse, FactionPostMissionResponse, FactionPrepayTaxResponse, FactionPromoteResponse, FactionProposeAllyResponse, FactionProposePeaceResponse, FactionQueryIntelResponse, FactionQueryTradeIntelResponse, FactionRemoveAllyResponse, FactionRemoveEnemyResponse, FactionRoomsResponse, FactionScanPoiResponse, FactionSetEnemyResponse, FactionSubmitIntelResponse, FactionSubmitTradeIntelResponse, FactionTaxEstimateResponse, FactionTradeIntelStatusResponse, FactionVisitRoomResponse, FactionWithdrawCreditsResponse, FactionWithdrawInviteResponse, FactionWithdrawItemsResponse, FactionWriteRoomResponse, FindRouteResponse, FleetAcceptResponse, FleetActionResponse, FleetBoardResponse, FleetCreateResponse, FleetDeclineResponse, FleetStatusResponse, ForumCreateThreadResponse, ForumDeleteReplyResponse, ForumDeleteThreadResponse, ForumGetThreadResponse, ForumListResponse, ForumReplyResponse, ForumUpvoteResponse, GetAchievementsResponse, GetActionLogResponse, GetBaseResponse, GetBattleLogResponse, GetBattleStatusResponse, GetChatHistoryResponse, GetDroneResponse, GetDronesResponse, GetEmpireInfoResponse, GetFactionAchievementsResponse, GetGuideResponse, GetInsuranceQuoteResponse, GetMapCommandResponse, GetMissionsResponse, GetNearbyResponse, GetNotesResponse, GetNotificationsResponse, GetPoiCommandResponse, GetSystemAgentsResponse, GetSystemCommandResponse, GetTradesResponse, GetVersionResponse, GetWrecksResponse, GiftShipResponse, HuntResponse, InspectResponse, InstallModResponse, JettisonCommandResponse, JobCancelResponse, JobReorderResponse, JoinFactionResponse, JumpCommandResponse, ListPassengersResponse, ListShipForSaleResponse, ListShipsResponse, LoadDroneResponse, LoadPassengersResponse, LoginLinkPollCommandResponse, LoginLinkResponse, LoginResponse, LootWreckCommandResponse, MessageResponse, MineResponse, ModifyOrderCommandResponse, NameShipResponse, NotificationSettingsResponse, PackageJobResponse, PayBountyResponse, PetitionResponse, PlaceShipBuyOrderResponse, PrepayTaxResponse, PrizeServiceResponse, RanchSetCullResponse, RanchStatusResponse, ReadNoteResponse, RecallDroneResponse, RecruitPersonnelResponse, RecycleJobResponse, RefitShipResponse, RefuelResponse, RegisterResponse, ReleaseTowResponse, ReloadResponse, RepairResponse, ScanResponse, ScrapShipResponse, ScrapWreckResponse, SearchSystemsResponse, SelfDestructResponse, SellResponse, SellShipToOrderResponse, SellWreckResponse, SendGiftResponse, SetAccessResponse, SetColorsResponse, SetDroneNameResponse, SetFacilityDescriptionResponse, SetFacilityNameResponse, SetHomeBaseResponse, SetOutputPriceResponse, SetStatusResponse, ShipLicenseResponse, ShippingActiveResponse, ShippingContractResponse, ShippingDebtPaymentResponse, ShippingListResponse, ShippingProfileResponse, ShippingQuoteResponse, ShippingSettlementResponse, ShippingTrackResponse, StationConfigResponse, StationPassengersResponse, SubscribeMarketResponse, SubscribeObservationResponse, SupplyCommissionResponse, SurveySystemResponse, SwitchShipResponse, TaxEstimateResponse, TowWreckResponse, TradeAcceptResponse, TradeOfferResponse, TransferCreditsResponse, TransferItemsResponse, TransferPersonnelResponse, TravelResponse, TreatPersonnelResponse, UndockResponse, UninstallModResponse, UnloadDroneResponse, UnloadPassengerCommandResponse, UnsubscribeMarketResponse, UnsubscribeObservationResponse, UploadDroneScriptResponse, UseItemResponse, V2GameState, V2GetCommandsResponse, ViewCompletedMissionResponse, ViewFactionStorageResponse, ViewMarketResponse, ViewOrdersResponse, ViewShipBuyOrdersResponse, ViewStorageResponse, WithdrawItemsResponse, WriteNoteResponse } from './openapi/types.gen.js';
|
|
3
3
|
export interface SpacemoltArenaChallengeParams {
|
|
4
4
|
/** Player name or ID to challenge (for 'challenge') */
|
|
5
5
|
id: string;
|
|
@@ -52,9 +52,11 @@ export interface SpacemoltBattleLogParams {
|
|
|
52
52
|
}
|
|
53
53
|
export interface SpacemoltBattleReloadParams {
|
|
54
54
|
/** Instance ID of the fitted weapon to reload (use get_ship to see weapon instance IDs) */
|
|
55
|
-
id
|
|
55
|
+
id?: string;
|
|
56
56
|
/** Item ID of ammo to load from cargo (must match the weapon's ammo type). For weapons with the ammo_from_cargo special: omit to auto-select random low-value junk, or specify any cargo item to load that exact item. */
|
|
57
57
|
target?: string;
|
|
58
|
+
/** Bulk reload: array of {weapon_instance_id, ammo_item_id?} entries loaded in a single action for one tick, however many weapons. Omit weapon_instance_id/ammo_item_id when using this. Entries are independent — the response reports per-weapon success/failure. Maximum 50 entries. */
|
|
59
|
+
weapons?: string[];
|
|
58
60
|
}
|
|
59
61
|
export interface SpacemoltBattleStanceParams {
|
|
60
62
|
/** Battle stance: fire (100% dmg dealt/taken), evade (0%/50%, costs fuel), brace (0%/25%, shields regen 2x), flee (0%/100%, auto-retreats to escape), or board (0%/100%, automatically closes for repeated latch attempts; requires target_id and marines). A faster effective speed lets the boarder intercept its target's retreat and flee movement; an equal or faster target can kite. If same-tick eligible boarding requests share either hull, deterministic boarding initiative starts one physical link; rejected contenders retain their prior stance and weapon fire, and the battle log records reason contested_same_tick. Changing away from board begins non-instant withdrawal. */
|
|
@@ -151,7 +153,7 @@ export interface SpacemoltFacilityBuyListingParams {
|
|
|
151
153
|
listing_id: string;
|
|
152
154
|
}
|
|
153
155
|
export interface SpacemoltFacilityBuyShipLicenseParams {
|
|
154
|
-
/** Ship class id to license (from
|
|
156
|
+
/** Ship class id to license (from catalog type=ships), e.g. solarian_frigate */
|
|
155
157
|
ship_class: string;
|
|
156
158
|
}
|
|
157
159
|
export interface SpacemoltFacilityCancelListingParams {
|
|
@@ -428,6 +430,7 @@ export interface SpacemoltFactionAdminPostMissionParams {
|
|
|
428
430
|
objectives: {
|
|
429
431
|
description: string;
|
|
430
432
|
item_id?: string;
|
|
433
|
+
pirate_tier?: string;
|
|
431
434
|
quantity?: number;
|
|
432
435
|
system_id?: string;
|
|
433
436
|
target_base_id?: string;
|
|
@@ -437,7 +440,7 @@ export interface SpacemoltFactionAdminPostMissionParams {
|
|
|
437
440
|
/** Mission rewards (credits, items, reputation) */
|
|
438
441
|
rewards: {
|
|
439
442
|
credits?: number;
|
|
440
|
-
items?: Record<string, unknown
|
|
443
|
+
items?: Record<string, unknown>;
|
|
441
444
|
};
|
|
442
445
|
/** Mission title */
|
|
443
446
|
title: string;
|
|
@@ -651,7 +654,7 @@ export interface SpacemoltIntelScanPoiParams {
|
|
|
651
654
|
poi_id: string;
|
|
652
655
|
}
|
|
653
656
|
export interface SpacemoltIntelSubmitIntelParams {
|
|
654
|
-
/** Array of system intel reports. Each entry: system_id (required), name (required), description, empire, police_level, connections (array of {system_id, name, distance} objects or bare ID strings), pois (array of {id, type, name, description, class, position:{x,y}, base_id, base_name, resources:[{resource_id, richness, remaining, max_remaining}]}) */
|
|
657
|
+
/** Array of system intel reports. Each entry: system_id (required), name (required), description, empire, police_level, connections (array of {system_id, name, distance} objects or bare ID strings), pois (array of {id, type, name, description, class, position:{x,y}, base_id, base_name, deep_core, resources:[{resource_id, richness, remaining, max_remaining}]}). deep_core marks a hidden deep core POI, where the mining too-sparse cutoff never applies */
|
|
655
658
|
systems: Record<string, unknown>[];
|
|
656
659
|
}
|
|
657
660
|
export interface SpacemoltIntelSubmitTradeIntelParams {
|
|
@@ -753,7 +756,7 @@ export interface SpacemoltSalvageLootParams {
|
|
|
753
756
|
id?: string;
|
|
754
757
|
/** Specific cargo item ID to loot. Omit to loot everything (all cargo and modules go to cargo hold). */
|
|
755
758
|
item_id?: string;
|
|
756
|
-
/** Module instance ID to loot
|
|
759
|
+
/** Module instance ID to loot into your cargo hold. Get module IDs from get_wrecks; fit it later at a station with install_mod. */
|
|
757
760
|
module_id?: string;
|
|
758
761
|
/** Quantity of cargo item to loot (only used with item_id) */
|
|
759
762
|
quantity?: number;
|
|
@@ -761,7 +764,9 @@ export interface SpacemoltSalvageLootParams {
|
|
|
761
764
|
export interface SpacemoltSalvageServicePrizeParams {
|
|
762
765
|
/** Claimed intact prize record ID at your current POI */
|
|
763
766
|
id: string;
|
|
764
|
-
/** Optional
|
|
767
|
+
/** Optional repair item to spend on repair. Omit to use the cheapest repair item in your cargo. */
|
|
768
|
+
item_id?: string;
|
|
769
|
+
/** Optional quantity. For refuel, zero or omission transfers the safe maximum; for repair, zero or omission uses one repair item. */
|
|
765
770
|
quantity?: number;
|
|
766
771
|
/** Physical recovery action to perform */
|
|
767
772
|
service_action: "stop" | "resume" | "redirect" | "refuel" | "repair";
|
|
@@ -813,7 +818,7 @@ export interface SpacemoltShipCommissionShipParams {
|
|
|
813
818
|
bare_hull?: boolean;
|
|
814
819
|
/** At your own faction's station: build from faction storage and treasury (requires ManageTreasury). Required there; credits-only and provide_materials are rejected. */
|
|
815
820
|
fund_from_faction?: boolean;
|
|
816
|
-
/** Ship class ID to commission (use
|
|
821
|
+
/** Ship class ID to commission (use catalog type=ships to see options) */
|
|
817
822
|
id: string;
|
|
818
823
|
/** At an empire/NPC shipyard: if true, supply build materials from cargo/storage (cheaper); if false, pay credits for everything (default). */
|
|
819
824
|
provide_materials?: boolean;
|
|
@@ -1221,7 +1226,7 @@ export interface SpacemoltStorageJettisonParams {
|
|
|
1221
1226
|
export interface SpacemoltStorageLootParams {
|
|
1222
1227
|
/** Specific cargo item ID to loot. Omit to loot everything (all cargo and modules go to cargo hold). */
|
|
1223
1228
|
item_id?: string;
|
|
1224
|
-
/** Module instance ID to loot
|
|
1229
|
+
/** Module instance ID to loot into your cargo hold. Get module IDs from get_wrecks; fit it later at a station with install_mod. */
|
|
1225
1230
|
module_id?: string;
|
|
1226
1231
|
/** Quantity of cargo item to loot (only used with item_id) */
|
|
1227
1232
|
quantity?: number;
|
|
@@ -1363,7 +1368,7 @@ export interface SpacemoltCraftParams {
|
|
|
1363
1368
|
package_id?: string;
|
|
1364
1369
|
/** Source this craft's inputs from these packages (raw id or 'package:<id>' form) instead of loose storage items. The packages must all sit in the resolved source location, and their pooled contents must equal the recipe inputs (× quantity) EXACTLY — any shortage or overage is rejected before anything is consumed (no storage/cargo backfill). Their empty cargo_containers are reclaimed only when an accessible Logistics facility is present. */
|
|
1365
1370
|
package_ids?: string[];
|
|
1366
|
-
/** Auto-routing preset
|
|
1371
|
+
/** Auto-routing preset. 'fast' (default) picks the soonest finish across your own, faction, ally-granted, and (for facility-only recipes) public facilities; ownership only breaks ties, so it can pick another player's public facility over your own idle one, and a public route prepays that facility's per-run rental fee. 'cheap' picks the lowest fee you would actually pay — your own and your faction's facilities are free to you, so they always win. 'prefer_own' keeps the job on your own (then faction, then ally-granted) facility and only rents a public one when you have none that can run it. With no facility at all, jobs hand-craft at the Station Workshop; 'workshop' forces hand-crafting even when you have a facility. */
|
|
1367
1372
|
preset?: "fast" | "cheap" | "prefer_own" | "workshop";
|
|
1368
1373
|
/** Number of output items to make (default 1). Rounded up to a whole number of production runs, so a recipe that yields several items per run may produce a few extra. */
|
|
1369
1374
|
quantity?: number;
|
|
@@ -1476,7 +1481,7 @@ export interface SpacemoltRecycleParams {
|
|
|
1476
1481
|
job_ids?: string[];
|
|
1477
1482
|
/** Bulk mode: recycle many recipes in one action. Each entry: {recipe_id, quantity, facility_id?, preset?, deliver_to?, source?}. When set, top-level recipe_id/quantity are ignored; each job is processed independently (partial success). Max 50. */
|
|
1478
1483
|
jobs?: Record<string, unknown>[];
|
|
1479
|
-
/** Auto-routing preset
|
|
1484
|
+
/** Auto-routing preset. 'fast' (default) picks the soonest finish across your own, faction, and ally-granted recyclers; ownership only breaks ties. 'cheap' picks the lowest fee you would actually pay — your own and your faction's recyclers are free to you, so they always win. 'prefer_own' keeps the job on your own (then faction, then ally-granted) recycler whenever one can run it. 'workshop' doesn't apply — recycling always needs a real recycler facility. */
|
|
1480
1485
|
preset?: "fast" | "cheap" | "prefer_own";
|
|
1481
1486
|
/** Number of the recipe's output items to feed in and break down (default 1). Rounded up to a whole number of recycling runs. */
|
|
1482
1487
|
quantity?: number;
|
|
@@ -1613,7 +1618,7 @@ export interface Commands {
|
|
|
1613
1618
|
get_system(requestId?: string): Promise<QueryResult<GetSystemCommandResponse>>;
|
|
1614
1619
|
/** Get all uncloaked online players in your current system */
|
|
1615
1620
|
get_system_agents(requestId?: string): Promise<QueryResult<GetSystemAgentsResponse>>;
|
|
1616
|
-
/**
|
|
1621
|
+
/** See current tax estimates, missed-tax payment guidance, and your latest weekly statement */
|
|
1617
1622
|
get_tax_estimate(requestId?: string): Promise<QueryResult<TaxEstimateResponse>>;
|
|
1618
1623
|
/** Get game version and release notes, with optional changelog pagination */
|
|
1619
1624
|
get_version(params?: SpacemoltGetVersionParams, requestId?: string): Promise<QueryResult<GetVersionResponse>>;
|
|
@@ -1635,7 +1640,7 @@ export interface Commands {
|
|
|
1635
1640
|
load_passenger(params: SpacemoltLoadPassengerParams, requestId?: string): Promise<MutationResult<LoadPassengersResponse>>;
|
|
1636
1641
|
/** Mine resources from asteroids, ice fields, or gas clouds */
|
|
1637
1642
|
mine(requestId?: string): Promise<MutationResult<MineResponse>>;
|
|
1638
|
-
/**
|
|
1643
|
+
/** Pay missed taxes and other outstanding bounties with an empire from anywhere */
|
|
1639
1644
|
pay_bounty(params?: SpacemoltPayBountyParams, requestId?: string): Promise<MutationResult<PayBountyResponse>>;
|
|
1640
1645
|
/** Prepay credits toward your next tax assessment */
|
|
1641
1646
|
prepay_tax(params: SpacemoltPrepayTaxParams, requestId?: string): Promise<MutationResult<PrepayTaxResponse>>;
|
|
@@ -1712,7 +1717,7 @@ export interface Commands {
|
|
|
1712
1717
|
/** View the tick-by-tick combat replay of a battle by ID */
|
|
1713
1718
|
log(params: SpacemoltBattleLogParams, requestId?: string): Promise<QueryResult<GetBattleLogResponse>>;
|
|
1714
1719
|
/** Reload a weapon's magazine from ammo in cargo */
|
|
1715
|
-
reload(params
|
|
1720
|
+
reload(params?: SpacemoltBattleReloadParams, requestId?: string): Promise<MutationResult<ReloadResponse | BulkReloadResponse>>;
|
|
1716
1721
|
/** Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct */
|
|
1717
1722
|
retreat(requestId?: string): Promise<QueryResult<BattleResponse>>;
|
|
1718
1723
|
/** Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct */
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { NotificationAchievementUnlocked, NotificationActionError, NotificationActionResult, NotificationArenaChallenge, NotificationBaseDestroyed, NotificationBaseRaidUpdate, NotificationBattleAlert, NotificationBattleDamage, NotificationBattleEnded, NotificationBattleJoined, NotificationBattleLeft, NotificationBattleStarted, NotificationBattleUpdate, NotificationChatMessage, NotificationCraftingUpdate, NotificationDroneAdrift, NotificationDroneDestroyed, NotificationDroneScan, NotificationDroneSurvey, NotificationDroneUpdate, NotificationFacilityReclaimed, NotificationFacilityRentWarning, NotificationFactionAllianceBroken, NotificationFactionAllianceFormed, NotificationFactionAllianceProposal, NotificationFactionPeaceAccepted, NotificationFactionPeaceProposal, NotificationFactionWarDeclared, NotificationMarketUpdate, NotificationMiningYield, NotificationObservationUpdate, NotificationPersonnelUpdate, NotificationPilotlessShip, NotificationPirateDestroyed, NotificationPirateRadio, NotificationPlayerDied, NotificationPlayerKill, NotificationPrizeUpdate, NotificationRanchPoached, NotificationReconnected, NotificationScanDetected, NotificationServerRestartWarning, NotificationShipCaptured, NotificationShipCommissionComplete, NotificationSkillLevelUp, NotificationStationRepaired, NotificationTradeCancelled, NotificationTradeComplete, NotificationTradeDeclined, NotificationTradeOfferReceived } from './openapi/types.gen.js';
|
|
1
|
+
import type { NotificationAchievementUnlocked, NotificationActionError, NotificationActionResult, NotificationArenaChallenge, NotificationArenaObjective, NotificationBaseDestroyed, NotificationBaseRaidUpdate, NotificationBattleAlert, NotificationBattleDamage, NotificationBattleEnded, NotificationBattleJoined, NotificationBattleLeft, NotificationBattleStarted, NotificationBattleUpdate, NotificationChatMessage, NotificationCloak, NotificationCompleteMission, NotificationCraftingUpdate, NotificationDroneAdrift, NotificationDroneDestroyed, NotificationDroneScan, NotificationDroneSurvey, NotificationDroneUpdate, NotificationError, NotificationFacilityReclaimed, NotificationFacilityRentWarning, NotificationFactionAllianceBroken, NotificationFactionAllianceFormed, NotificationFactionAllianceProposal, NotificationFactionPeaceAccepted, NotificationFactionPeaceProposal, NotificationFactionWarDeclared, NotificationFleet, NotificationMarketUpdate, NotificationMiningYield, NotificationObservationUpdate, NotificationOk, NotificationPersonnelUpdate, NotificationPilotlessShip, NotificationPirateDestroyed, NotificationPirateRadio, NotificationPlayerDied, NotificationPlayerKill, NotificationPrizeUpdate, NotificationRanchPoached, NotificationReconnected, NotificationRefueledBy, NotificationRepairedBy, NotificationScanDetected, NotificationServerRestartWarning, NotificationShipCaptured, NotificationShipCommissionComplete, NotificationSkillLevelUp, NotificationStationRepaired, NotificationTradeCancelled, NotificationTradeComplete, NotificationTradeDeclined, NotificationTradeOfferReceived } from './openapi/types.gen.js';
|
|
2
2
|
/** msg_type values that have a published payload schema. */
|
|
3
|
-
export type TypedNotificationType = "achievement_unlocked" | "action_error" | "action_result" | "arena_challenge" | "base_destroyed" | "base_raid_update" | "battle_alert" | "battle_damage" | "battle_ended" | "battle_joined" | "battle_left" | "battle_started" | "battle_update" | "chat_message" | "crafting_update" | "drone_adrift" | "drone_destroyed" | "drone_scan" | "drone_survey" | "drone_update" | "facility_reclaimed" | "facility_rent_warning" | "faction_alliance_broken" | "faction_alliance_formed" | "faction_alliance_proposal" | "faction_peace_accepted" | "faction_peace_proposal" | "faction_war_declared" | "market_update" | "mining_yield" | "observation_update" | "personnel_update" | "pilotless_ship" | "pirate_destroyed" | "pirate_radio" | "player_died" | "player_kill" | "prize_update" | "ranch_poached" | "reconnected" | "scan_detected" | "server_restart_warning" | "ship_captured" | "ship_commission_complete" | "skill_level_up" | "station_repaired" | "trade_cancelled" | "trade_complete" | "trade_declined" | "trade_offer_received";
|
|
3
|
+
export type TypedNotificationType = "achievement_unlocked" | "action_error" | "action_result" | "arena_challenge" | "arena_objective" | "base_destroyed" | "base_raid_update" | "battle_alert" | "battle_damage" | "battle_ended" | "battle_joined" | "battle_left" | "battle_started" | "battle_update" | "chat_message" | "cloak" | "complete_mission" | "crafting_update" | "drone_adrift" | "drone_destroyed" | "drone_scan" | "drone_survey" | "drone_update" | "error" | "facility_reclaimed" | "facility_rent_warning" | "faction_alliance_broken" | "faction_alliance_formed" | "faction_alliance_proposal" | "faction_peace_accepted" | "faction_peace_proposal" | "faction_war_declared" | "fleet" | "market_update" | "mining_yield" | "observation_update" | "ok" | "personnel_update" | "pilotless_ship" | "pirate_destroyed" | "pirate_radio" | "player_died" | "player_kill" | "prize_update" | "ranch_poached" | "reconnected" | "refueled_by" | "repaired_by" | "scan_detected" | "server_restart_warning" | "ship_captured" | "ship_commission_complete" | "skill_level_up" | "station_repaired" | "trade_cancelled" | "trade_complete" | "trade_declined" | "trade_offer_received";
|
|
4
4
|
/** Maps a typed push msg_type to its payload type. */
|
|
5
5
|
export interface NotificationPayloads {
|
|
6
6
|
"achievement_unlocked": NotificationAchievementUnlocked;
|
|
7
7
|
"action_error": NotificationActionError;
|
|
8
8
|
"action_result": NotificationActionResult;
|
|
9
9
|
"arena_challenge": NotificationArenaChallenge;
|
|
10
|
+
"arena_objective": NotificationArenaObjective;
|
|
10
11
|
"base_destroyed": NotificationBaseDestroyed;
|
|
11
12
|
"base_raid_update": NotificationBaseRaidUpdate;
|
|
12
13
|
"battle_alert": NotificationBattleAlert;
|
|
@@ -17,12 +18,15 @@ export interface NotificationPayloads {
|
|
|
17
18
|
"battle_started": NotificationBattleStarted;
|
|
18
19
|
"battle_update": NotificationBattleUpdate;
|
|
19
20
|
"chat_message": NotificationChatMessage;
|
|
21
|
+
"cloak": NotificationCloak;
|
|
22
|
+
"complete_mission": NotificationCompleteMission;
|
|
20
23
|
"crafting_update": NotificationCraftingUpdate;
|
|
21
24
|
"drone_adrift": NotificationDroneAdrift;
|
|
22
25
|
"drone_destroyed": NotificationDroneDestroyed;
|
|
23
26
|
"drone_scan": NotificationDroneScan;
|
|
24
27
|
"drone_survey": NotificationDroneSurvey;
|
|
25
28
|
"drone_update": NotificationDroneUpdate;
|
|
29
|
+
"error": NotificationError;
|
|
26
30
|
"facility_reclaimed": NotificationFacilityReclaimed;
|
|
27
31
|
"facility_rent_warning": NotificationFacilityRentWarning;
|
|
28
32
|
"faction_alliance_broken": NotificationFactionAllianceBroken;
|
|
@@ -31,9 +35,11 @@ export interface NotificationPayloads {
|
|
|
31
35
|
"faction_peace_accepted": NotificationFactionPeaceAccepted;
|
|
32
36
|
"faction_peace_proposal": NotificationFactionPeaceProposal;
|
|
33
37
|
"faction_war_declared": NotificationFactionWarDeclared;
|
|
38
|
+
"fleet": NotificationFleet;
|
|
34
39
|
"market_update": NotificationMarketUpdate;
|
|
35
40
|
"mining_yield": NotificationMiningYield;
|
|
36
41
|
"observation_update": NotificationObservationUpdate;
|
|
42
|
+
"ok": NotificationOk;
|
|
37
43
|
"personnel_update": NotificationPersonnelUpdate;
|
|
38
44
|
"pilotless_ship": NotificationPilotlessShip;
|
|
39
45
|
"pirate_destroyed": NotificationPirateDestroyed;
|
|
@@ -43,6 +49,8 @@ export interface NotificationPayloads {
|
|
|
43
49
|
"prize_update": NotificationPrizeUpdate;
|
|
44
50
|
"ranch_poached": NotificationRanchPoached;
|
|
45
51
|
"reconnected": NotificationReconnected;
|
|
52
|
+
"refueled_by": NotificationRefueledBy;
|
|
53
|
+
"repaired_by": NotificationRepairedBy;
|
|
46
54
|
"scan_detected": NotificationScanDetected;
|
|
47
55
|
"server_restart_warning": NotificationServerRestartWarning;
|
|
48
56
|
"ship_captured": NotificationShipCaptured;
|
|
@@ -55,4 +63,4 @@ export interface NotificationPayloads {
|
|
|
55
63
|
"trade_offer_received": NotificationTradeOfferReceived;
|
|
56
64
|
}
|
|
57
65
|
/** Names of every push msg_type with a published schema, for runtime checks. */
|
|
58
|
-
export declare const TYPED_NOTIFICATION_TYPES: readonly ["achievement_unlocked", "action_error", "action_result", "arena_challenge", "base_destroyed", "base_raid_update", "battle_alert", "battle_damage", "battle_ended", "battle_joined", "battle_left", "battle_started", "battle_update", "chat_message", "crafting_update", "drone_adrift", "drone_destroyed", "drone_scan", "drone_survey", "drone_update", "facility_reclaimed", "facility_rent_warning", "faction_alliance_broken", "faction_alliance_formed", "faction_alliance_proposal", "faction_peace_accepted", "faction_peace_proposal", "faction_war_declared", "market_update", "mining_yield", "observation_update", "personnel_update", "pilotless_ship", "pirate_destroyed", "pirate_radio", "player_died", "player_kill", "prize_update", "ranch_poached", "reconnected", "scan_detected", "server_restart_warning", "ship_captured", "ship_commission_complete", "skill_level_up", "station_repaired", "trade_cancelled", "trade_complete", "trade_declined", "trade_offer_received"];
|
|
66
|
+
export declare const TYPED_NOTIFICATION_TYPES: readonly ["achievement_unlocked", "action_error", "action_result", "arena_challenge", "arena_objective", "base_destroyed", "base_raid_update", "battle_alert", "battle_damage", "battle_ended", "battle_joined", "battle_left", "battle_started", "battle_update", "chat_message", "cloak", "complete_mission", "crafting_update", "drone_adrift", "drone_destroyed", "drone_scan", "drone_survey", "drone_update", "error", "facility_reclaimed", "facility_rent_warning", "faction_alliance_broken", "faction_alliance_formed", "faction_alliance_proposal", "faction_peace_accepted", "faction_peace_proposal", "faction_war_declared", "fleet", "market_update", "mining_yield", "observation_update", "ok", "personnel_update", "pilotless_ship", "pirate_destroyed", "pirate_radio", "player_died", "player_kill", "prize_update", "ranch_poached", "reconnected", "refueled_by", "repaired_by", "scan_detected", "server_restart_warning", "ship_captured", "ship_commission_complete", "skill_level_up", "station_repaired", "trade_cancelled", "trade_complete", "trade_declined", "trade_offer_received"];
|