pet.trezy.getDefinitions

trezy.pet

Documentation

Every species and tier definition the game will actually price from. Reads the INDEX, not the publisher's PDS, and filters to the publisher DID. The store must price from the same rows createPet charges from: definitions can be published and not yet indexed, and reading the PDS in that state renders a full catalogue at correct prices where every purchase refuses. Returns both collections in one answer so a species can never be shown without its tier.

main query

Every species and tier definition the game will actually price from. Reads the INDEX, not the publisher's PDS, and filters to the publisher DID. The store must price from the same rows createPet charges from: definitions can be published and not yet indexed, and reading the PDS in that state renders a full catalogue at correct prices where every purchase refuses. Returns both collections in one answer so a species can never be shown without its tier.

Output

Encodingapplication/json
achievements array Optional

`games.gamesgamesgamesgames.achievement` records — OUR half: the title, the family it hangs in, the display rank, and the sentence shown to somebody who has not earned it. Joined to `badges` by the shared id, deliberately not joined here: a script that decided what a badge looked like would be a second opinion about a record it did not own. Same absent-is-not-a-fault rule.

activePetCap integer Optional

How many pets may be on the stage at once, from pet.trezy.gameConfig. A DISPLAY hint: the corral draws this many slots so a player can see the room they have, rather than discovering the ceiling by being refused. swapPets remains the only authority on whether a pet may actually come on. ABSENT when the config could not be read — a client must then draw the pets it has and no empty slots, never substitute a number of its own, because a compiled-in cap is exactly the drift that put four copies of the decay curve in this directory.

badges array Optional

`community.lexicon.badge.definition` records — the PORTABLE half of a badge: the stable name every other client reads it by, and the earned statement. Shaped like the others. ⚠ ABSENT OR EMPTY IS NOT A FAULT, for the same reason groups are not: a game whose trophy cabinet cannot be furnished still prices, sells and draws every pet in it.

error string Optional

Present instead of the catalogue when there is no catalogue to send. A stable machine code the client branches on — add codes, never rename them. `definitions-unavailable` means the read failed and the answer is unknown; `definitions-empty` means the read succeeded and there is genuinely nothing published. They are different operator problems — a broken index versus an unpublished catalogue — and they were once the same 200 with two empty arrays, which rendered an empty shop that looked like the game rather than like a fault.

Known values: definitions-unavailable, definitions-empty
foods array Optional

`pet.trezy.food` records — what a player may drop into the terrarium, and which frame of the food sheet each one draws. Shaped like the others. ⚠ ABSENT OR EMPTY IS NOT A FAULT, for the same reason groups and badges are not: a catalogue with no foods still prices, sells and draws every pet in the game. Only feeding is unavailable, and a client must render the shop it has rather than treating this as an outage.

groups array Optional

Group definitions, shaped like the others. ⚠ ABSENT OR EMPTY IS NOT A FAULT, unlike an empty `species` or `tiers`. A species without its groups is still priceable, buyable and drawable — it is only unlabelled — so the Lua sends an empty list rather than refusing the catalogue, and a client must render the pets it has with no group chips instead of treating this as an outage.

message string Optional

A sentence to show the player, accompanying `error`.

species array Optional

No description available.

starterGrantCap integer Optional

The most createPet will grant a player for their very first pet, from pet.trezy.gameConfig/self. Onboarding offers a choice of starters and every one of them must be a pet the grant actually covers, so the number that decides that has to come from the same record the server enforces it from — a client-side copy would offer pets nobody can buy the moment it is repriced. Absent when the config record could not be read, which a client must treat as 'unknown' and NOT as zero: zero would empty the starter choice, and an instance that cannot read its config also cannot sell anything, so the honest reading is that the catalogue is unusable rather than that everything is too dear.

tiers array Optional

