pet.trezy.setPreferences
Save a text style, either for the whole account or for one device. ⚠ `scope` IS REQUIRED AND HAS NO DEFAULT. Guessing it is the one mistake that cannot be undone by guessing again: silently defaulting to `account` changes the typeface on every device somebody owns when they meant to change one, and silently defaulting to `device` leaves them wondering why their laptop never followed. The client always knows which the player asked for, because the player was asked.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | trezy.pet |
| Indexed |
Procedure
procedure · POSTInput
application/jsondeviceId
stringRequired for `device` scope; optional for `account`, where supplying it clears this device's override. Opaque — the client generates it and it must carry nothing about the device or the person.
maxLength: 64
featureOffered
booleanAccount-scope only.
fingerprint
stringmaxLength: 64
label
stringmaxLength: 60
`account` writes the account-wide default AND deletes this device's override, so the device the player is holding actually follows the choice they just made. `device` writes an override for `deviceId` alone and leaves the account default untouched.
knownValues: account | device
typeMode
stringknownValues: pixel | softer | system
typeOffered
booleanAccount-scope only. Refused with `device`, because being told about pixel type is a fact about a person and storing it per-device would re-arm the notice on every new device.
Output
application/jsonerror
stringA stable machine code the client branches on — add codes, never rename them.
knownValues: not-authenticated | invalid-scope | invalid-mode | device-required | offered-is-account-scope | nothing-to-do | save-failed
featureOffered
booleanAccount-scope only.
message
stringtypeMode
stringknownValues: pixel | softer | system
typeOffered
booleanupdatedAt
string · datetimeSimilar lexicons
semantic matchLexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
pet.trezy.getPreferences
queryEverything the caller's account knows about how to present the game: the account-wide default, and every device that has been given its own text style. Takes no DID — it answers for whoever is authenticated and nobody else. ⚠ IT RETURNS THE WHOLE PICTURE RATHER THAN AN ANSWER, deliberately: which of these applies depends on which device is asking and what its browser still remembers, and that reconciliation lives in one tested place on the client (src/lib/preferences.ts) instead of being half he
-
pet.trezy.preferences
record