pub struct Draft {Show 19 fields
pub id: Option<String>,
pub created_at: Option<DateTime<Utc>>,
pub updated_at: Option<DateTime<Utc>>,
pub archived_at: Option<DateTime<Utc>>,
pub body_data: Option<Value>,
pub data: Option<Value>,
pub is_autogenerated: Option<bool>,
pub was_local_draft: Option<bool>,
pub user: Option<User>,
pub issue: Option<Issue>,
pub project: Option<Project>,
pub project_update: Option<ProjectUpdate>,
pub initiative: Option<Initiative>,
pub initiative_update: Option<InitiativeUpdate>,
pub post: Option<Post>,
pub parent_comment: Option<Comment>,
pub customer_need: Option<CustomerNeed>,
pub anchor: Option<String>,
pub team: Option<Team>,
}Expand description
A general-purpose draft for unsaved content. Drafts store in-progress text for comments, project updates, initiative updates, posts, pull request comments, and customer needs. Each draft belongs to a user and is associated with exactly one parent entity. Drafts are automatically deleted when the user publishes the corresponding comment or update.
Fields§
§id: Option<String>The unique identifier of the entity.
created_at: Option<DateTime<Utc>>The time at which the entity was created.
updated_at: Option<DateTime<Utc>>The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn’t been updated after creation.
archived_at: Option<DateTime<Utc>>The time at which the entity was archived. Null if the entity has not been archived.
body_data: Option<Value>The draft text content as a ProseMirror document.
data: Option<Value>Additional properties for the draft, such as generation metadata for AI-generated drafts, health status for project updates, or post titles.
is_autogenerated: Option<bool>Whether the draft was autogenerated for the user.
was_local_draft: Option<bool>INTERNAL Whether the draft was ported from a local draft.
user: Option<User>The user who created the draft.
issue: Option<Issue>The issue for which this is a draft comment. Null if the draft belongs to a different parent entity type.
project: Option<Project>The project for which this is a draft comment or project update. Null if the draft belongs to a different parent entity type.
project_update: Option<ProjectUpdate>The project update for which this is a draft comment. Null if the draft belongs to a different parent entity type.
initiative: Option<Initiative>The initiative for which this is a draft comment or initiative update. Null if the draft belongs to a different parent entity type.
initiative_update: Option<InitiativeUpdate>The initiative update for which this is a draft comment. Null if the draft belongs to a different parent entity type.
post: Option<Post>The post for which this is a draft comment. Null if the draft belongs to a different parent entity type.
parent_comment: Option<Comment>The parent comment for which this is a draft reply. Null if the draft is a top-level comment or belongs to a different parent entity type.
customer_need: Option<CustomerNeed>The customer need that this draft is referencing. Null if the draft belongs to a different parent entity type.
anchor: Option<String>INTERNAL Allows for multiple drafts per entity (currently constrained to Pull Requests).
team: Option<Team>The team for which this is a draft post. Null if the draft belongs to a different parent entity type.