-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstate-types.ts
More file actions
58 lines (54 loc) · 1.28 KB
/
state-types.ts
File metadata and controls
58 lines (54 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { SearchParams } from '../../common/types/search-api-types'
import { CSVDownloadType } from '../state'
import { SignonProfileData } from '../../backend/constants/types'
export type Field =
| 'url'
| 'title'
| 'locale'
| 'documentType'
| 'contentId'
| 'publishing_app'
| 'first_published_at'
| 'public_updated_at'
| 'publisher_updated_at'
| 'taxons'
| 'primary_organisation'
| 'all_organisations'
| 'page_views'
| 'withdrawn_at'
| 'withdrawn_explanation'
| 'occurrences'
export enum SortAction {
DESC = 'desc',
ASC = 'asc',
NONE = '',
}
export type Sorting = Partial<
Record<Field, { sortIndex: number; sort: SortAction }>
>
export interface State {
searchParams: SearchParams
taxons: string[]
organisations: string[]
locales: string[]
systemErrorText: any
userErrors: string[]
searchResults: any[] | null
metaSearchResults: any[] | null
skip: number
pagination: {
currentPage: number
resultsPerPage: number
}
waiting: boolean
disamboxExpanded: boolean
stagedShowFields: any
showFields: any
showFiltersPane: boolean
showFieldSet: boolean
documentTypes: string[]
sorting: Partial<Record<Field, SortAction>>
CSVDownloadType: CSVDownloadType
phoneNumberError: boolean | null
signonProfileData?: SignonProfileData
}