# at.happyproto.registry.defs

- Kind: defs
- Authority: registry.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.defs/analytics)

## #bannerView (`at.happyproto.registry.defs#bannerView`)

Type: object

### Properties

- `alt` (string)
- `cid` (string · cid, required): The CID of the image, which getArtifact serves once the registry has copied it.
- `height` (integer, required)
  - Constraints: minimum: 1
- `width` (integer, required)
  - Constraints: minimum: 1

## #changelogView (`at.happyproto.registry.defs#changelogView`)

Type: object

The version's changelog, from the registry's copy of its site.standard.document.

### Properties

- `fetchedAt` (string · datetime, required)
- `markdown` (string, required): CommonMark written by the publisher. Render it as untrusted input, with raw HTML stripped.
- `title` (string, required)
- `uri` (string · at-uri, required)

## #channelRef (`at.happyproto.registry.defs#channelRef`)

Type: object

The version a channel points at.

### Properties

- `availability` (string, required)
  - Constraints: knownValues: pending | available | deletedAtSource
- `cid` (string · cid, required)
- `state` (string, required): The version's lifecycle state.
  - Constraints: knownValues: active | deprecated | unavailable | retired
- `uri` (string · at-uri, required): The software.release.version record.
- `version` (string, required)
  - Constraints: maxLength: 64

## #lifecycle (`at.happyproto.registry.defs#lifecycle`)

Type: object

A lifecycle state derived from the publisher's software.release.status records. The last status that has not been withdrawn decides it: none means `active`; `endOfDevelopment`, `endOfSupport` or `supersededBy` mean `deprecated`; `endOfDistribution` means `unavailable`; `endOfLife` means `retired`.

### Properties

- `events` (array): Every status about the subject, oldest first, including withdrawn ones.
  - `items` (ref)
    - Reference: `#lifecycleEvent`
- `installable` (boolean): True when the state is `active` or `deprecated`.
- `kind` (string): The deciding status's kind, such as `security`.
- `reason` (string): The deciding status's reason.
- `state` (string, required)
  - Constraints: knownValues: active | deprecated | unavailable | retired
- `supersededBy` (string): The version to use instead, when the deciding status is `supersededBy`.

## #lifecycleEvent (`at.happyproto.registry.defs#lifecycleEvent`)

Type: object

One software.release.status record.

### Properties

- `kind` (string)
- `reason` (string)
- `status` (string, required): The event type, such as `endOfSupport`.
- `supersededBy` (string)
- `uri` (string · at-uri, required)
- `withdrawnBy` (string · at-uri): The status that withdrew this one. A withdrawn status no longer counts toward the state.

## #projectView (`at.happyproto.registry.defs#projectView`)

Type: object

An indexed plugin: its software.release.project with the registry's view of everything around it.

### Properties

- `authors` (array, required)
  - `items` (ref)
    - Reference: `at.happyproto.registry.project#author`
- `banner` (ref): The banner of the version the `latest` channel points at, when it has one.
  - Reference: `#bannerView`
- `channels` (unknown, required): A map from channel name, such as `latest`, to the #channelRef it points at. Empty when no channel is indexed.
- `cid` (string · cid)
- `did` (string · did, required)
- `handle` (string · handle): The publisher's handle, when the registry can resolve one. Its absence says nothing about who owns the project.
- `indexedAt` (string · datetime, required)
- `keywords` (array, required)
  - `items` (string)
- `lifecycle` (ref, required): The project's own lifecycle. Only `state` is set.
  - Reference: `#lifecycle`
- `name` (string, required): The project's name, which is its record key.
  - Constraints: maxLength: 64
- `pluginType` (string, required)
  - Constraints: knownValues: auth | library | interpreter
- `publication` (ref, required)
  - Reference: `#publicationView`
- `security` (array, required)
  - `items` (ref)
    - Reference: `at.happyproto.registry.project#contact`
- `sidecar` (ref, required)
  - Reference: `#sidecarRef`
- `uri` (string · at-uri, required): The software.release.project record.

## #publicationView (`at.happyproto.registry.defs#publicationView`)

Type: object

The project's site.standard.publication, at the CID its at.happyproto.registry.project record pins.

### Properties

- `cid` (string · cid, required)
- `description` (string)
- `icon` (string · cid): The CID of the icon, which getArtifact serves once the registry has copied it.
- `name` (string, required): The plugin's display name.
- `uri` (string · at-uri, required)
- `url` (string · uri, required)

