# io.kich.grocery.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 grocery namespace. Grocery lists have no record type — they live 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.grocery.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.grocery.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uxjwdy4wvuridijisalvxlxe/io.kich.grocery.defs/examples)

## Definitions

### `io.kich.grocery.defs#groceryListView`

**Type**: `object`

A shopping list, without its items. `toBuy` is the count a reader actually wants; the items themselves are a shopping surface, not a planning one.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `completedAt` | `string` (datetime) | No |  |
| `createdAt` | `string` (datetime) | No |  |
| `id` | `string` | Yes |  |
| `name` | `string` | Yes |  |
| `status` | `string` | Yes |  |
| `toBuy` | `integer` | Yes | How many items on the list are still unchecked |

### `io.kich.grocery.defs`

**Type**: `object`

Shared definitions for grocery-related lexicons

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

### `io.kich.grocery.defs#plannedRecipe`

**Type**: `object`

A recipe somebody attached to a shopping list — which is what a planned meal is in this product. There is no separate meal-plan record, and this view does not pretend there is one.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `plannedDate` | `string` (datetime) | No | The night it is meant for, when somebody set one. Usually absent — most lists are ordered, not dated. |
| `recipe` | `ref` → `io.kich.recipe.defs#recipeView` | Yes |  |
| `servings` | `unknown` | Yes | How many this is being cooked for, which may differ from the recipe's own |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "groceryListView": {
      "description": "A shopping list, without its items. `toBuy` is the count a reader actually wants; the items themselves are a shopping surface, not a planning one.",
      "properties": {
        "completedAt": {
          "format": "datetime",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "knownValues": [
            "draft",
            "active",
            "completed",
            "archived"
          ],
          "type": "string"
        },
        "toBuy": {
          "description": "How many items on the list are still unchecked",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "id",
        "name",
        "status",
        "toBuy"
      ],
      "type": "object"
    },
    "main": {
      "description": "Shared definitions for grocery-related lexicons",
      "properties": {},
      "type": "object"
    },
    "plannedRecipe": {
      "description": "A recipe somebody attached to a shopping list — which is what a planned meal is in this product. There is no separate meal-plan record, and this view does not pretend there is one.",
      "properties": {
        "plannedDate": {
          "description": "The night it is meant for, when somebody set one. Usually absent — most lists are ordered, not dated.",
          "format": "datetime",
          "type": "string"
        },
        "recipe": {
          "ref": "io.kich.recipe.defs#recipeView",
          "type": "ref"
        },
        "servings": {
          "description": "How many this is being cooked for, which may differ from the recipe's own",
          "type": "unknown"
        }
      },
      "required": [
        "recipe",
        "servings"
      ],
      "type": "object"
    }
  },
  "description": "Shared definitions for the grocery namespace. Grocery lists have no record type — they live in the application database rather than on a PDS — so these views exist only as query output.",
  "id": "io.kich.grocery.defs",
  "lexicon": 1
}
```
