{
"id": "ink.igav.whatmealtodo.pantryItem",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"name",
"text",
"createdAt"
],
"properties": {
"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."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}