## #ref (`at.happyproto.registry.defs#ref`)

Type: object

A record, by at-uri and the CID of the version meant.

### Properties

- `cid` (string · cid, required)
- `uri` (string · at-uri, required)

## #sidecarRef (`at.happyproto.registry.defs#sidecarRef`)

Type: object

The project's at.happyproto.registry.project record.

### Properties

- `cid` (string · cid)
- `uri` (string · at-uri, required)

## #versionView (`at.happyproto.registry.defs#versionView`)

Type: object

An indexed version of a plugin, with the artifact its manifest carries.

### Properties

- `artifact` (ref, required): The plugin artifact from the manifest, as published.
  - Reference: `at.happyproto.plugin.v1`
- `availability` (string, required): `available` means the registry holds the package and manifest bytes and serves them from getArtifact. `pending` means it has not copied them yet. `deletedAtSource` means the publisher deleted the version; the registry keeps serving what it already holds.
  - Constraints: knownValues: pending | available | deletedAtSource
- `changelog` (ref)
  - Reference: `#changelogView`
- `cid` (string · cid, required)
- `did` (string · did, required)
- `indexedAt` (string · datetime, required)
- `lifecycle` (ref, required): The version's lifecycle, combined with the project's: the worse state of the two applies. `installable` and `events` are always set.
  - Reference: `#lifecycle`
- `manifest` (ref, required): The software.release.manifest the version points at.
  - Reference: `#ref`
- `name` (string, required)
  - Constraints: maxLength: 64
