-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfig.ts
More file actions
194 lines (172 loc) · 3.91 KB
/
Copy pathconfig.ts
File metadata and controls
194 lines (172 loc) · 3.91 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import type { BuiltInFilterKey } from '@datagouv/components-next'
import type { DsfrFooterProps } from '@gouvminint/vue-dsfr'
export const CUSTOM_FILTER_TYPES = ['select', 'organization_custom'] as const
export type CustomFilterType = (typeof CUSTOM_FILTER_TYPES)[number]
export interface TopicsConf {
can_add_topics: {
everyone: boolean
authorized_users: string[]
}
}
export interface TopicItemConf {
id: string
name: string
}
export interface StaticPageConfig {
title: string
id: string
route: string
url: string
meta?: {
title?: string
description?: string
}
}
export interface MenuConfig {
text: string
to: string
}
export interface PageFilterValueConf {
id: string
name: string
parent?: string
}
export interface PageFilterFormConf {
required: boolean
}
export interface PageFilterConf {
name: string
id: string
type: CustomFilterType | BuiltInFilterKey
advanced?: boolean
// Page keys this filter applies to in multi-type search. Defaults to the owning page only.
applies_to_pages?: string[]
child: string | null
color: string | null
default_option: string | null
default_value: string | boolean | null
use_filter_prefix: boolean | null
api_param: string | null
form: PageFilterFormConf | null
values: PageFilterValueConf[]
}
export type PageUniverseQueryConf = {
[key: string]: string | number | boolean
}
export type PageBannerConf = {
title: string
content: string
}
export type PageSearchConf = {
input: string
placeholder?: string | null
}
export type PageLabelsConf = {
singular: string
plural: string
extended: string
feminine?: boolean
}
export type PageObjectType = 'datasets' | 'dataservices' | 'topics'
export type PageConf = {
object_type: PageObjectType
list_all: boolean
filter_prefix: string | null
universe_query: PageUniverseQueryConf | null
title: string
breadcrumb_title: string | null
icon?: string
labels: PageLabelsConf
search: PageSearchConf
banner: PageBannerConf | null
default_sort: string | null
resources_tabs: {
discussions: {
display: boolean
create: boolean
}
datasets: {
display: boolean
}
reuses: {
display: boolean
}
}
editable: boolean
meta?: {
title?: string
description?: string
}
filters: PageFilterConf[]
}
export type PagesConf = {
[key: string]: PageConf
}
export type DatasetsConf = {
add_to_topic: {
page: string
} | null
harvest_backends_quality_warning: string[]
show_extended_information_panel: boolean
}
interface Logo {
src?: string
width?: string
height?: string
}
export type HeaderConf = {
admin_shortcut: boolean
logo?: Logo
title_image?: Logo
description?: string
beta: boolean
search: {
display: boolean
placeholder?: string
}
}
export type FooterConf = {
logo?: Logo
phrase?: string
external_links?: DsfrFooterProps['ecosystemLinks']
mandatory_links?: DsfrFooterProps['mandatoryLinks']
}
export type WebsiteConfig = {
title: string
rf_title: string
seo?: {
canonical_url?: string
meta?: {
keywords?: string
description?: string
robots?: string
}
}
header: HeaderConf
footer: FooterConf
}
// https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/
export type SentryConfig = {
dsn: string // Mandatory to send errors to Sentry
domain_url?: string // Mandatory to send sourcemaps to Sentry. This is not used in sentry options, it is only used in vite.config.mts to send sourcemaps to the correct domain.
environment?: string
tracePropagationTargets?: RegExp[]
tracesSampleRate?: number
replaysSessionSampleRate?: number
replaysOnErrorSampleRate?: number
}
export type OrganizationsConfig = {
datasets?: string
dataservices?: string
bouquets?: string
page?: {
breadcrumb_title?: string
labels?: {
singular?: string
}
meta?: {
title?: string
description?: string
}
}
}