diff --git a/models/ShipModule.json b/models/ShipModule.json index 813c9b2..05139e1 100644 --- a/models/ShipModule.json +++ b/models/ShipModule.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "A module can be installed in a ship and provides a set of capabilities such as storage space or quarters for crew.", + "description": "A module can be installed in a ship and provides a set of capabilities such as storage space or quarters for crew. Module installations are permanent.", "properties": { "symbol": { "type": "string", @@ -11,6 +11,8 @@ "MODULE_ENVOY_QUARTERS_I", "MODULE_PASSENGER_CABIN_I", "MODULE_MICRO_REFINERY_I", + "MODULE_ORE_REFINERY_I", + "MODULE_FUEL_REFINERY_I", "MODULE_SCIENCE_LAB_I", "MODULE_JUMP_DRIVE_I", "MODULE_JUMP_DRIVE_II", diff --git a/models/ShipType.json b/models/ShipType.json index 0642999..15b8e21 100644 --- a/models/ShipType.json +++ b/models/ShipType.json @@ -10,6 +10,7 @@ "SHIP_EXPLORER", "SHIP_HEAVY_FREIGHTER", "SHIP_LIGHT_SHUTTLE", - "SHIP_ORE_HOUND" + "SHIP_ORE_HOUND", + "SHIP_REFINING_FREIGHTER" ] } \ No newline at end of file diff --git a/models/TradeGood.json b/models/TradeGood.json index e7224e6..e1af4ee 100644 --- a/models/TradeGood.json +++ b/models/TradeGood.json @@ -1,120 +1,19 @@ { - "symbol": { - "type": "string", - "enum": [ - "PRECIOUS_STONES", - "QUARTZ_SAND", - "SILICON_CRYSTALS", - "AMMONIA_ICE", - "LIQUID_HYDROGEN", - "LIQUID_NITROGEN", - "ICE_WATER", - "EXOTIC_MATTER", - "ADVANCED_CIRCUITRY", - "GRAVITON_EMITTERS", - "IRON", - "IRON_ORE", - "COPPER", - "COPPER_ORE", - "ALUMINUM", - "ALUMINUM_ORE", - "SILVER", - "SILVER_ORE", - "GOLD", - "GOLD_ORE", - "PLATINUM", - "PLATINUM_ORE", - "DIAMONDS", - "URANITE", - "URANITE_ORE", - "MERITIUM", - "MERITIUM_ORE", - "HYDROCARBON", - "ANTIMATTER", - "FERTILIZERS", - "FABRICS", - "FOOD", - "JEWELRY", - "MACHINERY", - "FIREARMS", - "ASSAULT_RIFLES", - "MILITARY_EQUIPMENT", - "EXPLOSIVES", - "LAB_INSTRUMENTS", - "AMMUNITION", - "ELECTRONICS", - "SHIP_PLATING", - "EQUIPMENT", - "FUEL", - "MEDICINE", - "DRUGS", - "CLOTHING", - "MICROPROCESSORS", - "PLASTICS", - "POLYNUCLEOTIDES", - "BIOCOMPOSITES", - "NANOBOTS", - "AI_MAINFRAMES", - "QUANTUM_DRIVES", - "ROBOTIC_DRONES", - "CYBER_IMPLANTS", - "GENE_THERAPEUTICS", - "NEURAL_CHIPS", - "MOOD_REGULATORS", - "VIRAL_AGENTS", - "MICRO_FUSION_GENERATORS", - "SUPERGRAINS", - "LASER_RIFLES", - "HOLOGRAPHICS", - "SHIP_SALVAGE", - "RELIC_TECH", - "NOVEL_LIFEFORMS", - "BOTANICAL_SPECIMENS", - "CULTURAL_ARTIFACTS", - "REACTOR_SOLAR_I", - "REACTOR_FUSION_I", - "REACTOR_FISSION_I", - "REACTOR_CHEMICAL_I", - "REACTOR_ANTIMATTER_I", - "ENGINE_IMPULSE_DRIVE_I", - "ENGINE_ION_DRIVE_I", - "ENGINE_ION_DRIVE_II", - "ENGINE_HYPER_DRIVE_I", - "MODULE_MINERAL_PROCESSOR_I", - "MODULE_CARGO_HOLD_I", - "MODULE_CREW_QUARTERS_I", - "MODULE_ENVOY_QUARTERS_I", - "MODULE_PASSENGER_CABIN_I", - "MODULE_MICRO_REFINERY_I", - "MODULE_SCIENCE_LAB_I", - "MODULE_JUMP_DRIVE_I", - "MODULE_JUMP_DRIVE_II", - "MODULE_JUMP_DRIVE_III", - "MODULE_SHIELD_GENERATOR_I", - "MODULE_SHIELD_GENERATOR_II", - "MOUNT_GAS_SIPHON_I", - "MOUNT_GAS_SIPHON_II", - "MOUNT_GAS_SIPHON_III", - "MOUNT_SENSOR_ARRAY_I", - "MOUNT_SENSOR_ARRAY_II", - "MOUNT_SENSOR_ARRAY_III", - "MOUNT_MINING_LASER_I", - "MOUNT_MINING_LASER_II", - "MOUNT_MINING_LASER_III", - "MOUNT_LASER_CANNON_I", - "MOUNT_MISSILE_LAUNCHER_I", - "MOUNT_TURRET_I" + "type": "object", + "attributes": { + "symbol": { + "$ref": "./TradeSymbol.json" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": [ + "symbol", + "name", + "description" ] - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": [ - "symbol", - "name", - "description" - ] + } } \ No newline at end of file diff --git a/models/TradeSymbol.json b/models/TradeSymbol.json new file mode 100644 index 0000000..2ef60ff --- /dev/null +++ b/models/TradeSymbol.json @@ -0,0 +1,109 @@ +{ + "type": "string", + "enum": [ + "PRECIOUS_STONES", + "QUARTZ_SAND", + "SILICON_CRYSTALS", + "AMMONIA_ICE", + "LIQUID_HYDROGEN", + "LIQUID_NITROGEN", + "ICE_WATER", + "EXOTIC_MATTER", + "ADVANCED_CIRCUITRY", + "GRAVITON_EMITTERS", + "IRON", + "IRON_ORE", + "COPPER", + "COPPER_ORE", + "ALUMINUM", + "ALUMINUM_ORE", + "SILVER", + "SILVER_ORE", + "GOLD", + "GOLD_ORE", + "PLATINUM", + "PLATINUM_ORE", + "DIAMONDS", + "URANITE", + "URANITE_ORE", + "MERITIUM", + "MERITIUM_ORE", + "HYDROCARBON", + "ANTIMATTER", + "FERTILIZERS", + "FABRICS", + "FOOD", + "JEWELRY", + "MACHINERY", + "FIREARMS", + "ASSAULT_RIFLES", + "MILITARY_EQUIPMENT", + "EXPLOSIVES", + "LAB_INSTRUMENTS", + "AMMUNITION", + "ELECTRONICS", + "SHIP_PLATING", + "EQUIPMENT", + "FUEL", + "MEDICINE", + "DRUGS", + "CLOTHING", + "MICROPROCESSORS", + "PLASTICS", + "POLYNUCLEOTIDES", + "BIOCOMPOSITES", + "NANOBOTS", + "AI_MAINFRAMES", + "QUANTUM_DRIVES", + "ROBOTIC_DRONES", + "CYBER_IMPLANTS", + "GENE_THERAPEUTICS", + "NEURAL_CHIPS", + "MOOD_REGULATORS", + "VIRAL_AGENTS", + "MICRO_FUSION_GENERATORS", + "SUPERGRAINS", + "LASER_RIFLES", + "HOLOGRAPHICS", + "SHIP_SALVAGE", + "RELIC_TECH", + "NOVEL_LIFEFORMS", + "BOTANICAL_SPECIMENS", + "CULTURAL_ARTIFACTS", + "REACTOR_SOLAR_I", + "REACTOR_FUSION_I", + "REACTOR_FISSION_I", + "REACTOR_CHEMICAL_I", + "REACTOR_ANTIMATTER_I", + "ENGINE_IMPULSE_DRIVE_I", + "ENGINE_ION_DRIVE_I", + "ENGINE_ION_DRIVE_II", + "ENGINE_HYPER_DRIVE_I", + "MODULE_MINERAL_PROCESSOR_I", + "MODULE_CARGO_HOLD_I", + "MODULE_CREW_QUARTERS_I", + "MODULE_ENVOY_QUARTERS_I", + "MODULE_PASSENGER_CABIN_I", + "MODULE_MICRO_REFINERY_I", + "MODULE_ORE_REFINERY_I", + "MODULE_FUEL_REFINERY_I", + "MODULE_SCIENCE_LAB_I", + "MODULE_JUMP_DRIVE_I", + "MODULE_JUMP_DRIVE_II", + "MODULE_JUMP_DRIVE_III", + "MODULE_SHIELD_GENERATOR_I", + "MODULE_SHIELD_GENERATOR_II", + "MOUNT_GAS_SIPHON_I", + "MOUNT_GAS_SIPHON_II", + "MOUNT_GAS_SIPHON_III", + "MOUNT_SENSOR_ARRAY_I", + "MOUNT_SENSOR_ARRAY_II", + "MOUNT_SENSOR_ARRAY_III", + "MOUNT_MINING_LASER_I", + "MOUNT_MINING_LASER_II", + "MOUNT_MINING_LASER_III", + "MOUNT_LASER_CANNON_I", + "MOUNT_MISSILE_LAUNCHER_I", + "MOUNT_TURRET_I" + ] +} \ No newline at end of file diff --git a/reference/SpaceTraders.json b/reference/SpaceTraders.json index 493a185..0ffe130 100644 --- a/reference/SpaceTraders.json +++ b/reference/SpaceTraders.json @@ -745,7 +745,7 @@ "type": "string" }, "tradeSymbol": { - "type": "string" + "$ref": "../models/TradeSymbol.json" }, "units": { "type": "integer" @@ -864,62 +864,6 @@ ] } }, - "/my/ships/{shipSymbol}/orbit": { - "parameters": [ - { - "description": "The symbol of the ship", - "in": "path", - "name": "shipSymbol", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "description": "Attempt to move your ship into orbit at it's current location. The request will only succeed if your ship is capable of moving into orbit at the time of the request.\n\nThe endpoint is idempotent - successive calls will succeed even if the ship is already in orbit.", - "operationId": "orbit-ship", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Orbit Ship 200 Response", - "description": "", - "properties": { - "data": { - "properties": { - "nav": { - "$ref": "../models/ShipNav.json" - } - }, - "type": "object", - "required": [ - "nav" - ] - } - }, - "required": [ - "data" - ], - "type": "object" - } - } - }, - "description": "The ship has successfully moved into orbit at it's current location." - } - }, - "security": [ - { - "AgentToken": [] - } - ], - "summary": "Orbit Ship", - "tags": [ - "fleet" - ] - } - }, "/my/ships": { "get": { "description": "Retrieve all of your ships.", @@ -1077,6 +1021,176 @@ } ] }, + "/my/ships/{shipSymbol}/orbit": { + "parameters": [ + { + "description": "The symbol of the ship", + "in": "path", + "name": "shipSymbol", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "description": "Attempt to move your ship into orbit at it's current location. The request will only succeed if your ship is capable of moving into orbit at the time of the request.\n\nThe endpoint is idempotent - successive calls will succeed even if the ship is already in orbit.", + "operationId": "orbit-ship", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "title": "Orbit Ship 200 Response", + "description": "", + "properties": { + "data": { + "properties": { + "nav": { + "$ref": "../models/ShipNav.json" + } + }, + "type": "object", + "required": [ + "nav" + ] + } + }, + "required": [ + "data" + ], + "type": "object" + } + } + }, + "description": "The ship has successfully moved into orbit at it's current location." + } + }, + "security": [ + { + "AgentToken": [] + } + ], + "summary": "Orbit Ship", + "tags": [ + "fleet" + ] + } + }, + "/my/ships/{shipSymbol}/refine": { + "parameters": [ + { + "description": "The symbol of the ship", + "in": "path", + "name": "shipSymbol", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "description": "Attempt to refine the raw materials on your ship. The request will only succeed if your ship is capable of refining at the time of the request.", + "operationId": "ship-refine", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "produce": { + "type": "string", + "enum": [ + "IRON", + "COPPER", + "SILVER", + "GOLD", + "ALUMINUM", + "PLATINUM", + "URANITE", + "MERITIUM", + "FUEL" + ] + } + }, + "required": [ + "produce" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "title": "Ship Refine 200 Response", + "description": "", + "properties": { + "data": { + "properties": { + "cargo": { + "$ref": "../models/ShipCargo.json" + }, + "produced": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tradeSymbol": { + "$ref": "../models/TradeSymbol.json" + }, + "units": { + "type": "integer" + } + } + } + }, + "consumed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tradeSymbol": { + "$ref": "../models/TradeSymbol.json" + }, + "units": { + "type": "integer" + } + } + } + } + }, + "type": "object", + "required": [ + "cargo", + "produced", + "consumed" + ] + } + }, + "required": [ + "data" + ], + "type": "object" + } + } + }, + "description": "The ship has successfully started refining." + } + }, + "security": [ + { + "AgentToken": [] + } + ], + "summary": "Ship Refine", + "tags": [ + "fleet" + ] + } + }, "/my/ships/{shipSymbol}/chart": { "parameters": [ { @@ -1180,54 +1294,6 @@ } ] }, - "/my/ships/{shipSymbol}/deploy": { - "parameters": [ - { - "description": "The ship symbol", - "in": "path", - "name": "shipSymbol", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "description": "Use this endpoint to deploy a Communications Relay to a waypoint. A waypoint with a communications relay will allow agents to retrieve price information from the market. Without a relay, agents must send a ship to a market to retrieve price information.\n\nCommunication relays can be purchased from a market that exports `COMM_RELAY_I`.", - "operationId": "deploy-asset", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "symbol": { - "type": "string" - } - }, - "required": [ - "symbol" - ], - "type": "object" - } - } - } - }, - "responses": { - "204": { - "description": "OK" - } - }, - "security": [ - { - "AgentToken": [] - } - ], - "summary": "Deploy Asset", - "tags": [ - "fleet" - ] - } - }, "/my/ships/{shipSymbol}/dock": { "parameters": [ { @@ -1750,7 +1816,7 @@ "title": "SellCargoRequest", "properties": { "symbol": { - "type": "string" + "$ref": "../models/TradeSymbol.json" }, "units": { "type": "integer" @@ -2015,7 +2081,7 @@ "title": "Purchase Cargo Request", "properties": { "symbol": { - "type": "string" + "$ref": "../models/TradeSymbol.json" }, "units": { "type": "integer" @@ -2100,7 +2166,7 @@ "title": "Transfer Cargo Request", "properties": { "tradeSymbol": { - "type": "string" + "$ref": "../models/TradeSymbol.json" }, "units": { "type": "integer"