# fyi.opensocial.listTemplates

> The templates shared within the group, each at its latest version: for its members alone.

- Kind: query
- 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.listTemplates)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listTemplates/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listTemplates/analytics)

## Query (`fyi.opensocial.listTemplates`)

Type: query · GET

### Parameters (query string)

- `group` (string · did, required)

### Output (application/json)

- `templates` (array, required)
  - `items` (ref)
    - Reference: `#templateView`

### Errors

- `Forbidden`: No description in schema.

## #templateView (`fyi.opensocial.listTemplates#templateView`)

Type: object

### Properties

- `createdAt` (string · datetime, required)
- `createdBy` (string · did): Who shared its latest version.
- `description` (string, required)
- `entry` (ref, required): How a tab uses it, its own kinds of record not yet named for any tab.
  - Reference: `fyi.opensocial.template#entry`
- `name` (string, required): Its record key: lowercase letters, digits and dashes.
- `number` (integer, required)
  - Constraints: minimum: 1
- `sharedFrom` (string): The namespace of the tab it was shared from.
- `updatedAt` (string · datetime)
- `uri` (string · at-uri, required)
- `version` (ref, required): Its latest version, which a tab made from it names.
  - Reference: `com.atproto.repo.strongRef`
- `versions` (array): Every version, newest first.
  - `items` (ref)
    - Reference: `#versionView`

## #versionView (`fyi.opensocial.listTemplates#versionView`)

Type: object

### Properties

- `changes` (string): What's new in it.
- `createdAt` (string · datetime, required)
- `createdBy` (string · did): Who shared it.
- `found` (array): What this host's scan of it found, on an earlier version: each a sentence for its row on the template's page.
  - `items` (string)
- `number` (integer, required)
  - Constraints: minimum: 1
- `takenBack` (boolean): Whoever shared it took it back.
- `unsafe` (boolean): Labelled unsafe, by this host's moderators or a labeler it follows: no tab is brought onto it, and a tab on it goes back to the last version that isn't.
- `version` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The templates shared within the group, each at its latest version: for its members alone.",
      "errors": [
        {
          "name": "Forbidden"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "templates": {
              "items": {
                "ref": "#templateView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "templates"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "group": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "group"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "templateView": {
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "createdBy": {
          "description": "Who shared its latest version.",
          "format": "did",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "entry": {
          "description": "How a tab uses it, its own kinds of record not yet named for any tab.",
          "ref": "fyi.opensocial.template#entry",
          "type": "ref"
        },
        "name": {
          "description": "Its record key: lowercase letters, digits and dashes.",
          "type": "string"
        },
        "number": {
          "minimum": 1,
          "type": "integer"
        },
        "sharedFrom": {
          "description": "The namespace of the tab it was shared from.",
          "type": "string"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "version": {
          "description": "Its latest version, which a tab made from it names.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "versions": {
          "description": "Every version, newest first.",
          "items": {
            "ref": "#versionView",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "uri",
        "name",
        "description",
        "version",
        "number",
        "entry",
        "createdAt"
      ],
      "type": "object"
    },
    "versionView": {
      "properties": {
        "changes": {
          "description": "What's new in it.",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "createdBy": {
          "description": "Who shared it.",
          "format": "did",
          "type": "string"
        },
        "found": {
          "description": "What this host's scan of it found, on an earlier version: each a sentence for its row on the template's page.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "number": {
          "minimum": 1,
          "type": "integer"
        },
        "takenBack": {
          "description": "Whoever shared it took it back.",
          "type": "boolean"
        },
        "unsafe": {
          "description": "Labelled unsafe, by this host's moderators or a labeler it follows: no tab is brought onto it, and a tab on it goes back to the last version that isn't.",
          "type": "boolean"
        },
        "version": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "version",
        "number",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.listTemplates",
  "lexicon": 1
}
```
