# ing.opn.availability.defs

- Kind: defs
- Authority: availability.opn.ing
- Lexicon: 1
- Published by [opn.ing](https://lexicon.garden/identity/did:plc:fd7yovynbzbli5i7m6tu76cl), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:fd7yovynbzbli5i7m6tu76cl/ing.opn.availability.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:fd7yovynbzbli5i7m6tu76cl/ing.opn.availability.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:fd7yovynbzbli5i7m6tu76cl/ing.opn.availability.defs/analytics)

## #override (`ing.opn.availability.defs#override`)

Type: object

A date whose hours differ from the week's.

### Properties

- `date` (string, required): A calendar date, YYYY-MM-DD.
  - Constraints: minLength: 10, maxLength: 10
- `ranges` (array, required): Open ranges on this date in place of the week's. Empty means unavailable all day.
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`

## #slot (`ing.opn.availability.defs#slot`)

Type: object

A time someone can book.

### Properties

- `end` (string · datetime, required)
- `start` (string · datetime, required)

## #timeRange (`ing.opn.availability.defs#timeRange`)

Type: object

An open range of time within one day.

### Properties

- `end` (string, required): A time of day, HH:MM on a 24 hour clock. An end of 24:00 means midnight at the end of the day.
  - Constraints: minLength: 5, maxLength: 5
- `start` (string, required): A time of day, HH:MM on a 24 hour clock. An end of 24:00 means midnight at the end of the day.
  - Constraints: minLength: 5, maxLength: 5

## #week (`ing.opn.availability.defs#week`)

Type: object

A normal week's open ranges, keyed by day. A day left out or empty is closed.

### Properties

- `friday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`
- `monday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`
- `saturday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`
- `sunday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`
- `thursday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`
- `tuesday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`
- `wednesday` (array)
  - Constraints: maxLength: 24
  - `items` (ref)
    - Reference: `#timeRange`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "override": {
      "description": "A date whose hours differ from the week's.",
      "properties": {
        "date": {
          "description": "A calendar date, YYYY-MM-DD.",
          "maxLength": 10,
          "minLength": 10,
          "type": "string"
        },
        "ranges": {
          "description": "Open ranges on this date in place of the week's. Empty means unavailable all day.",
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        }
      },
      "required": [
        "date",
        "ranges"
      ],
      "type": "object"
    },
    "slot": {
      "description": "A time someone can book.",
      "properties": {
        "end": {
          "format": "datetime",
          "type": "string"
        },
        "start": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    },
    "timeRange": {
      "description": "An open range of time within one day.",
      "properties": {
        "end": {
          "description": "A time of day, HH:MM on a 24 hour clock. An end of 24:00 means midnight at the end of the day.",
          "maxLength": 5,
          "minLength": 5,
          "type": "string"
        },
        "start": {
          "description": "A time of day, HH:MM on a 24 hour clock. An end of 24:00 means midnight at the end of the day.",
          "maxLength": 5,
          "minLength": 5,
          "type": "string"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    },
    "week": {
      "description": "A normal week's open ranges, keyed by day. A day left out or empty is closed.",
      "properties": {
        "friday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        },
        "monday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        },
        "saturday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        },
        "sunday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        },
        "thursday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        },
        "tuesday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        },
        "wednesday": {
          "items": {
            "ref": "#timeRange",
            "type": "ref"
          },
          "maxLength": 24,
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "id": "ing.opn.availability.defs",
  "lexicon": 1
}
```
