# ai.newnal.illi.artwork.defs

- Kind: defs
- Authority: artwork.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.artwork.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.artwork.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.artwork.defs/analytics)

## #archiveWork (`ai.newnal.illi.artwork.defs#archiveWork`)

Type: object

### Properties

- `artworkKey` (string, required)
  - Constraints: minLength: 1, maxLength: 64
- `deliveries` (array, required)
  - `items` (ref)
    - Reference: `ai.newnal.illi.artwork.defs#deliveryView`
- `localDate` (string, required): Local date (YYYY-MM-DD) of the day the work was made for, in the home's time zone; the same for sent and unsent works.
  - Constraints: maxLength: 10
- `playbackUrl` (string)
- `previewUrl` (string · uri)
- `processingRetryState` (string): Automatic processing recovery: retrying includes backoff and queued work; stopped means no further automatic attempt.
  - Constraints: knownValues: none | retrying | stopped
- `productionState` (string, required)
- `sourceUris` (array)
  - `items` (string · at-uri)
- `thumbnailUrl` (string)
- `title` (string)
- `workType` (string, required)

## #artworkView (`ai.newnal.illi.artwork.defs#artworkView`)

Type: object

### Properties

- `analysisState` (string, required)
- `artworkKey` (string, required)
  - Constraints: minLength: 1, maxLength: 64
- `deliveries` (array, required)
  - `items` (ref)
    - Reference: `ai.newnal.illi.artwork.defs#deliveryView`
- `introSubtitle` (string)
- `occurrences` (array, required)
  - `items` (ref)
    - Reference: `ai.newnal.illi.artwork.defs#occurrenceView`
- `processingRetryState` (string): Automatic processing recovery: retrying includes backoff and queued work; stopped means no further automatic attempt.
  - Constraints: knownValues: none | retrying | stopped
- `productionState` (string, required)
- `sourceUris` (array, required)
  - `items` (string · at-uri)
- `title` (string)
- `versions` (array, required)
  - `items` (ref)
    - Reference: `ai.newnal.illi.artwork.defs#versionView`
- `workType` (string, required)
  - Constraints: knownValues: photoSlides | longVideo | shortVideoCollection

## #delivery (`ai.newnal.illi.artwork.defs#delivery`)

Type: object

Delivery counts of one occurrence. Delivered means downloaded and acknowledged, not played.

### Properties

- `devices` (integer, required): Devices this occurrence was offered to.
  - Constraints: minimum: 0
- `received` (integer, required): Devices that downloaded the whole file and confirmed its size and hash (not that anyone watched it).
  - Constraints: minimum: 0

## #deliveryView (`ai.newnal.illi.artwork.defs#deliveryView`)

Type: object

### Properties

- `artworkKey` (string, required)
  - Constraints: maxLength: 64
- `completedAt` (string · datetime)
- `compositionVersion` (integer, required)
  - Constraints: minimum: 1
- `deliveryId` (string, required)
  - Constraints: maxLength: 64
- `durationMs` (integer)
  - Constraints: minimum: 0
- `expiresAt` (string · datetime, required)
- `failure` (string)
  - Constraints: knownValues: download | size | hash | storage | metadata | decode
- `kind` (string)
  - Constraints: knownValues: slides | video
- `lastPositionMs` (integer, required)
  - Constraints: minimum: 0
- `occurrenceId` (string, required)
  - Constraints: maxLength: 64
- `offeredAt` (string · datetime)
- `playbackReadyAt` (string · datetime)
- `played` (boolean, required): Whether this device started playing this delivery; independent of receipt.
- `receivedAt` (string · datetime)
- `state` (string, required): Receipt state: offered, received, failed, cancelled or expired.
  - Constraints: knownValues: offered | received | failed | cancelled | expired
- `title` (string)

## #familyWorkCard (`ai.newnal.illi.artwork.defs#familyWorkCard`)

Type: object

### Properties

- `artworkKey` (string, required)
  - Constraints: minLength: 1, maxLength: 64
- `compositionVersion` (integer, required)
  - Constraints: minimum: 1
- `deliveryId` (string, required)
  - Constraints: minLength: 1, maxLength: 64
- `durationMs` (integer, required)
  - Constraints: minimum: 0
- `lastPositionMs` (integer, required)
  - Constraints: minimum: 0
- `playable` (boolean, required)
- `playbackState` (string, required)
  - Constraints: knownValues: unplayed | inProgress | paused | completed
