@bit-ui-libs/common
Version:
This library was generated with [Nx](https://nx.dev).
80 lines (73 loc) • 1.73 kB
text/typescript
import { BeingId, EndUserOrganizationResponse } from '../interfaces';
import { BaseAddress } from './address';
export interface UserRole {
userId: string;
roleId: number;
appName: string;
orgId: string;
friendlyName: string;
}
export interface User {
firstName: string;
lastName: string;
id: string;
dateOfBirth?: string;
address: {
// Old structure
// addressLine: string;
// country: string;
// city: string;
// state: string;
// zipCode: string;
addressLine1: string;
addressLine2: string;
city: string;
country: string;
state: string;
zip: string;
};
organization?: string;
email: string;
phone: string;
avatar?: string;
avatarUrl?: string;
emailVerified: boolean;
createdAt: string;
updatedAt: string;
blocked: boolean;
flagged?: boolean;
roles?: UserRole[];
beingId?: BeingId;
organizations?: EndUserOrganizationResponse[];
isPublic?: boolean;
}
export type EndUserAddress = Omit<BaseAddress, 'id'>;
export interface EndUser {
id: string;
orgId?: string | null;
email?: string;
emailVerified?: boolean;
phone?: string;
firstName?: string;
lastName?: string;
middleName?: string;
username: string;
avatarUrl?: string;
jobTitle?: string;
phoneVerified?: boolean;
mainProfileCompleted?: boolean;
// Warning: this property has been removed in Vlad's rewrite
address?: EndUserAddress | null;
dateOfBirth?: string;
blocked?: boolean;
blockedUntil?: string | null;
blockedReason?: string | null;
createdAt?: string;
updatedAt?: string | null;
beingId?: {
history?: { level?: number; timestamp?: string }[];
level?: number;
userId?: string;
updatedAt?: string;
};
}