general setup

This commit is contained in:
2024-03-11 17:14:31 +00:00
parent 5af89ab258
commit b82ab35bbe
342 changed files with 3672 additions and 10809 deletions

40
types/TibiCommerceRelated.d.ts vendored Normal file
View File

@@ -0,0 +1,40 @@
interface LocalProduct {
id: string
bigCommerceSKU: string
previewImage: FileField
isBestseller: boolean
isFeatured: boolean
isOnSale: boolean
isNew: boolean
}
interface CompleteYourLook {
id: string
products: {
productImage: string
productReference: string
imageWidth: number
imageHeight: number
imageTop: number
imageLeft: number
}
}
interface ProductRating {
id: string
bigCommerceOrderId: string
bigCommerceProductRatingId: string
productId: string
author: string
rating: {
length: number
fit: number
quality: number
priceQualityRatio: number
comfort: number
overall: number
}
comment: string
review_date: Date
status: "pending" | "approved" | "rejected"
}

23
types/content.d.ts vendored
View File

@@ -12,9 +12,16 @@ interface Content {
}
}
enum ContentWidth {
Full = 0,
Normal = 1,
Narrow = 2,
}
interface Row {
title: string
backgroundImage: string
contentWidth: ContentWidth
columns: Column[]
}
@@ -24,5 +31,19 @@ type Column =
| { contentType: "form"; moduleImport: string }
| { contentType: "text"; text: string }
| { contentType: "googleMaps" }
| {
contentType: "productSlider"
productSlider: {
productSource: "manual" | "category" | "bestseller" | "newProducts" | "offers"
productSKUs: string[]
category: string
}
}
type Module = { type: "form"; form: DBFormObj; id: string } | { type: ""; id: string }
interface SizeChart {
rows: Row[]
}
type Module =
| { type: "form"; form: DBFormObj; id: string }
| { type: "completeYourLook"; completeYourLook: CompleteYourLook }
| { type: "sizeChart"; sizeChart: SizeChart }

View File

@@ -1,12 +1,17 @@
enum NavigationType {
MainNavigation = 0,
ServiceNavigation = 1,
}
interface Navigation {
tree: number
type: NavigationType
elements: NavElement[]
}
interface NavElement {
endpoint: boolean
name: string
image: FileField
image?: string
page?: string
elements?: NavElement[]
}