Files
core/hwe/ts/defs/API/Betting.ts
T
Hide_D 315dcf80c9 refac: APICall에 타입 지정
- 비 undefined 타입에서 ?타입 호출 제거
- API 소속 type들을 defs/API/ 로 이동
- 모든 SammoAPI, SammoRootAPI 지정
2022-04-03 18:16:53 +09:00

39 lines
839 B
TypeScript

import type { ValidResponse } from "@/defs";
export type BettingListResponse = ValidResponse & {
bettingList: Record<number, Omit<BettingInfo & { totalAmount: number }, "candidates">>;
year: number;
month: number;
};
export type BettingDetailResponse = ValidResponse & {
bettingInfo: BettingInfo;
bettingDetail: [string, number][];
myBetting: [string, number][];
remainPoint: number;
year: number;
month: number;
};
export type BettingInfo = {
id: number;
type: 'nationBetting',
name: string;
finished: boolean;
selectCnt: number;
isExclusive?: boolean;
reqInheritancePoint: boolean;
openYearMonth: number;
closeYearMonth: number;
candidates: SelectItem[];
winner?: number[];
}
export type SelectItem = {
title: string;
info?: string;
isHtml?: boolean;
aux?: Record<string, unknown>;
}