- `recommendation` (string): Stored version introduction, shared with direct cards. Absent during generation or retries; later reads may fill it even for an existing snapshot.
- `thumbnailUrl` (string, required)
- `title` (string, required)
- `workType` (string, required)
  - Constraints: knownValues: photoSlides | longVideo | shortVideoCollection

## #manifest (`ai.newnal.illi.artwork.defs#manifest`)

Type: object

### Properties

- `artworkKey` (string, required)
  - Constraints: maxLength: 64
- `blobCid` (string · cid, required): CID of the video blob on the root admin's PDN.
- `byteSize` (integer, required)
  - Constraints: minimum: 1, maximum: 314572800
- `compositionVersion` (integer, required): Fixed for this delivery: later versions never replace it.
  - Constraints: minimum: 1
- `contentHash` (string, required): sha256 of the file, lowercase hex.
  - Constraints: maxLength: 128
- `deliveryId` (string, required)
  - Constraints: maxLength: 64
- `downloadUrl` (string, required): Path on the Service Agent Node (GET, bearer, device session) that streams exactly this file.
- `durationMs` (integer)
  - Constraints: minimum: 0
- `expiresAt` (string · datetime)
- `height` (integer)
  - Constraints: minimum: 1
- `homeId` (string, required)
- `introSubtitle` (string)
- `kind` (string, required)
  - Constraints: knownValues: slides | video
- `mediaArtworkId` (string, required)
  - Constraints: maxLength: 128
- `mimeType` (string, required): Always video/mp4.
- `title` (string)
- `width` (integer)
  - Constraints: minimum: 1

## #occurrenceView (`ai.newnal.illi.artwork.defs#occurrenceView`)

Type: object

### Properties

- `acceptedAt` (string · datetime)
- `acceptedVersion` (integer)
  - Constraints: minimum: 1
- `analysisState` (string, required)
  - Constraints: knownValues: pending | masking | verifying | verified | textGenerating | complete | failed
- `artworkKey` (string, required)
  - Constraints: maxLength: 64
- `attempt` (integer, required)
  - Constraints: minimum: 0
- `changeReason` (string): Composition changed after guardian editing/acceptance of a previous attempt. Previous edits are not applied to this attempt. Absent after a new subtitle edit is accepted; processing retries that preserve composition do not set it.
  - Constraints: knownValues: previousEditsNotApplied
- `changesUntil` (string · datetime): Upload-window end while the next-day draft may change. Omitted at/after local midnight and for immediate debug days.
- `deliveryState` (string)
- `durationMs` (integer): Output length of the accepted version, or of the latest stored version when none is accepted; absent until that version has rendered.
  - Constraints: minimum: 0
- `errorCode` (string)
- `expiresAt` (string · datetime, required)
- `holdReason` (string): Technical readiness stage while held before dispatch, or terminal failure reason when not ready at the first dispatch decision at/after scheduledAt. Absent on a failure whose stored version's originals are no longer eligible.
  - Constraints: knownValues: processing | analysis | text | render | store
- `localDate` (string, required)
  - Constraints: maxLength: 10
- `lockAt` (string · datetime, required)
- `locked` (boolean, required)
- `occurrenceId` (string, required)
  - Constraints: maxLength: 64
- `previewUrl` (string · uri)
- `processingRetryState` (string): Automatic processing recovery: retrying includes backoff and queued work; stopped means no further automatic attempt.
  - Constraints: knownValues: none | retrying | stopped
- `productionState` (string, required)
  - Constraints: knownValues: composing | ready | failed | cancelled
- `receivedAt` (string · datetime)
- `revision` (integer, required)
  - Constraints: minimum: 1
- `scheduledAt` (string · datetime, required)
- `slotKey` (string, required)
  - Constraints: knownValues: newPhoto | newVideo | basePhoto | baseVideo
- `state` (string, required)
  - Constraints: knownValues: scheduled | held | offered | received | cancelled | expired | failed
- `thumbnailUrl` (string)
- `title` (string)
- `workType` (string): Present after concrete media selection; an in-flight video kind choice has no selected work type yet.
  - Constraints: knownValues: photoSlides | longVideo | shortVideoCollection

## #scheduledSlot (`ai.newnal.illi.artwork.defs#scheduledSlot`)

Type: object

### Properties

- `artworkKey` (string)
- `localDate` (string, required)
  - Constraints: maxLength: 10
- `reason` (string): insufficientSources: the slot had too few eligible originals, so no occurrence or work exists for it.
  - Constraints: knownValues: insufficientSources
