# com.suibari.nagi.putDraft

> Published by [suibari.com](https://lexicon.garden/identity/did:plc:uixgxpiqf4i63p6rgpu7ytmx)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.putDraft)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.putDraft/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.putDraft/examples)

## Definitions

### `com.suibari.nagi.putDraft`

**Type**: `procedure`

#### Input

**Encoding**: `application/json`

#### Output

**Encoding**: `application/json`

#### Errors

- **AuthRequired**
- **InvalidRequest**
- **DraftLimit**

### `com.suibari.nagi.putDraft#emoji`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `end` | `integer` | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `start` | `integer` | Yes |  |

### `com.suibari.nagi.putDraft#channel`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `end` | `integer` | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `name` | `string` | Yes |  |
| `start` | `integer` | Yes |  |

### `com.suibari.nagi.putDraft#mention`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `end` | `integer` | Yes |  |
| `start` | `integer` | Yes |  |
| `handle` | `string` (handle) | Yes |  |

### `com.suibari.nagi.putDraft#linkCard`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes |  |
| `title` | `string` | Yes |  |
| `description` | `string` | No |  |

### `com.suibari.nagi.putDraft#draftView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes |  |
| `text` | `string` | Yes |  |
| `emojis` | `array` | Yes |  |
| `channels` | `array` | Yes |  |
| `mentions` | `array` | Yes |  |
| `quoteUri` | `string` (at-uri) | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `linkCards` | `array` | Yes |  |
| `updatedAt` | `string` (datetime) | Yes |  |
| `dismissedUrls` | `array` | Yes |  |

### `com.suibari.nagi.putDraft#draftInput`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes |  |
| `content` | `ref` → `#draftContent` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `updatedAt` | `string` (datetime) | Yes |  |

### `com.suibari.nagi.putDraft#draftContent`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `text` | `string` | Yes |  |
| `emojis` | `array` | Yes |  |
| `channels` | `array` | Yes |  |
| `mentions` | `array` | Yes |  |
| `quoteUri` | `string` (at-uri) | No |  |
| `linkCards` | `array` | Yes |  |
| `dismissedUrls` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "com.suibari.nagi.putDraft",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "ref": "#draftInput",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "DraftLimit"
        }
      ],
      "output": {
        "schema": {
          "ref": "#draftView",
          "type": "ref"
        },
        "encoding": "application/json"
      }
    },
    "emoji": {
      "type": "object",
      "required": [
        "start",
        "end",
        "uri"
      ],
      "properties": {
        "end": {
          "type": "integer",
          "minimum": 0
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "maxLength": 2048
        },
        "start": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "channel": {
      "type": "object",
      "required": [
        "start",
        "end",
        "uri",
        "name"
      ],
      "properties": {
        "end": {
          "type": "integer",
          "minimum": 0
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "maxLength": 2048
        },
        "name": {
          "type": "string",
          "maxLength": 300
        },
        "start": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "mention": {
      "type": "object",
      "required": [
        "start",
        "end",
        "did",
        "handle"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "end": {
          "type": "integer",
          "minimum": 0
        },
        "start": {
          "type": "integer",
          "minimum": 0
        },
        "handle": {
          "type": "string",
          "format": "handle"
        }
      }
    },
    "linkCard": {
      "type": "object",
      "required": [
        "uri",
        "title"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "maxLength": 2048
        },
        "title": {
          "type": "string",
          "maxLength": 3000
        },
        "description": {
          "type": "string",
          "maxLength": 30000
        }
      }
    },
    "draftView": {
      "type": "object",
      "required": [
        "id",
        "text",
        "mentions",
        "channels",
        "emojis",
        "linkCards",
        "dismissedUrls",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 36
        },
        "text": {
          "type": "string",
          "maxLength": 30000,
          "maxGraphemes": 3000
        },
        "emojis": {
          "type": "array",
          "items": {
            "ref": "#emoji",
            "type": "ref"
          },
          "maxLength": 100
        },
        "channels": {
          "type": "array",
          "items": {
            "ref": "#channel",
            "type": "ref"
          },
          "maxLength": 100
        },
        "mentions": {
          "type": "array",
          "items": {
            "ref": "#mention",
            "type": "ref"
          },
          "maxLength": 100
        },
        "quoteUri": {
          "type": "string",
          "format": "at-uri",
          "maxLength": 2048
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "linkCards": {
          "type": "array",
          "items": {
            "ref": "#linkCard",
            "type": "ref"
          },
          "maxLength": 4
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime"
        },
        "dismissedUrls": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 2048
          },
          "maxLength": 100
        }
      }
    },
    "draftInput": {
      "type": "object",
      "required": [
        "id",
        "content",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 36
        },
        "content": {
          "ref": "#draftContent",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime"
        }
      }
    },
    "draftContent": {
      "type": "object",
      "required": [
        "text",
        "mentions",
        "channels",
        "emojis",
        "linkCards",
        "dismissedUrls"
      ],
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 30000,
          "maxGraphemes": 3000
        },
        "emojis": {
          "type": "array",
          "items": {
            "ref": "#emoji",
            "type": "ref"
          },
          "maxLength": 100
        },
        "channels": {
          "type": "array",
          "items": {
            "ref": "#channel",
            "type": "ref"
          },
          "maxLength": 100
        },
        "mentions": {
          "type": "array",
          "items": {
            "ref": "#mention",
            "type": "ref"
          },
          "maxLength": 100
        },
        "quoteUri": {
          "type": "string",
          "format": "at-uri",
          "maxLength": 2048
        },
        "linkCards": {
          "type": "array",
          "items": {
            "ref": "#linkCard",
            "type": "ref"
          },
          "maxLength": 4
        },
        "dismissedUrls": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 2048
          },
          "maxLength": 100
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
