interface · Browser and Node

# Reason

`@toip-tools/mandates` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mandates/src/types.ts#L61)

Import:

```ts
import { type Reason } from "@toip-tools/mandates";
```

## Declaration

interface:

```ts
interface Reason {
  code: string;
  /** Which link, numbered from 0 at the root. */
  link?: number;
  dimension?: string;
  op?: string;
  attr?: string;
  limit?: unknown;
  value?: unknown;
  /** Budgets: what was already spent in the period. */
  spent?: Units;
  period?: Period;
  /** requirement.failed: which requirement. */
  requirement?: string;
  /** Structural reasons: what exactly was wrong, for people. */
  detail?: string;
  approvable: boolean;
}
```

## Properties

**`code` (required)**

`string`

**`link` (optional)**

`number | undefined`

Which link, numbered from 0 at the root.

**`dimension` (optional)**

`string | undefined`

**`op` (optional)**

`string | undefined`

**`attr` (optional)**

`string | undefined`

**`limit` (optional)**

`unknown`

**`value` (optional)**

`unknown`

**`spent` (optional)**

`string | undefined`

Budgets: what was already spent in the period.

**`period` (optional)**

`Period | undefined`

**`requirement` (optional)**

`string | undefined`

requirement.failed: which requirement.

**`detail` (optional)**

`string | undefined`

Structural reasons: what exactly was wrong, for people.

**`approvable` (required)**

`boolean`

[Usage guide](https://toip.tools/toolkit/mandates/#usage) · [Error handling](https://toip.tools/toolkit/mandates/#errors) · [All exports](https://toip.tools/toolkit/mandates/api/)

---

This is the Markdown version of https://toip.tools/toolkit/mandates/api/Reason/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
