mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
- add new AdminUser interface and use it in AdminUserResponse & AdminUsersResponse - reorder alphabeticallypull/5910/head
2 changed files with 27 additions and 37 deletions
@ -1,45 +1,35 @@ |
|||||
import { Provider, Role } from '@prisma/client'; |
import { Provider, Role, Subscription, Tag } from '@prisma/client'; |
||||
|
|
||||
export interface AdminUsersResponse { |
|
||||
count: number; |
|
||||
users: { |
|
||||
accountCount: number; |
|
||||
activityCount: number; |
|
||||
country: string; |
|
||||
createdAt: Date; |
|
||||
dailyApiRequests: number; |
|
||||
engagement: number; |
|
||||
id: string; |
|
||||
lastActivity: Date; |
|
||||
role: Role; |
|
||||
}[]; |
|
||||
} |
|
||||
|
|
||||
export interface AdminUserResponse { |
|
||||
id: string; |
|
||||
role: Role; |
|
||||
provider: Provider; |
|
||||
createdAt: Date; |
|
||||
updatedAt: Date; |
|
||||
|
|
||||
|
interface AdminUser { |
||||
accountCount: number; |
accountCount: number; |
||||
activityCount: number; |
activityCount: number; |
||||
watchlistCount: number; |
|
||||
|
|
||||
analytics?: { |
analytics?: { |
||||
country?: string | null; |
country?: string | null; |
||||
dailyApiRequests: number; |
dailyApiRequests: number; |
||||
lastActivity?: Date | null; |
lastActivity?: Date | null; |
||||
}; |
}; |
||||
|
|
||||
subscriptions: { |
|
||||
id: string; |
|
||||
expiresAt: Date; |
|
||||
createdAt: Date; |
createdAt: Date; |
||||
}[]; |
|
||||
|
|
||||
tags: { |
|
||||
id: string; |
id: string; |
||||
name: string; |
provider: Provider; |
||||
}[]; |
role: Role; |
||||
|
updatedAt: Date; |
||||
|
watchlistCount: number; |
||||
|
} |
||||
|
|
||||
|
export interface AdminUserResponse extends AdminUser { |
||||
|
subscriptions: Subscription[]; |
||||
|
tags: Tag[]; |
||||
|
} |
||||
|
|
||||
|
export interface AdminUsersResponse { |
||||
|
count: number; |
||||
|
users: (Pick< |
||||
|
AdminUser, |
||||
|
'accountCount' | 'activityCount' | 'createdAt' | 'id' | 'role' |
||||
|
> & { |
||||
|
country: string; |
||||
|
dailyApiRequests: number; |
||||
|
engagement: number; |
||||
|
lastActivity: Date; |
||||
|
})[]; |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue