# airdress.location.*

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

## `airdress.location.consent.changed`

The person it concerns info

A person's device reported a change to their location consent.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `event_id` | string (uuid) | yes |  |
| `principal_id` | string (uuid) | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person's device reported a change to their location consent.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "event_id": {
      "format": "uuid",
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "event_id",
    "principal_id"
  ],
  "title": "LocationConsentChanged",
  "type": "object"
}
```

</details>

## `airdress.location.event.received`

The person it concerns info

A location event from a person's device was stored. Its kind and origin and, for a track, the track's id; never what it says.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `event_id` | string (uuid) | yes |  |
| `kind` | string | yes |  |
| `origin` | string | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A location event from a person's device was stored. Its kind and origin and, for a track, the track's id; never what it says.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "event_id": {
      "format": "uuid",
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "origin": {
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "event_id",
    "kind",
    "origin",
    "principal_id",
    "track_id"
  ],
  "title": "LocationEventReceived",
  "type": "object"
}
```

</details>

## `airdress.location.events.erased`

The person it concerns info

A person erased the location events their airdress received: from the calling device (`device`) or all their devices (`all`), optionally one track's, with how many rows went.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `erased` | integer (uint64) | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `scope` | string | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person erased the location events their airdress received: from the calling device (`device`) or all their devices (`all`), optionally one track's, with how many rows went.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "erased": {
      "format": "uint64",
      "minimum": 0,
      "type": "integer"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "scope": {
      "type": "string"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "erased",
    "principal_id",
    "scope",
    "track_id"
  ],
  "title": "LocationEventsErased",
  "type": "object"
}
```

</details>

## `airdress.location.events.expired`

Owner info

Location events past their retention window were deleted. A count across every device and person; nothing about what the rows held.

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `rows` | integer (uint64) | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Location events past their retention window were deleted. A count across every device and person; nothing about what the rows held.",
  "properties": {
    "rows": {
      "format": "uint64",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "rows"
  ],
  "title": "LocationEventsExpired",
  "type": "object"
}
```

</details>

## `airdress.location.model_call.refused`

Owner warn Functions

A function invocation carrying a location event asked a model, and the owner has not allowed location to reach models.

**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 |
| ----- | ---- | -------- | ----------- |
| `invocation_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A function invocation carrying a location event asked a model, and the owner has not allowed location to reach models.",
  "properties": {
    "invocation_id": {
      "type": "string"
    }
  },
  "required": [
    "invocation_id"
  ],
  "title": "LocationModelCallRefused",
  "type": "object"
}
```

</details>

## `airdress.location.request.refused`

Owner warn Functions

A location request was refused: the device's enrollment was revoked (`enrollment_revoked`), or the device is not the owner's (`not_owner`, with its enrollment and principal, if it has one).

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string or null | no |  |
| `principal_id` | string or null | no |  |
| `reason` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A location request was refused: the device's enrollment was revoked (`enrollment_revoked`), or the device is not the owner's (`not_owner`, with its enrollment and principal, if it has one).",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "principal_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "reason"
  ],
  "title": "LocationRequestRefused",
  "type": "object"
}
```

</details>

## `airdress.location.track.ended`

The person it concerns info

A person's continuous location track ended, with why (`expired`, `stopped`, `low_battery`, …). Never where.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `event_id` | string (uuid) | yes |  |
| `precision` | string | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `reason` | string | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person's continuous location track ended, with why (`expired`, `stopped`, `low_battery`, …). Never where.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "event_id": {
      "format": "uuid",
      "type": "string"
    },
    "precision": {
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "reason": {
      "type": "string"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "event_id",
    "precision",
    "principal_id",
    "reason",
    "track_id"
  ],
  "title": "LocationTrackEnded",
  "type": "object"
}
```

</details>

## `airdress.location.track.lost`

The person it concerns info

A person's location track passed its end without saying it ended, and was announced lost. `silent_for_s` is how long since it was last heard.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `silent_for_s` | integer (int64) | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person's location track passed its end without saying it ended, and was announced lost. `silent_for_s` is how long since it was last heard.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "silent_for_s": {
      "format": "int64",
      "type": "integer"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "principal_id",
    "silent_for_s",
    "track_id"
  ],
  "title": "LocationTrackLost",
  "type": "object"
}
```

</details>

## `airdress.location.track.recovered`

The person it concerns info

A person's location track was heard from again after its silence was announced. `silent_for_s` is how long it had been silent.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `silent_for_s` | integer (int64) | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person's location track was heard from again after its silence was announced. `silent_for_s` is how long it had been silent.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "silent_for_s": {
      "format": "int64",
      "type": "integer"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "principal_id",
    "silent_for_s",
    "track_id"
  ],
  "title": "LocationTrackRecovered",
  "type": "object"
}
```

</details>

## `airdress.location.track.silent`

The person it concerns info

A person's running location track was not heard from for longer than the silence threshold, and the silence was announced.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `silent_for_s` | integer (int64) | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person's running location track was not heard from for longer than the silence threshold, and the silence was announced.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "silent_for_s": {
      "format": "int64",
      "type": "integer"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "principal_id",
    "silent_for_s",
    "track_id"
  ],
  "title": "LocationTrackSilent",
  "type": "object"
}
```

</details>

## `airdress.location.track.started`

The person it concerns info

A person started a continuous location track, at a precision (`approximate` or `precise`). Never where, never when it is due to end.

**Audience: the person it concerns.** About one person on the airdress. It reaches only that person: their own devices and subscriptions they made themselves. The owner's subscriptions never receive another person's events.

**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.
- Not functions bound to this operator's events: functions act for the owner, and this event is about someone else.

**Versions**

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

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `enrollment_id` | string (uuid) | yes |  |
| `event_id` | string (uuid) | yes |  |
| `precision` | string | yes |  |
| `principal_id` | string (uuid) | yes |  |
| `track_id` | string | yes |  |

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

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A person started a continuous location track, at a precision (`approximate` or `precise`). Never where, never when it is due to end.",
  "properties": {
    "enrollment_id": {
      "format": "uuid",
      "type": "string"
    },
    "event_id": {
      "format": "uuid",
      "type": "string"
    },
    "precision": {
      "type": "string"
    },
    "principal_id": {
      "format": "uuid",
      "type": "string"
    },
    "track_id": {
      "type": "string"
    }
  },
  "required": [
    "enrollment_id",
    "event_id",
    "precision",
    "principal_id",
    "track_id"
  ],
  "title": "LocationTrackStarted",
  "type": "object"
}
```

</details>