{
"id": "social.agent.draft.post",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"target",
"delegationRef",
"content",
"status",
"createdAt"
],
"properties": {
"edits": {
"type": "array",
"items": {
"ref": "#editEntry",
"type": "ref"
},
"description": "Append-only edit trail"
},
"status": {
"type": "string",
"knownValues": [
"pending",
"edited",
"approved",
"posted",
"rejected"
]
},
"target": {
"type": "string",
"format": "did",
"description": "DID of the human this draft is for"
},
"content": {
"ref": "#draftContent",
"type": "ref"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"updatedAt": {
"type": "string",
"format": "datetime"
},
"autoApproved": {
"type": "boolean",
"description": "True if approved automatically (auto/transparent mode)"
},
"publishedRef": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the published post on target network (set when status=posted)"
},
"delegationRef": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the social.agent.delegation.grant authorizing this draft"
},
"rejectionReason": {
"type": "string",
"maxLength": 1000
},
"constraintEvaluation": {
"ref": "#constraintResult",
"type": "ref"
}
}
}
},
"editEntry": {
"type": "object",
"required": [
"editedBy",
"at"
],
"properties": {
"at": {
"type": "string",
"format": "datetime"
},
"editedBy": {
"type": "string",
"format": "did"
},
"snapshot": {
"ref": "#draftContent",
"type": "ref"
},
"description": {
"type": "string",
"maxLength": 1000
}
}
},
"draftContent": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 3000,
"maxGraphemes": 1000
},
"embed": {
"refs": [
"app.bsky.embed.images",
"app.bsky.embed.external",
"app.bsky.embed.record",
"app.bsky.embed.recordWithMedia"
],
"type": "union"
},
"langs": {
"type": "array",
"items": {
"type": "string",
"format": "language"
},
"maxItems": 3
},
"reply": {
"type": "object",
"properties": {
"root": {
"ref": "com.atproto.repo.strongRef",
"type": "ref"
},
"parent": {
"ref": "com.atproto.repo.strongRef",
"type": "ref"
}
}
},
"facets": {
"type": "array",
"items": {
"ref": "app.bsky.richtext.facet",
"type": "ref"
}
}
}
},
"constraintResult": {
"type": "object",
"properties": {
"failed": {
"type": "array",
"items": {
"type": "string"
}
},
"passed": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"description": "Draft post created under a delegation. Lives on the agent's PDS. Accumulating record keyed by TID."
}