# app.thesocialwire.articleDraft.defs

- Kind: defs
- Authority: articleDraft.thesocialwire.app
- Lexicon: 1
- Published by [samclemente.me](https://lexicon.garden/identity/did:plc:qy5pluw2bsuq2x6albsgkvx3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.articleDraft.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.articleDraft.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.articleDraft.defs/analytics)

## #attachmentBinding (`app.thesocialwire.articleDraft.defs#attachmentBinding`)

Type: object

Ready owner-private photo only; asset kind must be photo, byteLength at most 1000000, with name and MIME matching the local asset descriptor.

### Properties

- `asset` (ref, required)
  - Reference: `app.thesocialwire.socialDraft.defs#asset`
- `localAssetId` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36

## #attachmentRef (`app.thesocialwire.articleDraft.defs#attachmentRef`)

Type: object

### Properties

- `assetId` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `localAssetId` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36

## #document (`app.thesocialwire.articleDraft.defs#document`)

Type: object

Owner-private snapshot. Live results contain draft with matching id; deletion tombstones omit draft and contain no attachments. Tombstones cannot be overwritten to resurrect a draft.

### Properties

- `attachments` (array, required)
  - Constraints: maxLength: 200
  - `items` (ref)
    - Reference: `app.thesocialwire.articleDraft.defs#attachmentBinding`
- `deleted` (boolean, required)
- `draft` (ref)
  - Reference: `app.thesocialwire.articleDraft.defs#payload`
- `draftId` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `mutationId` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `revision` (integer, required)
  - Constraints: minimum: 1
- `updatedAt` (string · datetime, required)

## #localAsset (`app.thesocialwire.articleDraft.defs#localAsset`)

Type: object

Original image metadata. Byte length is bounded to 1000000 by the service, with a ready owner-private photo binding required for every asset.

### Properties

- `alt` (string, required)
- `height` (integer, required)
  - Constraints: minimum: 1, maximum: 100000
- `id` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `mimeType` (string, required)
  - Constraints: enum: image/jpeg | image/png | image/gif | image/webp
- `name` (string, required)
  - Constraints: minLength: 1, maxLength: 1024
- `width` (integer, required)
  - Constraints: minimum: 1, maximum: 100000

## #payload (`app.thesocialwire.articleDraft.defs#payload`)

Type: object

Private article content, at most 524288 UTF-8 JSON bytes in total; title/body/excerpt/path/publication identifiers reject NUL. String limits are enforced in UTF-8 bytes by the service. No local cache or sync revisions are included. Publication/scheduling fields only describe explicit user actions, never cause them.

### Properties

- `assets` (array, required)
  - Constraints: maxLength: 200
  - `items` (ref)
    - Reference: `app.thesocialwire.articleDraft.defs#localAsset`
- `coverAssetId` (string): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `createdAt` (string · datetime, required)
- `excerpt` (string, required)
- `id` (string, required): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `markdown` (string, required)
- `path` (string, required)
- `publicationClaimId` (string): Canonical lowercase UUID. This private identifier is not a PDS record.
  - Constraints: minLength: 36, maxLength: 36
- `publicationUri` (string, required)
- `publishedUri` (string)
  - Constraints: minLength: 1, maxLength: 4096
- `publishingRecordKey` (string): Private pending explicit Publish lock. Requires publicationClaimId; never copied into a PDS record.
  - Constraints: minLength: 1, maxLength: 4096
- `scheduleRecordKey` (string)
  - Constraints: minLength: 1, maxLength: 4096
- `scheduleUri` (string)
  - Constraints: minLength: 1, maxLength: 4096
- `tags` (array, required)
  - Constraints: maxLength: 100
  - `items` (string)
    - Constraints: maxLength: 256
- `title` (string, required)
- `updatedAt` (string · datetime, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "attachmentBinding": {
      "description": "Ready owner-private photo only; asset kind must be photo, byteLength at most 1000000, with name and MIME matching the local asset descriptor.",
      "properties": {
        "asset": {
          "ref": "app.thesocialwire.socialDraft.defs#asset",
          "type": "ref"
        },
        "localAssetId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        }
      },
      "required": [
        "localAssetId",
        "asset"
      ],
      "type": "object"
    },
    "attachmentRef": {
      "properties": {
        "assetId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "localAssetId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        }
      },
      "required": [
        "localAssetId",
        "assetId"
      ],
      "type": "object"
    },
    "document": {
      "description": "Owner-private snapshot. Live results contain draft with matching id; deletion tombstones omit draft and contain no attachments. Tombstones cannot be overwritten to resurrect a draft.",
      "properties": {
        "attachments": {
          "items": {
            "ref": "app.thesocialwire.articleDraft.defs#attachmentBinding",
            "type": "ref"
          },
          "maxLength": 200,
          "type": "array"
        },
        "deleted": {
          "type": "boolean"
        },
        "draft": {
          "ref": "app.thesocialwire.articleDraft.defs#payload",
          "type": "ref"
        },
        "draftId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "mutationId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "revision": {
          "minimum": 1,
          "type": "integer"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "draftId",
        "revision",
        "deleted",
        "mutationId",
        "updatedAt",
        "attachments"
      ],
      "type": "object"
    },
    "localAsset": {
      "description": "Original image metadata. Byte length is bounded to 1000000 by the service, with a ready owner-private photo binding required for every asset.",
      "properties": {
        "alt": {
          "type": "string"
        },
        "height": {
          "maximum": 100000,
          "minimum": 1,
          "type": "integer"
        },
        "id": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "mimeType": {
          "enum": [
            "image/jpeg",
            "image/png",
            "image/gif",
            "image/webp"
          ],
          "type": "string"
        },
        "name": {
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "width": {
          "maximum": 100000,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "id",
        "alt",
        "width",
        "height",
        "mimeType",
        "name"
      ],
      "type": "object"
    },
    "payload": {
      "description": "Private article content, at most 524288 UTF-8 JSON bytes in total; title/body/excerpt/path/publication identifiers reject NUL. String limits are enforced in UTF-8 bytes by the service. No local cache or sync revisions are included. Publication/scheduling fields only describe explicit user actions, never cause them.",
      "properties": {
        "assets": {
          "items": {
            "ref": "app.thesocialwire.articleDraft.defs#localAsset",
            "type": "ref"
          },
          "maxLength": 200,
          "type": "array"
        },
        "coverAssetId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "excerpt": {
          "type": "string"
        },
        "id": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "markdown": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "publicationClaimId": {
          "description": "Canonical lowercase UUID. This private identifier is not a PDS record.",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "publicationUri": {
          "type": "string"
        },
        "publishedUri": {
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        "publishingRecordKey": {
          "description": "Private pending explicit Publish lock. Requires publicationClaimId; never copied into a PDS record.",
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        "scheduleRecordKey": {
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        "scheduleUri": {
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        },
        "tags": {
          "items": {
            "maxLength": 256,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        },
        "title": {
          "type": "string"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "markdown",
        "excerpt",
        "path",
        "tags",
        "publicationUri",
        "createdAt",
        "updatedAt",
        "assets"
      ],
      "type": "object"
    }
  },
  "id": "app.thesocialwire.articleDraft.defs",
  "lexicon": 1
}
```
