Zeeshaun 9ba725d207
All checks were successful
Deploy Promiscuity Auth API / deploy (push) Successful in 46s
Deploy Promiscuity Character API / deploy (push) Successful in 45s
Deploy Promiscuity Inventory API / deploy (push) Successful in 46s
Deploy Promiscuity Locations API / deploy (push) Successful in 1m3s
k8s smoke test / test (push) Successful in 7s
Gathering infra
2026-03-15 14:04:12 -05:00

1.3 KiB

LocationsApi document shapes

This service expects JSON request bodies for location creation and updates and stores location documents in MongoDB.

Inbound JSON documents

  • CreateLocationRequest (POST /api/locations)
    {
      "name": "string",
      "coord": {
        "x": 0,
        "y": 0
      }
    }
    
  • UpdateLocationRequest (PUT /api/locations/{id})
    {
      "name": "string"
    }
    
    coord cannot be updated.
  • GatherResourceRequest (POST /api/locations/{id}/gather)
    {
      "characterId": "string (Character ObjectId)",
      "resourceKey": "wood"
    }
    

Stored documents (MongoDB)

  • Location
    {
      "id": "string (ObjectId)",
      "name": "string",
      "coord": {
        "x": 0,
        "y": 0
      },
      "resources": [
        {
          "itemKey": "wood",
          "remainingQuantity": 100,
          "gatherQuantity": 3
        }
      ],
      "createdUtc": "string (ISO-8601 datetime)"
    }
    

Outbound JSON documents

  • GatherResourceResponse (POST /api/locations/{id}/gather)
    {
      "locationId": "string (ObjectId)",
      "characterId": "string (ObjectId)",
      "resourceKey": "wood",
      "quantityGranted": 3,
      "remainingQuantity": 97,
      "inventoryResponseJson": "string (raw InventoryApi response JSON)"
    }