pet.trezy.retirePet

trezy.pet

{
  "id": "pet.trezy.retirePet",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "uri"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "The pet to retire. Must be a pet the caller owns; the procedure never accepts a DID and acts only on the authenticated caller's own rows."
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "The pet that was retired. Present only on success, which is why nothing here is required: a refusal carries error and message instead, and requiring even one of these would fail response validation and turn an expected refusal back into a 500."
            },
            "name": {
              "type": "string",
              "description": "The retired pet's name, so the confirmation the player sees afterwards can use it. Absent if the ledger row carries no usable name."
            },
            "error": {
              "type": "string",
              "description": "Present instead of uri/name when the pet was not retired for an expected reason. A stable machine code the client branches on — add codes, never rename them.",
              "knownValues": [
                "missing-uri",
                "unknown-pet",
                "already-retired",
                "last-active-pet",
                "last-pet"
              ]
            },
            "message": {
              "type": "string",
              "description": "A sentence to show the player, accompanying `error`. Free to reword; do not branch on it."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Retire one of the caller's own pets: put it away, off the stage and out of the collection's foreground. IRREVERSIBLE — there is no un-retire, here or anywhere, by design. A client MUST confirm before calling this and MUST name the pet in the confirmation. The pet is not deleted and not refunded: its ledger row stays, its price still counts as spent, and the record in the caller's repo is left where it is. REFUSES the caller's last ACTIVE pet with last-active-pet: only active pets earn and nothing activates a pet after the fact, so retiring the last one leaves a player with no income and no route back to any — the balance can never reach a price again and the starter grant is once per DID. It blocks nothing achievable another way: buying lands a pet active while a slot is free, so a player with money can buy first and retire after."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}

Validate Record

Validate a record against pet.trezy.retirePet

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:ollch4g7tes2reb5eceiwuol
CID
bafyreifwnyrx2b5vgr777zic77x4ggdka7orll5yvqhxcakzkbxywfy23e
Indexed At
2026-08-09 01:42 UTC
AT-URI
at://did:plc:ollch4g7tes2reb5eceiwuol/com.atproto.lexicon.schema/pet.trezy.retirePet

Lexicon Garden

@