# fyi.opensocial.templateVersion

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.templateVersion)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.templateVersion/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.templateVersion/examples)

## Definitions

### `fyi.opensocial.templateVersion`

**Type**: `record`

One version of a published template, as it was put out: never changed, so a tab that names it gets what was chosen. Its files are the template itself, as a folder of it has them: `template.html` (the page, drawn in a sandboxed frame with the site kit in front of it), `SKILL.md` (how to use it, for an agent), `outside.js` and `outside.html` (its public page, if its tabs can have one), `methods/<name>.js` with `lexicons/<name>.json` (the methods it brings, each a query every tab made from it answers under that tab's own namespace), and `lexicons/<nsid>.json` (kinds of record it makes up).

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `changes` | `string` | No | What's new in it, in a line or two. |
| `createdAt` | `string` (datetime) | Yes |  |
| `createdBy` | `string` (did) | No | Who put it out, for one a group shares, within it or with everyone: the group's own repo or members space holds it, whoever shared it. |
| `entry` | `ref` → `fyi.opensocial.template#entry` | No | How a site uses it unless told otherwise; what it reads, writes and calls are what it needs to be allowed for it to work. |
| `files` | `array` | Yes |  |
| `template` | `string` (at-uri) | Yes | The fyi.opensocial.template it's a version of. |
| `version` | `integer` | Yes | Which it is, counting from 1: each new one more than the last. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One version of a published template, as it was put out: never changed, so a tab that names it gets what was chosen. Its files are the template itself, as a folder of it has them: `template.html` (the page, drawn in a sandboxed frame with the site kit in front of it), `SKILL.md` (how to use it, for an agent), `outside.js` and `outside.html` (its public page, if its tabs can have one), `methods/<name>.js` with `lexicons/<name>.json` (the methods it brings, each a query every tab made from it answers under that tab's own namespace), and `lexicons/<nsid>.json` (kinds of record it makes up).",
      "key": "tid",
      "record": {
        "properties": {
          "changes": {
            "description": "What's new in it, in a line or two.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "createdBy": {
            "description": "Who put it out, for one a group shares, within it or with everyone: the group's own repo or members space holds it, whoever shared it.",
            "format": "did",
            "type": "string"
          },
          "entry": {
            "description": "How a site uses it unless told otherwise; what it reads, writes and calls are what it needs to be allowed for it to work.",
            "ref": "fyi.opensocial.template#entry",
            "type": "ref"
          },
          "files": {
            "items": {
              "ref": "fyi.opensocial.defs#file",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "template": {
            "description": "The fyi.opensocial.template it's a version of.",
            "format": "at-uri",
            "type": "string"
          },
          "version": {
            "description": "Which it is, counting from 1: each new one more than the last.",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "template",
          "version",
          "files",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "fyi.opensocial.templateVersion",
  "lexicon": 1
}
```
