# us.off-the-clock.admin.defs

- Kind: defs
- Authority: admin.off-the-clock.us
- Lexicon: 1
- Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.admin.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.admin.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.admin.defs/analytics)

## #automodOutcome (`us.off-the-clock.admin.defs#automodOutcome`)

Type: object

What one rule did in a run (AUT-16).

### Properties

- `labels` (array)
  - `items` (string)
    - Constraints: maxLength: 128
- `name` (string, required)
- `outcome` (string, required)
  - Constraints: maxLength: 64, knownValues: matched | missed | skipped | stopped | failed
- `rkey` (string)
  - Constraints: maxLength: 64
- `warning` (ref): A matching rule's warning types, when the content-warning it applies is one the run adds (AUT-13, CW-9).
  - Reference: `us.off-the-clock.automod.rule#warning`
- `why` (string)
  - Constraints: maxLength: 3000

## #automodRule (`us.off-the-clock.admin.defs#automodRule`)

Type: object

A pair's effective automod rule (AUT-1), as it runs.

### Properties

- `author` (string · did, required)
- `createdAt` (string · datetime, required)
- `description` (string)
- `enabled` (boolean, required)
- `engine` (string, required)
  - Constraints: maxLength: 64
- `labels` (array, required)
  - `items` (string)
    - Constraints: maxLength: 128
- `name` (string, required)
- `precondition` (ref)
  - Reference: `us.off-the-clock.automod.rule#precondition`
- `priority` (integer, required)
- `rkey` (string · tid, required)
- `rule` (unknown, required)
- `stackKey` (string)
  - Constraints: maxLength: 64
- `warning` (ref)
  - Reference: `us.off-the-clock.automod.rule#warning`

## #blob (`us.off-the-clock.admin.defs#blob`)

Type: object

A blob records in the space reference.

### Properties

- `cid` (string · cid, required)
- `did` (string · did, required)
- `labels` (array, required)
  - `items` (ref)
    - Reference: `us.off-the-clock.admin.defs#label`
- `mime` (string)
- `records` (integer, required)

## #collectionCount (`us.off-the-clock.admin.defs#collectionCount`)

Type: object

### Properties

- `collection` (string · nsid, required)
- `count` (integer, required)

## #feed (`us.off-the-clock.admin.defs#feed`)

Type: object

The effective feed of a pair's record key (D13, D36).

### Properties

- `author` (string · did, required)
- `configuration` (unknown, required)
- `default` (boolean, required): The feed the pair's space record names.
- `displayName` (string, required)
- `rkey` (string · record-key, required)
- `sort` (string, required)
  - Constraints: knownValues: newest | startsAt
- `text` (string, required)
- `view` (string): How the feed is shown (D93).
  - Constraints: maxLength: 64, knownValues: cards | wall

## #label (`us.off-the-clock.admin.defs#label`)

Type: object

A label that counts.

### Properties

- `cid` (string · cid)
- `cts` (string · datetime, required)
- `record` (string · at-uri, required): The label record, in the management space.
- `src` (string · did, required)
- `target` (string, required): The record URI, blob CID or DID labelled.
- `val` (string, required)

## #member (`us.off-the-clock.admin.defs#member`)

Type: object

A DID with an entry in any followed space, with every entry naming it.

### Properties

- `admin` (boolean, required): An effective admin (admin on the self management space), or the community identity.
- `adminOf` (array, required): The TIDs of the pairs whose team the DID is on.
  - `items` (string · tid)
- `did` (string · did, required)
- `entries` (array, required)
  - `items` (ref)
    - Reference: `#memberEntry`
- `handle` (string · handle)
- `invited` (boolean): A root entry with both read and write false: invited, not yet joined (D80).
- `joinedAt` (string · datetime): When the DID joined: when its joined root entry was indexed.
- `member` (boolean, required)
- `spaces` (array, required): The content halves where the DID holds read or write.
  - `items` (string): <space-type>/<space-id>: a pair's content space
    - Constraints: maxLength: 512

## #memberEntry (`us.off-the-clock.admin.defs#memberEntry`)

Type: object

One published member entry naming the DID: its flags in one space (D77).

### Properties

- `admin` (boolean, required)
- `indexedAt` (string · datetime)
- `read` (boolean, required)
- `space` (string, required): The space, as <space-type>/<space-id>.
  - Constraints: maxLength: 512
- `write` (boolean, required)

## #pair (`us.off-the-clock.admin.defs#pair`)

Type: object

A registered pair (D33, D34): its space record, its team and both halves.

### Properties

- `admins` (array, required): The pair's own team: admin entries on its content half, less the effective admins (D79).
  - `items` (string · did)
