106 lines
2.8 KiB
TypeScript
106 lines
2.8 KiB
TypeScript
import { requestClient } from '#/api/request';
|
|
|
|
export interface CountryDashboardMetric {
|
|
countryCode: string;
|
|
countryName: string;
|
|
countryNewUser: number;
|
|
d1RetentionBaseUser: number;
|
|
d1RetentionRate: number | string;
|
|
d1RetentionUser: number;
|
|
d7RetentionBaseUser: number;
|
|
d7RetentionRate: number | string;
|
|
d7RetentionUser: number;
|
|
d30RetentionBaseUser: number;
|
|
d30RetentionRate: number | string;
|
|
d30RetentionUser: number;
|
|
dailyActiveUser: number;
|
|
dealerRecharge: number | string;
|
|
googleRecharge: number | string;
|
|
gamePayoutRate: number | string;
|
|
gamePayout: number | string;
|
|
gameProfit: number | string;
|
|
gameProfitRate: number | string;
|
|
gameTotalFlow: number | string;
|
|
gameUser: number;
|
|
giftConsume: number | string;
|
|
luckyGiftAnchorShare: number | string;
|
|
luckyGiftPayout: number | string;
|
|
luckyGiftPayoutRate: number | string;
|
|
luckyGiftProfit: number | string;
|
|
luckyGiftProfitRate: number | string;
|
|
luckyGiftTotalFlow: number | string;
|
|
luckyGiftUser: number;
|
|
luckyGiftUserRate: number | string;
|
|
mifapayRecharge: number | string;
|
|
newUserRecharge: number | string;
|
|
officialRecharge: number | string;
|
|
periodKey: string;
|
|
periodName: string;
|
|
salaryExchange: number | string;
|
|
totalRecharge: number | string;
|
|
}
|
|
|
|
export interface CountryDashboardResult {
|
|
computedAt: string;
|
|
endDate?: string;
|
|
periodType: string;
|
|
records: CountryDashboardMetric[];
|
|
startDate?: string;
|
|
total: CountryDashboardMetric;
|
|
}
|
|
|
|
export interface CountryDashboardRechargeDetail {
|
|
amount: number | string;
|
|
coinQuantity: number | string;
|
|
countryCode: string;
|
|
countryName: string;
|
|
createTime: string;
|
|
recordId: string;
|
|
remark: string;
|
|
sourceChannel: string;
|
|
sourceType: string;
|
|
userAccount: string;
|
|
userId: number | string;
|
|
userNickname: string;
|
|
}
|
|
|
|
export async function countryDashboard(params: Record<string, any> = {}) {
|
|
return requestClient.get<CountryDashboardResult>('/datav/country-dashboard', {
|
|
params,
|
|
});
|
|
}
|
|
|
|
export async function countryDashboardRechargeDetails(
|
|
params: Record<string, any> = {},
|
|
) {
|
|
return requestClient.get<{
|
|
current: number;
|
|
records: CountryDashboardRechargeDetail[];
|
|
size: number;
|
|
total: number;
|
|
}>('/datav/country-dashboard/recharge-details', {
|
|
params,
|
|
});
|
|
}
|
|
|
|
export async function latestActiveUserCountryCode(params: Record<string, any> = {}) {
|
|
return requestClient.get<Array<Record<string, any>>>(
|
|
'/datav/active/user-country-code',
|
|
{
|
|
params,
|
|
},
|
|
);
|
|
}
|
|
|
|
export async function onlineUserCount(params: Record<string, any> = {}) {
|
|
return requestClient.get<number>('/datav/online/user/count', {
|
|
params,
|
|
});
|
|
}
|
|
|
|
export async function onlineRoomCount(params: Record<string, any> = {}) {
|
|
return requestClient.get<number>('/datav/online/room/count', {
|
|
params,
|
|
});
|
|
}
|