ink.igav.whatmealtodo.pantryItem

kaur.igav.ink

Documentation

One thing in a pantry. Structured on purpose: a recipe ingredient is prose because recipe.exchange chose prose, but this lexicon is being written from scratch and has no reason to inherit that.

main record

One thing in a pantry. Structured on purpose: a recipe ingredient is prose because recipe.exchange chose prose, but this lexicon is being written from scratch and has no reason to inherit that.

Record Key tid Timestamp-based ID

Properties

createdAt string datetime Required

An RFC 3339 formatted timestamp.

expiresAt string datetime Optional

An RFC 3339 formatted timestamp.

kind string Optional

Whether this is something the kitchen happens to hold or something it always holds. Absent means ingredient. The difference is a claim about time rather than about quantity: an ingredient is a stock level that runs out, a staple is a standing assertion that this is simply always around. Matching treats the two the same once a recipe is being scored and says which it was, but only ingredients decide which recipes are considered at all — see the getSuggestions description.

Known values: ink.igav.whatmealtodo.defs#ingredient, ink.igav.whatmealtodo.defs#staple
name string Required

The canonical ingredient name, and the only field matching reads. Proposed by the normalizer, then accepted or corrected by a person before it is written — so it is an assertion by the owner, not a cache of a function that may change tomorrow.

maxLength: 100 bytes
nameSource string Optional

Whether `name` is what the normalizer offered or what a person put in its place. Corrections are the cases the rules got wrong, and are worth being able to find.

Known values: ink.igav.whatmealtodo.defs#proposed, ink.igav.whatmealtodo.defs#corrected
note string Optional

No description available.

maxLength: 500 bytes
quantity ref ink.igav.whatmealtodo.defs#quantity Optional

Optional, and not consulted when matching: recipe quantities are prose too, so there is nothing honest to compare against yet. Stored because the normalizer has to strip it to find the name anyway, and because it is what makes this record useful to another app reading the space.

text string Required

Exactly what was typed, kept verbatim. Provenance, and the input a re-scan re-reads when the rules improve. Same 500-character cap as an exchange.recipe.recipe ingredient, because it holds the same kind of thing.

maxLength: 500 bytes
View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "name",
      "text",
      "createdAt"
    ],
    "properties": {
      "kind": {
        "type": "string",
        "description": "Whether this is something the kitchen happens to hold or something it always holds. Absent means ingredient. The difference is a claim about time rather than about quantity: an ingredient is a stock level that runs out, a staple is a standing assertion that this is simply always around. Matching treats the two the same once a recipe is being scored and says which it was, but only ingredients decide which recipes are considered at all — see the getSuggestions description.",
        "knownValues": [
          "ink.igav.whatmealtodo.defs#ingredient",
          "ink.igav.whatmealtodo.defs#staple"
        ]
      },
      "name": {
        "type": "string",
        "maxLength": 100,
        "description": "The canonical ingredient name, and the only field matching reads. Proposed by the normalizer, then accepted or corrected by a person before it is written — so it is an assertion by the owner, not a cache of a function that may change tomorrow."
      },
      "note": {
        "type": "string",
        "maxLength": 500
      },
      "text": {
        "type": "string",
        "maxLength": 500,
        "description": "Exactly what was typed, kept verbatim. Provenance, and the input a re-scan re-reads when the rules improve. Same 500-character cap as an exchange.recipe.recipe ingredient, because it holds the same kind of thing."
      },
      "quantity": {
        "ref": "ink.igav.whatmealtodo.defs#quantity",
        "type": "ref",
        "description": "Optional, and not consulted when matching: recipe quantities are prose too, so there is nothing honest to compare against yet. Stored because the normalizer has to strip it to find the name anyway, and because it is what makes this record useful to another app reading the space."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime"
      },
      "expiresAt": {
        "type": "string",
        "format": "datetime"
      },
      "nameSource": {
        "type": "string",
        "description": "Whether `name` is what the normalizer offered or what a person put in its place. Corrections are the cases the rules got wrong, and are worth being able to find.",
        "knownValues": [
          "ink.igav.whatmealtodo.defs#proposed",
          "ink.igav.whatmealtodo.defs#corrected"
        ]
      }
    }
  },
  "description": "One thing in a pantry. Structured on purpose: a recipe ingredient is prose because recipe.exchange chose prose, but this lexicon is being written from scratch and has no reason to inherit that."
}

Lexicon Garden

@