-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (43 loc) · 1.48 KB
/
Copy pathtypes.ts
File metadata and controls
55 lines (43 loc) · 1.48 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
import config from "@/sanity.config"
import type { DocumentValues, InferSchemaValues } from "@sanity-typed/types"
export type SanitySlug = {
current: string
_type: "slug"
}
/**
* Inneholder alle typer tilknyttet sanity
*/
export type SanityValues = InferSchemaValues<typeof config>
/**
* Inneholder alle schemas som er definert i sanity/schemas, som en union type.
*/
export type SanityDocuments = DocumentValues<SanityValues>
/**
* Et bildeobjekt som innholder data knyttet til et bilde. Samt alt tekst.
*/
export type SanityImageObject = SanityValues["event"]["hero_image"]
/**
* Inneholder data knyttet til en Event, som bedriftspresentasjon, workshop, sosialt arrangement eller lignende.
*/
export type RootEvent = SanityValues["event"] & {
// Må spesifiseres fordi den originale typen inneholder bare referansen til et bildegalleri, ikke selve galleriet.
gallery?: { slug: SanitySlug }
}
/**
* Type som beskriver hvilken type event det er.
*/
export type EventType = SanityValues["event"]["type"]
/**
* Inneholder data knyttet til et bildegalleri
*/
export type ImageGallery = SanityValues["image_gallery"] & {
event?: { slug: SanitySlug }
}
/**
* Inneholder data knyttet til en stillingsannonse.
*/
export type JobAdvert = SanityValues["job_advert"]
//export type Styre = SanityValues["styrer"]
//export type StyreMedlem = SanityValues["styremedlem"]
//export type StyreRoller = SanityValues["styre_roller"]
export type InfoSide = SanityValues["info_sider"]