# io.kich.pantry.defs

> Published by [kich.io](https://lexicon.garden/identity/did:plc:uxjwdy4wvuridijisalvxlxe)

✓ This is the authoritative definition for this NSID.

## Description

Shared definitions for the pantry namespace. The pantry has no record type — it lives in the application database rather than on a PDS — so these views exist only as query output.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.pantry.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.pantry.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.pantry.defs/examples)

## Definitions

### `io.kich.pantry.defs`

**Type**: `object`

Shared definitions for pantry-related lexicons

| Property | Type | Required | Description |
|----------|------|----------|-------------|

### `io.kich.pantry.defs#pantryItemView`

**Type**: `object`

One thing in the house, as a reader sees it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `category` | `string` | No | The product catalogue's category, where the item is matched to one |
| `expirationDate` | `string` (datetime) | No | When this turns. Absent for things that do not. |
| `id` | `string` | Yes | Stable identifier for this pantry item |
| `name` | `string` | Yes | What the thing is called |
| `notes` | `string` | No | Whatever somebody wrote on it |
| `purchasedAt` | `string` (datetime) | No | When it came into the house |
| `quantity` | `unknown` | Yes | How much there is. A number, and deliberately not an integer: half a bag is a real quantity. |
| `status` | `string` | Yes | Whether the item is in stock, running low, or used up. `finished` items are never returned. |
| `unit` | `string` | Yes | The unit the quantity is counted in (pieces, g, ml, bunch) |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Shared definitions for pantry-related lexicons",
      "properties": {},
      "type": "object"
    },
    "pantryItemView": {
      "description": "One thing in the house, as a reader sees it.",
      "properties": {
        "category": {
          "description": "The product catalogue's category, where the item is matched to one",
          "type": "string"
        },
        "expirationDate": {
          "description": "When this turns. Absent for things that do not.",
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "description": "Stable identifier for this pantry item",
          "type": "string"
        },
        "name": {
          "description": "What the thing is called",
          "type": "string"
        },
        "notes": {
          "description": "Whatever somebody wrote on it",
          "type": "string"
        },
        "purchasedAt": {
          "description": "When it came into the house",
          "format": "datetime",
          "type": "string"
        },
        "quantity": {
          "description": "How much there is. A number, and deliberately not an integer: half a bag is a real quantity.",
          "type": "unknown"
        },
        "status": {
          "description": "Whether the item is in stock, running low, or used up. `finished` items are never returned.",
          "knownValues": [
            "in_stock",
            "low",
            "depleted"
          ],
          "type": "string"
        },
        "unit": {
          "description": "The unit the quantity is counted in (pieces, g, ml, bunch)",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "quantity",
        "unit",
        "status"
      ],
      "type": "object"
    }
  },
  "description": "Shared definitions for the pantry namespace. The pantry has no record type — it lives in the application database rather than on a PDS — so these views exist only as query output.",
  "id": "io.kich.pantry.defs",
  "lexicon": 1
}
```
