export type MemberStatus = 'Member' | 'Visitor' | 'Inactive' | 'Former'; export interface MemberListItemDto { id: number; firstName_en: string; lastName_en: string; nickName: string | null; firstName_zh: string | null; lastName_zh: string | null; status: MemberStatus; email: string | null; phoneCell: string | null; joinDate: string | null; linkedUserId: string | null; } export interface MemberDto extends MemberListItemDto { gender: string | null; dateOfBirth: string | null; baptismDate: string | null; baptismChurch: string | null; phoneHome: string | null; address: string | null; city: string | null; state: string | null; zipCode: string | null; country: string; photoBlobPath: string | null; languagePreference: string; notes: string | null; familyUnitId: number | null; createdAt: string; updatedAt: string; } export interface CreateMemberRequest { firstName_en: string; lastName_en: string; nickName: string | null; firstName_zh: string | null; lastName_zh: string | null; gender: string | null; dateOfBirth: string | null; baptismDate: string | null; baptismChurch: string | null; email: string | null; phoneCell: string | null; phoneHome: string | null; address: string | null; city: string | null; state: string | null; zipCode: string | null; country: string; status: string; languagePreference: string; joinDate: string | null; notes: string | null; familyUnitId: number | null; } export type UpdateMemberRequest = CreateMemberRequest; export interface PagedResult { items: T[]; totalCount: number; page: number; pageSize: number; totalPages: number; } export interface MemberQueryParams { page?: number; pageSize?: number; search?: string; status?: string; hasUser?: boolean; } /** Display name: NickName (if present) else FirstName_en, plus LastName_en */ export function memberDisplayName( m: Pick ): string { return `${m.nickName ?? m.firstName_en} ${m.lastName_en}`; }