41 lines
863 B
TypeScript
41 lines
863 B
TypeScript
/**
|
|
* Users domain. Pure types: no framework, no infrastructure.
|
|
*/
|
|
|
|
export interface Profile {
|
|
userId: string;
|
|
displayName: string | null;
|
|
phone: string | null;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
}
|
|
|
|
/** Fields a profile update may set. Undefined = leave unchanged. */
|
|
export interface ProfilePatch {
|
|
displayName?: string | null;
|
|
phone?: string | null;
|
|
}
|
|
|
|
/** Joined identity_users + users_profiles row for admin customer listing. */
|
|
export interface CustomerSummary {
|
|
userId: string;
|
|
email: string;
|
|
role: string;
|
|
displayName: string | null;
|
|
phone: string | null;
|
|
createdAt: Date;
|
|
}
|
|
|
|
/** Paginated customer list result. */
|
|
export interface CustomerListResult {
|
|
items: CustomerSummary[];
|
|
total: number;
|
|
}
|
|
|
|
/** Filters for customer listing. */
|
|
export interface CustomerListOptions {
|
|
q?: string;
|
|
offset: number;
|
|
limit: number;
|
|
}
|