pub struct UserDraftOverlay {
pub is_draft: bool,
pub draft_saved_at: 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>§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.
Trait Implementations§
Source§impl Clone for UserDraftOverlay
impl Clone for UserDraftOverlay
Source§fn clone(&self) -> UserDraftOverlay
fn clone(&self) -> UserDraftOverlay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more