interface IGetVisibleBoostPromotionResponse {
total: number;
list: IBoostPromotionDetail[];
refresh: IBoostRefreshInfo;
}
export interface IBoostPromotionDetail {
...
isPossibleBoostUp: boolean;
hasBoostUp: boolean;
boostUp?: IBoostUpTotalResponse; // hasBoostUp == true인 경우만 존재
}
export interface IBoostUpTotalResponse {
totalBoostUpCount: number;
totalCashbackAmount: number;
totalDiscountRate: number;
highestResult: IBoostUpHighestResult;
}
export interface IBoostUpHighestResult {
result: BoostUpResultType;
level: number;
}
풀어 쓰면, 아래와 같다
{
total: number;
list: [
{
...
isPossibleBoostUp: boolean;
hasBoostUp: boolean;
boostUp: {
totalBoostUpCount: number; // 유저가 해당 캠페인 강화를 총 몇번 했는지
totalCashbackAmount: number; // 유저가 강화를 통해 '추가로' 얻은 총 할인 금액
totalDiscountRate: number; // 유저가 강화를 통해 '추가로' 얻은 총 할인률
benefitDescription:string;
highestResult: { // 유저의 강화 시도들 중 가장 높은 결과
result: BoostUpResultType;
level: number;
}
}
},
...
]
refresh: IBoostRefreshInfo;
}
TypeScript
복사