mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 20:06:57 +02:00
feat(types): add User type and App.Locals
Define App.Locals.user interface for session user data. Add User type to shared types (mirrors DB columns minus passwordHash). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Fred Cabassut
co-authored by
Claude Opus 4.6
parent
9405acdb4d
commit
c13d7c0ea3
Vendored
+8
-1
@@ -3,7 +3,14 @@
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
interface Locals {
|
||||
user: {
|
||||
id: number;
|
||||
email: string;
|
||||
displayName: string;
|
||||
role: 'admin' | 'user';
|
||||
} | null;
|
||||
}
|
||||
// interface PageData {}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
|
||||
@@ -52,6 +52,16 @@ export interface Tag {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: number;
|
||||
email: string;
|
||||
displayName: string;
|
||||
role: 'admin' | 'user';
|
||||
authProvider: string;
|
||||
providerId: string | null;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
export interface SyncChange {
|
||||
noteId: string;
|
||||
operation: 'create' | 'update' | 'delete';
|
||||
|
||||
Reference in New Issue
Block a user