mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Update admin/website search. Update param names.
This commit is contained in:
parent
0fc8828f8b
commit
4e2bfd7485
17 changed files with 90 additions and 77 deletions
|
|
@ -24,31 +24,7 @@ export type DynamicDataType = ObjectValues<typeof DATA_TYPE>;
|
|||
export type KafkaTopic = ObjectValues<typeof KAFKA_TOPIC>;
|
||||
export type ReportType = ObjectValues<typeof REPORT_TYPES>;
|
||||
|
||||
export interface WebsiteSearchFilter extends SearchFilter {
|
||||
userId?: string;
|
||||
teamId?: string;
|
||||
includeTeams?: boolean;
|
||||
onlyTeams?: boolean;
|
||||
}
|
||||
|
||||
export interface UserSearchFilter extends SearchFilter {
|
||||
teamId?: string;
|
||||
}
|
||||
|
||||
export interface TeamSearchFilter extends SearchFilter {
|
||||
userId?: string;
|
||||
}
|
||||
|
||||
export interface TeamUserSearchFilter extends SearchFilter {
|
||||
teamId?: string;
|
||||
}
|
||||
|
||||
export interface ReportSearchFilter extends SearchFilter {
|
||||
userId?: string;
|
||||
websiteId?: string;
|
||||
}
|
||||
|
||||
export interface SearchFilter {
|
||||
export interface PageParams {
|
||||
query?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
|
|
@ -56,7 +32,7 @@ export interface SearchFilter {
|
|||
sortDescending?: boolean;
|
||||
}
|
||||
|
||||
export interface FilterResult<T> {
|
||||
export interface PageResult<T> {
|
||||
data: T;
|
||||
count: number;
|
||||
page: number;
|
||||
|
|
@ -66,10 +42,10 @@ export interface FilterResult<T> {
|
|||
}
|
||||
|
||||
export interface FilterQueryResult<T> {
|
||||
result: FilterResult<T>;
|
||||
result: PageResult<T>;
|
||||
query: any;
|
||||
params: SearchFilter;
|
||||
setParams: Dispatch<SetStateAction<T | SearchFilter>>;
|
||||
params: PageParams;
|
||||
setParams: Dispatch<SetStateAction<T | PageParams>>;
|
||||
}
|
||||
|
||||
export interface DynamicData {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue