# airdress.grant.*

{/* Generated by scripts/generate-event-reference.mjs from https://schemas.airdress.co/operator/events/v1.json (operator v0.1.138).
    Do not edit by hand: run `pnpm generate:event-reference` and commit the result. */}

The events in the `airdress.grant` family. How to read a section, and what
each audience means, is on the [event reference](/events/) page.

## `airdress.grant.created`

Owner info Functions

The owner granted a principal actions on a resource.

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.133.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `actions` | string | yes |  |
| `actor` | string | yes |  |
| `grant_id` | string (uuid) | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `target` | string | yes | `Kind::name`, `*` for every resource of the kind. |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "The owner granted a principal actions on a resource.",
  "properties": {
    "actions": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "grant_id": {
      "format": "uuid",
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "target": {
      "description": "`Kind::name`, `*` for every resource of the kind.",
      "type": "string"
    }
  },
  "required": [
    "actions",
    "actor",
    "grant_id",
    "principal_id",
    "target"
  ],
  "title": "GrantCreated",
  "type": "object"
}
```

</details>

## `airdress.grant.revoked`

Owner info Functions

A resource grant was revoked.

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.133.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `actions` | string | yes |  |
| `actor` | string | yes |  |
| `grant_id` | string (uuid) | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `target` | string | yes |  |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A resource grant was revoked.",
  "properties": {
    "actions": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "grant_id": {
      "format": "uuid",
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "target": {
      "type": "string"
    }
  },
  "required": [
    "actions",
    "actor",
    "grant_id",
    "principal_id",
    "target"
  ],
  "title": "GrantRevoked",
  "type": "object"
}
```

</details>