From 4fbad900a2035bf0318bb8ba0f825eac0c755565 Mon Sep 17 00:00:00 2001 From: boxswapper Date: Thu, 12 Nov 2026 13:16:57 -0700 Subject: [PATCH] updated commodities --- trade-hub/backend/app/available.py | 69 + .../backend/data/samples/commodities.json | 1332 +++++++++++++++++ .../backend/tests/fixtures/commodities.json | 30 + trade-hub/backend/tests/test_available.py | 130 ++ 4 files changed, 1561 insertions(+) create mode 100644 trade-hub/backend/app/available.py create mode 100644 trade-hub/backend/data/samples/commodities.json create mode 100644 trade-hub/backend/tests/fixtures/commodities.json create mode 100644 trade-hub/backend/tests/test_available.py diff --git a/trade-hub/backend/app/available.py b/trade-hub/backend/app/available.py new file mode 100644 index 0000000..0d6f7a8 --- /dev/null +++ b/trade-hub/backend/app/available.py @@ -0,0 +1,69 @@ +"""Public listing of inventory items owners marked as `available`. + +Read-only and unauthenticated, like the catalog. Notes are never included: the +listing only reveals the owner's username, quantity and catalog details. +""" +import math + +from fastapi import APIRouter, Depends, Query +from sqlalchemy import select +from sqlalchemy.orm import Session as DbSession + +from app.db import get_db +from app.inventory import SORT_KEYS, enrich_entry +from app.models import InventoryEntry, User +from app.schemas import AvailablePage + +router = APIRouter(prefix="/api/v1/available", tags=["available"]) + +MAX_PAGE_SIZE = 100 + + +@router.get("", response_model=AvailablePage) +def list_available( + category: str | None = None, + search: str | None = None, + sort: str = Query(default="updated", pattern="^(name|category|quantity|updated)$"), + page: int = Query(default=1, ge=1), + page_size: int = Query(default=25, ge=1), + db: DbSession = Depends(get_db), +): + page_size = min(page_size, MAX_PAGE_SIZE) + rows = db.execute( + select(InventoryEntry, User.username) + .join(User, User.id == InventoryEntry.user_id) + .where(InventoryEntry.visibility == "available") + ).all() + + items = [] + for entry, username in rows: + enriched = enrich_entry(entry) + if not enriched["available"]: + continue + enriched["username"] = username + items.append(enriched) + + if category is not None and category.strip(): + wanted = category.strip() + items = [i for i in items if i["category"] == wanted] + if search is not None and search.strip(): + needle = search.strip().lower() + items = [ + i + for i in items + if needle in i["name"].lower() + or needle in i["class_name"].lower() + or needle in i["username"].lower() + ] + + items.sort(key=SORT_KEYS[sort]) + total = len(items) + total_pages = max(1, math.ceil(total / page_size)) + start = (page - 1) * page_size + return { + "total": total, + "page": page, + "page_size": page_size, + "total_pages": total_pages, + "items": items[start : start + page_size], + } diff --git a/trade-hub/backend/data/samples/commodities.json b/trade-hub/backend/data/samples/commodities.json new file mode 100644 index 0000000..648c6b5 --- /dev/null +++ b/trade-hub/backend/data/samples/commodities.json @@ -0,0 +1,1332 @@ +[ + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ProcyonCanister_Acryliplex_Damage", + "name": "AcryliPlex Composite", + "type": "Cargo", + "subType": "Cargo", + "reference": "fdb8babe-470b-49be-b5b4-034ea606cc22" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Agricium", + "name": "Agricium", + "type": "Cargo", + "subType": "Cargo", + "reference": "8e462ace-0b0e-49ce-b722-ea687101911c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Agricium", + "name": "Agricium (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "41d7dbd7-c2b7-4b36-9787-f6b7a4c92be2" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_AgriculturalSupplies", + "name": "Agricultural Supplies", + "type": "Cargo", + "subType": "Cargo", + "reference": "282e0a66-c9e0-4140-95c8-56a511ba2399" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_AltruciaToxin", + "name": "Altruciatoxin", + "type": "Cargo", + "subType": "Cargo", + "reference": "169b534b-6d61-4cad-b275-694fc5a04574" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Aluminum", + "name": "Aluminum", + "type": "Cargo", + "subType": "Cargo", + "reference": "93c7aa8d-559b-4f89-9607-8c56ba67c5bb" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Aluminum", + "name": "Aluminum (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "4e30af98-a6bd-4113-b405-3a2f865f4855" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_AmioshiPlague", + "name": "Amioshi Plague", + "type": "Cargo", + "subType": "Cargo", + "reference": "87e82811-8dac-4f11-b004-ab61c1d0e593" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_AmmoCrate", + "name": "Ammo Crate", + "type": "Cargo", + "subType": "Cargo", + "reference": "ac3d6f79-258c-47fb-9fe0-8ece7babff68" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Ammonia", + "name": "Ammonia", + "type": "Cargo", + "subType": "Cargo", + "reference": "afa96ede-0c20-4e38-829b-872b5fbde02f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Aphorite", + "name": "Aphorite", + "type": "Cargo", + "subType": "Cargo", + "reference": "23006dfc-aef1-45c8-8461-72bd5064526f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Argon", + "name": "Argon", + "type": "Cargo", + "subType": "Cargo", + "reference": "8fab527e-d27b-4746-8e22-bf1971b5768f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Aslarite", + "name": "Aslarite", + "type": "Cargo", + "subType": "Cargo", + "reference": "60faf682-8595-44e4-98fb-5eb950f5da2d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Aslarite", + "name": "Aslarite (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "b2e7271a-5c3d-4b32-93c5-415a8271fa4b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Astatine", + "name": "Astatine", + "type": "Cargo", + "subType": "Cargo", + "reference": "4b285725-7c67-4fba-9a21-8a24e38f6fd3" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Atlassium", + "name": "Atlasium", + "type": "Cargo", + "subType": "Cargo", + "reference": "9bd39a36-4c9f-47c2-b0c4-c0a2019922b4" + }, + { + "className": "Carryable_TBO_FL_8SCU_Commodity_Metal_Atlassium", + "name": "Atlasium (8 SCU)", + "type": "Cargo", + "subType": "Cargo", + "reference": "40e8e983-15d8-47fd-82ab-6eb1d16c7ba5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ElectronicsEquipment", + "name": "Audio-Visual Equipment", + "type": "Cargo", + "subType": "Cargo", + "reference": "66a48bdc-e86c-4ff8-959a-b447e4403049" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Beradom", + "name": "Beradom", + "type": "Cargo", + "subType": "Cargo", + "reference": "8b71b394-94d4-46e7-9923-cf3f3a684898" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Beryl", + "name": "Beryl", + "type": "Cargo", + "subType": "Cargo", + "reference": "fa917cef-bd60-4181-884d-8dddbd45226e" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Beryl", + "name": "Beryl (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "667c36c2-3097-437a-8494-947e91a57d66" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Bexalite", + "name": "Bexalite", + "type": "Cargo", + "subType": "Cargo", + "reference": "290048c7-1a35-4156-97e1-73d0f8a29257" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Bexalite", + "name": "Bexalite (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "25a68f9f-e350-4e9f-b8fd-e877e35974e3" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_BiologicalSamples", + "name": "Biological Samples", + "type": "Cargo", + "subType": "Cargo", + "reference": "1bca935f-85f0-493e-bdf1-208a82b0c936" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Bioplastic", + "name": "Bioplastic", + "type": "Cargo", + "subType": "Cargo", + "reference": "65a1e21f-d7e2-4284-b45c-0a7c3f2bdb73" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_BlueBilva", + "name": "Blue Bilva", + "type": "Cargo", + "subType": "Cargo", + "reference": "2d3f3e66-95a8-4629-bb80-ec34d65b73a9" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Borase", + "name": "Borase", + "type": "Cargo", + "subType": "Cargo", + "reference": "937639ac-7e83-47fa-88db-8ff2298f6824" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Borase", + "name": "Borase (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "9d63d0db-2308-40fa-8659-389d8f6976a3" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_CK13SeedBlend", + "name": "CK13-GID Seed Blend", + "type": "Cargo", + "subType": "Cargo", + "reference": "0f14aea2-e4bb-45cc-b616-5ce5994ace83" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_CadmiumAllinide", + "name": "Cadmium Allinide", + "type": "Cargo", + "subType": "Cargo", + "reference": "9479e8d0-486b-44ba-8847-8d93b99c753d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Carbon", + "name": "Carbon", + "type": "Cargo", + "subType": "Cargo", + "reference": "aaae8279-9d4f-463c-83fa-3a7dcf5b3773" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_Carbonsilk", + "name": "Carbon-Silk", + "type": "Cargo", + "subType": "Cargo", + "reference": "5b94c9a1-1d8f-4f3f-b1d9-4287984638c8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Carinite", + "name": "Carinite", + "type": "Cargo", + "subType": "Cargo", + "reference": "b70d0ebd-3920-4d3c-b586-4793c76385ac" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_CarinitePure", + "name": "Carinite (Pure)", + "type": "Cargo", + "subType": "Cargo", + "reference": "b218099b-bc4e-434f-ab32-591bd85c00af" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Chlorine", + "name": "Chlorine", + "type": "Cargo", + "subType": "Cargo", + "reference": "cb2fd95d-6d29-44ab-90af-c51a14213efe" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Cobalt", + "name": "Cobalt", + "type": "Cargo", + "subType": "Cargo", + "reference": "9f8e9561-7f78-4cc6-9ac3-204528f06be2" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_MilitarySupplies", + "name": "Combat Supplies", + "type": "Cargo", + "subType": "Cargo", + "reference": "623b4e75-7221-4db3-9410-a5972b80cbea" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Waste_CompBoard", + "name": "Compboard", + "type": "Cargo", + "subType": "Cargo", + "reference": "2f99ff1c-bfcb-4dcd-a611-0b576a59bfc8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ConstructionMaterials", + "name": "Construction Materials", + "type": "Cargo", + "subType": "Cargo", + "reference": "5ee15a9b-4ce5-445b-a02d-415c63f43764" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ConstructionMaterialsScraps", + "name": "Construction Pieces", + "type": "Cargo", + "subType": "Cargo", + "reference": "dc4ab563-5a21-4a8a-a79f-1d5fd9974ecc" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ConstructionMaterialsPowder", + "name": "Construction Rubble", + "type": "Cargo", + "subType": "Cargo", + "reference": "86a9223f-af16-4b7c-beef-f0f20e72a491" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ConstructionMaterialsChunks", + "name": "Construction Salvage", + "type": "Cargo", + "subType": "Cargo", + "reference": "c3fc4028-b100-47c9-964b-1e0d17033dca" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Copper", + "name": "Copper", + "type": "Cargo", + "subType": "Cargo", + "reference": "5d553a61-3f15-4219-8065-3c7587323f26" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Copper", + "name": "Copper (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "61cadc8f-68a2-4173-98e7-e20b12996304" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Corundum", + "name": "Corundum", + "type": "Cargo", + "subType": "Cargo", + "reference": "f8822a2b-d7db-4556-98d3-a94fae02ceb7" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Corundum", + "name": "Corundum (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "fdf2d12c-eafa-4eac-be26-c418e651bbad" + }, + { + "className": "Carryable_TBO_FL_4SCU_Commodity_Organic_VanduulCorpse", + "name": "CryoPod (Vanduul)", + "type": "Cargo", + "subType": "Cargo", + "reference": "e72cbc1d-c35c-4f4e-b78c-8a3719f7dc83" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_Slam_Unprocessed", + "name": "DCSR2", + "type": "Cargo", + "subType": "Cargo", + "reference": "58950ef8-7d2e-4173-83cb-8b23b1901f63" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_DecariPod", + "name": "Decari Pod", + "type": "Cargo", + "subType": "Cargo", + "reference": "528a07d5-ff1c-4c4c-acf4-09e235a66349" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipCountermeasures_Decoy", + "name": "Decoy Ammunition", + "type": "Cargo", + "subType": "Cargo", + "reference": "7e933afd-ce0e-4ef0-8cda-bb4f6a8961c5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_DegnousRoot", + "name": "Degnous Root", + "type": "Cargo", + "subType": "Cargo", + "reference": "f5a8d50f-231b-40c6-9a3d-3ee9d40b08e3" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_GenericExplosive_Detatrine", + "name": "Detatrine", + "type": "Cargo", + "subType": "Cargo", + "reference": "8dcbd3fd-e31d-45a8-802e-7e5767ee1cde" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Diamond", + "name": "Diamond", + "type": "Cargo", + "subType": "Cargo", + "reference": "1a3e83f0-5f13-4f11-a4ba-9836ac975553" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Diamond", + "name": "Diamond (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "8f599320-e019-49da-8b48-4ff768fbe16a" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_DiamondLaminate", + "name": "Diamond Laminate", + "type": "Cargo", + "subType": "Cargo", + "reference": "d0b22330-8b4b-4cf5-b241-b55b1687d03f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_GenericExplosive", + "name": "Diluthermex", + "type": "Cargo", + "subType": "Cargo", + "reference": "9c361f58-730b-4f29-a5d4-4de29624ec9e" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_DistilledSpirits", + "name": "Distilled Spirits", + "type": "Cargo", + "subType": "Cargo", + "reference": "67c17f8d-9307-4fa1-88e8-244243f42f7a" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Dolivine", + "name": "Dolivine", + "type": "Cargo", + "subType": "Cargo", + "reference": "145e3a20-058e-46d7-83cc-143c9be2f18c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Dopple", + "name": "Dopple", + "type": "Cargo", + "subType": "Cargo", + "reference": "47df6faa-e0d4-4408-8cd7-ad31ea1a6c68" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Dymantium", + "name": "Dymantium", + "type": "Cargo", + "subType": "Cargo", + "reference": "a22c2f2a-a6ca-4a65-8007-1af5b69eae68" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Dynaflex", + "name": "DynaFlex", + "type": "Cargo", + "subType": "Cargo", + "reference": "8d56a6d5-1bfa-4fef-af97-09e640622d39" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Etam", + "name": "E'tam", + "type": "Cargo", + "subType": "Cargo", + "reference": "52e16dee-1010-44a6-88bd-5bce8f3e12e7" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Elespo", + "name": "Elespo", + "type": "Cargo", + "subType": "Cargo", + "reference": "bf0b20bc-ab78-4c27-a1ee-7ee05b4706ec" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Feynmaline", + "name": "Feynmaline", + "type": "Cargo", + "subType": "Cargo", + "reference": "e0acc152-438c-45d0-b34e-2965870b97e4" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Flourine", + "name": "Fluorine", + "type": "Cargo", + "subType": "Cargo", + "reference": "4c758aa4-1279-428c-b773-488b69bfafac" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_Fotia", + "name": "Fotia Seedpod", + "type": "Cargo", + "subType": "Cargo", + "reference": "3aada733-8f06-42ae-8af9-36c19b354dc7" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Freeze", + "name": "Freeze", + "type": "Cargo", + "subType": "Cargo", + "reference": "8dc26e83-f2b9-4f5d-a6d3-e30ad56c1905" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_FreshFood", + "name": "Fresh Food", + "type": "Cargo", + "subType": "Cargo", + "reference": "d5f599b5-dfca-4121-a1c9-476948b8310b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_GasperingWeevilEggs", + "name": "Gasping Weevil Eggs", + "type": "Cargo", + "subType": "Cargo", + "reference": "665e1748-57ee-4603-ba42-ea41aae459f9" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_GenmodSeeds", + "name": "Genmod Seeds", + "type": "Cargo", + "subType": "Cargo", + "reference": "daf17593-66b4-47c8-9199-91c2c6dbde6b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Glacosite", + "name": "Glacosite", + "type": "Cargo", + "subType": "Cargo", + "reference": "2bce3511-ca99-40f1-852e-387606c6151d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Glow", + "name": "Glow", + "type": "Cargo", + "subType": "Cargo", + "reference": "45e0b5c6-e108-4562-b20a-1e86775a129b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Gold", + "name": "Gold", + "type": "Cargo", + "subType": "Cargo", + "reference": "8b6a4ea8-5052-42aa-94ec-3fb8182d68c0" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Gold", + "name": "Gold (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "12fbd7da-3e92-4bd8-ab68-8e81fe50fd42" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_GoldenMedmon", + "name": "Golden Medmon", + "type": "Cargo", + "subType": "Cargo", + "reference": "11e97874-fb5a-4197-afb1-2eafe9673c4d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_HLX99Hyperprocessors", + "name": "HLX99 Hyperprocessors", + "type": "Cargo", + "subType": "Cargo", + "reference": "09a9e4d4-871f-41e1-8898-62e8ddd6e35a" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Hadanite", + "name": "Hadanite", + "type": "Cargo", + "subType": "Cargo", + "reference": "d8126953-4007-4635-88ae-a3d8fb28fff7" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_HeartOfTheWoods", + "name": "Heart of the Woods", + "type": "Cargo", + "subType": "Cargo", + "reference": "5b8464f0-f480-4c4a-8d26-a43b217ac15c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Helium", + "name": "Helium", + "type": "Cargo", + "subType": "Cargo", + "reference": "ec37d0df-2368-4430-9439-ebf4f52b7977" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Hephaestanite", + "name": "Hephaestanite", + "type": "Cargo", + "subType": "Cargo", + "reference": "5bdc83bd-4093-4e93-994d-5f5cf056609f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Hephaestanite", + "name": "Hephaestanite (R)", + "type": "Cargo", + "subType": "Cargo", + "reference": "8fdacbaf-eb1b-47e5-a5ed-01beb269b0a6" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_HPMC", + "name": "HexaPolyMesh Coating", + "type": "Cargo", + "subType": "Cargo", + "reference": "05040fdd-da2c-4c05-b79e-9653adc194da" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_HumanFoodBars", + "name": "Human Food Bars", + "type": "Cargo", + "subType": "Cargo", + "reference": "53b36fcd-3b37-4056-8d9e-b9b63869c3a2" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Hydrogen", + "name": "Hydrogen", + "type": "Cargo", + "subType": "Cargo", + "reference": "74c37612-a6d5-4497-a5d2-fcd131d8442c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_PlasmaFuel", + "name": "Hydrogen Fuel", + "type": "Cargo", + "subType": "Cargo", + "reference": "c9540a47-4002-4dba-9c24-3658d4e850d8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_IntertMaterials", + "name": "Inert Materials", + "type": "Cargo", + "subType": "Cargo", + "reference": "985db7db-586f-4ffd-9e60-f8baf05b8f1d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Iodine", + "name": "Iodine", + "type": "Cargo", + "subType": "Cargo", + "reference": "9011dd81-e4db-417c-9ead-8c220aeca45f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Iron", + "name": "Iron", + "type": "Cargo", + "subType": "Cargo", + "reference": "332096b9-1cbf-436d-b8b0-5ed422c23da9" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Iron", + "name": "Iron (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "271effd5-3aa8-4538-b9a0-b0f33dc86d68" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Jaclium", + "name": "Jaclium (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "fef1557a-bd3e-44ab-a436-a561fced6e8f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Janalite", + "name": "Janalite", + "type": "Cargo", + "subType": "Cargo", + "reference": "b3ec731d-30f9-4a6b-9277-ece19bd3c1cb" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_JumpingLimes", + "name": "Jumping Limes", + "type": "Cargo", + "subType": "Cargo", + "reference": "1d5db1e7-0e61-4ed4-b549-a87ff5fd35df" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_KopionHorn", + "name": "Kopion Horn", + "type": "Cargo", + "subType": "Cargo", + "reference": "f8ba6e0c-24ea-494a-9a1c-6030cb1c4f29" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Laranite", + "name": "Laranite", + "type": "Cargo", + "subType": "Cargo", + "reference": "b30f35c0-943b-4cfd-aa9e-43723a720fdd" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Laranite", + "name": "Laranite (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "5373e161-8c2b-4449-8ddb-96af7047e559" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Lastaprene", + "name": "Lastaprene", + "type": "Cargo", + "subType": "Cargo", + "reference": "9107ca52-d38e-4fc1-acfa-ab8af47905ad" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_LifeCureMedsticks", + "name": "LifeCure Medsticks", + "type": "Cargo", + "subType": "Cargo", + "reference": "0093bd3b-83cf-4187-a815-052c94416a4d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Lindinium", + "name": "Lindinium", + "type": "Cargo", + "subType": "Cargo", + "reference": "2037a4b6-465b-4c40-9b2e-370bff558fd9" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Lindinium", + "name": "Lindinium (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "d17453e9-61e0-4e5b-9356-9ef1792f32c0" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_HolidayBox", + "name": "Luminalia Gift", + "type": "Cargo", + "subType": "Cargo", + "reference": "47059963-f01a-4b85-a475-33e117428713" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_SpiralFruit", + "name": "Lunes (Spiral Fruit)", + "type": "Cargo", + "subType": "Cargo", + "reference": "47b05bf1-2dca-4828-bad9-c8026f11f08b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Lycara", + "name": "Lycara", + "type": "Cargo", + "subType": "Cargo", + "reference": "d6e14883-b09b-4014-91e6-09dc8afad1e2" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Mala", + "name": "Mala", + "type": "Cargo", + "subType": "Cargo", + "reference": "a89b60a1-0253-4bd0-ae99-94f20bc0635e" + }, + { + "className": "Carryable_TBO_FL_8SCU_Commodity_Organic_MarokPearl", + "name": "Marok Gem", + "type": "Cargo", + "subType": "Cargo", + "reference": "1c8f600a-544e-4923-8297-1c1820ec596c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Maze", + "name": "Maze", + "type": "Cargo", + "subType": "Cargo", + "reference": "2e41b1d1-57b6-4803-bd2d-d5ae0acc6aed" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_MedGel", + "name": "MedGel", + "type": "Cargo", + "subType": "Cargo", + "reference": "24160bf1-cddf-4b3c-aa75-64bdf4fb91c6" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_MedicalSupplies", + "name": "Medical Supplies", + "type": "Cargo", + "subType": "Cargo", + "reference": "7ab1a3a5-579a-41b4-9b8f-f0d530c3c8b8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Mercury", + "name": "Mercury", + "type": "Cargo", + "subType": "Cargo", + "reference": "113a22d3-81e5-4051-abc4-a8b8892d3c72" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Methane", + "name": "Methane", + "type": "Cargo", + "subType": "Cargo", + "reference": "8c4b1b1d-f326-4101-b0d5-23aee46657b5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_MixedMining", + "name": "Mixed Mining", + "type": "Cargo", + "subType": "Cargo", + "reference": "1d1547c0-7b9c-4cf6-ac52-ac833c84591d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_MoldSample", + "name": "Molina Mold Samples", + "type": "Cargo", + "subType": "Cargo", + "reference": "f7ffb7f6-a91f-46d1-8b96-4d33cf60dee4" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_MoldTreatment", + "name": "Molina Mold Treatment", + "type": "Cargo", + "subType": "Cargo", + "reference": "e1307ad1-2dc6-4585-8b16-950bd15f7ea3" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_VentFilters", + "name": "Molina Ventilation Filters", + "type": "Cargo", + "subType": "Cargo", + "reference": "bb9bcd36-e351-4206-9a59-fad9f1fc21ce" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Neograph", + "name": "Neograph", + "type": "Cargo", + "subType": "Cargo", + "reference": "8ccbe590-4b61-4418-b857-32c316a3bc02" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Neon", + "name": "Neon", + "type": "Cargo", + "subType": "Cargo", + "reference": "e122cd69-8fe9-4cf4-a03a-a2520f0591e4" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Nitrogen", + "name": "Nitrogen", + "type": "Cargo", + "subType": "Cargo", + "reference": "0ada25ce-b4d2-4745-be9c-ab069a5f4087" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipCountermeasures_Noise", + "name": "Noise Ammunition", + "type": "Cargo", + "subType": "Cargo", + "reference": "212a9320-19e4-4b54-b1e3-bee326d10888" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Omnapoxy", + "name": "Omnapoxy", + "type": "Cargo", + "subType": "Cargo", + "reference": "9eda76ab-199e-43ef-b998-610a323d944d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_OrganiMass", + "name": "Organics", + "type": "Cargo", + "subType": "Cargo", + "reference": "ee7c755a-ebdc-4b91-b1be-592523bba783" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_OrganHarvesting", + "name": "Organs", + "type": "Cargo", + "subType": "Cargo", + "reference": "fc89492f-a38c-4beb-9720-da4276aee0eb" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_OsoianHides", + "name": "Osoian Hides", + "type": "Cargo", + "subType": "Cargo", + "reference": "c010f532-cd8a-43b4-b732-19e57f14b29d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Ouratite", + "name": "Ouratite", + "type": "Cargo", + "subType": "Cargo", + "reference": "a52c99f4-f270-4ac2-bbb0-57f67f0345f5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_Oza", + "name": "Oza", + "type": "Cargo", + "subType": "Cargo", + "reference": "1fe7dc01-47fa-4ed7-bce9-0a78ba0ccf7d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Partiullium", + "name": "Partillium", + "type": "Cargo", + "subType": "Cargo", + "reference": "735314ca-3b49-4767-9d5b-fab00fd38091" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_PartyFavors", + "name": "Party Favors", + "type": "Cargo", + "subType": "Cargo", + "reference": "31c9f31f-6fbf-43e8-98fc-617f8380507d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_MarokPearl", + "name": "Pingala Seeds", + "type": "Cargo", + "subType": "Cargo", + "reference": "1ed06f81-6b41-4107-84b1-18fa3c8c97c0" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_Pitambu", + "name": "Pitambu", + "type": "Cargo", + "subType": "Cargo", + "reference": "e318e567-ccf6-488a-bce2-8550e8ef83c5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Potassium", + "name": "Potassium", + "type": "Cargo", + "subType": "Cargo", + "reference": "fd89ead8-75f2-4114-b7ab-e1931247ba02" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Pressurized_Ice", + "name": "Pressurized Ice", + "type": "Cargo", + "subType": "Cargo", + "reference": "cfef1221-4c45-476a-b2f4-2e388279df58" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ProcessedFood", + "name": "Processed Food", + "type": "Cargo", + "subType": "Cargo", + "reference": "6c4cab7d-a2f6-46d2-95fa-a2cad9e1ceea" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_AceInterceptorHelmet", + "name": "Processed Goods", + "type": "Cargo", + "subType": "Cargo", + "reference": "8c466409-fe60-4c6b-9832-30faa2674694" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_Prota", + "name": "Prota", + "type": "Cargo", + "subType": "Cargo", + "reference": "13fef5cb-ee61-4c61-b177-47f15c9c1e4b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Quantanium", + "name": "Quantainium", + "type": "Cargo", + "subType": "Cargo", + "reference": "62cb51fb-b94c-49c9-84a4-4c3673b29d1c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Quantainium", + "name": "Quantainium (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "8af08ef3-6ba3-4719-8bbb-224bb1095d5d" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_QuantumFuel", + "name": "Quantum Fuel", + "type": "Cargo", + "subType": "Cargo", + "reference": "292304c5-cbcd-4287-ac1b-9c1f2e155a86" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Quartz", + "name": "Quartz", + "type": "Cargo", + "subType": "Cargo", + "reference": "fbb353b5-058d-4929-aece-dba5f395b848" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Quartz", + "name": "Quartz (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "967202d0-e6fb-4762-96d0-1f9b3ce0d803" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_RS1OdyseySpacesuits", + "name": "RS1 Odysey Spacesuits", + "type": "Cargo", + "subType": "Cargo", + "reference": "e4ac7ad6-0a03-4105-b10d-7a13d1b569d2" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_QuasigrazerEggs", + "name": "Ranta Dung", + "type": "Cargo", + "subType": "Cargo", + "reference": "0c538438-072a-4038-9d3c-87de08620bfc" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_RawOuratite", + "name": "Raw Ouratite", + "type": "Cargo", + "subType": "Cargo", + "reference": "c22ff291-0b40-48dc-9a25-9667b3177148" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_RawSilicon", + "name": "Raw Silicon", + "type": "Cargo", + "subType": "Cargo", + "reference": "1fd362f2-85c1-4e67-8032-4a4024aa3886" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_RMC", + "name": "Recycled Material Composite", + "type": "Cargo", + "subType": "Cargo", + "reference": "2e50dde5-30d4-4faa-af8f-8e5aa8004b96" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_RedfinEnergyModulator", + "name": "Redfin Energy Modulators", + "type": "Cargo", + "subType": "Cargo", + "reference": "31230d21-e69d-4823-8cc0-ed7b6e708581" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_RevenantPod", + "name": "Revenant Pod", + "type": "Cargo", + "subType": "Cargo", + "reference": "aa59b457-ec0a-44f3-a9e6-9ab728d6dc26" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_AltruciaToxin_unprocessed", + "name": "Revenant Tree Pollen", + "type": "Cargo", + "subType": "Cargo", + "reference": "5b8eb60d-0d36-4138-b874-5304f228420f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Riccite", + "name": "Riccite", + "type": "Cargo", + "subType": "Cargo", + "reference": "f0557125-1e7b-48bf-847b-88dd1bcf18ab" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Riccite", + "name": "Riccite (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "bf3253f5-fd3f-4a50-b6c6-70e71ccb4057" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Slam", + "name": "SLAM", + "type": "Cargo", + "subType": "Cargo", + "reference": "c17e01a8-43d7-4f7f-ad2e-354a56673063" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Sadaryx", + "name": "Sadaryx", + "type": "Cargo", + "subType": "Cargo", + "reference": "869ee2cd-bfe3-4026-b35a-1d3385832552" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Saldynium", + "name": "Saldynium (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "4edd1ed2-463e-480c-a1b3-39f8c4527289" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Sarilus", + "name": "Sarilus", + "type": "Cargo", + "subType": "Cargo", + "reference": "fab3f02c-f973-4d29-a45e-6dcf8e2ea0f8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Savrilium", + "name": "Savrilium", + "type": "Cargo", + "subType": "Cargo", + "reference": "9e5087b2-6011-4d9e-84e2-cec0acae409c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Savrilium", + "name": "Savrilium (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "4ed0b502-4054-4d56-837b-ed0a38b450f1" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Waste_Scrap", + "name": "Scrap", + "type": "Cargo", + "subType": "Cargo", + "reference": "ef3a5a2f-aefb-42ac-9feb-57cee23e9ac7" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition", + "name": "Ship Ammunition", + "type": "Cargo", + "subType": "Cargo", + "reference": "a14f2f2a-d6e7-4109-aef5-c3a8ca295a73" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Nonmetal_Silicon", + "name": "Silicon", + "type": "Cargo", + "subType": "Cargo", + "reference": "5eba843f-8578-43d5-b74e-9aed3d413df1" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Silnex", + "name": "Silnex", + "type": "Cargo", + "subType": "Cargo", + "reference": "19cdc820-513e-455f-b6e1-10dd758725dd" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size1", + "name": "Size 1 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "0f096438-0eab-42e2-98c2-6ef4c418922e" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size2", + "name": "Size 2 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "532ee58d-ac42-4dc5-abf6-cb614976a7cc" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size3", + "name": "Size 3 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "c796b5b4-9361-449f-88d3-699ed197c496" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size4", + "name": "Size 4 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "1d4fd318-e510-48bc-95be-dc5e5b851194" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size5", + "name": "Size 5 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "aebdd39c-aee6-4eaa-806f-0b8f798f3a30" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size6", + "name": "Size 6 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "e856d459-1a37-4878-bf01-448feab860b6" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ShipAmmunition_Size7", + "name": "Size 7 Vehicle Weapon Ammuniton", + "type": "Cargo", + "subType": "Cargo", + "reference": "e2eee033-d04e-43ce-9a04-c225984e9a2b" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Souvenirs", + "name": "Souvenirs", + "type": "Cargo", + "subType": "Cargo", + "reference": "9aa4aaaa-78b5-454f-b99d-c3277125e41f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Steel", + "name": "Steel", + "type": "Cargo", + "subType": "Cargo", + "reference": "8bb2a949-8347-41c2-afbf-66b63a673e47" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Stileron", + "name": "Stileron", + "type": "Cargo", + "subType": "Cargo", + "reference": "626cae96-794e-4df8-804c-0a03105690b6" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Stims", + "name": "Stims", + "type": "Cargo", + "subType": "Cargo", + "reference": "545af540-d0a5-45bc-9c11-6e6ac4155560" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Organic_SunsetBerry", + "name": "Sunset Berries", + "type": "Cargo", + "subType": "Cargo", + "reference": "10ef9b65-529a-4644-9258-2e3de4587021" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Taranite", + "name": "Taranite", + "type": "Cargo", + "subType": "Cargo", + "reference": "33be464b-34df-427e-8dc7-70bdbd528fa3" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Mineral_Raw_Taranite", + "name": "Taranite (Raw)", + "type": "Cargo", + "subType": "Cargo", + "reference": "e926cc03-91fc-491f-9c2c-9b27830d907c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Thermalfoam", + "name": "ThermalFoam", + "type": "Cargo", + "subType": "Cargo", + "reference": "0409ccc7-821b-4d6e-bd45-37f1252e23a5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Thrust", + "name": "Thrust", + "type": "Cargo", + "subType": "Cargo", + "reference": "05ba7bff-b67e-4bb1-9c64-0d3827388275" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Tin", + "name": "Tin", + "type": "Cargo", + "subType": "Cargo", + "reference": "bbeada81-2aff-4f2a-8650-ae6cdcf9aa13" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Titanium", + "name": "Titanium", + "type": "Cargo", + "subType": "Cargo", + "reference": "e3046c8f-5c62-4883-86a7-fc9c5e535c58" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Titanium", + "name": "Titanium (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "13cb5ac8-9e14-4535-aa7c-5797bb714426" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Torite", + "name": "Torite", + "type": "Cargo", + "subType": "Cargo", + "reference": "64f68fa3-cac5-4937-ba96-02a1189010d8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Torite", + "name": "Torite (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "f9a563ba-4437-4855-97e5-5387a54b8d6f" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Gas_Tritium", + "name": "Tritium", + "type": "Cargo", + "subType": "Cargo", + "reference": "72ecfa54-6a7e-4b56-90fe-a18c925d5537" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Tungsten", + "name": "Tungsten", + "type": "Cargo", + "subType": "Cargo", + "reference": "dc6d498c-ad02-449e-87b8-bc71a6f7ff0c" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Tungsten", + "name": "Tungsten (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "ffea8c03-60a0-4d6f-b2ee-d847e084a8f6" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_SlamUncut", + "name": "Uncut SLAM", + "type": "Cargo", + "subType": "Cargo", + "reference": "fdbef4a2-40eb-412f-bc7c-ebb4ade7f6ad" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_VirusCultures", + "name": "Virus Cultures", + "type": "Cargo", + "subType": "Cargo", + "reference": "0abbd0a3-9d53-44c9-9542-518ec4d3c212" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Waste", + "name": "Waste", + "type": "Cargo", + "subType": "Cargo", + "reference": "393ef7c3-d6e9-4a8e-aaa8-6045806d30e8" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Widow", + "name": "WiDoW", + "type": "Cargo", + "subType": "Cargo", + "reference": "c6cbc500-da0e-46d3-822b-e1d1af45da75" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Xapyen", + "name": "Xa'Pyen", + "type": "Cargo", + "subType": "Cargo", + "reference": "5f4d6c95-fdcd-4ee7-adf6-ca799e020486" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_HolidayLetter", + "name": "Year of the Rooster Envelope", + "type": "Cargo", + "subType": "Cargo", + "reference": "ffbeac48-de3b-4411-a464-feffde2aa1d5" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ProcyonCanister_Time", + "name": "Zeta-Prolanide", + "type": "Cargo", + "subType": "Cargo", + "reference": "92c98bd5-803b-4c4a-9d9f-858e186067ac" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_Zip", + "name": "Zip", + "type": "Cargo", + "subType": "Cargo", + "reference": "793f5952-8562-4354-9465-ce5a0bb472f0" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_mobyGlassPersonalComputers", + "name": "mobyGlass Personal Computers", + "type": "Cargo", + "subType": "Cargo", + "reference": "5fe22670-9d6f-4130-8e1c-9723ed6dcdf5" + } +] \ No newline at end of file diff --git a/trade-hub/backend/tests/fixtures/commodities.json b/trade-hub/backend/tests/fixtures/commodities.json new file mode 100644 index 0000000..689d5b8 --- /dev/null +++ b/trade-hub/backend/tests/fixtures/commodities.json @@ -0,0 +1,30 @@ +[ + { + "className": "Carryable_TBO_FL_1SCU_Commodity_ProcessedGoods_ConstructionMaterials", + "name": "Construction Materials", + "type": "Cargo", + "subType": "Cargo", + "reference": "5ee15a9b-4ce5-445b-a02d-415c63f43764" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Iron", + "name": "Iron", + "type": "Cargo", + "subType": "Cargo", + "reference": "332096b9-1cbf-436d-b8b0-5ed422c23da9" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Iron", + "name": "Iron (Ore)", + "type": "Cargo", + "subType": "Cargo", + "reference": "271effd5-3aa8-4538-b9a0-b0f33dc86d68" + }, + { + "className": "Carryable_TBO_FL_1SCU_Commodity_Metal_RMC", + "name": "Recycled Material Composite", + "type": "Cargo", + "subType": "Cargo", + "reference": "2e50dde5-30d4-4faa-af8f-8e5aa8004b96" + } +] \ No newline at end of file diff --git a/trade-hub/backend/tests/test_available.py b/trade-hub/backend/tests/test_available.py new file mode 100644 index 0000000..249e9cc --- /dev/null +++ b/trade-hub/backend/tests/test_available.py @@ -0,0 +1,130 @@ +"""Public available-items listing: open access, owner attribution, no notes.""" +from fastapi.testclient import TestClient + +from app.api import app + +PASSWORD = "correct horse battery staple" +CARROCK = "ANVL_Carrack" +RIFLE = "BEHR_Rifle_Ballistic_01" +IRON_ORE = "Carryable_TBO_FL_1SCU_Commodity_Metal_Ore_Iron" + + +def authed_client(username: str) -> TestClient: + client = TestClient(app) + resp = client.post( + "/api/v1/auth/register", json={"username": username, "password": PASSWORD} + ) + assert resp.status_code == 201, resp.text + return client + + +def add(client: TestClient, class_name: str, quantity: int = 1, notes: str = ""): + resp = client.post( + "/api/v1/me/inventory", + json={"class_name": class_name, "quantity": quantity, "notes": notes}, + ) + assert resp.status_code in (200, 201), resp.text + return resp + + +def offer(client: TestClient, class_name: str, quantity: int = 1): + add(client, class_name, quantity) + resp = client.patch( + f"/api/v1/me/inventory/{class_name}", json={"visibility": "available"} + ) + assert resp.status_code == 200, resp.text + + +def public_items(**params): + return TestClient(app).get("/api/v1/available", params=params).json() + + +def test_listing_is_public_and_empty_by_default(): + body = public_items() + assert body["total"] == 0 + assert body["items"] == [] + assert body["page"] == 1 + + +def test_private_items_are_not_listed_until_marked_available(): + alice = authed_client("alice") + add(alice, CARROCK) + assert public_items()["total"] == 0 + + alice.patch(f"/api/v1/me/inventory/{CARROCK}", json={"visibility": "available"}) + body = public_items() + assert body["total"] == 1 + assert body["items"][0]["class_name"] == CARROCK + + alice.patch(f"/api/v1/me/inventory/{CARROCK}", json={"visibility": "private"}) + assert public_items()["total"] == 0 + + +def test_listing_shows_owner_and_catalog_details_but_not_notes(): + alice = authed_client("alice") + offer(alice, CARROCK, quantity=3) + alice.patch(f"/api/v1/me/inventory/{CARROCK}", json={"notes": "hidden stash"}) + + item = public_items()["items"][0] + assert item["username"] == "alice" + assert item["name"] == "Anvil Carrack" + assert item["category"] == "ships" + assert item["manufacturer"]["code"] == "ANVL" + assert item["quantity"] == 3 + assert "notes" not in item + assert "hidden stash" not in str(public_items()) + + +def test_each_owner_appears_as_its_own_offer(): + offer(authed_client("alice"), CARROCK, quantity=1) + offer(authed_client("bob"), CARROCK, quantity=2) + + items = public_items(sort="quantity")["items"] + assert [(i["username"], i["quantity"], i["class_name"]) for i in items] == [ + ("bob", 2, CARROCK), + ("alice", 1, CARROCK), + ] + + +def test_removing_an_offer_removes_it_from_the_listing(): + alice = authed_client("alice") + offer(alice, CARROCK) + assert public_items()["total"] == 1 + + assert alice.delete(f"/api/v1/me/inventory/{CARROCK}").status_code == 204 + assert public_items()["total"] == 0 + assert public_items()["items"] == [] + + +def test_listing_filters_by_category_and_searches_owner_or_item(): + offer(authed_client("alice"), CARROCK) + offer(authed_client("bob"), RIFLE) + + assert [i["class_name"] for i in public_items(category="ships")["items"]] == [CARROCK] + assert [i["username"] for i in public_items(search="bob")["items"]] == ["bob"] + assert [i["class_name"] for i in public_items(search="carrack")["items"]] == [CARROCK] + + +def test_listing_paginates_and_rejects_unknown_sort(): + for quantity, class_name in ((1, CARROCK), (2, RIFLE)): + offer(authed_client(f"pilot{quantity}"), class_name, quantity=quantity) + + body = public_items(page=2, page_size=1) + assert body["total"] == 2 + assert body["total_pages"] == 2 + assert len(body["items"]) == 1 + + assert public_items(page_size=500)["page_size"] == 100 + assert TestClient(app).get("/api/v1/available?sort=bogus").status_code == 422 + + +def test_commodity_offers_are_listed_with_owner(): + alice = authed_client("alice") + offer(alice, IRON_ORE, quantity=12) + body = public_items() + assert body["total"] == 1 + item = body["items"][0] + assert item["name"] == "Iron (Ore)" + assert item["category"] == "commodities" + assert item["quantity"] == 12 + assert item["username"] == "alice"