# fyi.opensocial.listDrafts

> The drafts your assistant left for you in the group's tabs, waiting for you to add or let go: each with the space it goes in, added as you, or for its tab's page to make into what it keeps (page).

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

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

Type: query · GET

### Parameters (query string)

- `group` (string · did, required)

### Output (application/json)

- `drafts` (array, required)
  - `items` (ref)
    - Reference: `#draftView`

## #draftFile (`fyi.opensocial.listDrafts#draftFile`)

Type: object

### Properties

- `alt` (string): What it shows, in words.
- `n` (integer, required): Its number, from 1.
  - Constraints: minimum: 1
- `size` (integer, required): How big it is, in bytes.
- `type` (string, required): Its MIME type.

## #draftView (`fyi.opensocial.listDrafts#draftView`)

Type: object

### Properties

- `asGroup` (boolean): Added as the group, by whoever adds it and may.
- `by` (string): The AI app that left it, by the name it gave.
- `collection` (string · nsid, required)
- `createdAt` (string · datetime, required)
- `files` (array): The files it brings, in order: each read with getDraftFile, by its number.
  - `items` (ref)
    - Reference: `#draftFile`
- `id` (string, required)
- `page` (boolean): Its tab's page makes it into what it keeps.
- `record` (unknown, required)
- `remove` (boolean): It removes that one, rather than changing it.
- `replaces` (string): The one it changes, or removes: the record's address, or, for its tab's page to change, as the page names one.
- `space` (string): The space it goes in, added.
- `tab` (string, required): Its tab's namespace.
- `title` (string, required)
- `was` (string): What the one it changes or removes is called.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "draftFile": {
      "properties": {
        "alt": {
          "description": "What it shows, in words.",
          "type": "string"
        },
        "n": {
          "description": "Its number, from 1.",
          "minimum": 1,
          "type": "integer"
        },
        "size": {
          "description": "How big it is, in bytes.",
          "type": "integer"
        },
        "type": {
          "description": "Its MIME type.",
          "type": "string"
        }
      },
      "required": [
        "n",
        "type",
        "size"
      ],
      "type": "object"
    },
    "draftView": {
      "properties": {
        "asGroup": {
          "description": "Added as the group, by whoever adds it and may.",
          "type": "boolean"
        },
        "by": {
          "description": "The AI app that left it, by the name it gave.",
          "type": "string"
        },
        "collection": {
          "format": "nsid",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "files": {
          "description": "The files it brings, in order: each read with getDraftFile, by its number.",
          "items": {
            "ref": "#draftFile",
            "type": "ref"
          },
          "type": "array"
        },
        "id": {
          "type": "string"
        },
        "page": {
          "description": "Its tab's page makes it into what it keeps.",
          "type": "boolean"
        },
        "record": {
          "type": "unknown"
        },
        "remove": {
          "description": "It removes that one, rather than changing it.",
          "type": "boolean"
        },
        "replaces": {
          "description": "The one it changes, or removes: the record's address, or, for its tab's page to change, as the page names one.",
          "type": "string"
        },
        "space": {
          "description": "The space it goes in, added.",
          "type": "string"
        },
        "tab": {
          "description": "Its tab's namespace.",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "was": {
          "description": "What the one it changes or removes is called.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "tab",
        "collection",
        "title",
        "record",
        "createdAt"
      ],
      "type": "object"
    },
    "main": {
      "description": "The drafts your assistant left for you in the group's tabs, waiting for you to add or let go: each with the space it goes in, added as you, or for its tab's page to make into what it keeps (page).",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "drafts": {
              "items": {
                "ref": "#draftView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "drafts"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "group": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "group"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "fyi.opensocial.listDrafts",
  "lexicon": 1
}
```
