import { DATA_URL, PROCEDURES, ProfileTypes, } from 'config' import { callApi } from 'helpers' const proc = PROCEDURES.get_user_favorites type ObjectWithName = { id: number, name_eng: string, name_rus: string, } export type Info = { country?: ObjectWithName, date?: string, firstname_eng?: string, firstname_rus?: string, lastname_eng?: string, lastname_rus?: string, name_eng?: string, name_rus?: string, nickname_eng?: string, nickname_rus?: string, short_name_eng?: string, short_name_rus?: string, /** информация о супертурнире, если турнир входит в супертурнир */ super_tournament?: ObjectWithName, team?: ObjectWithName, team1?: ObjectWithName, team2?: ObjectWithName, } export type UserFavorite = { id: number, info: Info, sport: number, type: ProfileTypes, } export type UserFavorites = Array export const getUserFavorites = (): Promise => { const config = { body: { params: {}, proc, }, } return callApi({ config, url: DATA_URL, }) }