[www] add delete account request

This commit is contained in:
Devin Zuczek
2026-10-28 00:12:41 -04:00
parent cc14c208b2
commit 633695b657
7 changed files with 189 additions and 0 deletions
+4
View File
@@ -219,6 +219,10 @@ function toSelfAccountDto(account: Account) {
// everyone can be old.
birthday: '1904-01-01T00:00:00.000Z',
availableUsernameChanges: account.availableUsernameChanges ?? DEFAULT_USERNAME_CHANGES,
// The website's "delete account" mark, so its account page can show it. Always a
// boolean (the game client drops unknown members and reads nothing here).
isDeleted: account.isDeleted === true,
...(account.isDeleted === true && account.deletedAt ? { deletedAt: account.deletedAt } : {}),
}
}
+6
View File
@@ -98,6 +98,12 @@ export const SelfAccountDto = AccountDto.extend({
),
birthday: z.iso.datetime().describe('A fixed placeholder — birthdays are not stored'),
availableUsernameChanges: z.int().describe('Remaining username changes'),
isDeleted: z
.boolean()
.describe(
'Whether the player asked the website to delete this account (a mark, not a deletion)'
),
deletedAt: z.iso.datetime().optional().describe('When they asked; present only when isDeleted'),
})
/** Player bio, from `GET /account/:id/bio`. */