/
contentfulTypes.ts
88 lines (77 loc) · 2.04 KB
/
contentfulTypes.ts
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
import { Sys, RichTextContent, Asset } from 'contentful'
// Might be using types incorrectly because you might not have to make fields/sys manually
// Need to investigate further. Some types missing sys/fields because of the type they are
// designated as in the contentful service
export interface Course {
courseImage: Asset
previewImage: Asset;
courseTitle: string
shortName?: string
courseDescription: RichTextContent
previewDescription: RichTextContent;
lessons: LessonLink[]
flowchartImg: Asset
idx: number;
isActive: boolean;
}
export interface CourseOrdered extends Course {
id: string
}
export interface CourseExt {
fields: Course
sys: Sys
}
export interface CourseOrder {
courses: CourseExt[]
}
export interface LessonLink {
sys: Sys
fields: {
lessonTitle: string
lessonDescription: RichTextContent
lessonPreviewImg: Asset
lesson: Lesson
}
}
export interface Lesson {
sys: Sys
fields: {
titleText: string
titleURLNormalized:string
titleGraphic: Asset
introduction: RichTextContent
introductionInfographic: Asset
introVideo: string
introVideoCaption: RichTextContent
goalsListField: string[]
whatDoINeedToKnow: RichTextContent
whatDoINeedToKnowInfographic: Asset
wdintkText2?: RichTextContent
wdintkImg2?: Asset
whereDoIStart: string[]
whereDoIStartMedia: Asset[]
tipsTricksTitle: string
dos: RichTextContent
donts: RichTextContent
summary: RichTextContent
sources: RichTextContent
pageSettings?: {
whatDoINeedToKnowAlt: boolean
}
}
}
export const defaultPageSettings: Lesson['fields']['pageSettings'] = {
whatDoINeedToKnowAlt: false
}
export interface ProfileList {
people: Profile[]
}
export interface Profile {
sys: Sys
fields: {
nameOfPerson: string
pictureOfPerson: Asset
positionTitle: string
linkedInUrl:string
}
}