# airdress.root_recovery.*

{/* 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.root_recovery` family. How to read a section, and what
each audience means, is on the [event reference](/events/) page.

## `airdress.root_recovery.cancelled`

Owner warn Functions

A pending root recovery was cancelled from an enrolled device. The owner's OIDC subject is in the journal line and kept out of the recorded data.

**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.135.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `airdress` | string | yes |  |
| `cancelled_by_enrollment` | string (uuid) | yes |  |
| `prior_enrollment_count` | integer (int64) | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A pending root recovery was cancelled from an enrolled device. The owner's OIDC subject is in the journal line and kept out of the recorded data.",
  "properties": {
    "airdress": {
      "type": "string"
    },
    "cancelled_by_enrollment": {
      "format": "uuid",
      "type": "string"
    },
    "prior_enrollment_count": {
      "format": "int64",
      "type": "integer"
    }
  },
  "required": [
    "airdress",
    "cancelled_by_enrollment",
    "prior_enrollment_count"
  ],
  "title": "RootRecoveryCancelled",
  "type": "object"
}
```

</details>

## `airdress.root_recovery.executed`

Owner warn Functions

A self-service root recovery executed: every device must re-enroll.

`trigger` says what executed it (`approval`, `timer`, `immediate`). The owner's OIDC subject is in the journal line and kept out of the recorded data.

**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.135.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `airdress` | string | yes |  |
| `delegation_only_enrollment_count` | integer (int64) | yes |  |
| `objector_enrollment_count` | integer (int64) | yes |  |
| `objector_window_days` | integer (int64) | yes |  |
| `prior_enrollment_count` | integer (int64) | yes |  |
| `revoked_enrollments` | integer (uint) | yes |  |
| `sub_user_enrollment_count` | integer (int64) | yes |  |
| `trigger` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A self-service root recovery executed: every device must re-enroll.\n\n`trigger` says what executed it (`approval`, `timer`, `immediate`). The owner's OIDC subject is in the journal line and kept out of the recorded data.",
  "properties": {
    "airdress": {
      "type": "string"
    },
    "delegation_only_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "objector_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "objector_window_days": {
      "format": "int64",
      "type": "integer"
    },
    "prior_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "revoked_enrollments": {
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "sub_user_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "trigger": {
      "type": "string"
    }
  },
  "required": [
    "airdress",
    "delegation_only_enrollment_count",
    "objector_enrollment_count",
    "objector_window_days",
    "prior_enrollment_count",
    "revoked_enrollments",
    "sub_user_enrollment_count",
    "trigger"
  ],
  "title": "RootRecoveryExecuted",
  "type": "object"
}
```

</details>

## `airdress.root_recovery.rejected`

Owner warn Functions

A root recovery attempt was refused, or one source was locked out after repeated failures (`reason = backoff_locked`). `airdress` is what the assertion claimed — a label, not a fact.

**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.135.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `airdress` | string or null | no |  |
| `attempt` | integer or null | no |  |
| `locked_for_secs` | integer or null | no |  |
| `reason` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A root recovery attempt was refused, or one source was locked out after repeated failures (`reason = backoff_locked`). `airdress` is what the assertion claimed — a label, not a fact.",
  "properties": {
    "airdress": {
      "type": [
        "string",
        "null"
      ]
    },
    "attempt": {
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "locked_for_secs": {
      "format": "uint64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "reason"
  ],
  "title": "RootRecoveryRejected",
  "type": "object"
}
```

</details>

## `airdress.root_recovery.scheduled`

Owner warn App stream

Somebody asked to reset this airdress's root key and the reset waits, because devices are enrolled; any of them may cancel it. The notice the devices see carries no `owner_sub` and no key material.

**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.
- **The app's event stream**, as `root_recovery_pending`: devices it concerns hear of it at once.
- Not functions bound to this operator's events: it is kept off that path as too frequent or too internal. A subscription with a function target still receives it.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `airdress` | string | yes |  |
| `delegation_only_enrollment_count` | integer (int64) | yes |  |
| `delivered` | integer (uint) | yes | Streams open when it was recorded. |
| `excluded_enrollment_count` | integer (int64) | yes |  |
| `execute_after` | string | yes |  |
| `objector_enrollment_count` | integer (int64) | yes |  |
| `objector_window_days` | integer (int64) | yes |  |
| `owner_sub` | string | yes |  |
| `prior_enrollment_count` | integer (int64) | yes |  |
| `request_id` | string (uuid) | yes |  |
| `scheduled_for` | string | yes | The same instant as `execute_after`, under the frame's name. |
| `sub_user_enrollment_count` | integer (int64) | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Somebody asked to reset this airdress's root key and the reset waits, because devices are enrolled; any of them may cancel it. The notice the devices see carries no `owner_sub` and no key material.",
  "properties": {
    "airdress": {
      "type": "string"
    },
    "delegation_only_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "delivered": {
      "description": "Streams open when it was recorded.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "excluded_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "execute_after": {
      "type": "string"
    },
    "objector_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "objector_window_days": {
      "format": "int64",
      "type": "integer"
    },
    "owner_sub": {
      "type": "string"
    },
    "prior_enrollment_count": {
      "format": "int64",
      "type": "integer"
    },
    "request_id": {
      "format": "uuid",
      "type": "string"
    },
    "scheduled_for": {
      "description": "The same instant as `execute_after`, under the frame's name.",
      "type": "string"
    },
    "sub_user_enrollment_count": {
      "format": "int64",
      "type": "integer"
    }
  },
  "required": [
    "airdress",
    "delegation_only_enrollment_count",
    "delivered",
    "excluded_enrollment_count",
    "execute_after",
    "objector_enrollment_count",
    "objector_window_days",
    "owner_sub",
    "prior_enrollment_count",
    "request_id",
    "scheduled_for",
    "sub_user_enrollment_count"
  ],
  "title": "RootRecoveryScheduled",
  "type": "object"
}
```

</details>