# fyi.opensocial.listTemplates

> 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.listTemplates)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listTemplates/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listTemplates/examples)

## Definitions

### `fyi.opensocial.listTemplates`

**Type**: `query`

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

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `group` | `string` (did) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `templates` | `array` | Yes |  |

#### Errors

- **Forbidden**

### `fyi.opensocial.listTemplates#templateView`

**Type**: `object`

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

### `fyi.opensocial.listTemplates#versionView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `changes` | `string` | No | What's new in it. |
| `createdAt` | `string` (datetime) | Yes |  |
| `createdBy` | `string` (did) | No | Who shared it. |
| `number` | `integer` | Yes |  |
| `takenBack` | `boolean` | No | Whoever shared it took it back. |
| `unsafe` | `boolean` | No | 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` → `com.atproto.repo.strongRef` | Yes |  |

## Raw 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"
        },
        "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
}
```