- `content` (ref, required)
  - Reference: `#space`
- `default` (boolean, required)
- `defaultFeed` (string · record-key, required)
- `description` (string)
- `displayName` (string, required)
- `management` (ref, required)
  - Reference: `#space`
- `tid` (string · tid, required)

## #record (`us.off-the-clock.admin.defs#record`)

Type: object

Any indexed record, hidden or not.

### Properties

- `author` (string · did, required)
- `authorMember` (boolean, required): The author may still use the record's space; if not, the record is hidden.
- `cid` (string · cid, required)
- `collection` (string · nsid, required)
- `handle` (string · handle)
- `indexedAt` (string · datetime, required)
- `labels` (array, required)
  - `items` (ref)
    - Reference: `us.off-the-clock.admin.defs#label`
- `rkey` (string · record-key, required)
- `uri` (string · at-uri, required)
- `value` (unknown, required)
- `warnings` (array): The record's counting content warnings as views carry them, the author's first, then the community's oldest first (LEX-77, CW-11).
  - `items` (ref)
    - Reference: `us.off-the-clock.defs#warningView`

## #space (`us.off-the-clock.admin.defs#space`)

Type: object

A space the community names (D34), and how the AppView follows it.

### Properties

- `blobs` (integer, required)
- `caughtUp` (boolean, required)
- `credential` (unknown): The AppView's credential state in the space.
- `followed` (boolean, required)
- `key` (string): The pair's TID, for a pair's half.
  - Constraints: maxLength: 512
- `records` (integer, required)
- `space` (string, required): <space-type>/<space-id>
  - Constraints: maxLength: 512
