---
title: "Views (ViewDecl)"
description: "Generated from the doc schema (CatalogDocSchema, @canonify/kernel-catalog/doc): each field’s type, default and description are the schema’s own, and each example is a bundle file that readBundle…"
order: 17
id: "model/view"
---

# Views (ViewDecl)

Generated from the doc schema (`CatalogDocSchema`, @canonify/kernel-catalog/doc): each field’s type, default and description are the schema’s own, and each example is a bundle file that readBundle decodes. A field’s Example is its value in one of those examples.

## ViewDecl {#viewdecl}

A view: a SpringML page source and its schema version (pages).

**Not yet typed** (owner: pages K6-P page pipeline (epic 4p3)). Until its owner types it, the doc checks the fields below and keeps every other field as JSON.

The `views` slot of the doc holds these, keyed by id. In a bundle each is one file, `views/<name>.json`, named by its `name`, which the file then leaves out.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `id` | [ViewId](shapes.md#viewid) | yes (propose assigns it; a new declaration leaves it out) | — | — | A view id (`vw_…`); renames keep it. |
| `name` | [Ident](shapes.md#ident) | yes | — | — | The declaration name. |

Any other field: JSON.

## TypePresentation {#typepresentation}

How the type is shown (pages, C33); it never produces a migration.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `noun` | [TypePresentation.noun](view.md#typepresentation.noun) | no | — | `{"one":"order","other":"orders"}` | What one record and several records are called. |
| `code` | [PropId](shapes.md#propid) | no | — | `"pr_4p6r8t0v2x"` | The property that holds the record’s code. |
| `statusProp` | [PropId](shapes.md#propid) | no | — | `"pr_4p6r8t0v2x"` | The property whose value is the status. |
| `recordView` | [ViewId](shapes.md#viewid) | no | — | `"vw_3c5e7g9k2m"` | The view that shows one record. |
| `conditions` | Record<[PropId](shapes.md#propid), [ConditionPresentation](view.md#conditionpresentation)> | no | — | `{"pr_8b2f4h6j0k":{"meaning":"critical","level":"critical"}}` | The named conditions, by the derived boolean property that holds each. |
| `props` | Record<string, JSON> | no | — | `{"pr_8b2f4h6j0k":{"better":"down"}}` | How a property is read and judged (better, thresholds, importance); typed by the bind task that reads it. |

The `presentation` of a type file.

```json
{
  "noun": { "one": "order", "other": "orders" },
  "statusProp": "pr_4p6r8t0v2x",
  "conditions": {
    "pr_8b2f4h6j0k": { "meaning": "critical", "level": "critical" }
  }
}
```

The `presentation` of a type file.

```json
{
  "code": "pr_4p6r8t0v2x",
  "recordView": "vw_3c5e7g9k2m",
  "props": { "pr_8b2f4h6j0k": { "better": "down" } }
}
```

## TypePresentation.noun {#typepresentation.noun}

What one record and several records are called.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `one` | [Text](shapes.md#text) | yes | — | `"order"` | The noun for one record. |
| `other` | [Text](shapes.md#text) | yes | — | `"orders"` | The noun for several records. |

## ConditionPresentation {#conditionpresentation}

A named condition of a type: what it means, its tone and what fixes it.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `meaning` | `"critical"` \| `"warn"` \| `"good"` | no | — | `"critical"` | What a row holding the condition means: critical, warn or good. |
| `level` | `"critical"` \| `"warn"` \| `"good"` \| `"info"` \| `"neutral"` | yes | — | `"critical"` | The tone a mark of the condition is shown in. |
| `on` | [PropId](shapes.md#propid) | no | — | `"pr_6w8y0a2c4e"` | The date, time or number property the condition is about; a flag shows its distance. |
| `amount` | [PropId](shapes.md#propid) | no | — | `"pr_8b2f4h6j0k"` | The number property that says how much (“Short 2”). |
| `fix` | [ActionId](shapes.md#actionid) | no | — | `"ac_3h5k7n9q1s"` | The action that fixes the condition: a row holding it offers it first. |

An entry of `presentation.conditions` in a type file, under the id of the derived boolean property that holds it.

```json
{ "level": "neutral", "amount": "pr_8b2f4h6j0k" }
```

An entry of `presentation.conditions` in a type file, under the id of the derived boolean property that holds it.

```json
{
  "meaning": "warn",
  "level": "warn",
  "on": "pr_6w8y0a2c4e",
  "fix": "ac_3h5k7n9q1s"
}
```

## PresentationOverrides {#presentationoverrides}

The presentation keys this declaration overrides (pages, C33).

**Not yet typed** (owner: pages K6-P page pipeline (epic 4p3)). Until its owner types it, the doc checks the fields below and keeps every other field as JSON.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `inputs` | Record<[Ident](shapes.md#ident), [PresentationOverrides.inputs](view.md#presentationoverrides.inputs)> | no | — | (see the example) | Per input (by input name): the label and help the form shows. |

Any other field: JSON.

## PresentationOverrides.inputs {#presentationoverrides.inputs}

How one input is worded in the action’s form.

| Field | Type | Required | Default | Example | Description |
|---|---|---|---|---|---|
| `label` | [Text](shapes.md#text) | no | — | `"Note for the kitchen"` | The input label, per locale. |
| `help` | [Text](shapes.md#text) | no | — | `"The kitchen reads it when it packs the order."` | The input help text, per locale. |
