pub struct UserDraftOverlay {
pub is_draft: bool,
pub draft_saved_at: Option<String>,
pub draft_base: Option<String>,
pub no_deployed: Option<bool>,
pub draft: Option<HashMap<String, Value>>,
pub other_drafts_users: Option<Vec<UserDraftOverlayOtherDraftsUsersInner>>,
}Expand description
UserDraftOverlay : Overlay fields added to every "get by path" response that accepts the get_draft query parameter. The deployed payload is sent untouched in the response body; the authed user’s saved draft for this path — whatever shape the editor wrote — is attached as the sibling draft field when get_draft=true and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them. When no_deployed=true there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only draft is canonical. Callers should disable "diff vs deployed" UI in that case.
Fields§
§is_draft: bool§draft_saved_at: Option<String>§draft_base: Option<String>The deployed version the draft forked from, as text whatever the kind (script hash, flow version id, app version id). Compare to the deployed head to tell a draft that is behind. Absent when there is no draft or it was never forked from a deploy.
no_deployed: Option<bool>§draft: Option<HashMap<String, Value>>§other_drafts_users: Option<Vec<UserDraftOverlayOtherDraftsUsersInner>>Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user’s "get by path" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI.
Implementations§
Source§impl UserDraftOverlay
impl UserDraftOverlay
Sourcepub fn new(is_draft: bool) -> UserDraftOverlay
pub fn new(is_draft: bool) -> UserDraftOverlay
Overlay fields added to every "get by path" response that accepts the get_draft query parameter. The deployed payload is sent untouched in the response body; the authed user’s saved draft for this path — whatever shape the editor wrote — is attached as the sibling draft field when get_draft=true and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them. When no_deployed=true there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only draft is canonical. Callers should disable "diff vs deployed" UI in that case.