app.starrysky.streak.inventory
A ledger record tracking the accumulation and expenditure of streak freezes. Forms a linked chain via the 'prev' field.
Details · record, key tid
| Kind | record |
|---|---|
| Record key | tid |
| Authority | streak.starrysky.app |
| Indexed |
Checks
Validunlimited-stringdefs.main.record.properties.actionNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.record.properties.originServiceNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.record.properties.subjectNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "A ledger record tracking the accumulation and expenditure of streak freezes. Forms a linked chain via the 'prev' field.",
"key": "tid",
"record": {
"properties": {
"action": {
"description": "The transaction type occurring in this ledger entry.",
"knownValues": [
"earn",
"spend",
"initialize",
"claim",
"spend_and_earn"
],
"type": "string"
},
"balance": {
"description": "The total number of freezes available *after* this action is applied.",
"type": "integer"
},
"createdAt": {
"description": "Timestamp of when this inventory ledger entry was created.",
"format": "datetime",
"type": "string"
},
"originService": {
"description": "The NSID of the service this inventory applies to.",
"type": "string"
},
"policy": {
"description": "The URI of the policy governing this streak's rules.",
"format": "at-uri",
"type": "string"
},
"prev": {
"description": "Link to the previous inventory record in the ledger chain. Null if initializing.",
"format": "cid",
"type": "string"
},
"relatedCheckin": {
"description": "The CID of the checkin record that earned or spent these freezes.",
"format": "cid",
"type": "string"
},
"relatedFreezeGrant": {
"description": "The CID of the freezegrant record being claimed.",
"format": "cid",
"type": "string"
},
"subject": {
"description": "The name of the habit this inventory ledger belongs to (e.g., 'Daily Coding').",
"type": "string"
}
},
"required": [
"originService",
"policy",
"subject",
"action",
"balance",
"createdAt"
],
"type": "object"
},
"type": "record"
}
},
"id": "app.starrysky.streak.inventory",
"lexicon": 1
}