app.starrysky.streak.inventory

starrysky.app

Documentation

A ledger record tracking the accumulation and expenditure of streak freezes. Forms a linked chain via the 'prev' field.

main record

A ledger record tracking the accumulation and expenditure of streak freezes. Forms a linked chain via the 'prev' field.

Record Key tid Timestamp-based ID

Properties

action string Required

The transaction type occurring in this ledger entry.

Known values: earn, spend, initialize, claim, spend_and_earn
balance integer Required

The total number of freezes available *after* this action is applied.

createdAt string datetime Required

Timestamp of when this inventory ledger entry was created.

originService string Required

The NSID of the service this inventory applies to.

policy string at-uri Required

The URI of the policy governing this streak's rules.

prev string cid Optional

Link to the previous inventory record in the ledger chain. Null if initializing.

relatedCheckin string cid Optional

The CID of the checkin record that earned or spent these freezes.

relatedFreezeGrant string cid Optional

The CID of the freezegrant record being claimed.

subject string Required

The name of the habit this inventory ledger belongs to (e.g., 'Daily Coding').

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "originService",
      "policy",
      "subject",
      "action",
      "balance",
      "createdAt"
    ],
    "properties": {
      "prev": {
        "type": "string",
        "format": "cid",
        "description": "Link to the previous inventory record in the ledger chain. Null if initializing."
      },
      "action": {
        "type": "string",
        "description": "The transaction type occurring in this ledger entry.",
        "knownValues": [
          "earn",
          "spend",
          "initialize",
          "claim",
          "spend_and_earn"
        ]
      },
      "policy": {
        "type": "string",
        "format": "at-uri",
        "description": "The URI of the policy governing this streak's rules."
      },
      "balance": {
        "type": "integer",
        "description": "The total number of freezes available *after* this action is applied."
      },
      "subject": {
        "type": "string",
        "description": "The name of the habit this inventory ledger belongs to (e.g., 'Daily Coding')."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime",
        "description": "Timestamp of when this inventory ledger entry was created."
      },
      "originService": {
        "type": "string",
        "description": "The NSID of the service this inventory applies to."
      },
      "relatedCheckin": {
        "type": "string",
        "format": "cid",
        "description": "The CID of the checkin record that earned or spent these freezes."
      },
      "relatedFreezeGrant": {
        "type": "string",
        "format": "cid",
        "description": "The CID of the freezegrant record being claimed."
      }
    }
  },
  "description": "A ledger record tracking the accumulation and expenditure of streak freezes. Forms a linked chain via the 'prev' field."
}

Lexicon Garden

@