# fyi.opensocial.templateVersion

> 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).

- Kind: record
- Record key: tid
- Authority: opensocial.fyi
- Lexicon: 1
- Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.templateVersion)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.templateVersion/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.templateVersion/analytics)

## Record (`fyi.opensocial.templateVersion`)

Type: record · key tid

### Properties

- `changes` (string): What's new in it, in a line or two.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `createdAt` (string · datetime, required)
- `createdBy` (string · did): 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): 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.
  - Reference: `fyi.opensocial.template#entry`
- `files` (array, required)
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `fyi.opensocial.defs#file`
- `previews` (array): Pictures of a tab made from it, filled in, for whoever's choosing one: shown on its page and where a tab is added.
  - Constraints: maxLength: 4
  - `items` (ref)
    - Reference: `#preview`
- `template` (string · at-uri, required): The fyi.opensocial.template it's a version of.
- `version` (integer, required): Which it is, counting from 1: each new one more than the last.
  - Constraints: minimum: 1

## #preview (`fyi.opensocial.templateVersion#preview`)

Type: object

One picture of a tab made from it.

### Properties

- `alt` (string, required): What it shows, for whoever can't see it.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `image` (blob, required)
  - Constraints: maxSize: 1000000, accept: image/png, image/jpeg, image/webp
- `size` (string): What it was seen on: a wide screen or a phone.
  - Constraints: knownValues: wide | phone

## 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"
          },
          "previews": {
            "description": "Pictures of a tab made from it, filled in, for whoever's choosing one: shown on its page and where a tab is added.",
            "items": {
              "ref": "#preview",
              "type": "ref"
            },
            "maxLength": 4,
            "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"
    },
    "preview": {
      "description": "One picture of a tab made from it.",
      "properties": {
        "alt": {
          "description": "What it shows, for whoever can't see it.",
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        },
        "image": {
          "accept": [
            "image/png",
            "image/jpeg",
            "image/webp"
          ],
          "maxSize": 1000000,
          "type": "blob"
        },
        "size": {
          "description": "What it was seen on: a wide screen or a phone.",
          "knownValues": [
            "wide",
            "phone"
          ],
          "type": "string"
        }
      },
      "required": [
        "image",
        "alt"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.templateVersion",
  "lexicon": 1
}
```
