# org.hypercerts.context.attachment

> Published by [hypercerts.org](https://lexicon.garden/identity/did:plc:s4puetfspot742ai7y4otuel)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:s4puetfspot742ai7y4otuel/org.hypercerts.context.attachment)
- [Documentation](https://lexicon.garden/lexicon/did:plc:s4puetfspot742ai7y4otuel/org.hypercerts.context.attachment/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:s4puetfspot742ai7y4otuel/org.hypercerts.context.attachment/examples)

## Definitions

### `org.hypercerts.context.attachment`

**Type**: `record`

An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation).

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `title` | `string` | Yes | Display title for this attachment (e.g. 'Impact Assessment Report', 'Audit Findings') |
| `content` | `array` | No | The files, documents, or external references included in this attachment record. |
| `location` | `ref` → `com.atproto.repo.strongRef` | No | A strong reference to the location where this attachment's subject matter occurred. The record referenced must conform with the lexicon app.certified.location. |
| `subjects` | `array` | No | References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded. |
| `createdAt` | `string` (datetime) | Yes | Client-declared timestamp when this record was originally created. |
| `contentType` | `string` | No | The type of attachment. Values beyond the known set are permitted. |
| `description` | `union` | No | Long-form description of the attachment. An inline string for plain text or markdown, a Leaflet linear document for rich-text content, or a strong reference to an external description record. |
| `shortDescription` | `string` | No | Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. |
| `shortDescriptionFacets` | `array` | No | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). |

## Raw Schema

```json
{
  "id": "org.hypercerts.context.attachment",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "title",
          "createdAt"
        ],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 256,
            "description": "Display title for this attachment (e.g. 'Impact Assessment Report', 'Audit Findings')"
          },
          "content": {
            "type": "array",
            "items": {
              "refs": [
                "org.hypercerts.defs#uri",
                "org.hypercerts.defs#smallBlob"
              ],
              "type": "union"
            },
            "maxLength": 100,
            "description": "The files, documents, or external references included in this attachment record."
          },
          "location": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "A strong reference to the location where this attachment's subject matter occurred. The record referenced must conform with the lexicon app.certified.location."
          },
          "subjects": {
            "type": "array",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "maxLength": 100,
            "description": "References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Client-declared timestamp when this record was originally created."
          },
          "contentType": {
            "type": "string",
            "maxLength": 64,
            "description": "The type of attachment. Values beyond the known set are permitted.",
            "knownValues": [
              "report",
              "audit",
              "evidence",
              "testimonial",
              "methodology"
            ]
          },
          "description": {
            "refs": [
              "org.hypercerts.defs#descriptionString",
              "pub.leaflet.pages.linearDocument",
              "com.atproto.repo.strongRef"
            ],
            "type": "union",
            "description": "Long-form description of the attachment. An inline string for plain text or markdown, a Leaflet linear document for rich-text content, or a strong reference to an external description record."
          },
          "shortDescription": {
            "type": "string",
            "maxLength": 3000,
            "description": "Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.",
            "maxGraphemes": 300
          },
          "shortDescriptionFacets": {
            "type": "array",
            "items": {
              "ref": "app.bsky.richtext.facet",
              "type": "ref"
            },
            "description": "Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc)."
          }
        }
      },
      "description": "An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