Tier definitions, shaped as com.atproto.repo.listRecords returns them so the client parse is the same either way.

Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
View raw schema
{
  "type": "query",
  "output": {
    "schema": {
      "type": "object",
      "required": [],
      "properties": {
        "error": {
          "type": "string",
          "description": "Present instead of the catalogue when there is no catalogue to send. A stable machine code the client branches on — add codes, never rename them. `definitions-unavailable` means the read failed and the answer is unknown; `definitions-empty` means the read succeeded and there is genuinely nothing published. They are different operator problems — a broken index versus an unpublished catalogue — and they were once the same 200 with two empty arrays, which rendered an empty shop that looked like the game rather than like a fault.",
          "knownValues": [
            "definitions-unavailable",
            "definitions-empty"
          ]
        },
        "foods": {
          "type": "array",
          "items": {
            "ref": "#definition",
            "type": "ref"
          },
          "description": "`pet.trezy.food` records — what a player may drop into the terrarium, and which frame of the food sheet each one draws. Shaped like the others. ⚠ ABSENT OR EMPTY IS NOT A FAULT, for the same reason groups and badges are not: a catalogue with no foods still prices, sells and draws every pet in the game. Only feeding is unavailable, and a client must render the shop it has rather than treating this as an outage."
        },
        "tiers": {
          "type": "array",
          "items": {
            "ref": "#definition",
            "type": "ref"
          },
          "description": "Tier definitions, shaped as com.atproto.repo.listRecords returns them so the client parse is the same either way."
        },
        "badges": {
          "type": "array",
          "items": {
            "ref": "#definition",
            "type": "ref"
          },
          "description": "`community.lexicon.badge.definition` records — the PORTABLE half of a badge: the stable name every other client reads it by, and the earned statement. Shaped like the others. ⚠ ABSENT OR EMPTY IS NOT A FAULT, for the same reason groups are not: a game whose trophy cabinet cannot be furnished still prices, sells and draws every pet in it."
        },
        "groups": {
          "type": "array",
          "items": {
            "ref": "#definition",
            "type": "ref"
          },
          "description": "Group definitions, shaped like the others. ⚠ ABSENT OR EMPTY IS NOT A FAULT, unlike an empty `species` or `tiers`. A species without its groups is still priceable, buyable and drawable — it is only unlabelled — so the Lua sends an empty list rather than refusing the catalogue, and a client must render the pets it has with no group chips instead of treating this as an outage."
        },
        "message": {
          "type": "string",
          "description": "A sentence to show the player, accompanying `error`."
        },
        "species": {
          "type": "array",
          "items": {
            "ref": "#definition",
            "type": "ref"
          }
        },
        "achievements": {
          "type": "array",
          "items": {
            "ref": "#definition",
            "type": "ref"
          },
          "description": "`games.gamesgamesgamesgames.achievement` records — OUR half: the title, the family it hangs in, the display rank, and the sentence shown to somebody who has not earned it. Joined to `badges` by the shared id, deliberately not joined here: a script that decided what a badge looked like would be a second opinion about a record it did not own. Same absent-is-not-a-fault rule."
        },
        "activePetCap": {
          "type": "integer",
          "minimum": 0,
          "description": "How many pets may be on the stage at once, from pet.trezy.gameConfig. A DISPLAY hint: the corral draws this many slots so a player can see the room they have, rather than discovering the ceiling by being refused. swapPets remains the only authority on whether a pet may actually come on. ABSENT when the config could not be read — a client must then draw the pets it has and no empty slots, never substitute a number of its own, because a compiled-in cap is exactly the drift that put four copies of the decay curve in this directory."
        },
        "starterGrantCap": {
          "type": "integer",
          "description": "The most createPet will grant a player for their very first pet, from pet.trezy.gameConfig/self. Onboarding offers a choice of starters and every one of them must be a pet the grant actually covers, so the number that decides that has to come from the same record the server enforces it from — a client-side copy would offer pets nobody can buy the moment it is repriced. Absent when the config record could not be read, which a client must treat as 'unknown' and NOT as zero: zero would empty the starter choice, and an instance that cannot read its config also cannot sell anything, so the honest reading is that the catalogue is unusable rather than that everything is too dear."
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Every species and tier definition the game will actually price from. Reads the INDEX, not the publisher's PDS, and filters to the publisher DID. The store must price from the same rows createPet charges from: definitions can be published and not yet indexed, and reading the PDS in that state renders a full catalogue at correct prices where every purchase refuses. Returns both collections in one answer so a species can never be shown without its tier."
}
definition object

No description available.

Properties

uri string at-uri Required

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

value unknown Required

The record body verbatim. Unknown rather than typed: the client already parses this shape, and a schema here would have to be kept in step with pet.trezy.species and pet.trezy.tier for no gain.

View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "value"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri"
    },
    "value": {
      "type": "unknown",
      "description": "The record body verbatim. Unknown rather than typed: the client already parses this shape, and a schema here would have to be kept in step with pet.trezy.species and pet.trezy.tier for no gain."
    }
  }
}

Lexicon Garden

@