diff --git a/frontend/packages/console-shared/src/index.ts b/frontend/packages/console-shared/src/index.ts index 6f48a9cc404..509164cd7c4 100644 --- a/frontend/packages/console-shared/src/index.ts +++ b/frontend/packages/console-shared/src/index.ts @@ -1,2 +1,3 @@ export * from './selectors'; export * from './constants'; +export * from './types'; diff --git a/frontend/packages/console-shared/src/types/filter.ts b/frontend/packages/console-shared/src/types/filter.ts new file mode 100644 index 00000000000..afc2c321d7c --- /dev/null +++ b/frontend/packages/console-shared/src/types/filter.ts @@ -0,0 +1,15 @@ +import { TableFilter } from '@console/internal/components/factory/table-filters'; +import { K8sResourceKind } from '@console/internal/module/k8s'; + +export type FilterItem = { + id: string; + title: string; +}; + +export type Filter = { + type: string; + selected: string[]; + reducer(obj: K8sResourceKind): string; + items: FilterItem[]; + filter: TableFilter; +}; diff --git a/frontend/packages/console-shared/src/types/index.ts b/frontend/packages/console-shared/src/types/index.ts new file mode 100644 index 00000000000..009bf076365 --- /dev/null +++ b/frontend/packages/console-shared/src/types/index.ts @@ -0,0 +1 @@ +export * from './filter';