add refine endpoint

add refinery modules
add refining freighter ship
add enum for TradeSymbol
This commit is contained in:
Space Admiral 2022-12-20 21:40:46 -08:00
parent 2893a700dc
commit f64f87fa1d
5 changed files with 304 additions and 227 deletions

View File

@ -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",

View File

@ -10,6 +10,7 @@
"SHIP_EXPLORER",
"SHIP_HEAVY_FREIGHTER",
"SHIP_LIGHT_SHUTTLE",
"SHIP_ORE_HOUND"
"SHIP_ORE_HOUND",
"SHIP_REFINING_FREIGHTER"
]
}

View File

@ -1,110 +1,8 @@
{
"type": "object",
"attributes": {
"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"
]
"$ref": "./TradeSymbol.json"
},
"name": {
"type": "string"
@ -117,4 +15,5 @@
"name",
"description"
]
}
}

109
models/TradeSymbol.json Normal file
View File

@ -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"
]
}

View File

@ -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"