- `suspect` (boolean, required): True when the publisher changed the version or its manifest after publishing it. Versions are immutable, so the registry keeps the first record it saw and flags this one.
- `uri` (string · at-uri, required): The software.release.version record.
- `version` (string, required)
  - Constraints: maxLength: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "bannerView": {
      "properties": {
        "alt": {
          "type": "string"
        },
        "cid": {
          "description": "The CID of the image, which getArtifact serves once the registry has copied it.",
          "format": "cid",
          "type": "string"
        },
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "cid",
        "width",
        "height"
      ],
      "type": "object"
    },
    "changelogView": {
      "description": "The version's changelog, from the registry's copy of its site.standard.document.",
      "properties": {
        "fetchedAt": {
          "format": "datetime",
          "type": "string"
        },
        "markdown": {
          "description": "CommonMark written by the publisher. Render it as untrusted input, with raw HTML stripped.",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "title",
        "markdown",
        "fetchedAt"
      ],
      "type": "object"
    },
    "channelRef": {
      "description": "The version a channel points at.",
      "properties": {
        "availability": {
          "knownValues": [
            "pending",
            "available",
            "deletedAtSource"
          ],
          "type": "string"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "state": {
          "description": "The version's lifecycle state.",
          "knownValues": [
            "active",
            "deprecated",
            "unavailable",
            "retired"
          ],
          "type": "string"
        },
        "uri": {
          "description": "The software.release.version record.",
          "format": "at-uri",
          "type": "string"
        },
        "version": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "version",
        "uri",
        "cid",
        "state",
        "availability"
      ],
      "type": "object"
    },
    "lifecycle": {
      "description": "A lifecycle state derived from the publisher's software.release.status records. The last status that has not been withdrawn decides it: none means `active`; `endOfDevelopment`, `endOfSupport` or `supersededBy` mean `deprecated`; `endOfDistribution` means `unavailable`; `endOfLife` means `retired`.",
      "properties": {
        "events": {
          "description": "Every status about the subject, oldest first, including withdrawn ones.",
          "items": {
            "ref": "#lifecycleEvent",
            "type": "ref"
          },
          "type": "array"
        },
        "installable": {
          "description": "True when the state is `active` or `deprecated`.",
          "type": "boolean"
        },
        "kind": {
          "description": "The deciding status's kind, such as `security`.",
          "type": "string"
        },
        "reason": {
          "description": "The deciding status's reason.",
          "type": "string"
        },
        "state": {
          "knownValues": [
            "active",
            "deprecated",
            "unavailable",
            "retired"
          ],
          "type": "string"
        },
        "supersededBy": {
          "description": "The version to use instead, when the deciding status is `supersededBy`.",
          "type": "string"
        }
      },
      "required": [
        "state"
      ],
      "type": "object"
    },
    "lifecycleEvent": {
      "description": "One software.release.status record.",
      "properties": {
        "kind": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "status": {
          "description": "The event type, such as `endOfSupport`.",
          "type": "string"
        },
        "supersededBy": {
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "withdrawnBy": {
          "description": "The status that withdrew this one. A withdrawn status no longer counts toward the state.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "status"
      ],
      "type": "object"
    },
    "projectView": {
      "description": "An indexed plugin: its software.release.project with the registry's view of everything around it.",
      "properties": {
        "authors": {
          "items": {
            "ref": "at.happyproto.registry.project#author",
            "type": "ref"
          },
          "type": "array"
        },
        "banner": {
          "description": "The banner of the version the `latest` channel points at, when it has one.",
          "ref": "#bannerView",
          "type": "ref"
        },
        "channels": {
          "description": "A map from channel name, such as `latest`, to the #channelRef it points at. Empty when no channel is indexed.",
          "type": "unknown"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "description": "The publisher's handle, when the registry can resolve one. Its absence says nothing about who owns the project.",
          "format": "handle",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "keywords": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "lifecycle": {
          "description": "The project's own lifecycle. Only `state` is set.",
          "ref": "#lifecycle",
          "type": "ref"
        },
        "name": {
          "description": "The project's name, which is its record key.",
          "maxLength": 64,
          "type": "string"
        },
        "pluginType": {
          "knownValues": [
            "auth",
            "library",
            "interpreter"
          ],
          "type": "string"
        },
        "publication": {
          "ref": "#publicationView",
          "type": "ref"
        },
        "security": {
          "items": {
            "ref": "at.happyproto.registry.project#contact",
            "type": "ref"
          },
          "type": "array"
        },
        "sidecar": {
          "ref": "#sidecarRef",
          "type": "ref"
        },
        "uri": {
          "description": "The software.release.project record.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "did",
        "name",
        "sidecar",
        "publication",
        "pluginType",
        "keywords",
        "authors",
        "security",
        "channels",
        "lifecycle",
        "indexedAt"
      ],
      "type": "object"
    },
    "publicationView": {
      "description": "The project's site.standard.publication, at the CID its at.happyproto.registry.project record pins.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "icon": {
          "description": "The CID of the icon, which getArtifact serves once the registry has copied it.",
          "format": "cid",
          "type": "string"
        },
        "name": {
          "description": "The plugin's display name.",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "url": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "name",
        "url"
      ],
      "type": "object"
    },
    "ref": {
      "description": "A record, by at-uri and the CID of the version meant.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid"
      ],
      "type": "object"
    },
    "sidecarRef": {
      "description": "The project's at.happyproto.registry.project record.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    },
    "versionView": {
      "description": "An indexed version of a plugin, with the artifact its manifest carries.",
      "properties": {
        "artifact": {
          "description": "The plugin artifact from the manifest, as published.",
          "ref": "at.happyproto.plugin.v1",
          "type": "ref"
        },
        "availability": {
          "description": "`available` means the registry holds the package and manifest bytes and serves them from getArtifact. `pending` means it has not copied them yet. `deletedAtSource` means the publisher deleted the version; the registry keeps serving what it already holds.",
          "knownValues": [
            "pending",
            "available",
            "deletedAtSource"
          ],
          "type": "string"
        },
        "changelog": {
          "ref": "#changelogView",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "lifecycle": {
          "description": "The version's lifecycle, combined with the project's: the worse state of the two applies. `installable` and `events` are always set.",
          "ref": "#lifecycle",
          "type": "ref"
        },
        "manifest": {
          "description": "The software.release.manifest the version points at.",
          "ref": "#ref",
          "type": "ref"
        },
        "name": {
          "maxLength": 64,
          "type": "string"
        },
        "suspect": {
          "description": "True when the publisher changed the version or its manifest after publishing it. Versions are immutable, so the registry keeps the first record it saw and flags this one.",
          "type": "boolean"
        },
        "uri": {
          "description": "The software.release.version record.",
          "format": "at-uri",
          "type": "string"
        },
        "version": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "did",
        "name",
        "version",
        "manifest",
        "artifact",
        "availability",
        "suspect",
        "lifecycle",
        "indexedAt"
      ],
      "type": "object"
    }
  },
  "id": "at.happyproto.registry.defs",
  "lexicon": 1
}
```
