tibi-docs/types/content.d.ts

50 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-02-13 17:36:09 +01:00
interface Content {
2024-01-27 19:58:35 +01:00
path: string
active: boolean
2024-02-13 17:36:09 +01:00
type: "page"
2024-01-27 19:58:35 +01:00
pageTitle: string
rows: Row[]
id: string
meta: {
title: string
description: string
keywords: string
}
}
2024-03-11 18:14:31 +01:00
enum ContentWidth {
Full = 0,
Normal = 1,
Narrow = 2,
}
2024-01-27 19:58:35 +01:00
interface Row {
2024-02-13 17:36:09 +01:00
title: string
backgroundImage: string
2024-03-11 18:14:31 +01:00
contentWidth: ContentWidth
2024-01-27 19:58:35 +01:00
columns: Column[]
}
type Column =
2024-02-13 17:36:09 +01:00
| { contentType: "images"; images: string[] }
2024-01-27 19:58:35 +01:00
| { contentType: "moduleImport"; moduleImport: string }
2024-02-13 17:36:09 +01:00
| { contentType: "form"; moduleImport: string }
2024-01-27 19:58:35 +01:00
| { contentType: "text"; text: string }
2024-02-13 17:36:09 +01:00
| { contentType: "googleMaps" }
2024-03-11 18:14:31 +01:00
| {
contentType: "productSlider"
productSlider: {
productSource: "manual" | "category" | "bestseller" | "newProducts" | "offers"
productSKUs: string[]
category: string
}
}
2024-02-13 17:36:09 +01:00
2024-03-11 18:14:31 +01:00
interface SizeChart {
rows: Row[]
}
type Module =
| { type: "form"; form: DBFormObj; id: string }
| { type: "completeYourLook"; completeYourLook: CompleteYourLook }
| { type: "sizeChart"; sizeChart: SizeChart }