feat: sync account deletion lifecycle

Sync telesrv 73f5c91 (feat(account): implement unified account deletion lifecycle).

Skipped telesrv docs changes per public sync rules.
This commit is contained in:
A 2026-07-19 20:35:58 +08:00
parent 96a419b565
commit edb7057757
32 changed files with 3236 additions and 88 deletions

View file

@ -10,6 +10,7 @@ import (
const (
PhoneCodePurposeChangePhone = "change_phone"
PhoneCodePurposeConfirmPhone = "confirm_phone"
PhoneCodeChannelPhone = "phone"
PhoneCodeChannelSMS = "sms"
PhoneCodeChannelEmailLogin = "email_login"
@ -75,6 +76,10 @@ type PhoneCode struct {
VerifiedEmail bool
RequireSignUp bool
LoginEmailHash string
// AccountDeletionHash is the hex-encoded SHA-256 digest of the validated
// confirmphone link token. It binds account.confirmPhone to one pending
// deletion without persisting the raw link credential in the code record.
AccountDeletionHash string
}
type PhoneCodeSnapshot struct {