generated from cms/tibi-docs
backend & types
This commit is contained in:
22
types/content.d.ts
vendored
Normal file
22
types/content.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
interface Page {
|
||||
path: string
|
||||
active: boolean
|
||||
type: "page" | "teamMembers" | "jobOffers"
|
||||
pageTitle: string
|
||||
rows: Row[]
|
||||
id: string
|
||||
meta: {
|
||||
title: string
|
||||
description: string
|
||||
keywords: string
|
||||
}
|
||||
}
|
||||
|
||||
interface Row {
|
||||
columns: Column[]
|
||||
}
|
||||
|
||||
type Column =
|
||||
| { contentType: "image"; image: string; icons: { icon: string; link: string }[] }
|
||||
| { contentType: "moduleImport"; moduleImport: string }
|
||||
| { contentType: "text"; text: string }
|
||||
144
types/formComponent.d.ts
vendored
Normal file
144
types/formComponent.d.ts
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
interface FormValues {
|
||||
[key: string]: CustomHTMLElement
|
||||
blockGroups?: Set<number>
|
||||
}
|
||||
interface FormObj {
|
||||
formRows?: string[]
|
||||
index?: number
|
||||
formTitle?: string
|
||||
formValues?: Writable<FormValues>
|
||||
honey?: boolean
|
||||
agreement?: boolean
|
||||
}
|
||||
// Before transformation
|
||||
interface TempFormBefore {
|
||||
[rowName: string]: TempFormRowBefore
|
||||
}
|
||||
|
||||
interface TempFormRowBefore {
|
||||
[newKey: string]: [any, boolean, boolean]
|
||||
}
|
||||
|
||||
// After transformation
|
||||
interface TempFormAfter {
|
||||
[rowName: string]: Array<[string, [any, boolean, boolean]]>
|
||||
}
|
||||
|
||||
interface TempFormIndices {
|
||||
[rowName: string]: {
|
||||
[newKey: string]: number
|
||||
}
|
||||
}
|
||||
|
||||
type ValueEntry =
|
||||
| [string, [boolean | string | any, boolean]]
|
||||
| [string, [any, CustomHTMLElement, string | null, boolean]]
|
||||
|
||||
type ObjectEntry = [string, CustomHTMLElement]
|
||||
|
||||
interface DBFormObj {
|
||||
emailSubject: string
|
||||
emailReciever: string
|
||||
emailCC: string[]
|
||||
emailIntroduction: string
|
||||
rows: DBFormRow[]
|
||||
}
|
||||
interface DBFormRow {
|
||||
title: string
|
||||
emailTitle: string
|
||||
columns: FormColumn[]
|
||||
}
|
||||
|
||||
interface Block {
|
||||
label: string
|
||||
emailName: string
|
||||
}
|
||||
|
||||
interface LabelNumberInput {
|
||||
group: number
|
||||
title: string
|
||||
emailName: string
|
||||
block: Block[]
|
||||
}
|
||||
|
||||
type inputWidgets =
|
||||
| "labelNumber"
|
||||
| "times"
|
||||
| "select"
|
||||
| "defaultCalendar"
|
||||
| "customCalendar"
|
||||
| "number"
|
||||
| "checkboxGroup"
|
||||
| "test"
|
||||
| "multiSelect"
|
||||
|
||||
type StandardInputProperties = {
|
||||
emailTitle: string
|
||||
placeholder: string
|
||||
notRequired: boolean
|
||||
fieldOrder: number
|
||||
textTitle: string
|
||||
}
|
||||
|
||||
interface CheckboxGroupInput {
|
||||
groupTitle: string
|
||||
checkboxes: {
|
||||
standardInputProperties: StandardInputProperties[]
|
||||
}[]
|
||||
}
|
||||
|
||||
interface DateInput {
|
||||
standardInputProperties: StandardInputProperties
|
||||
}
|
||||
|
||||
interface DatePickerInput {
|
||||
standardInputProperties: StandardInputProperties
|
||||
props: {
|
||||
allowedDateRanges: {
|
||||
from: Date
|
||||
to: Date
|
||||
}
|
||||
excludeDates: string[]
|
||||
}
|
||||
}
|
||||
|
||||
interface MultiSelectInput {
|
||||
standardInputProperties: StandardInputProperties
|
||||
props: {
|
||||
additionalAddableValues: boolean
|
||||
}
|
||||
options: {
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
interface NumberInput {
|
||||
standardInputProperties: StandardInputProperties
|
||||
}
|
||||
|
||||
interface TextInput {
|
||||
standardInputProperties: StandardInputProperties
|
||||
textArea: boolean
|
||||
emailValidation: boolean
|
||||
telValidation: boolean
|
||||
}
|
||||
|
||||
interface TimesInput {
|
||||
standardInputProperties: StandardInputProperties
|
||||
times: {
|
||||
from: string
|
||||
to: string
|
||||
}[]
|
||||
}
|
||||
|
||||
interface FormColumn {
|
||||
inputWidgets: inputWidgets
|
||||
labelNumberInput?: LabelNumber
|
||||
checkboxGroupInput?: CheckboxGroupInput
|
||||
dateInput?: DateInputInput
|
||||
datePickerInput?: DatePickerInput
|
||||
multiSelectInput?: MultiSelectInput
|
||||
numberInput?: NumberInput
|
||||
timesInput?: TimesInput
|
||||
textInput?: TextInput
|
||||
}
|
||||
7
types/global.d.ts
vendored
7
types/global.d.ts
vendored
@@ -25,3 +25,10 @@ interface ApiResult<T> {
|
||||
data: T
|
||||
count: number
|
||||
}
|
||||
|
||||
interface MediaLibrary {
|
||||
file: FileField
|
||||
alt: string
|
||||
title: string
|
||||
id: string
|
||||
}
|
||||
|
||||
19
types/lighthouse.d.ts
vendored
Normal file
19
types/lighthouse.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
interface lighthouse {
|
||||
analyzedPaths: string[]
|
||||
performance: number
|
||||
accessibility: number
|
||||
bestPractices: number
|
||||
seo: number
|
||||
lighthouseMetrics: {
|
||||
FCPS: number
|
||||
FCPV: number
|
||||
FMPV: number
|
||||
FMPS: number
|
||||
SIS: number
|
||||
SIV: number
|
||||
TTIS: number
|
||||
TTIV: number
|
||||
FPIDS: number
|
||||
FPIDV: number
|
||||
}
|
||||
}
|
||||
0
types/modules.d.ts
vendored
Normal file
0
types/modules.d.ts
vendored
Normal file
9
types/navigation.d.ts
vendored
Normal file
9
types/navigation.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
interface Navigation {
|
||||
tree: number
|
||||
pages: NavElement[]
|
||||
}
|
||||
|
||||
interface NavElement {
|
||||
name: string
|
||||
page: string
|
||||
}
|
||||
Reference in New Issue
Block a user