Add admin-emailed one-time intake links
- intake_tokens table (server-only via service role) - Server functions: createIntakeToken (admin), getIntakeToken (public validate), submitIntake (public write + mark used, 14-day one-time tokens) - Public /intake/$token full intake form (no login) with valid/used/expired states - Student profile (admin): generate link, copy, and email-to-parent (mailto) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -439,6 +439,44 @@ export type Database = {
|
||||
},
|
||||
]
|
||||
}
|
||||
intake_tokens: {
|
||||
Row: {
|
||||
created_at: string
|
||||
created_by: string | null
|
||||
expires_at: string
|
||||
id: string
|
||||
student_id: string
|
||||
token: string
|
||||
used_at: string | null
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
created_by?: string | null
|
||||
expires_at: string
|
||||
id?: string
|
||||
student_id: string
|
||||
token: string
|
||||
used_at?: string | null
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
created_by?: string | null
|
||||
expires_at?: string
|
||||
id?: string
|
||||
student_id?: string
|
||||
token?: string
|
||||
used_at?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "intake_tokens_student_id_fkey"
|
||||
columns: ["student_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "students"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
ledger_entries: {
|
||||
Row: {
|
||||
amount_cents: number
|
||||
|
||||
Reference in New Issue
Block a user