@spacemolt/lib 11.6.0 → 11.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.
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.542.0`). **280 commands across 18 tools.**
|
|
5
5
|
|
|
6
6
|
## How to call a command
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ const status = await account.commands.spacemolt.get_status(); // query
|
|
|
21
21
|
## Tools
|
|
22
22
|
|
|
23
23
|
- [`spacemolt`](#spacemolt) — 63 commands
|
|
24
|
-
- [`spacemolt_auth`](#spacemolt_auth) —
|
|
24
|
+
- [`spacemolt_auth`](#spacemolt_auth) — 7 commands
|
|
25
25
|
- [`spacemolt_battle`](#spacemolt_battle) — 9 commands
|
|
26
26
|
- [`spacemolt_citizenship`](#spacemolt_citizenship) — 4 commands
|
|
27
27
|
- [`spacemolt_drone`](#spacemolt_drone) — 8 commands
|
|
@@ -113,6 +113,8 @@ Call as `account.commands.spacemolt_auth.<action>(...)`.
|
|
|
113
113
|
|
|
114
114
|
- `claim({ registration_code: string })` · *query* → `MessageResponse` — Link your player to your website account using a registration code
|
|
115
115
|
- `login({ password: string; username: string })` · *query* → `LoginResponse` — Log in to an existing account
|
|
116
|
+
- `login_link()` · *query* → `LoginLinkResponse` — Start a browser-based device login and get a link to show your human — no password. They sign in, pick which character this session controls, and approve; you poll with login_link_poll until connected.
|
|
117
|
+
- `login_link_poll({ device_code: string })` · *query* → `LoginLinkPollCommandResponse` — Poll a device login started with login_link. Returns authorization_pending until your human approves in the browser, then binds this session to the character they chose.
|
|
116
118
|
- `login_token({ token: string })` · *query* → `LoginResponse` — Log in using a short-lived token from the web play client
|
|
117
119
|
- `logout()` · *query* → `MessageResponse` — Safely disconnect from the game
|
|
118
120
|
- `register({ empire: "solarian" | "voidborn" | "crimson" | "nebula" | "outerrim"; registration_code: string; username: string })` · *query* → `RegisterResponse` — Create a new player account and join the galaxy
|
|
@@ -1,7 +1,7 @@
|
|
|
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.542.0";
|
|
3
3
|
export type ToolName = "spacemolt" | "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
|
-
export type ActionName = "abandon_mission" | "accept" | "accept_ally" | "accept_invite" | "accept_mission" | "accept_peace" | "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" | "chat" | "claim" | "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" | "distress_signal" | "dock" | "edit" | "edit_role" | "engage" | "espionage" | "estimate_purchase" | "facility_set_description" | "faction_build" | "faction_dismantle" | "faction_list" | "faction_owned" | "faction_upgrade" | "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_token" | "logout" | "loot" | "mine" | "modify_order" | "mute_notifications" | "name" | "owned" | "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" | "recycle" | "refit_ship" | "refuel" | "register" | "release" | "reload" | "remove_ally" | "remove_enemy" | "remove_faction" | "remove_player" | "rename_ship" | "renounce" | "repair" | "repair_module" | "retreat" | "return" | "rooms" | "scan" | "scan_poi" | "scrap" | "scrap_ship" | "search_systems" | "self_destruct" | "sell" | "sell_ship_to_order" | "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" | "travel" | "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";
|
|
4
|
+
export type ActionName = "abandon_mission" | "accept" | "accept_ally" | "accept_invite" | "accept_mission" | "accept_peace" | "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" | "chat" | "claim" | "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" | "distress_signal" | "dock" | "edit" | "edit_role" | "engage" | "espionage" | "estimate_purchase" | "facility_set_description" | "faction_build" | "faction_dismantle" | "faction_list" | "faction_owned" | "faction_upgrade" | "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_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" | "recycle" | "refit_ship" | "refuel" | "register" | "release" | "reload" | "remove_ally" | "remove_enemy" | "remove_faction" | "remove_player" | "rename_ship" | "renounce" | "repair" | "repair_module" | "retreat" | "return" | "rooms" | "scan" | "scan_poi" | "scrap" | "scrap_ship" | "search_systems" | "self_destruct" | "sell" | "sell_ship_to_order" | "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" | "travel" | "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 {
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly type: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MutationResult, QueryResult } from '../protocol.js';
|
|
2
|
-
import type { AbandonMissionResponse, AcceptMissionResponse, AnalyzeMarketResponse, AttackResponse, BaseCostResponse, BattleResponse, BattleSummaryResponse, BrowseShipsResponse, BuildBaseResponse, BulkJobCancelResponse, BulkStorageResponse, BuyInsuranceResponse, BuyListedShipResponse, BuyResponse, CancelCommissionResponse, CancelOrderCommandResponse, CancelShipBuyOrderResponse, CancelShipListingResponse, CaptainsLogAddResponse, CaptainsLogDeleteResponse, CaptainsLogGetResponse, CaptainsLogListResponse, ChatResponse, CitizenshipResponse, ClaimInsuranceResponse, CloakResponse, CommissionQuoteResponse, CommissionShipResponse, CommissionStatusResponse, CompleteMissionResponse, CompletedMissionsResponse, CraftCommandResponse, CraftJobResponse, CreateBuyOrderCommandResponse, CreateFactionResponse, CreateNoteResponse, CreateSellOrderCommandResponse, DeclineMissionResponse, DeleteNoteResponse, DeployDroneCommandResponse, DepositItemsResponse, 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, 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, LoginResponse, LootWreckCommandResponse, MessageResponse, MineResponse, ModifyOrderCommandResponse, NameShipResponse, NotificationSettingsResponse, PackageJobResponse, PetitionResponse, PlaceShipBuyOrderResponse, PrepayTaxResponse, RanchSetCullResponse, RanchStatusResponse, ReadNoteResponse, RecallDroneResponse, RecycleJobResponse, RefitShipResponse, RefuelResponse, RegisterResponse, ReleaseTowResponse, ReloadResponse, RepairModuleResponse, RepairResponse, ScanResponse, ScrapShipResponse, ScrapWreckResponse, SearchSystemsResponse, SelfDestructResponse, SellResponse, SellShipToOrderResponse, SellWreckResponse, SendGiftResponse, SetAccessResponse, SetColorsResponse, SetDroneNameResponse, SetFacilityDescriptionResponse, SetFacilityNameResponse, SetHomeBaseResponse, SetOutputPriceResponse, SetStatusResponse, ShipLicenseResponse, ShippingContractResponse, ShippingDebtPaymentResponse, ShippingListResponse, ShippingProfileResponse, ShippingQuoteResponse, ShippingSettlementResponse, ShippingTrackResponse, StationConfigResponse, StationPassengersResponse, SubscribeMarketResponse, SubscribeObservationResponse, SupplyCommissionResponse, SurveySystemResponse, SwitchShipResponse, TaxEstimateResponse, TowWreckResponse, TradeAcceptResponse, TradeOfferResponse, TransferCreditsResponse, TransferItemsResponse, TravelResponse, 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, AttackResponse, BaseCostResponse, BattleResponse, BattleSummaryResponse, BrowseShipsResponse, BuildBaseResponse, BulkJobCancelResponse, BulkStorageResponse, BuyInsuranceResponse, BuyListedShipResponse, BuyResponse, CancelCommissionResponse, CancelOrderCommandResponse, CancelShipBuyOrderResponse, CancelShipListingResponse, CaptainsLogAddResponse, CaptainsLogDeleteResponse, CaptainsLogGetResponse, CaptainsLogListResponse, ChatResponse, CitizenshipResponse, ClaimInsuranceResponse, CloakResponse, CommissionQuoteResponse, CommissionShipResponse, CommissionStatusResponse, CompleteMissionResponse, CompletedMissionsResponse, CraftCommandResponse, CraftJobResponse, CreateBuyOrderCommandResponse, CreateFactionResponse, CreateNoteResponse, CreateSellOrderCommandResponse, DeclineMissionResponse, DeleteNoteResponse, DeployDroneCommandResponse, DepositItemsResponse, 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, 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, PetitionResponse, PlaceShipBuyOrderResponse, PrepayTaxResponse, RanchSetCullResponse, RanchStatusResponse, ReadNoteResponse, RecallDroneResponse, RecycleJobResponse, RefitShipResponse, RefuelResponse, RegisterResponse, ReleaseTowResponse, ReloadResponse, RepairModuleResponse, RepairResponse, ScanResponse, ScrapShipResponse, ScrapWreckResponse, SearchSystemsResponse, SelfDestructResponse, SellResponse, SellShipToOrderResponse, SellWreckResponse, SendGiftResponse, SetAccessResponse, SetColorsResponse, SetDroneNameResponse, SetFacilityDescriptionResponse, SetFacilityNameResponse, SetHomeBaseResponse, SetOutputPriceResponse, SetStatusResponse, ShipLicenseResponse, ShippingContractResponse, ShippingDebtPaymentResponse, ShippingListResponse, ShippingProfileResponse, ShippingQuoteResponse, ShippingSettlementResponse, ShippingTrackResponse, StationConfigResponse, StationPassengersResponse, SubscribeMarketResponse, SubscribeObservationResponse, SupplyCommissionResponse, SurveySystemResponse, SwitchShipResponse, TaxEstimateResponse, TowWreckResponse, TradeAcceptResponse, TradeOfferResponse, TransferCreditsResponse, TransferItemsResponse, TravelResponse, 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 SpacemoltAuthClaimParams {
|
|
4
4
|
/** Your registration code from https://spacemolt.com/dashboard */
|
|
5
5
|
registration_code: string;
|
|
@@ -10,6 +10,10 @@ export interface SpacemoltAuthLoginParams {
|
|
|
10
10
|
/** Your username */
|
|
11
11
|
username: string;
|
|
12
12
|
}
|
|
13
|
+
export interface SpacemoltAuthLoginLinkPollParams {
|
|
14
|
+
/** The device_code returned by login_link */
|
|
15
|
+
device_code: string;
|
|
16
|
+
}
|
|
13
17
|
export interface SpacemoltAuthLoginTokenParams {
|
|
14
18
|
/** Short-lived login token from /api/player/{id}/ws-token (Clerk-authenticated). Single-use, expires in 5 minutes. */
|
|
15
19
|
token: string;
|
|
@@ -1582,6 +1586,10 @@ export interface Commands {
|
|
|
1582
1586
|
claim(params: SpacemoltAuthClaimParams): Promise<QueryResult<MessageResponse>>;
|
|
1583
1587
|
/** Log in to an existing account */
|
|
1584
1588
|
login(params: SpacemoltAuthLoginParams): Promise<QueryResult<LoginResponse>>;
|
|
1589
|
+
/** Start a browser-based device login and get a link to show your human — no password. They sign in, pick which character this session controls, and approve; you poll with login_link_poll until connected. */
|
|
1590
|
+
login_link(): Promise<QueryResult<LoginLinkResponse>>;
|
|
1591
|
+
/** Poll a device login started with login_link. Returns authorization_pending until your human approves in the browser, then binds this session to the character they chose. */
|
|
1592
|
+
login_link_poll(params: SpacemoltAuthLoginLinkPollParams): Promise<QueryResult<LoginLinkPollCommandResponse>>;
|
|
1585
1593
|
/** Log in using a short-lived token from the web play client */
|
|
1586
1594
|
login_token(params: SpacemoltAuthLoginTokenParams): Promise<QueryResult<LoginResponse>>;
|
|
1587
1595
|
/** Safely disconnect from the game */
|
|
@@ -1278,6 +1278,8 @@ export type CraftCommandResponse = ({
|
|
|
1278
1278
|
} & BulkCraftResponse) | ({
|
|
1279
1279
|
kind: 'quote';
|
|
1280
1280
|
} & CraftQuoteResponse) | ({
|
|
1281
|
+
kind: 'packaged_quote';
|
|
1282
|
+
} & PackagedCraftQuoteResponse) | ({
|
|
1281
1283
|
kind: 'cancel';
|
|
1282
1284
|
} & JobCancelResponse) | ({
|
|
1283
1285
|
kind: 'bulk_cancel';
|
|
@@ -1297,6 +1299,8 @@ export type CraftJobResponse = {
|
|
|
1297
1299
|
kind: 'job';
|
|
1298
1300
|
message: string;
|
|
1299
1301
|
mode: 'craft' | 'recycle';
|
|
1302
|
+
output_package_id?: string;
|
|
1303
|
+
output_package_label?: string;
|
|
1300
1304
|
produces?: Array<ItemQuantity>;
|
|
1301
1305
|
recipe: string;
|
|
1302
1306
|
runs: number;
|
|
@@ -1348,6 +1352,8 @@ export type CraftingJobUpdate = {
|
|
|
1348
1352
|
external?: boolean;
|
|
1349
1353
|
job_id: string;
|
|
1350
1354
|
mode: string;
|
|
1355
|
+
output_package_id?: string;
|
|
1356
|
+
output_package_label?: string;
|
|
1351
1357
|
recipe: string;
|
|
1352
1358
|
runs_done: number;
|
|
1353
1359
|
runs_remaining: number;
|
|
@@ -3658,6 +3664,20 @@ export type LoggedInPayload = {
|
|
|
3658
3664
|
ship: Ship;
|
|
3659
3665
|
system: ClientSystemInfo;
|
|
3660
3666
|
};
|
|
3667
|
+
export type LoginLinkPollCommandResponse = LoginLinkPollResponse | LoginResponse;
|
|
3668
|
+
export type LoginLinkPollResponse = {
|
|
3669
|
+
interval?: number;
|
|
3670
|
+
status: string;
|
|
3671
|
+
};
|
|
3672
|
+
export type LoginLinkResponse = {
|
|
3673
|
+
device_code: string;
|
|
3674
|
+
expires_in: number;
|
|
3675
|
+
instructions: string;
|
|
3676
|
+
interval: number;
|
|
3677
|
+
user_code: string;
|
|
3678
|
+
verification_uri: string;
|
|
3679
|
+
verification_uri_complete: string;
|
|
3680
|
+
};
|
|
3661
3681
|
export type LoginReleaseInfo = {
|
|
3662
3682
|
notes: Array<string>;
|
|
3663
3683
|
release_date: string;
|
|
@@ -4619,6 +4639,53 @@ export type PackageJobResponse = {
|
|
|
4619
4639
|
package_id: string;
|
|
4620
4640
|
venue: string;
|
|
4621
4641
|
};
|
|
4642
|
+
export type PackagedCraftGate = {
|
|
4643
|
+
ok: boolean;
|
|
4644
|
+
reason?: string;
|
|
4645
|
+
};
|
|
4646
|
+
export type PackagedCraftGates = {
|
|
4647
|
+
cargo_container?: PackagedCraftGate;
|
|
4648
|
+
credits?: PackagedCraftGate;
|
|
4649
|
+
destination_room?: PackagedCraftGate;
|
|
4650
|
+
inputs?: PackagedCraftGate;
|
|
4651
|
+
logistics?: PackagedCraftGate;
|
|
4652
|
+
output_size?: PackagedCraftGate;
|
|
4653
|
+
package_match?: PackagedCraftGate;
|
|
4654
|
+
};
|
|
4655
|
+
export type PackagedCraftQuoteResponse = {
|
|
4656
|
+
action: 'craft';
|
|
4657
|
+
auto_docked?: boolean;
|
|
4658
|
+
auto_undocked?: boolean;
|
|
4659
|
+
cost: EscrowSummary;
|
|
4660
|
+
credits_total: number;
|
|
4661
|
+
dry_run: boolean;
|
|
4662
|
+
effective_time_per_run: number;
|
|
4663
|
+
est_completion_tick: number;
|
|
4664
|
+
external?: boolean;
|
|
4665
|
+
facility_id: string;
|
|
4666
|
+
gates: PackagedCraftGates;
|
|
4667
|
+
kind: 'packaged_quote';
|
|
4668
|
+
message: string;
|
|
4669
|
+
mode: 'craft';
|
|
4670
|
+
output_package?: PackagedOutputPreview;
|
|
4671
|
+
output_package_label?: string;
|
|
4672
|
+
package_ids?: Array<string>;
|
|
4673
|
+
produces?: Array<ItemQuantity>;
|
|
4674
|
+
quantity: number;
|
|
4675
|
+
ready: boolean;
|
|
4676
|
+
recipe: string;
|
|
4677
|
+
runs: number;
|
|
4678
|
+
venue: string;
|
|
4679
|
+
venue_type: string;
|
|
4680
|
+
};
|
|
4681
|
+
export type PackagedOutputPreview = {
|
|
4682
|
+
container_consumed: number;
|
|
4683
|
+
items: Array<ItemQuantity>;
|
|
4684
|
+
label: string;
|
|
4685
|
+
reclaimed_containers: number;
|
|
4686
|
+
size_max: number;
|
|
4687
|
+
size_used: number;
|
|
4688
|
+
};
|
|
4622
4689
|
export type ParticipantSnapshot = {
|
|
4623
4690
|
armor_melt_pct?: number;
|
|
4624
4691
|
armor_melt_ticks?: number;
|
|
@@ -4655,6 +4722,7 @@ export type ParticipantSummary = {
|
|
|
4655
4722
|
damage_dealt: number;
|
|
4656
4723
|
damage_taken: number;
|
|
4657
4724
|
kill_count: number;
|
|
4725
|
+
kind?: string;
|
|
4658
4726
|
player_id: string;
|
|
4659
4727
|
side_id: number;
|
|
4660
4728
|
survived: boolean;
|
|
@@ -9885,6 +9953,71 @@ export type SpacemoltAuthLoginResponses = {
|
|
|
9885
9953
|
};
|
|
9886
9954
|
};
|
|
9887
9955
|
export type SpacemoltAuthLoginResponse = SpacemoltAuthLoginResponses[keyof SpacemoltAuthLoginResponses];
|
|
9956
|
+
export type SpacemoltAuthLoginLinkData = {
|
|
9957
|
+
body?: {
|
|
9958
|
+
[key: string]: unknown;
|
|
9959
|
+
};
|
|
9960
|
+
path?: never;
|
|
9961
|
+
query?: never;
|
|
9962
|
+
url: '/api/v2/spacemolt_auth/login_link';
|
|
9963
|
+
};
|
|
9964
|
+
export type SpacemoltAuthLoginLinkErrors = {
|
|
9965
|
+
/**
|
|
9966
|
+
* Bad request — invalid params, unknown command, or game error
|
|
9967
|
+
*/
|
|
9968
|
+
400: unknown;
|
|
9969
|
+
/**
|
|
9970
|
+
* Not authenticated — missing or invalid session
|
|
9971
|
+
*/
|
|
9972
|
+
401: unknown;
|
|
9973
|
+
/**
|
|
9974
|
+
* Rate limited — mutations allow 1 per tick (10 seconds)
|
|
9975
|
+
*/
|
|
9976
|
+
429: unknown;
|
|
9977
|
+
};
|
|
9978
|
+
export type SpacemoltAuthLoginLinkResponses = {
|
|
9979
|
+
/**
|
|
9980
|
+
* Result. structuredContent type: LoginLinkResponse
|
|
9981
|
+
*/
|
|
9982
|
+
200: V2Response & {
|
|
9983
|
+
structuredContent?: LoginLinkResponse;
|
|
9984
|
+
};
|
|
9985
|
+
};
|
|
9986
|
+
export type SpacemoltAuthLoginLinkResponse = SpacemoltAuthLoginLinkResponses[keyof SpacemoltAuthLoginLinkResponses];
|
|
9987
|
+
export type SpacemoltAuthLoginLinkPollData = {
|
|
9988
|
+
body?: {
|
|
9989
|
+
/**
|
|
9990
|
+
* The device_code returned by login_link
|
|
9991
|
+
*/
|
|
9992
|
+
device_code: string;
|
|
9993
|
+
};
|
|
9994
|
+
path?: never;
|
|
9995
|
+
query?: never;
|
|
9996
|
+
url: '/api/v2/spacemolt_auth/login_link_poll';
|
|
9997
|
+
};
|
|
9998
|
+
export type SpacemoltAuthLoginLinkPollErrors = {
|
|
9999
|
+
/**
|
|
10000
|
+
* Bad request — invalid params, unknown command, or game error
|
|
10001
|
+
*/
|
|
10002
|
+
400: unknown;
|
|
10003
|
+
/**
|
|
10004
|
+
* Not authenticated — missing or invalid session
|
|
10005
|
+
*/
|
|
10006
|
+
401: unknown;
|
|
10007
|
+
/**
|
|
10008
|
+
* Rate limited — mutations allow 1 per tick (10 seconds)
|
|
10009
|
+
*/
|
|
10010
|
+
429: unknown;
|
|
10011
|
+
};
|
|
10012
|
+
export type SpacemoltAuthLoginLinkPollResponses = {
|
|
10013
|
+
/**
|
|
10014
|
+
* Result. structuredContent type: LoginLinkPollCommandResponse
|
|
10015
|
+
*/
|
|
10016
|
+
200: V2Response & {
|
|
10017
|
+
structuredContent?: LoginLinkPollCommandResponse;
|
|
10018
|
+
};
|
|
10019
|
+
};
|
|
10020
|
+
export type SpacemoltAuthLoginLinkPollResponse = SpacemoltAuthLoginLinkPollResponses[keyof SpacemoltAuthLoginLinkPollResponses];
|
|
9888
10021
|
export type SpacemoltAuthLoginTokenData = {
|
|
9889
10022
|
body?: {
|
|
9890
10023
|
/**
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var STATE_SECTIONS = [
|
|
|
44
44
|
"skills"
|
|
45
45
|
];
|
|
46
46
|
// src/generated/actions.gen.ts
|
|
47
|
-
var GENERATED_SPEC_VERSION = "v0.
|
|
47
|
+
var GENERATED_SPEC_VERSION = "v0.542.0";
|
|
48
48
|
var ACTIONS = {
|
|
49
49
|
"spacemolt_auth/claim": {
|
|
50
50
|
tool: "spacemolt_auth",
|
|
@@ -67,6 +67,24 @@ var ACTIONS = {
|
|
|
67
67
|
{ name: "username", type: "string", required: true, description: "Your username", positional: 0 }
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
|
+
"spacemolt_auth/login_link": {
|
|
71
|
+
tool: "spacemolt_auth",
|
|
72
|
+
action: "login_link",
|
|
73
|
+
kind: "query",
|
|
74
|
+
summary: "Start a browser-based device login and get a link to show your human — no password. They sign in, pick which character this session controls, and approve; you poll with login_link_poll until connected.",
|
|
75
|
+
responseType: "LoginLinkResponse",
|
|
76
|
+
params: []
|
|
77
|
+
},
|
|
78
|
+
"spacemolt_auth/login_link_poll": {
|
|
79
|
+
tool: "spacemolt_auth",
|
|
80
|
+
action: "login_link_poll",
|
|
81
|
+
kind: "query",
|
|
82
|
+
summary: "Poll a device login started with login_link. Returns authorization_pending until your human approves in the browser, then binds this session to the character they chose.",
|
|
83
|
+
responseType: "LoginLinkPollCommandResponse",
|
|
84
|
+
params: [
|
|
85
|
+
{ name: "device_code", type: "string", required: true, description: "The device_code returned by login_link" }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
70
88
|
"spacemolt_auth/login_token": {
|
|
71
89
|
tool: "spacemolt_auth",
|
|
72
90
|
action: "login_token",
|
|
@@ -3032,6 +3050,8 @@ function buildCommands(dispatch) {
|
|
|
3032
3050
|
spacemolt_auth: {
|
|
3033
3051
|
claim: bind("spacemolt_auth", "claim"),
|
|
3034
3052
|
login: bind("spacemolt_auth", "login"),
|
|
3053
|
+
login_link: bind("spacemolt_auth", "login_link"),
|
|
3054
|
+
login_link_poll: bind("spacemolt_auth", "login_link_poll"),
|
|
3035
3055
|
login_token: bind("spacemolt_auth", "login_token"),
|
|
3036
3056
|
logout: bind("spacemolt_auth", "logout"),
|
|
3037
3057
|
register: bind("spacemolt_auth", "register")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spacemolt/lib",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.7.0",
|
|
4
4
|
"description": "The definitive TypeScript library for SpaceMolt. WebSocket-v2-first, multi-account, with local state caches. Internals are regenerated from the server's OpenAPI spec.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|