- `slotKey` (string, required)
  - Constraints: knownValues: newPhoto | newVideo | basePhoto | baseVideo
- `state` (string, required)
  - Constraints: knownValues: insufficient | processing | failed | excluded | ready

## #versionView (`ai.newnal.illi.artwork.defs#versionView`)

Type: object

### Properties

- `analysis` (unknown, required)
- `capturePeriod` (unknown)
- `compositionVersion` (integer, required)
  - Constraints: minimum: 1
- `errorCode` (string)
- `playbackUrl` (string)
- `previewUrl` (string · uri)
- `state` (string, required)
  - Constraints: knownValues: ready | processing | failed
- `storeState` (string, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "archiveWork": {
      "properties": {
        "artworkKey": {
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "deliveries": {
          "items": {
            "ref": "ai.newnal.illi.artwork.defs#deliveryView",
            "type": "ref"
          },
          "type": "array"
        },
        "localDate": {
          "description": "Local date (YYYY-MM-DD) of the day the work was made for, in the home's time zone; the same for sent and unsent works.",
          "maxLength": 10,
          "type": "string"
        },
        "playbackUrl": {
          "type": "string"
        },
        "previewUrl": {
          "format": "uri",
          "type": "string"
        },
        "processingRetryState": {
          "description": "Automatic processing recovery: retrying includes backoff and queued work; stopped means no further automatic attempt.",
          "knownValues": [
            "none",
            "retrying",
            "stopped"
          ],
          "type": "string"
        },
        "productionState": {
          "type": "string"
        },
        "sourceUris": {
          "items": {
            "format": "at-uri",
            "type": "string"
          },
          "type": "array"
        },
        "thumbnailUrl": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "workType": {
          "type": "string"
        }
      },
      "required": [
        "artworkKey",
        "workType",
        "productionState",
        "deliveries",
        "localDate"
      ],
      "type": "object"
    },
    "artworkView": {
      "properties": {
        "analysisState": {
          "type": "string"
        },
        "artworkKey": {
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "deliveries": {
          "items": {
            "ref": "ai.newnal.illi.artwork.defs#deliveryView",
            "type": "ref"
          },
          "type": "array"
        },
        "introSubtitle": {
          "type": "string"
        },
        "occurrences": {
          "items": {
            "ref": "ai.newnal.illi.artwork.defs#occurrenceView",
            "type": "ref"
          },
          "type": "array"
        },
        "processingRetryState": {
          "description": "Automatic processing recovery: retrying includes backoff and queued work; stopped means no further automatic attempt.",
          "knownValues": [
            "none",
            "retrying",
            "stopped"
          ],
          "type": "string"
        },
        "productionState": {
          "type": "string"
        },
        "sourceUris": {
          "items": {
            "format": "at-uri",
            "type": "string"
          },
          "type": "array"
        },
        "title": {
          "type": "string"
        },
        "versions": {
          "items": {
            "ref": "ai.newnal.illi.artwork.defs#versionView",
            "type": "ref"
          },
          "type": "array"
        },
        "workType": {
          "knownValues": [
            "photoSlides",
            "longVideo",
            "shortVideoCollection"
          ],
          "type": "string"
        }
      },
      "required": [
        "artworkKey",
        "workType",
        "productionState",
        "analysisState",
        "sourceUris",
        "versions",
        "occurrences",
        "deliveries"
      ],
      "type": "object"
    },
    "delivery": {
      "description": "Delivery counts of one occurrence. Delivered means downloaded and acknowledged, not played.",
      "properties": {
        "devices": {
          "description": "Devices this occurrence was offered to.",
          "minimum": 0,
          "type": "integer"
        },
        "received": {
          "description": "Devices that downloaded the whole file and confirmed its size and hash (not that anyone watched it).",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "devices",
        "received"
      ],
      "type": "object"
    },
    "deliveryView": {
      "properties": {
        "artworkKey": {
          "maxLength": 64,
          "type": "string"
        },
        "completedAt": {
          "format": "datetime",
          "type": "string"
        },
        "compositionVersion": {
          "minimum": 1,
          "type": "integer"
        },
        "deliveryId": {
          "maxLength": 64,
          "type": "string"
        },
        "durationMs": {
          "minimum": 0,
          "type": "integer"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "failure": {
          "knownValues": [
            "download",
            "size",
            "hash",
            "storage",
            "metadata",
            "decode"
          ],
          "type": "string"
        },
        "kind": {
          "knownValues": [
            "slides",
            "video"
          ],
          "type": "string"
        },
        "lastPositionMs": {
          "minimum": 0,
          "type": "integer"
        },
        "occurrenceId": {
          "maxLength": 64,
          "type": "string"
        },
        "offeredAt": {
          "format": "datetime",
          "type": "string"
        },
        "playbackReadyAt": {
          "format": "datetime",
          "type": "string"
        },
        "played": {
          "description": "Whether this device started playing this delivery; independent of receipt.",
          "type": "boolean"
        },
        "receivedAt": {
          "format": "datetime",
          "type": "string"
        },
        "state": {
          "description": "Receipt state: offered, received, failed, cancelled or expired.",
          "knownValues": [
            "offered",
            "received",
            "failed",
            "cancelled",
            "expired"
          ],
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "deliveryId",
        "occurrenceId",
        "artworkKey",
        "compositionVersion",
        "state",
        "expiresAt",
        "played",
        "lastPositionMs"
      ],
      "type": "object"
    },
    "familyWorkCard": {
      "properties": {
        "artworkKey": {
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "compositionVersion": {
          "minimum": 1,
          "type": "integer"
        },
        "deliveryId": {
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "durationMs": {
          "minimum": 0,
          "type": "integer"
        },
        "lastPositionMs": {
          "minimum": 0,
          "type": "integer"
        },
        "playable": {
          "type": "boolean"
        },
        "playbackState": {
          "knownValues": [
            "unplayed",
            "inProgress",
            "paused",
            "completed"
          ],
          "type": "string"
        },
        "recommendation": {
          "description": "Stored version introduction, shared with direct cards. Absent during generation or retries; later reads may fill it even for an existing snapshot.",
          "type": "string"
        },
        "thumbnailUrl": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "workType": {
          "knownValues": [
            "photoSlides",
            "longVideo",
            "shortVideoCollection"
          ],
          "type": "string"
        }
      },
      "required": [
        "artworkKey",
        "compositionVersion",
        "deliveryId",
        "workType",
        "title",
        "thumbnailUrl",
        "playbackState",
        "lastPositionMs",
        "durationMs",
        "playable"
      ],
      "type": "object"
    },
    "manifest": {
      "properties": {
        "artworkKey": {
          "maxLength": 64,
          "type": "string"
        },
        "blobCid": {
          "description": "CID of the video blob on the root admin's PDN.",
          "format": "cid",
          "type": "string"
        },
        "byteSize": {
          "maximum": 314572800,
          "minimum": 1,
          "type": "integer"
        },
        "compositionVersion": {
          "description": "Fixed for this delivery: later versions never replace it.",
          "minimum": 1,
          "type": "integer"
        },
        "contentHash": {
          "description": "sha256 of the file, lowercase hex.",
          "maxLength": 128,
          "type": "string"
        },
        "deliveryId": {
          "maxLength": 64,
          "type": "string"
        },
        "downloadUrl": {
          "description": "Path on the Service Agent Node (GET, bearer, device session) that streams exactly this file.",
          "type": "string"
        },
        "durationMs": {
          "minimum": 0,
          "type": "integer"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "homeId": {
          "type": "string"
        },
        "introSubtitle": {
          "type": "string"
        },
        "kind": {
          "knownValues": [
            "slides",
            "video"
          ],
          "type": "string"
        },
        "mediaArtworkId": {
          "maxLength": 128,
          "type": "string"
        },
        "mimeType": {
          "description": "Always video/mp4.",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "deliveryId",
        "homeId",
        "artworkKey",
        "mediaArtworkId",
        "compositionVersion",
        "kind",
        "mimeType",
        "blobCid",
        "byteSize",
        "contentHash",
        "downloadUrl"
      ],
      "type": "object"
    },
    "occurrenceView": {
      "properties": {
        "acceptedAt": {
          "format": "datetime",
          "type": "string"
        },
        "acceptedVersion": {
          "minimum": 1,
          "type": "integer"
        },
        "analysisState": {
          "knownValues": [
            "pending",
            "masking",
            "verifying",
            "verified",
            "textGenerating",
            "complete",
            "failed"
          ],
          "type": "string"
        },
        "artworkKey": {
          "maxLength": 64,
          "type": "string"
        },
        "attempt": {
          "minimum": 0,
          "type": "integer"
        },
        "changeReason": {
          "description": "Composition changed after guardian editing/acceptance of a previous attempt. Previous edits are not applied to this attempt. Absent after a new subtitle edit is accepted; processing retries that preserve composition do not set it.",
          "knownValues": [
            "previousEditsNotApplied"
          ],
          "type": "string"
        },
        "changesUntil": {
          "description": "Upload-window end while the next-day draft may change. Omitted at/after local midnight and for immediate debug days.",
          "format": "datetime",
          "type": "string"
        },
        "deliveryState": {
          "type": "string"
        },
        "durationMs": {
          "description": "Output length of the accepted version, or of the latest stored version when none is accepted; absent until that version has rendered.",
          "minimum": 0,
          "type": "integer"
        },
        "errorCode": {
          "type": "string"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "holdReason": {
          "description": "Technical readiness stage while held before dispatch, or terminal failure reason when not ready at the first dispatch decision at/after scheduledAt. Absent on a failure whose stored version's originals are no longer eligible.",
          "knownValues": [
            "processing",
            "analysis",
            "text",
            "render",
            "store"
          ],
          "type": "string"
        },
        "localDate": {
          "maxLength": 10,
          "type": "string"
        },
        "lockAt": {
          "format": "datetime",
          "type": "string"
        },
        "locked": {
          "type": "boolean"
        },
        "occurrenceId": {
          "maxLength": 64,
          "type": "string"
        },
        "previewUrl": {
          "format": "uri",
          "type": "string"
        },
        "processingRetryState": {
          "description": "Automatic processing recovery: retrying includes backoff and queued work; stopped means no further automatic attempt.",
          "knownValues": [
            "none",
            "retrying",
            "stopped"
          ],
          "type": "string"
        },
        "productionState": {
          "knownValues": [
            "composing",
            "ready",
            "failed",
            "cancelled"
          ],
          "type": "string"
        },
        "receivedAt": {
          "format": "datetime",
          "type": "string"
        },
        "revision": {
          "minimum": 1,
          "type": "integer"
        },
        "scheduledAt": {
          "format": "datetime",
          "type": "string"
        },
        "slotKey": {
          "knownValues": [
            "newPhoto",
            "newVideo",
            "basePhoto",
            "baseVideo"
          ],
          "type": "string"
        },
        "state": {
          "knownValues": [
            "scheduled",
            "held",
            "offered",
            "received",
            "cancelled",
            "expired",
            "failed"
          ],
          "type": "string"
        },
        "thumbnailUrl": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "workType": {
          "description": "Present after concrete media selection; an in-flight video kind choice has no selected work type yet.",
          "knownValues": [
            "photoSlides",
            "longVideo",
            "shortVideoCollection"
          ],
          "type": "string"
        }
      },
      "required": [
        "occurrenceId",
        "artworkKey",
        "localDate",
        "slotKey",
        "attempt",
        "scheduledAt",
        "expiresAt",
        "state",
        "productionState",
        "analysisState",
        "revision",
        "lockAt",
        "locked"
      ],
      "type": "object"
    },
    "scheduledSlot": {
      "properties": {
        "artworkKey": {
          "type": "string"
        },
        "localDate": {
          "maxLength": 10,
          "type": "string"
        },
        "reason": {
          "description": "insufficientSources: the slot had too few eligible originals, so no occurrence or work exists for it.",
          "knownValues": [
            "insufficientSources"
          ],
          "type": "string"
        },
        "slotKey": {
          "knownValues": [
            "newPhoto",
            "newVideo",
            "basePhoto",
            "baseVideo"
          ],
          "type": "string"
        },
        "state": {
          "knownValues": [
            "insufficient",
            "processing",
            "failed",
            "excluded",
            "ready"
          ],
          "type": "string"
        }
      },
      "required": [
        "localDate",
        "slotKey",
        "state"
      ],
      "type": "object"
    },
    "versionView": {
      "properties": {
        "analysis": {
          "type": "unknown"
        },
        "capturePeriod": {
          "type": "unknown"
        },
        "compositionVersion": {
          "minimum": 1,
          "type": "integer"
        },
        "errorCode": {
          "type": "string"
        },
        "playbackUrl": {
          "type": "string"
        },
        "previewUrl": {
          "format": "uri",
          "type": "string"
        },
        "state": {
          "knownValues": [
            "ready",
            "processing",
            "failed"
          ],
          "type": "string"
        },
        "storeState": {
          "type": "string"
        }
      },
      "required": [
        "compositionVersion",
        "state",
        "storeState",
        "analysis"
      ],
      "type": "object"
    }
  },
  "id": "ai.newnal.illi.artwork.defs",
  "lexicon": 1
}
```
