@startujn render { direction: down; arrow_spacing: 24 } journey EXPORT "Download your data" description: "Ask for a copy of your data and download it from an email link" unique_id_friendly: export start from_privacy { description: "From privacy settings" } view privacy { title: "Your data"; description: "Download or delete your data"; route: /settings/privacy } ref delete_account { journey: DELETE; title: "Delete account"; description: "30-day grace period" } action reauth { type: auth; title: "Confirm your password"; description: "Sign in again before a sensitive download" } action queue { title: "Queue export" } view requested { title: "Export requested"; description: "We email you when it is ready"; route: /settings/privacy/export } action export_ready { type: event; title: "Export ready"; description: "The background job finished"; timeout: 48 h } data archive { type: file; title: "Export archive"; description: "Deleted after 7 days"; location: "/exports/:user_id.zip" } action fail_notice { type: message; title: "Send failure notice"; description: "Asks the user to try again"; channel: email } end not_built { type: failure; description: "Export not built in 48 h" } action send_link { type: message; title: "Send download link"; channel: email } handoff mail_link { title: "Download link"; description: "The user opens the email"; channel: email; timeout: 7 d; resume: /export/:token } view download { title: "Download your data" description: "Sign-in required; one archive, about 200 MB" route: /export/:token trace: [req:PRIV-02, test:e2e/export.spec.ts] unique_id: 83d5004848e ' AUTO GENERATED - DO NOT CHANGE } view link_expired { title: "Link expired"; description: "The archive was deleted"; route: /export/expired } end done { type: success; description: "Data downloaded" } from_privacy --> privacy privacy -right-> delete_account : [Delete account] privacy --> reauth : [Download my data] reauth --> queue : verified reauth .x.> privacy : wrong password queue -left-> requested queue --> export_ready export_ready -left-> archive { payload: [archive] } export_ready --> send_link : built export_ready -x-> fail_notice : timeout fail_notice -x-> not_built send_link --> mail_link { payload: [email, link] } mail_link ..> download : [Open link] valid mail_link ..> link_expired : [Open link] expired link_expired --> reauth : [Request a new export] download --> done : [Download] @endujn