- `uri` (string · uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "automodOutcome": {
      "description": "What one rule did in a run (AUT-16).",
      "properties": {
        "labels": {
          "items": {
            "maxLength": 128,
            "type": "string"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "outcome": {
          "knownValues": [
            "matched",
            "missed",
            "skipped",
            "stopped",
            "failed"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "rkey": {
          "maxLength": 64,
          "type": "string"
        },
        "warning": {
          "description": "A matching rule's warning types, when the content-warning it applies is one the run adds (AUT-13, CW-9).",
          "ref": "us.off-the-clock.automod.rule#warning",
          "type": "ref"
        },
        "why": {
          "maxLength": 3000,
          "type": "string"
        }
      },
      "required": [
        "name",
        "outcome"
      ],
      "type": "object"
    },
    "automodRule": {
      "description": "A pair's effective automod rule (AUT-1), as it runs.",
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "engine": {
          "maxLength": 64,
          "type": "string"
        },
        "labels": {
          "items": {
            "maxLength": 128,
            "type": "string"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "precondition": {
          "ref": "us.off-the-clock.automod.rule#precondition",
          "type": "ref"
        },
        "priority": {
          "type": "integer"
        },
        "rkey": {
          "format": "tid",
          "type": "string"
        },
        "rule": {
          "type": "unknown"
        },
        "stackKey": {
          "maxLength": 64,
          "type": "string"
        },
        "warning": {
          "ref": "us.off-the-clock.automod.rule#warning",
          "type": "ref"
        }
      },
      "required": [
        "rkey",
        "author",
        "name",
        "priority",
        "engine",
        "rule",
        "labels",
        "enabled",
        "createdAt"
      ],
      "type": "object"
    },
    "blob": {
      "description": "A blob records in the space reference.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "labels": {
          "items": {
            "ref": "us.off-the-clock.admin.defs#label",
            "type": "ref"
          },
          "type": "array"
        },
        "mime": {
          "type": "string"
        },
        "records": {
          "type": "integer"
        }
      },
      "required": [
        "did",
        "cid",
        "records",
        "labels"
      ],
      "type": "object"
    },
    "collectionCount": {
      "properties": {
        "collection": {
          "format": "nsid",
          "type": "string"
        },
        "count": {
          "type": "integer"
        }
      },
      "required": [
        "collection",
        "count"
      ],
      "type": "object"
    },
    "feed": {
      "description": "The effective feed of a pair's record key (D13, D36).",
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "configuration": {
          "type": "unknown"
        },
        "default": {
          "description": "The feed the pair's space record names.",
          "type": "boolean"
        },
        "displayName": {
          "type": "string"
        },
        "rkey": {
          "format": "record-key",
          "type": "string"
        },
        "sort": {
          "knownValues": [
            "newest",
            "startsAt"
          ],
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "view": {
          "description": "How the feed is shown (D93).",
          "knownValues": [
            "cards",
            "wall"
          ],
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "rkey",
        "author",
        "displayName",
        "text",
        "configuration",
        "sort",
        "default"
      ],
      "type": "object"
    },
    "label": {
      "description": "A label that counts.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "cts": {
          "format": "datetime",
          "type": "string"
        },
        "record": {
          "description": "The label record, in the management space.",
          "format": "at-uri",
          "type": "string"
        },
        "src": {
          "format": "did",
          "type": "string"
        },
        "target": {
          "description": "The record URI, blob CID or DID labelled.",
          "type": "string"
        },
        "val": {
          "type": "string"
        }
      },
      "required": [
        "record",
        "src",
        "val",
        "target",
        "cts"
      ],
      "type": "object"
    },
    "member": {
      "description": "A DID with an entry in any followed space, with every entry naming it.",
      "properties": {
        "admin": {
          "description": "An effective admin (admin on the self management space), or the community identity.",
          "type": "boolean"
        },
        "adminOf": {
          "description": "The TIDs of the pairs whose team the DID is on.",
          "items": {
            "format": "tid",
            "type": "string"
          },
          "type": "array"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "entries": {
          "items": {
            "ref": "#memberEntry",
            "type": "ref"
          },
          "type": "array"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        },
        "invited": {
          "description": "A root entry with both read and write false: invited, not yet joined (D80).",
          "type": "boolean"
        },
        "joinedAt": {
          "description": "When the DID joined: when its joined root entry was indexed.",
          "format": "datetime",
          "type": "string"
        },
        "member": {
          "type": "boolean"
        },
        "spaces": {
          "description": "The content halves where the DID holds read or write.",
          "items": {
            "description": "<space-type>/<space-id>: a pair's content space",
            "maxLength": 512,
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "did",
        "member",
        "admin",
        "adminOf",
        "spaces",
        "entries"
      ],
      "type": "object"
    },
    "memberEntry": {
      "description": "One published member entry naming the DID: its flags in one space (D77).",
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "read": {
          "type": "boolean"
        },
        "space": {
          "description": "The space, as <space-type>/<space-id>.",
          "maxLength": 512,
          "type": "string"
        },
        "write": {
          "type": "boolean"
        }
      },
      "required": [
        "space",
        "read",
        "write",
        "admin"
      ],
      "type": "object"
    },
    "pair": {
      "description": "A registered pair (D33, D34): its space record, its team and both halves.",
      "properties": {
        "admins": {
          "description": "The pair's own team: admin entries on its content half, less the effective admins (D79).",
          "items": {
            "format": "did",
            "type": "string"
          },
          "type": "array"
        },
        "content": {
          "ref": "#space",
          "type": "ref"
        },
        "default": {
          "type": "boolean"
        },
        "defaultFeed": {
          "format": "record-key",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "management": {
          "ref": "#space",
          "type": "ref"
        },
        "tid": {
          "format": "tid",
          "type": "string"
        }
      },
      "required": [
        "tid",
        "displayName",
        "defaultFeed",
        "default",
        "admins",
        "management",
        "content"
      ],
      "type": "object"
    },
    "record": {
      "description": "Any indexed record, hidden or not.",
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "authorMember": {
          "description": "The author may still use the record's space; if not, the record is hidden.",
          "type": "boolean"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "collection": {
          "format": "nsid",
          "type": "string"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "labels": {
          "items": {
            "ref": "us.off-the-clock.admin.defs#label",
            "type": "ref"
          },
          "type": "array"
        },
        "rkey": {
          "format": "record-key",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "type": "unknown"
        },
        "warnings": {
          "description": "The record's counting content warnings as views carry them, the author's first, then the community's oldest first (LEX-77, CW-11).",
          "items": {
            "ref": "us.off-the-clock.defs#warningView",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "collection",
        "rkey",
        "value",
        "indexedAt",
        "authorMember",
        "labels"
      ],
      "type": "object"
    },
    "space": {
      "description": "A space the community names (D34), and how the AppView follows it.",
      "properties": {
        "blobs": {
          "type": "integer"
        },
        "caughtUp": {
          "type": "boolean"
        },
        "credential": {
          "description": "The AppView's credential state in the space.",
          "type": "unknown"
        },
        "followed": {
          "type": "boolean"
        },
        "key": {
          "description": "The pair's TID, for a pair's half.",
          "maxLength": 512,
          "type": "string"
        },
        "records": {
          "type": "integer"
        },
        "space": {
          "description": "<space-type>/<space-id>",
          "maxLength": 512,
          "type": "string"
        },
        "uri": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "space",
        "uri",
        "followed",
        "caughtUp",
        "records",
        "blobs"
      ],
      "type": "object"
    }
  },
  "id": "us.off-the-clock.admin.defs",
  "lexicon": 1
}
```
