bbuddy-ui/src/types/profile.ts

50 lines
1.3 KiB
TypeScript

import { UploadFile } from 'antd';
import {EducationDTO} from "./education";
import {ExpertsTags} from "./tags";
import {PracticeDTO} from "./practice";
import {ScheduleDTO} from "./schedule";
export type ProfileData = {
username?: string;
surname?: string;
fillProgress?: string;
faceImageUrl?: string;
role?: string;
login?: string;
hasPassword?: boolean;
hasExternalLogin?: boolean;
isTestMode?: boolean;
phone?: string;
languagesLinks?: { language: { id: number, code: string, nativeSpelling: string }, languageId: number }[];
allLanguages?: { id: number, code: string, nativeSpelling: string }[]
}
export type Profile = ProfileData & { id: number };
export type ProfileRequest = {
login?: string;
password?: string;
isPasswordKeepExisting?: boolean;
languagesLinks?: { languageId: number }[];
username?: string;
surname?: string;
faceImage?: UploadFile;
isFaceImageKeepExisting?: boolean;
phone?: string;
};
export type PayInfo = {
beneficiaryName?: string,
iban?: string,
bicOrSwift?: string
};
export interface ExpertData {
person?: ProfileData,
education?: EducationDTO,
tags?: ExpertsTags,
practice?: PracticeDTO,
schedule?: ScheduleDTO,
payData?: { person6Data?: PayInfo },
}