pub async fn purge_did_data(pool: &SqlitePool, did: &str) -> Result<PurgeCounts>Expand description
Delete all local rows owned by did in a single transaction: the
per-DID read/star state (entry_state), per-feed read cursors
(read_cursor), the subscription projection (sub_ref), the closed-beta
seat (beta_access), and any invite codes this DID created
(invite_codes). The shared feeds/entries cache is intentionally left
intact — it is deduped and not owned by any single DID.
This is the local half of “delete my data”: the caller pairs it with a
sidecar POST /internal/revoke so the OAuth tokens + sidecar session rows
are dropped too. Idempotent — deleting a DID with no rows returns all-zero
counts.